@platforma-sdk/model 1.91.0 → 1.92.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.
Files changed (39) hide show
  1. package/dist/components/PlDatasetSelector/build_dataset_options.cjs +43 -33
  2. package/dist/components/PlDatasetSelector/build_dataset_options.cjs.map +1 -1
  3. package/dist/components/PlDatasetSelector/build_dataset_options.d.ts +6 -2
  4. package/dist/components/PlDatasetSelector/build_dataset_options.d.ts.map +1 -1
  5. package/dist/components/PlDatasetSelector/build_dataset_options.js +46 -36
  6. package/dist/components/PlDatasetSelector/build_dataset_options.js.map +1 -1
  7. package/dist/components/PlDatasetSelector/dataset_selection.cjs.map +1 -1
  8. package/dist/components/PlDatasetSelector/dataset_selection.d.ts +13 -4
  9. package/dist/components/PlDatasetSelector/dataset_selection.d.ts.map +1 -1
  10. package/dist/components/PlDatasetSelector/dataset_selection.js.map +1 -1
  11. package/dist/components/PlDatasetSelector/enrichment_discovery.cjs +20 -26
  12. package/dist/components/PlDatasetSelector/enrichment_discovery.cjs.map +1 -1
  13. package/dist/components/PlDatasetSelector/enrichment_discovery.js +22 -28
  14. package/dist/components/PlDatasetSelector/enrichment_discovery.js.map +1 -1
  15. package/dist/components/PlDatasetSelector/filter_discovery.cjs +6 -14
  16. package/dist/components/PlDatasetSelector/filter_discovery.cjs.map +1 -1
  17. package/dist/components/PlDatasetSelector/filter_discovery.d.ts +5 -10
  18. package/dist/components/PlDatasetSelector/filter_discovery.d.ts.map +1 -1
  19. package/dist/components/PlDatasetSelector/filter_discovery.js +8 -13
  20. package/dist/components/PlDatasetSelector/filter_discovery.js.map +1 -1
  21. package/dist/components/PlDatasetSelector/index.cjs +0 -1
  22. package/dist/components/PlDatasetSelector/index.d.ts +3 -3
  23. package/dist/components/PlDatasetSelector/index.js +2 -2
  24. package/dist/components/index.cjs +0 -1
  25. package/dist/components/index.d.ts +3 -3
  26. package/dist/components/index.js +2 -2
  27. package/dist/index.cjs +0 -1
  28. package/dist/index.d.ts +3 -3
  29. package/dist/index.js +2 -2
  30. package/dist/package.cjs +1 -1
  31. package/dist/package.js +1 -1
  32. package/package.json +7 -7
  33. package/src/columns/__test_helpers__/collection_driver.ts +45 -5
  34. package/src/components/PlDatasetSelector/build_dataset_options.test.ts +195 -0
  35. package/src/components/PlDatasetSelector/build_dataset_options.ts +86 -63
  36. package/src/components/PlDatasetSelector/dataset_selection.ts +14 -4
  37. package/src/components/PlDatasetSelector/enrichment_discovery.ts +26 -35
  38. package/src/components/PlDatasetSelector/filter_discovery.test.ts +16 -53
  39. package/src/components/PlDatasetSelector/filter_discovery.ts +10 -20
@@ -1 +1 @@
1
- {"version":3,"file":"enrichment_discovery.js","names":[],"sources":["../../../src/components/PlDatasetSelector/enrichment_discovery.ts"],"sourcesContent":["import {\n Annotation,\n createEnrichmentRef,\n extractPObjectId,\n isGlobalPObjectId,\n} from \"@milaboratories/pl-model-common\";\nimport type {\n ColumnsCollectionDriverModel,\n EnrichmentStep,\n LabeledEnrichmentRef,\n LabeledEnrichmentRefs,\n MultiColumnSelector,\n PColumnSpec,\n PObjectSpec,\n} from \"@milaboratories/pl-model-common\";\nimport type { ColumnRecipe, ColumnsSource } from \"../../columns\";\nimport {\n hasSingleDataColumn,\n ColumnsCollection,\n collectLinkerIds,\n hitQualifications,\n collectLinkerColumns,\n queriesQualifications,\n} from \"../../columns\";\nimport {\n deriveDistinctLabels,\n type DeriveLabelsOptions,\n type Entry,\n} from \"../../labels/derive_distinct_labels\";\n\nexport interface FindEnrichmentColumnsOptions {\n sources: ReadonlyArray<ColumnsSource>;\n anchorSpec: PColumnSpec;\n maxHops?: number;\n include?: MultiColumnSelector | MultiColumnSelector[];\n predicate?: (spec: PObjectSpec) => boolean;\n /** Override the resolved `columnsCollection` service (primarily for tests). */\n driver?: ColumnsCollectionDriverModel;\n}\n\n/**\n * Linker-reached hits attached to the anchor primary. Drops zero-hop variants\n * (filters / the primary itself) and structural hits (subset, linker, label\n * columns). Narrow further with `include` selectors or a `predicate`.\n */\nexport function findEnrichmentColumns(options: FindEnrichmentColumnsOptions): ColumnRecipe[] {\n const include =\n options.include === undefined\n ? undefined\n : Array.isArray(options.include)\n ? options.include\n : [options.include];\n\n const columns = ColumnsCollection([...options.sources], { driver: options.driver })\n .discover({\n anchors: { main: options.anchorSpec },\n mode: \"enrichment\",\n maxHops: options.maxHops ?? 4,\n include,\n exclude: [\n { annotations: { [Annotation.IsSubset]: \"true\" } },\n { annotations: { [Annotation.IsLinkerColumn]: \"true\" } },\n { name: Annotation.Label },\n ],\n })\n .getColumns();\n\n const predicate = options.predicate;\n return columns.filter((v) => {\n if (hasSingleDataColumn(v)) return false;\n if (predicate !== undefined && !predicate(v.getSpec())) return false;\n if (!isGlobalPObjectId(extractPObjectId(v.id))) return false;\n if (collectLinkerIds(v).some((id) => !isGlobalPObjectId(id))) return false;\n return true;\n });\n}\n\n/**\n * Pair each variant with a path-disambiguated label (so export headers stay\n * unique) and carry hit/linker `PObjectId`s through verbatim. Propagates\n * `qualifications.forHit`; `forQueries` is re-derived by the table builder.\n */\nexport function enrichmentVariantsToRefs(\n variants: ColumnRecipe[],\n labelOptions?: DeriveLabelsOptions,\n): LabeledEnrichmentRefs {\n if (variants.length === 0) return [];\n\n const linkerIdsByVariant = variants.map((v) => collectLinkerIds(v));\n const hitQualsByVariant = variants.map((v) => [...hitQualifications(v)]);\n\n const entries: Entry[] = variants.map((variant, i) => ({\n spec: variant.getSpec(),\n linkerPath: collectLinkerColumns(variant).map((linker) => ({ spec: linker.getSpec() })),\n qualifications: {\n forHit: hitQualsByVariant[i],\n forQueries: queriesQualifications(variant),\n },\n }));\n const labels = deriveDistinctLabels(entries, labelOptions);\n\n return variants.map((variant, i): LabeledEnrichmentRef => {\n const path: undefined | EnrichmentStep[] =\n linkerIdsByVariant[i].length === 0\n ? undefined\n : linkerIdsByVariant[i].map((id) => ({ type: \"linker\", linker: id }));\n return {\n ref: createEnrichmentRef(extractPObjectId(variant.id), {\n path,\n qualifications: hitQualsByVariant[i],\n }),\n label: labels[i],\n };\n });\n}\n"],"mappings":";;;;;;;;;;;AA6CA,SAAgB,sBAAsB,SAAuD;CAC3F,MAAM,UACJ,QAAQ,YAAY,KAAA,IAChB,KAAA,IACA,MAAM,QAAQ,QAAQ,OAAO,IAC3B,QAAQ,UACR,CAAC,QAAQ,OAAO;CAExB,MAAM,UAAU,kBAAkB,CAAC,GAAG,QAAQ,OAAO,GAAG,EAAE,QAAQ,QAAQ,OAAO,CAAC,CAAC,CAChF,SAAS;EACR,SAAS,EAAE,MAAM,QAAQ,WAAW;EACpC,MAAM;EACN,SAAS,QAAQ,WAAW;EAC5B;EACA,SAAS;GACP,EAAE,aAAa,GAAG,WAAW,WAAW,OAAO,EAAE;GACjD,EAAE,aAAa,GAAG,WAAW,iBAAiB,OAAO,EAAE;GACvD,EAAE,MAAM,WAAW,MAAM;EAC3B;CACF,CAAC,CAAC,CACD,WAAW;CAEd,MAAM,YAAY,QAAQ;CAC1B,OAAO,QAAQ,QAAQ,MAAM;EAC3B,IAAI,oBAAoB,CAAC,GAAG,OAAO;EACnC,IAAI,cAAc,KAAA,KAAa,CAAC,UAAU,EAAE,QAAQ,CAAC,GAAG,OAAO;EAC/D,IAAI,CAAC,kBAAkB,iBAAiB,EAAE,EAAE,CAAC,GAAG,OAAO;EACvD,IAAI,iBAAiB,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,kBAAkB,EAAE,CAAC,GAAG,OAAO;EACrE,OAAO;CACT,CAAC;AACH;;;;;;AAOA,SAAgB,yBACd,UACA,cACuB;CACvB,IAAI,SAAS,WAAW,GAAG,OAAO,CAAC;CAEnC,MAAM,qBAAqB,SAAS,KAAK,MAAM,iBAAiB,CAAC,CAAC;CAClE,MAAM,oBAAoB,SAAS,KAAK,MAAM,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC;CAEvE,MAAM,UAAmB,SAAS,KAAK,SAAS,OAAO;EACrD,MAAM,QAAQ,QAAQ;EACtB,YAAY,qBAAqB,OAAO,CAAC,CAAC,KAAK,YAAY,EAAE,MAAM,OAAO,QAAQ,EAAE,EAAE;EACtF,gBAAgB;GACd,QAAQ,kBAAkB;GAC1B,YAAY,sBAAsB,OAAO;EAC3C;CACF,EAAE;CACF,MAAM,SAAS,qBAAqB,SAAS,YAAY;CAEzD,OAAO,SAAS,KAAK,SAAS,MAA4B;EACxD,MAAM,OACJ,mBAAmB,EAAE,CAAC,WAAW,IAC7B,KAAA,IACA,mBAAmB,EAAE,CAAC,KAAK,QAAQ;GAAE,MAAM;GAAU,QAAQ;EAAG,EAAE;EACxE,OAAO;GACL,KAAK,oBAAoB,iBAAiB,QAAQ,EAAE,GAAG;IACrD;IACA,gBAAgB,kBAAkB;GACpC,CAAC;GACD,OAAO,OAAO;EAChB;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"enrichment_discovery.js","names":[],"sources":["../../../src/components/PlDatasetSelector/enrichment_discovery.ts"],"sourcesContent":["import {\n Annotation,\n isColumnDiscoveredId,\n isGlobalPObjectId,\n parseColumnDiscoveredId,\n} from \"@milaboratories/pl-model-common\";\nimport type {\n ColumnsCollectionDriverModel,\n ColumnUniversalId,\n MultiColumnSelector,\n PColumnSpec,\n PObjectSpec,\n} from \"@milaboratories/pl-model-common\";\nimport type { ColumnRecipe, ColumnsSource, ColumnsSourceShorthand } from \"../../columns\";\nimport {\n hasSingleDataColumn,\n ColumnsCollection,\n hitQualifications,\n collectLinkerColumns,\n queriesQualifications,\n} from \"../../columns\";\nimport {\n deriveDistinctLabels,\n type DeriveLabelsOptions,\n type Entry,\n} from \"../../labels/derive_distinct_labels\";\nimport type { DatasetEnrichment } from \"./dataset_selection\";\n\nexport interface FindEnrichmentColumnsOptions {\n sources: ReadonlyArray<ColumnsCollection | ColumnsSource | ColumnsSourceShorthand>;\n anchorSpec: PColumnSpec;\n maxHops?: number;\n include?: MultiColumnSelector | MultiColumnSelector[];\n predicate?: (spec: PObjectSpec) => boolean;\n /** Override the resolved `columnsCollection` service (primarily for tests). */\n driver?: ColumnsCollectionDriverModel;\n}\n\n/**\n * Linker-reached hits attached to the anchor primary. Drops zero-hop variants\n * (filters / the primary itself) and structural hits (subset, linker, label\n * columns). Narrow further with `include` selectors or a `predicate`.\n *\n * A hit is kept only when a workflow can find it by its id: the hit and every\n * linker leading to it are block outputs.\n */\nexport function findEnrichmentColumns(options: FindEnrichmentColumnsOptions): ColumnRecipe[] {\n const include =\n options.include === undefined\n ? undefined\n : Array.isArray(options.include)\n ? options.include\n : [options.include];\n\n const columns = ColumnsCollection([...options.sources], { driver: options.driver })\n .discover({\n anchors: { main: options.anchorSpec },\n mode: \"enrichment\",\n maxHops: options.maxHops ?? 4,\n include,\n exclude: [\n { annotations: { [Annotation.IsSubset]: \"true\" } },\n { annotations: { [Annotation.IsLinkerColumn]: \"true\" } },\n { name: Annotation.Label },\n ],\n })\n .getColumns();\n\n const predicate = options.predicate;\n return columns.filter((v) => {\n if (hasSingleDataColumn(v)) return false;\n if (!reachesBlockOutputs(v.id)) return false;\n return predicate === undefined || predicate(v.getSpec());\n });\n}\n\n/**\n * Pairs each column with a label that tells apart the same hit reached through\n * different linkers, so export headers stay unique.\n */\nexport function labelEnrichments(\n variants: ColumnRecipe[],\n labelOptions?: DeriveLabelsOptions,\n): DatasetEnrichment[] {\n if (variants.length === 0) return [];\n\n const entries: Entry[] = variants.map((variant) => ({\n spec: variant.getSpec(),\n linkerPath: collectLinkerColumns(variant).map((linker) => ({ spec: linker.getSpec() })),\n qualifications: {\n forHit: [...hitQualifications(variant)],\n forQueries: queriesQualifications(variant),\n },\n }));\n const labels = deriveDistinctLabels(entries, labelOptions);\n\n return variants.map((variant, i): DatasetEnrichment => ({ id: variant.id, label: labels[i] }));\n}\n\n// Internals\n\nfunction reachesBlockOutputs(id: ColumnUniversalId): boolean {\n if (!isColumnDiscoveredId(id)) return false;\n const key = parseColumnDiscoveredId(id);\n return [key.column, ...(key.path ?? []).map((step) => step.column)].every(isGlobalPObjectId);\n}\n"],"mappings":";;;;;;;;;;;;;;AA8CA,SAAgB,sBAAsB,SAAuD;CAC3F,MAAM,UACJ,QAAQ,YAAY,KAAA,IAChB,KAAA,IACA,MAAM,QAAQ,QAAQ,OAAO,IAC3B,QAAQ,UACR,CAAC,QAAQ,OAAO;CAExB,MAAM,UAAU,kBAAkB,CAAC,GAAG,QAAQ,OAAO,GAAG,EAAE,QAAQ,QAAQ,OAAO,CAAC,CAAC,CAChF,SAAS;EACR,SAAS,EAAE,MAAM,QAAQ,WAAW;EACpC,MAAM;EACN,SAAS,QAAQ,WAAW;EAC5B;EACA,SAAS;GACP,EAAE,aAAa,GAAG,WAAW,WAAW,OAAO,EAAE;GACjD,EAAE,aAAa,GAAG,WAAW,iBAAiB,OAAO,EAAE;GACvD,EAAE,MAAM,WAAW,MAAM;EAC3B;CACF,CAAC,CAAC,CACD,WAAW;CAEd,MAAM,YAAY,QAAQ;CAC1B,OAAO,QAAQ,QAAQ,MAAM;EAC3B,IAAI,oBAAoB,CAAC,GAAG,OAAO;EACnC,IAAI,CAAC,oBAAoB,EAAE,EAAE,GAAG,OAAO;EACvC,OAAO,cAAc,KAAA,KAAa,UAAU,EAAE,QAAQ,CAAC;CACzD,CAAC;AACH;;;;;AAMA,SAAgB,iBACd,UACA,cACqB;CACrB,IAAI,SAAS,WAAW,GAAG,OAAO,CAAC;CAEnC,MAAM,UAAmB,SAAS,KAAK,aAAa;EAClD,MAAM,QAAQ,QAAQ;EACtB,YAAY,qBAAqB,OAAO,CAAC,CAAC,KAAK,YAAY,EAAE,MAAM,OAAO,QAAQ,EAAE,EAAE;EACtF,gBAAgB;GACd,QAAQ,CAAC,GAAG,kBAAkB,OAAO,CAAC;GACtC,YAAY,sBAAsB,OAAO;EAC3C;CACF,EAAE;CACF,MAAM,SAAS,qBAAqB,SAAS,YAAY;CAEzD,OAAO,SAAS,KAAK,SAAS,OAA0B;EAAE,IAAI,QAAQ;EAAI,OAAO,OAAO;CAAG,EAAE;AAC/F;AAIA,SAAS,oBAAoB,IAAgC;CAC3D,IAAI,CAAC,qBAAqB,EAAE,GAAG,OAAO;CACtC,MAAM,MAAM,wBAAwB,EAAE;CACtC,OAAO,CAAC,IAAI,QAAQ,IAAI,IAAI,QAAQ,CAAC,EAAA,CAAG,KAAK,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,iBAAiB;AAC7F"}
@@ -1,11 +1,8 @@
1
- const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
1
  const require_derive_distinct_labels = require("../../labels/derive_distinct_labels.cjs");
3
2
  const require_columns_collection = require("../../columns/columns_collection.cjs");
4
3
  const require_utils = require("../../columns/utils.cjs");
5
4
  require("../../columns/index.cjs");
6
5
  let _milaboratories_pl_model_common = require("@milaboratories/pl-model-common");
7
- let canonicalize = require("canonicalize");
8
- canonicalize = require_runtime.__toESM(canonicalize, 1);
9
6
  // src/components/PlDatasetSelector/filter_discovery.ts
10
7
  /**
11
8
  * Matches columns annotated `pl7.app/isSubset: "true"` whose axes ⊆ anchor axes.
@@ -26,17 +23,17 @@ function findFilterColumns(options) {
26
23
  /**
27
24
  * Derive labeled options from filter column variants, for use in DatasetOption.filters.
28
25
  *
29
- * Entries whose column id has no PlRef in `refsByObjectId` are silently
30
- * skipped — they cannot be exposed as user-selectable options.
26
+ * A filter is stored as a reference to a block output, so a column that is
27
+ * not one — a column of the current block — is silently skipped.
31
28
  */
32
29
  function filterMatchesToOptions(variants, options) {
33
30
  if (variants.length === 0) return [];
34
- const { refsByObjectId, datasetSpec, labelOptions } = options;
31
+ const { datasetSpec, labelOptions } = options;
35
32
  const entries = variants.flatMap((variant) => {
36
- const ref = refsByObjectId.get((0, _milaboratories_pl_model_common.extractPObjectId)(variant.id));
37
- if (ref === void 0) return [];
33
+ const producer = (0, _milaboratories_pl_model_common.columnProducer)(variant.id);
34
+ if (producer === void 0) return [];
38
35
  return [{
39
- ref,
36
+ ref: (0, _milaboratories_pl_model_common.createPlRef)(producer.blockId, producer.name),
40
37
  spec: variant.getSpec(),
41
38
  linkerPath: require_utils.collectLinkerColumns(variant).map((linker) => ({ spec: linker.getSpec() }))
42
39
  }];
@@ -53,11 +50,6 @@ function filterMatchesToOptions(variants, options) {
53
50
  label: labels[i]
54
51
  }));
55
52
  }
56
- /** Build the `refsByObjectId` map from `ctx.resultPool.getSpecs().entries`. */
57
- function buildRefMap(entries) {
58
- return new Map(entries.map((e) => [(0, canonicalize.default)(e.ref), e.ref]));
59
- }
60
- exports.buildRefMap = buildRefMap;
61
53
  exports.filterMatchesToOptions = filterMatchesToOptions;
62
54
  exports.findFilterColumns = findFilterColumns;
63
55
 
@@ -1 +1 @@
1
- {"version":3,"file":"filter_discovery.cjs","names":["ColumnsCollection","Annotation","extractPObjectId","collectLinkerColumns","deriveDistinctLabels"],"sources":["../../../src/components/PlDatasetSelector/filter_discovery.ts"],"sourcesContent":["import { Annotation, extractPObjectId } from \"@milaboratories/pl-model-common\";\nimport type {\n ColumnsCollectionDriverModel,\n Option,\n PColumnSpec,\n PlRef,\n PObjectId,\n PObjectSpec,\n} from \"@milaboratories/pl-model-common\";\nimport canonicalize from \"canonicalize\";\nimport type { ColumnRecipe, ColumnsSource } from \"../../columns\";\nimport { ColumnsCollection, collectLinkerColumns } from \"../../columns\";\nimport {\n deriveDistinctLabels,\n type DeriveLabelsOptions,\n type Entry,\n} from \"../../labels/derive_distinct_labels\";\n\nexport interface FindFilterColumnsOptions {\n sources: ReadonlyArray<ColumnsSource>;\n anchorSpec: PColumnSpec;\n /** Override the resolved `columnsCollection` service (primarily for tests). */\n driver?: ColumnsCollectionDriverModel;\n}\n\n/**\n * Matches columns annotated `pl7.app/isSubset: \"true\"` whose axes ⊆ anchor axes.\n *\n * Filter-intent: only the dataset's own direct subset columns, no linker\n * traversal — so this uses `.filter()` (pins `maxHops: 0`), not `.discover()`\n * (which would default to 4 hops and surface subset columns from other,\n * linker-reachable datasets). `.filter()` still applies the default\n * `enrichment` matching mode (`allowFloatingHitAxes: false`), which enforces\n * the axes-subset constraint. See `matchingModeToConstraints()`.\n */\nexport function findFilterColumns(options: FindFilterColumnsOptions): ColumnRecipe[] {\n return ColumnsCollection([...options.sources], { driver: options.driver })\n .filter({\n anchors: { main: options.anchorSpec },\n include: { annotations: { [Annotation.IsSubset]: \"true\" } },\n })\n .getColumns();\n}\n\nexport type FilterMatchOptions = {\n /** Maps result-pool column id back to its source PlRef (see {@link buildRefMap}). */\n refsByObjectId: ReadonlyMap<PObjectId, PlRef>;\n /** Spec of the dataset the filters are subsets of. */\n datasetSpec: PObjectSpec;\n /**\n * Forwarded to `deriveDistinctLabels`. Any `formatters.native` caller\n * sets is silently overridden — the function relies on a no-op native\n * formatter to keep the algorithm from short-circuiting on filters'\n * inherited `pl7.app/label`.\n */\n labelOptions?: DeriveLabelsOptions;\n};\n\n/**\n * Derive labeled options from filter column variants, for use in DatasetOption.filters.\n *\n * Entries whose column id has no PlRef in `refsByObjectId` are silently\n * skipped — they cannot be exposed as user-selectable options.\n */\nexport function filterMatchesToOptions(\n variants: ColumnRecipe[],\n options: FilterMatchOptions,\n): Option[] {\n if (variants.length === 0) return [];\n\n const { refsByObjectId, datasetSpec, labelOptions } = options;\n\n // One Option per variant — `deriveDistinctLabels` disambiguates labels by\n // path. All variants of the same column share a terminal PObjectId, so the\n // ref lookup happens once per variant.\n const entries: (Entry & { ref: PlRef })[] = variants.flatMap((variant) => {\n const ref = refsByObjectId.get(extractPObjectId(variant.id));\n if (ref === undefined) return [];\n return [\n {\n ref,\n spec: variant.getSpec(),\n linkerPath: collectLinkerColumns(variant).map((linker) => ({ spec: linker.getSpec() })),\n },\n ];\n });\n\n // Appending the dataset forces a discriminating trace step into every\n // filter label (yielding e.g. \"Bulk / Top 10\"); the dataset's own label\n // is dropped because we only zip `entries`. Native label is force-\n // suppressed (the override sits after caller's spread) — filters\n // inherit the dataset's `pl7.app/label` and would otherwise satisfy\n // uniqueness before any trace step is consulted.\n const labels = deriveDistinctLabels([...entries, { spec: datasetSpec }], {\n ...labelOptions,\n formatters: { ...labelOptions?.formatters, native: () => undefined },\n });\n\n return entries.map(({ ref }, i) => ({ ref, label: labels[i] }));\n}\n\n/** Build the `refsByObjectId` map from `ctx.resultPool.getSpecs().entries`. */\nexport function buildRefMap(entries: readonly { readonly ref: PlRef }[]): Map<PObjectId, PlRef> {\n return new Map(entries.map((e) => [canonicalize(e.ref)! as PObjectId, e.ref]));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmCA,SAAgB,kBAAkB,SAAmD;CACnF,OAAOA,2BAAAA,kBAAkB,CAAC,GAAG,QAAQ,OAAO,GAAG,EAAE,QAAQ,QAAQ,OAAO,CAAC,CAAC,CACvE,OAAO;EACN,SAAS,EAAE,MAAM,QAAQ,WAAW;EACpC,SAAS,EAAE,aAAa,GAAGC,gCAAAA,WAAW,WAAW,OAAO,EAAE;CAC5D,CAAC,CAAC,CACD,WAAW;AAChB;;;;;;;AAsBA,SAAgB,uBACd,UACA,SACU;CACV,IAAI,SAAS,WAAW,GAAG,OAAO,CAAC;CAEnC,MAAM,EAAE,gBAAgB,aAAa,iBAAiB;CAKtD,MAAM,UAAsC,SAAS,SAAS,YAAY;EACxE,MAAM,MAAM,eAAe,KAAA,GAAIC,gCAAAA,iBAAAA,CAAiB,QAAQ,EAAE,CAAC;EAC3D,IAAI,QAAQ,KAAA,GAAW,OAAO,CAAC;EAC/B,OAAO,CACL;GACE;GACA,MAAM,QAAQ,QAAQ;GACtB,YAAYC,cAAAA,qBAAqB,OAAO,CAAC,CAAC,KAAK,YAAY,EAAE,MAAM,OAAO,QAAQ,EAAE,EAAE;EACxF,CACF;CACF,CAAC;CAQD,MAAM,SAASC,+BAAAA,qBAAqB,CAAC,GAAG,SAAS,EAAE,MAAM,YAAY,CAAC,GAAG;EACvE,GAAG;EACH,YAAY;GAAE,GAAG,cAAc;GAAY,cAAc,KAAA;EAAU;CACrE,CAAC;CAED,OAAO,QAAQ,KAAK,EAAE,OAAO,OAAO;EAAE;EAAK,OAAO,OAAO;CAAG,EAAE;AAChE;;AAGA,SAAgB,YAAY,SAAoE;CAC9F,OAAO,IAAI,IAAI,QAAQ,KAAK,MAAM,EAAA,GAAC,aAAA,QAAA,CAAa,EAAE,GAAG,GAAiB,EAAE,GAAG,CAAC,CAAC;AAC/E"}
1
+ {"version":3,"file":"filter_discovery.cjs","names":["ColumnsCollection","Annotation","columnProducer","createPlRef","collectLinkerColumns","deriveDistinctLabels"],"sources":["../../../src/components/PlDatasetSelector/filter_discovery.ts"],"sourcesContent":["import { Annotation, columnProducer, createPlRef } from \"@milaboratories/pl-model-common\";\nimport type {\n ColumnsCollectionDriverModel,\n Option,\n PColumnSpec,\n PlRef,\n PObjectSpec,\n} from \"@milaboratories/pl-model-common\";\nimport type { ColumnRecipe, ColumnsSource, ColumnsSourceShorthand } from \"../../columns\";\nimport { ColumnsCollection, collectLinkerColumns } from \"../../columns\";\nimport {\n deriveDistinctLabels,\n type DeriveLabelsOptions,\n type Entry,\n} from \"../../labels/derive_distinct_labels\";\n\nexport interface FindFilterColumnsOptions {\n sources: ReadonlyArray<ColumnsCollection | ColumnsSource | ColumnsSourceShorthand>;\n anchorSpec: PColumnSpec;\n /** Override the resolved `columnsCollection` service (primarily for tests). */\n driver?: ColumnsCollectionDriverModel;\n}\n\n/**\n * Matches columns annotated `pl7.app/isSubset: \"true\"` whose axes ⊆ anchor axes.\n *\n * Filter-intent: only the dataset's own direct subset columns, no linker\n * traversal — so this uses `.filter()` (pins `maxHops: 0`), not `.discover()`\n * (which would default to 4 hops and surface subset columns from other,\n * linker-reachable datasets). `.filter()` still applies the default\n * `enrichment` matching mode (`allowFloatingHitAxes: false`), which enforces\n * the axes-subset constraint. See `matchingModeToConstraints()`.\n */\nexport function findFilterColumns(options: FindFilterColumnsOptions): ColumnRecipe[] {\n return ColumnsCollection([...options.sources], { driver: options.driver })\n .filter({\n anchors: { main: options.anchorSpec },\n include: { annotations: { [Annotation.IsSubset]: \"true\" } },\n })\n .getColumns();\n}\n\nexport type FilterMatchOptions = {\n /** Spec of the dataset the filters are subsets of. */\n datasetSpec: PObjectSpec;\n /**\n * Forwarded to `deriveDistinctLabels`. Any `formatters.native` caller\n * sets is silently overridden — the function relies on a no-op native\n * formatter to keep the algorithm from short-circuiting on filters'\n * inherited `pl7.app/label`.\n */\n labelOptions?: DeriveLabelsOptions;\n};\n\n/**\n * Derive labeled options from filter column variants, for use in DatasetOption.filters.\n *\n * A filter is stored as a reference to a block output, so a column that is\n * not one — a column of the current block — is silently skipped.\n */\nexport function filterMatchesToOptions(\n variants: ColumnRecipe[],\n options: FilterMatchOptions,\n): Option[] {\n if (variants.length === 0) return [];\n\n const { datasetSpec, labelOptions } = options;\n\n // One Option per variant — `deriveDistinctLabels` disambiguates labels by\n // path.\n const entries: (Entry & { ref: PlRef })[] = variants.flatMap((variant) => {\n const producer = columnProducer(variant.id);\n if (producer === undefined) return [];\n return [\n {\n ref: createPlRef(producer.blockId, producer.name),\n spec: variant.getSpec(),\n linkerPath: collectLinkerColumns(variant).map((linker) => ({ spec: linker.getSpec() })),\n },\n ];\n });\n\n // Appending the dataset forces a discriminating trace step into every\n // filter label (yielding e.g. \"Bulk / Top 10\"); the dataset's own label\n // is dropped because we only zip `entries`. Native label is force-\n // suppressed (the override sits after caller's spread) — filters\n // inherit the dataset's `pl7.app/label` and would otherwise satisfy\n // uniqueness before any trace step is consulted.\n const labels = deriveDistinctLabels([...entries, { spec: datasetSpec }], {\n ...labelOptions,\n formatters: { ...labelOptions?.formatters, native: () => undefined },\n });\n\n return entries.map(({ ref }, i) => ({ ref, label: labels[i] }));\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiCA,SAAgB,kBAAkB,SAAmD;CACnF,OAAOA,2BAAAA,kBAAkB,CAAC,GAAG,QAAQ,OAAO,GAAG,EAAE,QAAQ,QAAQ,OAAO,CAAC,CAAC,CACvE,OAAO;EACN,SAAS,EAAE,MAAM,QAAQ,WAAW;EACpC,SAAS,EAAE,aAAa,GAAGC,gCAAAA,WAAW,WAAW,OAAO,EAAE;CAC5D,CAAC,CAAC,CACD,WAAW;AAChB;;;;;;;AAoBA,SAAgB,uBACd,UACA,SACU;CACV,IAAI,SAAS,WAAW,GAAG,OAAO,CAAC;CAEnC,MAAM,EAAE,aAAa,iBAAiB;CAItC,MAAM,UAAsC,SAAS,SAAS,YAAY;EACxE,MAAM,YAAA,GAAWC,gCAAAA,eAAAA,CAAe,QAAQ,EAAE;EAC1C,IAAI,aAAa,KAAA,GAAW,OAAO,CAAC;EACpC,OAAO,CACL;GACE,MAAA,GAAKC,gCAAAA,YAAAA,CAAY,SAAS,SAAS,SAAS,IAAI;GAChD,MAAM,QAAQ,QAAQ;GACtB,YAAYC,cAAAA,qBAAqB,OAAO,CAAC,CAAC,KAAK,YAAY,EAAE,MAAM,OAAO,QAAQ,EAAE,EAAE;EACxF,CACF;CACF,CAAC;CAQD,MAAM,SAASC,+BAAAA,qBAAqB,CAAC,GAAG,SAAS,EAAE,MAAM,YAAY,CAAC,GAAG;EACvE,GAAG;EACH,YAAY;GAAE,GAAG,cAAc;GAAY,cAAc,KAAA;EAAU;CACrE,CAAC;CAED,OAAO,QAAQ,KAAK,EAAE,OAAO,OAAO;EAAE;EAAK,OAAO,OAAO;CAAG,EAAE;AAChE"}
@@ -1,10 +1,11 @@
1
1
  import { DeriveLabelsOptions } from "../../labels/derive_distinct_labels.js";
2
2
  import { ColumnRecipe } from "../../columns/column_recipes/index.js";
3
3
  import { ColumnsSource } from "../../columns/column_providers/types.js";
4
+ import { ColumnsCollection, ColumnsSourceShorthand } from "../../columns/columns_collection.js";
4
5
  import "../../columns/index.js";
5
- import { ColumnsCollectionDriverModel, Option, PColumnSpec, PObjectId, PObjectSpec, PlRef } from "@milaboratories/pl-model-common";
6
+ import { ColumnsCollectionDriverModel, Option, PColumnSpec, PObjectSpec } from "@milaboratories/pl-model-common";
6
7
  export interface FindFilterColumnsOptions {
7
- sources: ReadonlyArray<ColumnsSource>;
8
+ sources: ReadonlyArray<ColumnsCollection | ColumnsSource | ColumnsSourceShorthand>;
8
9
  anchorSpec: PColumnSpec;
9
10
  /** Override the resolved `columnsCollection` service (primarily for tests). */
10
11
  driver?: ColumnsCollectionDriverModel;
@@ -21,8 +22,6 @@ export interface FindFilterColumnsOptions {
21
22
  */
22
23
  export declare function findFilterColumns(options: FindFilterColumnsOptions): ColumnRecipe[];
23
24
  export type FilterMatchOptions = {
24
- /** Maps result-pool column id back to its source PlRef (see {@link buildRefMap}). */
25
- refsByObjectId: ReadonlyMap<PObjectId, PlRef>;
26
25
  /** Spec of the dataset the filters are subsets of. */
27
26
  datasetSpec: PObjectSpec;
28
27
  /**
@@ -36,12 +35,8 @@ export type FilterMatchOptions = {
36
35
  /**
37
36
  * Derive labeled options from filter column variants, for use in DatasetOption.filters.
38
37
  *
39
- * Entries whose column id has no PlRef in `refsByObjectId` are silently
40
- * skipped — they cannot be exposed as user-selectable options.
38
+ * A filter is stored as a reference to a block output, so a column that is
39
+ * not one — a column of the current block — is silently skipped.
41
40
  */
42
41
  export declare function filterMatchesToOptions(variants: ColumnRecipe[], options: FilterMatchOptions): Option[];
43
- /** Build the `refsByObjectId` map from `ctx.resultPool.getSpecs().entries`. */
44
- export declare function buildRefMap(entries: readonly {
45
- readonly ref: PlRef;
46
- }[]): Map<PObjectId, PlRef>;
47
42
  //# sourceMappingURL=filter_discovery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter_discovery.d.ts","names":[],"sources":["../../../src/components/PlDatasetSelector/filter_discovery.ts"],"mappings":";;;;;iBAkBiB;EACf,SAAS,cAAc;EACvB,YAAY;;EAEZ,SAAS;;;;;;;;;;;;wBAaK,kBAAkB,SAAS,2BAA2B;YAS1D;;EAEV,gBAAgB,YAAY,WAAW;;EAEvC,aAAa;;;;;;;EAOb,eAAe;;;;;;;;wBASD,uBACd,UAAU,gBACV,SAAS,qBACR;;wBAmCa,YAAY;WAA6B,KAAK;MAAY,IAAI,WAAW"}
1
+ {"version":3,"file":"filter_discovery.d.ts","names":[],"sources":["../../../src/components/PlDatasetSelector/filter_discovery.ts"],"mappings":";;;;;;iBAgBiB;EACf,SAAS,cAAc,oBAAoB,gBAAgB;EAC3D,YAAY;;EAEZ,SAAS;;;;;;;;;;;;wBAaK,kBAAkB,SAAS,2BAA2B;YAS1D;;EAEV,aAAa;;;;;;;EAOb,eAAe;;;;;;;;wBASD,uBACd,UAAU,gBACV,SAAS,qBACR"}
@@ -2,8 +2,7 @@ import { deriveDistinctLabels } from "../../labels/derive_distinct_labels.js";
2
2
  import { ColumnsCollection } from "../../columns/columns_collection.js";
3
3
  import { collectLinkerColumns } from "../../columns/utils.js";
4
4
  import "../../columns/index.js";
5
- import { Annotation, extractPObjectId } from "@milaboratories/pl-model-common";
6
- import canonicalize from "canonicalize";
5
+ import { Annotation, columnProducer, createPlRef } from "@milaboratories/pl-model-common";
7
6
  // src/components/PlDatasetSelector/filter_discovery.ts
8
7
  /**
9
8
  * Matches columns annotated `pl7.app/isSubset: "true"` whose axes ⊆ anchor axes.
@@ -24,17 +23,17 @@ function findFilterColumns(options) {
24
23
  /**
25
24
  * Derive labeled options from filter column variants, for use in DatasetOption.filters.
26
25
  *
27
- * Entries whose column id has no PlRef in `refsByObjectId` are silently
28
- * skipped — they cannot be exposed as user-selectable options.
26
+ * A filter is stored as a reference to a block output, so a column that is
27
+ * not one — a column of the current block — is silently skipped.
29
28
  */
30
29
  function filterMatchesToOptions(variants, options) {
31
30
  if (variants.length === 0) return [];
32
- const { refsByObjectId, datasetSpec, labelOptions } = options;
31
+ const { datasetSpec, labelOptions } = options;
33
32
  const entries = variants.flatMap((variant) => {
34
- const ref = refsByObjectId.get(extractPObjectId(variant.id));
35
- if (ref === void 0) return [];
33
+ const producer = columnProducer(variant.id);
34
+ if (producer === void 0) return [];
36
35
  return [{
37
- ref,
36
+ ref: createPlRef(producer.blockId, producer.name),
38
37
  spec: variant.getSpec(),
39
38
  linkerPath: collectLinkerColumns(variant).map((linker) => ({ spec: linker.getSpec() }))
40
39
  }];
@@ -51,10 +50,6 @@ function filterMatchesToOptions(variants, options) {
51
50
  label: labels[i]
52
51
  }));
53
52
  }
54
- /** Build the `refsByObjectId` map from `ctx.resultPool.getSpecs().entries`. */
55
- function buildRefMap(entries) {
56
- return new Map(entries.map((e) => [canonicalize(e.ref), e.ref]));
57
- }
58
- export { buildRefMap, filterMatchesToOptions, findFilterColumns };
53
+ export { filterMatchesToOptions, findFilterColumns };
59
54
 
60
55
  //# sourceMappingURL=filter_discovery.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter_discovery.js","names":[],"sources":["../../../src/components/PlDatasetSelector/filter_discovery.ts"],"sourcesContent":["import { Annotation, extractPObjectId } from \"@milaboratories/pl-model-common\";\nimport type {\n ColumnsCollectionDriverModel,\n Option,\n PColumnSpec,\n PlRef,\n PObjectId,\n PObjectSpec,\n} from \"@milaboratories/pl-model-common\";\nimport canonicalize from \"canonicalize\";\nimport type { ColumnRecipe, ColumnsSource } from \"../../columns\";\nimport { ColumnsCollection, collectLinkerColumns } from \"../../columns\";\nimport {\n deriveDistinctLabels,\n type DeriveLabelsOptions,\n type Entry,\n} from \"../../labels/derive_distinct_labels\";\n\nexport interface FindFilterColumnsOptions {\n sources: ReadonlyArray<ColumnsSource>;\n anchorSpec: PColumnSpec;\n /** Override the resolved `columnsCollection` service (primarily for tests). */\n driver?: ColumnsCollectionDriverModel;\n}\n\n/**\n * Matches columns annotated `pl7.app/isSubset: \"true\"` whose axes ⊆ anchor axes.\n *\n * Filter-intent: only the dataset's own direct subset columns, no linker\n * traversal — so this uses `.filter()` (pins `maxHops: 0`), not `.discover()`\n * (which would default to 4 hops and surface subset columns from other,\n * linker-reachable datasets). `.filter()` still applies the default\n * `enrichment` matching mode (`allowFloatingHitAxes: false`), which enforces\n * the axes-subset constraint. See `matchingModeToConstraints()`.\n */\nexport function findFilterColumns(options: FindFilterColumnsOptions): ColumnRecipe[] {\n return ColumnsCollection([...options.sources], { driver: options.driver })\n .filter({\n anchors: { main: options.anchorSpec },\n include: { annotations: { [Annotation.IsSubset]: \"true\" } },\n })\n .getColumns();\n}\n\nexport type FilterMatchOptions = {\n /** Maps result-pool column id back to its source PlRef (see {@link buildRefMap}). */\n refsByObjectId: ReadonlyMap<PObjectId, PlRef>;\n /** Spec of the dataset the filters are subsets of. */\n datasetSpec: PObjectSpec;\n /**\n * Forwarded to `deriveDistinctLabels`. Any `formatters.native` caller\n * sets is silently overridden — the function relies on a no-op native\n * formatter to keep the algorithm from short-circuiting on filters'\n * inherited `pl7.app/label`.\n */\n labelOptions?: DeriveLabelsOptions;\n};\n\n/**\n * Derive labeled options from filter column variants, for use in DatasetOption.filters.\n *\n * Entries whose column id has no PlRef in `refsByObjectId` are silently\n * skipped — they cannot be exposed as user-selectable options.\n */\nexport function filterMatchesToOptions(\n variants: ColumnRecipe[],\n options: FilterMatchOptions,\n): Option[] {\n if (variants.length === 0) return [];\n\n const { refsByObjectId, datasetSpec, labelOptions } = options;\n\n // One Option per variant — `deriveDistinctLabels` disambiguates labels by\n // path. All variants of the same column share a terminal PObjectId, so the\n // ref lookup happens once per variant.\n const entries: (Entry & { ref: PlRef })[] = variants.flatMap((variant) => {\n const ref = refsByObjectId.get(extractPObjectId(variant.id));\n if (ref === undefined) return [];\n return [\n {\n ref,\n spec: variant.getSpec(),\n linkerPath: collectLinkerColumns(variant).map((linker) => ({ spec: linker.getSpec() })),\n },\n ];\n });\n\n // Appending the dataset forces a discriminating trace step into every\n // filter label (yielding e.g. \"Bulk / Top 10\"); the dataset's own label\n // is dropped because we only zip `entries`. Native label is force-\n // suppressed (the override sits after caller's spread) — filters\n // inherit the dataset's `pl7.app/label` and would otherwise satisfy\n // uniqueness before any trace step is consulted.\n const labels = deriveDistinctLabels([...entries, { spec: datasetSpec }], {\n ...labelOptions,\n formatters: { ...labelOptions?.formatters, native: () => undefined },\n });\n\n return entries.map(({ ref }, i) => ({ ref, label: labels[i] }));\n}\n\n/** Build the `refsByObjectId` map from `ctx.resultPool.getSpecs().entries`. */\nexport function buildRefMap(entries: readonly { readonly ref: PlRef }[]): Map<PObjectId, PlRef> {\n return new Map(entries.map((e) => [canonicalize(e.ref)! as PObjectId, e.ref]));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmCA,SAAgB,kBAAkB,SAAmD;CACnF,OAAO,kBAAkB,CAAC,GAAG,QAAQ,OAAO,GAAG,EAAE,QAAQ,QAAQ,OAAO,CAAC,CAAC,CACvE,OAAO;EACN,SAAS,EAAE,MAAM,QAAQ,WAAW;EACpC,SAAS,EAAE,aAAa,GAAG,WAAW,WAAW,OAAO,EAAE;CAC5D,CAAC,CAAC,CACD,WAAW;AAChB;;;;;;;AAsBA,SAAgB,uBACd,UACA,SACU;CACV,IAAI,SAAS,WAAW,GAAG,OAAO,CAAC;CAEnC,MAAM,EAAE,gBAAgB,aAAa,iBAAiB;CAKtD,MAAM,UAAsC,SAAS,SAAS,YAAY;EACxE,MAAM,MAAM,eAAe,IAAI,iBAAiB,QAAQ,EAAE,CAAC;EAC3D,IAAI,QAAQ,KAAA,GAAW,OAAO,CAAC;EAC/B,OAAO,CACL;GACE;GACA,MAAM,QAAQ,QAAQ;GACtB,YAAY,qBAAqB,OAAO,CAAC,CAAC,KAAK,YAAY,EAAE,MAAM,OAAO,QAAQ,EAAE,EAAE;EACxF,CACF;CACF,CAAC;CAQD,MAAM,SAAS,qBAAqB,CAAC,GAAG,SAAS,EAAE,MAAM,YAAY,CAAC,GAAG;EACvE,GAAG;EACH,YAAY;GAAE,GAAG,cAAc;GAAY,cAAc,KAAA;EAAU;CACrE,CAAC;CAED,OAAO,QAAQ,KAAK,EAAE,OAAO,OAAO;EAAE;EAAK,OAAO,OAAO;CAAG,EAAE;AAChE;;AAGA,SAAgB,YAAY,SAAoE;CAC9F,OAAO,IAAI,IAAI,QAAQ,KAAK,MAAM,CAAC,aAAa,EAAE,GAAG,GAAiB,EAAE,GAAG,CAAC,CAAC;AAC/E"}
1
+ {"version":3,"file":"filter_discovery.js","names":[],"sources":["../../../src/components/PlDatasetSelector/filter_discovery.ts"],"sourcesContent":["import { Annotation, columnProducer, createPlRef } from \"@milaboratories/pl-model-common\";\nimport type {\n ColumnsCollectionDriverModel,\n Option,\n PColumnSpec,\n PlRef,\n PObjectSpec,\n} from \"@milaboratories/pl-model-common\";\nimport type { ColumnRecipe, ColumnsSource, ColumnsSourceShorthand } from \"../../columns\";\nimport { ColumnsCollection, collectLinkerColumns } from \"../../columns\";\nimport {\n deriveDistinctLabels,\n type DeriveLabelsOptions,\n type Entry,\n} from \"../../labels/derive_distinct_labels\";\n\nexport interface FindFilterColumnsOptions {\n sources: ReadonlyArray<ColumnsCollection | ColumnsSource | ColumnsSourceShorthand>;\n anchorSpec: PColumnSpec;\n /** Override the resolved `columnsCollection` service (primarily for tests). */\n driver?: ColumnsCollectionDriverModel;\n}\n\n/**\n * Matches columns annotated `pl7.app/isSubset: \"true\"` whose axes ⊆ anchor axes.\n *\n * Filter-intent: only the dataset's own direct subset columns, no linker\n * traversal — so this uses `.filter()` (pins `maxHops: 0`), not `.discover()`\n * (which would default to 4 hops and surface subset columns from other,\n * linker-reachable datasets). `.filter()` still applies the default\n * `enrichment` matching mode (`allowFloatingHitAxes: false`), which enforces\n * the axes-subset constraint. See `matchingModeToConstraints()`.\n */\nexport function findFilterColumns(options: FindFilterColumnsOptions): ColumnRecipe[] {\n return ColumnsCollection([...options.sources], { driver: options.driver })\n .filter({\n anchors: { main: options.anchorSpec },\n include: { annotations: { [Annotation.IsSubset]: \"true\" } },\n })\n .getColumns();\n}\n\nexport type FilterMatchOptions = {\n /** Spec of the dataset the filters are subsets of. */\n datasetSpec: PObjectSpec;\n /**\n * Forwarded to `deriveDistinctLabels`. Any `formatters.native` caller\n * sets is silently overridden — the function relies on a no-op native\n * formatter to keep the algorithm from short-circuiting on filters'\n * inherited `pl7.app/label`.\n */\n labelOptions?: DeriveLabelsOptions;\n};\n\n/**\n * Derive labeled options from filter column variants, for use in DatasetOption.filters.\n *\n * A filter is stored as a reference to a block output, so a column that is\n * not one — a column of the current block — is silently skipped.\n */\nexport function filterMatchesToOptions(\n variants: ColumnRecipe[],\n options: FilterMatchOptions,\n): Option[] {\n if (variants.length === 0) return [];\n\n const { datasetSpec, labelOptions } = options;\n\n // One Option per variant — `deriveDistinctLabels` disambiguates labels by\n // path.\n const entries: (Entry & { ref: PlRef })[] = variants.flatMap((variant) => {\n const producer = columnProducer(variant.id);\n if (producer === undefined) return [];\n return [\n {\n ref: createPlRef(producer.blockId, producer.name),\n spec: variant.getSpec(),\n linkerPath: collectLinkerColumns(variant).map((linker) => ({ spec: linker.getSpec() })),\n },\n ];\n });\n\n // Appending the dataset forces a discriminating trace step into every\n // filter label (yielding e.g. \"Bulk / Top 10\"); the dataset's own label\n // is dropped because we only zip `entries`. Native label is force-\n // suppressed (the override sits after caller's spread) — filters\n // inherit the dataset's `pl7.app/label` and would otherwise satisfy\n // uniqueness before any trace step is consulted.\n const labels = deriveDistinctLabels([...entries, { spec: datasetSpec }], {\n ...labelOptions,\n formatters: { ...labelOptions?.formatters, native: () => undefined },\n });\n\n return entries.map(({ ref }, i) => ({ ref, label: labels[i] }));\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAiCA,SAAgB,kBAAkB,SAAmD;CACnF,OAAO,kBAAkB,CAAC,GAAG,QAAQ,OAAO,GAAG,EAAE,QAAQ,QAAQ,OAAO,CAAC,CAAC,CACvE,OAAO;EACN,SAAS,EAAE,MAAM,QAAQ,WAAW;EACpC,SAAS,EAAE,aAAa,GAAG,WAAW,WAAW,OAAO,EAAE;CAC5D,CAAC,CAAC,CACD,WAAW;AAChB;;;;;;;AAoBA,SAAgB,uBACd,UACA,SACU;CACV,IAAI,SAAS,WAAW,GAAG,OAAO,CAAC;CAEnC,MAAM,EAAE,aAAa,iBAAiB;CAItC,MAAM,UAAsC,SAAS,SAAS,YAAY;EACxE,MAAM,WAAW,eAAe,QAAQ,EAAE;EAC1C,IAAI,aAAa,KAAA,GAAW,OAAO,CAAC;EACpC,OAAO,CACL;GACE,KAAK,YAAY,SAAS,SAAS,SAAS,IAAI;GAChD,MAAM,QAAQ,QAAQ;GACtB,YAAY,qBAAqB,OAAO,CAAC,CAAC,KAAK,YAAY,EAAE,MAAM,OAAO,QAAQ,EAAE,EAAE;EACxF,CACF;CACF,CAAC;CAQD,MAAM,SAAS,qBAAqB,CAAC,GAAG,SAAS,EAAE,MAAM,YAAY,CAAC,GAAG;EACvE,GAAG;EACH,YAAY;GAAE,GAAG,cAAc;GAAY,cAAc,KAAA;EAAU;CACrE,CAAC;CAED,OAAO,QAAQ,KAAK,EAAE,OAAO,OAAO;EAAE;EAAK,OAAO,OAAO;CAAG,EAAE;AAChE"}
@@ -2,7 +2,6 @@ const require_dataset_selection = require("./dataset_selection.cjs");
2
2
  const require_filter_discovery = require("./filter_discovery.cjs");
3
3
  const require_build_dataset_options = require("./build_dataset_options.cjs");
4
4
  exports.buildDatasetOptions = require_build_dataset_options.buildDatasetOptions;
5
- exports.buildRefMap = require_filter_discovery.buildRefMap;
6
5
  exports.createDatasetSelection = require_dataset_selection.createDatasetSelection;
7
6
  exports.filterMatchesToOptions = require_filter_discovery.filterMatchesToOptions;
8
7
  exports.findFilterColumns = require_filter_discovery.findFilterColumns;
@@ -1,4 +1,4 @@
1
- import { DatasetOption, DatasetSelection, createDatasetSelection, isDatasetSelection } from "./dataset_selection.js";
2
- import { FilterMatchOptions, FindFilterColumnsOptions, buildRefMap, filterMatchesToOptions, findFilterColumns } from "./filter_discovery.js";
1
+ import { DatasetEnrichment, DatasetOption, DatasetSelection, createDatasetSelection, isDatasetSelection } from "./dataset_selection.js";
2
+ import { FilterMatchOptions, FindFilterColumnsOptions, filterMatchesToOptions, findFilterColumns } from "./filter_discovery.js";
3
3
  import { BuildDatasetOptions, buildDatasetOptions } from "./build_dataset_options.js";
4
- export { BuildDatasetOptions, DatasetOption, DatasetSelection, FilterMatchOptions, FindFilterColumnsOptions, buildDatasetOptions, buildRefMap, createDatasetSelection, filterMatchesToOptions, findFilterColumns, isDatasetSelection };
4
+ export { BuildDatasetOptions, DatasetEnrichment, DatasetOption, DatasetSelection, FilterMatchOptions, FindFilterColumnsOptions, buildDatasetOptions, createDatasetSelection, filterMatchesToOptions, findFilterColumns, isDatasetSelection };
@@ -1,4 +1,4 @@
1
1
  import { createDatasetSelection, isDatasetSelection } from "./dataset_selection.js";
2
- import { buildRefMap, filterMatchesToOptions, findFilterColumns } from "./filter_discovery.js";
2
+ import { filterMatchesToOptions, findFilterColumns } from "./filter_discovery.js";
3
3
  import { buildDatasetOptions } from "./build_dataset_options.js";
4
- export { buildDatasetOptions, buildRefMap, createDatasetSelection, filterMatchesToOptions, findFilterColumns, isDatasetSelection };
4
+ export { buildDatasetOptions, createDatasetSelection, filterMatchesToOptions, findFilterColumns, isDatasetSelection };
@@ -17,7 +17,6 @@ require("./PlDataTable/index.cjs");
17
17
  const require_PlMultiSequenceAlignment = require("./PlMultiSequenceAlignment.cjs");
18
18
  const require_PlSelectionModel = require("./PlSelectionModel.cjs");
19
19
  exports.buildDatasetOptions = require_build_dataset_options.buildDatasetOptions;
20
- exports.buildRefMap = require_filter_discovery.buildRefMap;
21
20
  exports.compileAnnotationScript = require_filters_ui.compileAnnotationScript;
22
21
  exports.compileFilter = require_filters_ui.compileFilter;
23
22
  exports.compileFilters = require_filters_ui.compileFilters;
@@ -3,8 +3,8 @@ import { createPFrameForGraphs, isHiddenFromGraphColumn, isHiddenFromUIColumn }
3
3
  import { AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationStep, IsNA, Log10, NotFilter, NumericalComparisonFilter, OrFilter, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, SortedCumulativeSum, TransformedColumn, ValueRank } from "./PlAnnotations/filter.js";
4
4
  import { AnnotationScriptUi, AnnotationStepUi, AnyForm, FilterUi, FilterUiOfType, FilterUiType, FormField, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, compileAnnotationScript, compileFilter, compileFilters, unreachable } from "./PlAnnotations/filters_ui.js";
5
5
  import "./PlAnnotations/index.js";
6
- import { DatasetOption, DatasetSelection, createDatasetSelection, isDatasetSelection } from "./PlDatasetSelector/dataset_selection.js";
7
- import { FilterMatchOptions, FindFilterColumnsOptions, buildRefMap, filterMatchesToOptions, findFilterColumns } from "./PlDatasetSelector/filter_discovery.js";
6
+ import { DatasetEnrichment, DatasetOption, DatasetSelection, createDatasetSelection, isDatasetSelection } from "./PlDatasetSelector/dataset_selection.js";
7
+ import { FilterMatchOptions, FindFilterColumnsOptions, filterMatchesToOptions, findFilterColumns } from "./PlDatasetSelector/filter_discovery.js";
8
8
  import { BuildDatasetOptions, buildDatasetOptions } from "./PlDatasetSelector/build_dataset_options.js";
9
9
  import "./PlDatasetSelector/index.js";
10
10
  import { PTableParamsV2, PlDataTableAxisMeta, PlDataTableColumnMeta, PlDataTableColumnsMeta, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlTableColumnIdJson } from "./PlDataTable/typesV8.js";
@@ -19,4 +19,4 @@ import { getEffectiveVisibility, getOrderPriority, isColumnHidden, isColumnOptio
19
19
  import "./PlDataTable/index.js";
20
20
  import { PTableKey, PlSelectionModel, createPlSelectionModel } from "./PlSelectionModel.js";
21
21
  import { PColumnPredicate, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, createRowSelectionColumn } from "./PlMultiSequenceAlignment.js";
22
- export { AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationStep, AnnotationStepUi, AnyForm, type AxesVault, BuildDatasetOptions, type ColumnOrderRule, type ColumnVisibilityRule, type ColumnsDisplayOptions, type ColumnsSelectorConfig, DatasetOption, DatasetSelection, FilterMatchOptions, FilterUi, FilterUiOfType, FilterUiType, FindFilterColumnsOptions, FormField, IsNA, Log10, NotFilter, NumericalComparisonFilter, OrFilter, PColumnPredicate, PTableKey, type PTableParamsV2, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, type PlDataTableAxisMeta, type PlDataTableColumnMeta, type PlDataTableColumnsMeta, type PlDataTableFilterMeta, type PlDataTableFilterSpecLeaf, type PlDataTableFilters, type PlDataTableFiltersWithMeta, type PlDataTableGridStateCore, type PlDataTableModel, type PlDataTableSheet, type PlDataTableSheetState, type PlDataTableStateV2, type PlDataTableStateV2CacheEntry, type PlDataTableStateV2Normalized, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, PlSelectionModel, type PlTableColumnIdJson, SortedCumulativeSum, TransformedColumn, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, ValueRank, buildDatasetOptions, buildRefMap, compileAnnotationScript, compileFilter, compileFilters, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, type createPlDataTableOptionsV3, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createRowSelectionColumn, discoverTableColumns as discoverTableColumnSnaphots, enrichCompatible, filterMatchesToOptions, findFilterColumns, getAvailableWithLinkersAxes, getEffectiveVisibility, getOrderPriority, isColumnHidden, isColumnOptional, isDatasetSelection, isHiddenFromGraphColumn, isHiddenFromUIColumn, isSheetFixedToOneValue, unreachable, upgradePlDataTableStateV2 };
22
+ export { AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationStep, AnnotationStepUi, AnyForm, type AxesVault, BuildDatasetOptions, type ColumnOrderRule, type ColumnVisibilityRule, type ColumnsDisplayOptions, type ColumnsSelectorConfig, DatasetEnrichment, DatasetOption, DatasetSelection, FilterMatchOptions, FilterUi, FilterUiOfType, FilterUiType, FindFilterColumnsOptions, FormField, IsNA, Log10, NotFilter, NumericalComparisonFilter, OrFilter, PColumnPredicate, PTableKey, type PTableParamsV2, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, type PlDataTableAxisMeta, type PlDataTableColumnMeta, type PlDataTableColumnsMeta, type PlDataTableFilterMeta, type PlDataTableFilterSpecLeaf, type PlDataTableFilters, type PlDataTableFiltersWithMeta, type PlDataTableGridStateCore, type PlDataTableModel, type PlDataTableSheet, type PlDataTableSheetState, type PlDataTableStateV2, type PlDataTableStateV2CacheEntry, type PlDataTableStateV2Normalized, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, PlSelectionModel, type PlTableColumnIdJson, SortedCumulativeSum, TransformedColumn, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, ValueRank, buildDatasetOptions, compileAnnotationScript, compileFilter, compileFilters, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, type createPlDataTableOptionsV3, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createRowSelectionColumn, discoverTableColumns as discoverTableColumnSnaphots, enrichCompatible, filterMatchesToOptions, findFilterColumns, getAvailableWithLinkersAxes, getEffectiveVisibility, getOrderPriority, isColumnHidden, isColumnOptional, isDatasetSelection, isHiddenFromGraphColumn, isHiddenFromUIColumn, isSheetFixedToOneValue, unreachable, upgradePlDataTableStateV2 };
@@ -2,7 +2,7 @@ import { enrichCompatible, getAvailableWithLinkersAxes } from "../pframe_utils/a
2
2
  import { createPFrameForGraphs, isHiddenFromGraphColumn, isHiddenFromUIColumn } from "./PFrameForGraphs.js";
3
3
  import { compileAnnotationScript, compileFilter, compileFilters, unreachable } from "./PlAnnotations/filters_ui.js";
4
4
  import { createDatasetSelection, isDatasetSelection } from "./PlDatasetSelector/dataset_selection.js";
5
- import { buildRefMap, filterMatchesToOptions, findFilterColumns } from "./PlDatasetSelector/filter_discovery.js";
5
+ import { filterMatchesToOptions, findFilterColumns } from "./PlDatasetSelector/filter_discovery.js";
6
6
  import { buildDatasetOptions } from "./PlDatasetSelector/build_dataset_options.js";
7
7
  import "./PlDatasetSelector/index.js";
8
8
  import { createDefaultPTableParams, createPlDataTableStateV2, upgradePlDataTableStateV2 } from "./PlDataTable/state-migration.js";
@@ -16,4 +16,4 @@ import { createPlDataTable } from "./PlDataTable/createPlDataTable/index.js";
16
16
  import "./PlDataTable/index.js";
17
17
  import { createRowSelectionColumn } from "./PlMultiSequenceAlignment.js";
18
18
  import { createPlSelectionModel } from "./PlSelectionModel.js";
19
- export { buildDatasetOptions, buildRefMap, compileAnnotationScript, compileFilter, compileFilters, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createRowSelectionColumn, discoverTableColumns as discoverTableColumnSnaphots, enrichCompatible, filterMatchesToOptions, findFilterColumns, getAvailableWithLinkersAxes, getEffectiveVisibility, getOrderPriority, isColumnHidden, isColumnOptional, isDatasetSelection, isHiddenFromGraphColumn, isHiddenFromUIColumn, isSheetFixedToOneValue, unreachable, upgradePlDataTableStateV2 };
19
+ export { buildDatasetOptions, compileAnnotationScript, compileFilter, compileFilters, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createRowSelectionColumn, discoverTableColumns as discoverTableColumnSnaphots, enrichCompatible, filterMatchesToOptions, findFilterColumns, getAvailableWithLinkersAxes, getEffectiveVisibility, getOrderPriority, isColumnHidden, isColumnOptional, isDatasetSelection, isHiddenFromGraphColumn, isHiddenFromUIColumn, isSheetFixedToOneValue, unreachable, upgradePlDataTableStateV2 };
package/dist/index.cjs CHANGED
@@ -127,7 +127,6 @@ exports._ctxProvidersCache = require_index$4._ctxProvidersCache;
127
127
  exports.allPColumnsReady = require_pcolumn_data.allPColumnsReady;
128
128
  exports.blockServiceNames = require_block_services.blockServiceNames;
129
129
  exports.buildDatasetOptions = require_build_dataset_options.buildDatasetOptions;
130
- exports.buildRefMap = require_filter_discovery.buildRefMap;
131
130
  exports.buildServices = require_service_bridge.buildServices;
132
131
  exports.collectDatasetAxes = require_peer_links.collectDatasetAxes;
133
132
  exports.collectLinkerColumns = require_utils.collectLinkerColumns;
package/dist/index.d.ts CHANGED
@@ -44,7 +44,7 @@ import { AnnotationSpec, AnnotationSpecUi, ExpressionSpec, FilterSpecUi } from "
44
44
  import { convertFilterSpecsToExpressionSpecs } from "./annotations/converter.js";
45
45
  import "./annotations/index.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 { DatasetOption, DatasetSelection, createDatasetSelection, isDatasetSelection } from "./components/PlDatasetSelector/dataset_selection.js";
47
+ import { DatasetEnrichment, DatasetOption, DatasetSelection, createDatasetSelection, isDatasetSelection } from "./components/PlDatasetSelector/dataset_selection.js";
48
48
  import { ColumnFieldStatus, ColumnRecipeId, ColumnResolutionStatus, SpecQuery } from "./columns/column_recipes/types.js";
49
49
  import { ColumnData, DataColumn, DataColumnId, DataColumnImpl, DataColumnRecipe, DataColumnSource, isDataColumn } from "./columns/data_column.js";
50
50
  import { ColumnDiscoveredRecipe } from "./columns/column_recipes/column_discovered_recipe.js";
@@ -62,7 +62,7 @@ import { ColumnOption, collectLinkerColumns, collectLinkerIds, createPeerLinkFin
62
62
  import { DatasetAxes, collectDatasetAxes, describePeerLinks, findPeerLinks, getResultPoolDatasetAxes, peerLinkedLast } from "./columns/peer_links.js";
63
63
  import { ColumnValueOption, ColumnValueOptionsColumn, ColumnValueOptionsModel, createColumnValueOptions, deriveColumnValueOptions, deriveLabelledColumnValueOptions } from "./columns/column_values.js";
64
64
  import "./columns/index.js";
65
- import { FilterMatchOptions, FindFilterColumnsOptions, buildRefMap, filterMatchesToOptions, findFilterColumns } from "./components/PlDatasetSelector/filter_discovery.js";
65
+ import { FilterMatchOptions, FindFilterColumnsOptions, filterMatchesToOptions, findFilterColumns } from "./components/PlDatasetSelector/filter_discovery.js";
66
66
  import { BuildDatasetOptions, buildDatasetOptions } from "./components/PlDatasetSelector/build_dataset_options.js";
67
67
  import { PTableParamsV2, PlDataTableAxisMeta, PlDataTableColumnMeta, PlDataTableColumnsMeta, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlTableColumnIdJson } from "./components/PlDataTable/typesV8.js";
68
68
  import { PlDataTableStateV2, createDefaultPTableParams, createPlDataTableStateV2, upgradePlDataTableStateV2 } from "./components/PlDataTable/state-migration.js";
@@ -89,4 +89,4 @@ import "./services/index.js";
89
89
  import { getEnvironmentValue } from "./env_value.js";
90
90
  export * from "@milaboratories/pl-model-common";
91
91
  export * from "@milaboratories/pl-error-like";
92
- export { AccessorColumnsProvider, AccessorColumnsProviderImpl, type AccessorHandle, AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationSpec, AnnotationSpecUi, AnnotationStep, AnnotationStepUi, AnyForm, ArrayColumnsProvider, type AxesVault, AxisLabelProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockApiV1, BlockApiV2, BlockConfig, BlockConfigV3, BlockConfigV4, BlockDefaultModelServices, BlockDefaultUiServices, BlockModelInfo, BlockModelV3, BlockRenderCtx, BlockServiceFlags, BlockStatePatch, type BlockStorage, BlockStorageFacade, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, type BlockStorageSchemaVersion, BuildDatasetOptions, 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, CfgResourceValueAsJson, Column, ColumnData, ColumnDiscoveredRecipe, type ColumnFieldStatus, ColumnFilteredRecipe, ColumnOption, type ColumnOrderRule, ColumnOverriddenRecipe, ColumnProvider, ColumnRecipe, type ColumnRecipeId, type ColumnResolutionStatus, ColumnSource, ColumnValueOption, ColumnValueOptionsColumn, ColumnValueOptionsModel, type ColumnVisibilityRule, ColumnsCollection, ColumnsCollectionDeps, ColumnsCollectionImpl, type ColumnsDisplayOptions, ColumnsProvider, type ColumnsSelectorConfig, ColumnsSource, ColumnsSourceShorthand, CommonFieldTraverseOps, CommonTraversalOps, ConfigRenderLambda, ConfigRenderLambdaFlags, CurrentSdkInfo, DataColumn, DataColumnId, DataColumnImpl, DataColumnRecipe, DataColumnSource, DataModel, DataModelBuilder, DatasetAxes, DatasetOption, DatasetSelection, DeriveHref, DeriveLabelsFormatters, DeriveLabelsOptions, DiscoveredRoot, Entry, ExpressionSpec, ExtractFunctionHandleReturn, type ExtractFutureRefType, FieldTraversalStep, FieldType, FilterMatchOptions, type FilterSpec, type FilterSpecLeaf, type FilterSpecNode, type FilterSpecOfType, type FilterSpecType, FilterSpecUi, FilterUi, FilterUiOfType, FilterUiType, FindFilterColumnsOptions, FormField, FutureRef, GetFieldStep, InferArgsType, InferBlockState, InferBlockStatePatch, InferDataType, InferFactoryData, InferFactoryModelServices, InferFactoryOutputs, InferFactoryParams, InferFactoryUiServices, InferHrefType, InferOutputsFromLambdas, InferOutputsType, InferPluginData, InferPluginHandle, InferPluginNames, InferPluginUiEntries, InferRenderFunctionReturn, InferUiState, IsNA, internal_d_exports as JsRenderInternal, type DeriveLabelsOptions as LabelDerivationOps, LinkerStep, Log10, MainAccessorName, type MigrateBlockStorageConfig, type MigrationFailure, type MigrationResult, type MigrationSuccess, type ModelServices, type MutateStoragePayload, NotFilter, NumericalComparisonFilter, OptionalPlResourceEntry, OrFilter, OutputError, PColumnCollection, type PColumnDataUniversal, PColumnEntryUniversal, PColumnEntryWithLabel, PColumnKeyList, PColumnPredicate, PColumnResourceMapData, PColumnResourceMapEntry, PColumnUniversal, PColumnWithLabel, PFrameImpl, PTableKey, type PTableParamsV2, type ParamsInput, Patch, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, type PlDataTableAxisMeta, type PlDataTableColumnMeta, type PlDataTableColumnsMeta, type PlDataTableFilterMeta, type PlDataTableFilterSpecLeaf, type PlDataTableFilters, type PlDataTableFiltersWithMeta, type PlDataTableGridStateCore, type PlDataTableModel, type PlDataTableSheet, type PlDataTableSheetState, type PlDataTableStateV2, type PlDataTableStateV2CacheEntry, type PlDataTableStateV2Normalized, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, PlResourceEntry, PlSelectionModel, type 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 PluginPublicOutputs, type PluginRecord, type PluginRegistry, PluginRenderCtx, PresentColumnValueOptionsModel, type PublicOutputFieldDef, QueryColumnId, QueryColumnIdAxis, QueryColumnIdColumn, 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, RenderCtx, RenderCtxBase, RenderFunction, ResolveModelServices, ResolveUiServices, ResourceTraversalOps, ResourceType, ResultPool, ResultPoolColumnsProvider, ResultPoolColumnsProviderImpl, SdkInfo, ServiceProxy, SimplifiedPColumnSpec, SimplifiedUniversalPColumnEntry, SortedCumulativeSum, type Entry as SpecExtractorResult, type SpecQuery, SplitAxis, SplitByAxesOpts, StagingAccessorName, StdCtx, StdCtxArgsOnly, TooltipEntry, type Trace, type TraceEntry, TransformedColumn, TreeNodeAccessor, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, TypedConfig, TypedConfigOrConfigLambda, TypedConfigOrString, type UiServices, Unionize, UniversalColumnOption, UnwrapFutureRef, ValueRank, type VersionedData, _ctxProvidersCache, allPColumnsReady, blockServiceNames, buildDatasetOptions, buildRefMap, buildServices, collectDatasetAxes, collectLinkerColumns, collectLinkerIds, compileAnnotationScript, compileFilter, compileFilters, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, createBlockStorage, createColumnValueOptions, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPeerLinkFinder, createPlDataTable, type createPlDataTableOptionsV3, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createRowSelectionColumn, createServiceProxy, deriveAxisValuesLabels, deriveColumnOptions, deriveColumnValueOptions, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabelledColumnValueOptions, deriveLabels, deriveRecipeOptions, describePeerLinks, discoverTableColumns as discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, finalizePColumnData, findFilterColumns, findPeerLinks, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getCtxProviders, getEffectiveVisibility, getEnvironmentValue, getNumberOfRows, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResultPoolDatasetAxes, getService, getSingleColumnData, getStorageData, getUniqueAxisValuesWithLabels, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, hasColumnData, hasReachableData, hasSingleDataColumn, hitQualifications, ifDef, isBlockStorage, isColumn, isColumnHidden, isColumnOptional, isColumnProvider, isColumnsCollection, isConfigLambda, isDataColumn, isDatasetSelection, isHiddenFromGraphColumn, isHiddenFromUIColumn, isLeafColumn, isPColumnReady, isPluginOutputKey, isSheetFixedToOneValue, migrateBlockStorage, normalizeBlockStorage, parsePColumnData, parseResourceMap, peerLinkedLast, pluginOutputKey, pluginOutputPrefix, queriesQualifications, readColumnValueOptions, readOutput, registerFacadeCallbacks, splitByAxes, toColumnProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
92
+ export { AccessorColumnsProvider, AccessorColumnsProviderImpl, type AccessorHandle, AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationSpec, AnnotationSpecUi, AnnotationStep, AnnotationStepUi, AnyForm, ArrayColumnsProvider, type AxesVault, AxisLabelProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockApiV1, BlockApiV2, BlockConfig, BlockConfigV3, BlockConfigV4, BlockDefaultModelServices, BlockDefaultUiServices, BlockModelInfo, BlockModelV3, BlockRenderCtx, BlockServiceFlags, BlockStatePatch, type BlockStorage, BlockStorageFacade, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, type BlockStorageSchemaVersion, BuildDatasetOptions, 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, CfgResourceValueAsJson, Column, ColumnData, ColumnDiscoveredRecipe, type ColumnFieldStatus, ColumnFilteredRecipe, ColumnOption, type ColumnOrderRule, ColumnOverriddenRecipe, ColumnProvider, ColumnRecipe, type ColumnRecipeId, type ColumnResolutionStatus, ColumnSource, ColumnValueOption, ColumnValueOptionsColumn, ColumnValueOptionsModel, type ColumnVisibilityRule, ColumnsCollection, ColumnsCollectionDeps, ColumnsCollectionImpl, type ColumnsDisplayOptions, ColumnsProvider, type ColumnsSelectorConfig, ColumnsSource, ColumnsSourceShorthand, CommonFieldTraverseOps, CommonTraversalOps, ConfigRenderLambda, ConfigRenderLambdaFlags, CurrentSdkInfo, DataColumn, DataColumnId, DataColumnImpl, DataColumnRecipe, DataColumnSource, DataModel, DataModelBuilder, DatasetAxes, DatasetEnrichment, DatasetOption, DatasetSelection, DeriveHref, DeriveLabelsFormatters, DeriveLabelsOptions, DiscoveredRoot, Entry, ExpressionSpec, ExtractFunctionHandleReturn, type ExtractFutureRefType, FieldTraversalStep, FieldType, FilterMatchOptions, type FilterSpec, type FilterSpecLeaf, type FilterSpecNode, type FilterSpecOfType, type FilterSpecType, FilterSpecUi, FilterUi, FilterUiOfType, FilterUiType, FindFilterColumnsOptions, FormField, FutureRef, GetFieldStep, InferArgsType, InferBlockState, InferBlockStatePatch, InferDataType, InferFactoryData, InferFactoryModelServices, InferFactoryOutputs, InferFactoryParams, InferFactoryUiServices, InferHrefType, InferOutputsFromLambdas, InferOutputsType, InferPluginData, InferPluginHandle, InferPluginNames, InferPluginUiEntries, InferRenderFunctionReturn, InferUiState, IsNA, internal_d_exports as JsRenderInternal, type DeriveLabelsOptions as LabelDerivationOps, LinkerStep, Log10, MainAccessorName, type MigrateBlockStorageConfig, type MigrationFailure, type MigrationResult, type MigrationSuccess, type ModelServices, type MutateStoragePayload, NotFilter, NumericalComparisonFilter, OptionalPlResourceEntry, OrFilter, OutputError, PColumnCollection, type PColumnDataUniversal, PColumnEntryUniversal, PColumnEntryWithLabel, PColumnKeyList, PColumnPredicate, PColumnResourceMapData, PColumnResourceMapEntry, PColumnUniversal, PColumnWithLabel, PFrameImpl, PTableKey, type PTableParamsV2, type ParamsInput, Patch, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, type PlDataTableAxisMeta, type PlDataTableColumnMeta, type PlDataTableColumnsMeta, type PlDataTableFilterMeta, type PlDataTableFilterSpecLeaf, type PlDataTableFilters, type PlDataTableFiltersWithMeta, type PlDataTableGridStateCore, type PlDataTableModel, type PlDataTableSheet, type PlDataTableSheetState, type PlDataTableStateV2, type PlDataTableStateV2CacheEntry, type PlDataTableStateV2Normalized, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, PlResourceEntry, PlSelectionModel, type 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 PluginPublicOutputs, type PluginRecord, type PluginRegistry, PluginRenderCtx, PresentColumnValueOptionsModel, type PublicOutputFieldDef, QueryColumnId, QueryColumnIdAxis, QueryColumnIdColumn, 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, RenderCtx, RenderCtxBase, RenderFunction, ResolveModelServices, ResolveUiServices, ResourceTraversalOps, ResourceType, ResultPool, ResultPoolColumnsProvider, ResultPoolColumnsProviderImpl, SdkInfo, ServiceProxy, SimplifiedPColumnSpec, SimplifiedUniversalPColumnEntry, SortedCumulativeSum, type Entry as SpecExtractorResult, type SpecQuery, SplitAxis, SplitByAxesOpts, StagingAccessorName, StdCtx, StdCtxArgsOnly, TooltipEntry, type Trace, type TraceEntry, TransformedColumn, TreeNodeAccessor, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, TypedConfig, TypedConfigOrConfigLambda, TypedConfigOrString, type UiServices, Unionize, UniversalColumnOption, UnwrapFutureRef, ValueRank, type VersionedData, _ctxProvidersCache, allPColumnsReady, blockServiceNames, buildDatasetOptions, buildServices, collectDatasetAxes, collectLinkerColumns, collectLinkerIds, compileAnnotationScript, compileFilter, compileFilters, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, createBlockStorage, createColumnValueOptions, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPeerLinkFinder, createPlDataTable, type createPlDataTableOptionsV3, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createRowSelectionColumn, createServiceProxy, deriveAxisValuesLabels, deriveColumnOptions, deriveColumnValueOptions, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabelledColumnValueOptions, deriveLabels, deriveRecipeOptions, describePeerLinks, discoverTableColumns as discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, finalizePColumnData, findFilterColumns, findPeerLinks, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getCtxProviders, getEffectiveVisibility, getEnvironmentValue, getNumberOfRows, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResultPoolDatasetAxes, getService, getSingleColumnData, getStorageData, getUniqueAxisValuesWithLabels, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, hasColumnData, hasReachableData, hasSingleDataColumn, hitQualifications, ifDef, isBlockStorage, isColumn, isColumnHidden, isColumnOptional, isColumnProvider, isColumnsCollection, isConfigLambda, isDataColumn, isDatasetSelection, isHiddenFromGraphColumn, isHiddenFromUIColumn, isLeafColumn, isPColumnReady, isPluginOutputKey, isSheetFixedToOneValue, migrateBlockStorage, normalizeBlockStorage, parsePColumnData, parseResourceMap, peerLinkedLast, pluginOutputKey, pluginOutputPrefix, queriesQualifications, readColumnValueOptions, readOutput, registerFacadeCallbacks, splitByAxes, toColumnProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
package/dist/index.js CHANGED
@@ -43,7 +43,7 @@ import { getAllRelatedColumns, getRelatedColumns } from "./pframe_utils/columns.
43
43
  import { createPFrameForGraphs, isHiddenFromGraphColumn, isHiddenFromUIColumn } from "./components/PFrameForGraphs.js";
44
44
  import { compileAnnotationScript, compileFilter, compileFilters, unreachable } from "./components/PlAnnotations/filters_ui.js";
45
45
  import { createDatasetSelection, isDatasetSelection } from "./components/PlDatasetSelector/dataset_selection.js";
46
- import { buildRefMap, filterMatchesToOptions, findFilterColumns } from "./components/PlDatasetSelector/filter_discovery.js";
46
+ import { filterMatchesToOptions, findFilterColumns } from "./components/PlDatasetSelector/filter_discovery.js";
47
47
  import { buildDatasetOptions } from "./components/PlDatasetSelector/build_dataset_options.js";
48
48
  import { filterSpecToSpecQueryExpr } from "./filters/converters/filterToQuery.js";
49
49
  import { convertFilterUiToExpressionImpl, convertFilterUiToExpressions } from "./filters/converters/filterUiToExpressionImpl.js";
@@ -71,4 +71,4 @@ import { getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, g
71
71
  import { getEnvironmentValue } from "./env_value.js";
72
72
  export * from "@milaboratories/pl-model-common";
73
73
  export * from "@milaboratories/pl-error-like";
74
- export { AccessorColumnsProvider, AccessorColumnsProviderImpl, ArrayColumnsProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockModelV3, BlockRenderCtx, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, Column, ColumnDiscoveredRecipe, ColumnFilteredRecipe, ColumnOverriddenRecipe, ColumnRecipe, ColumnsCollection, ColumnsCollectionImpl, ColumnsProvider, CurrentSdkInfo, DataColumn, DataColumnImpl, DataModel, DataModelBuilder, FutureRef, internal_exports as JsRenderInternal, MainAccessorName, 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, ResultPool, ResultPoolColumnsProvider, ResultPoolColumnsProviderImpl, StagingAccessorName, TreeNodeAccessor, _ctxProvidersCache, allPColumnsReady, blockServiceNames, buildDatasetOptions, buildRefMap, buildServices, collectDatasetAxes, collectLinkerColumns, collectLinkerIds, compileAnnotationScript, compileFilter, compileFilters, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, createBlockStorage, createColumnValueOptions, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPeerLinkFinder, createPlDataTable, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createRowSelectionColumn, createServiceProxy, deriveAxisValuesLabels, deriveColumnOptions, deriveColumnValueOptions, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabelledColumnValueOptions, deriveLabels, deriveRecipeOptions, describePeerLinks, discoverTableColumns as discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, finalizePColumnData, findFilterColumns, findPeerLinks, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getCtxProviders, getEffectiveVisibility, getEnvironmentValue, getNumberOfRows, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResultPoolDatasetAxes, getService, getSingleColumnData, getStorageData, getUniqueAxisValuesWithLabels, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, hasColumnData, hasReachableData, hasSingleDataColumn, hitQualifications, ifDef, isBlockStorage, isColumn, isColumnHidden, isColumnOptional, isColumnProvider, isColumnsCollection, isConfigLambda, isDataColumn, isDatasetSelection, isHiddenFromGraphColumn, isHiddenFromUIColumn, isLeafColumn, isPColumnReady, isPluginOutputKey, isSheetFixedToOneValue, migrateBlockStorage, normalizeBlockStorage, parsePColumnData, parseResourceMap, peerLinkedLast, pluginOutputKey, pluginOutputPrefix, queriesQualifications, readColumnValueOptions, readOutput, registerFacadeCallbacks, splitByAxes, toColumnProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
74
+ export { AccessorColumnsProvider, AccessorColumnsProviderImpl, ArrayColumnsProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockModelV3, BlockRenderCtx, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, Column, ColumnDiscoveredRecipe, ColumnFilteredRecipe, ColumnOverriddenRecipe, ColumnRecipe, ColumnsCollection, ColumnsCollectionImpl, ColumnsProvider, CurrentSdkInfo, DataColumn, DataColumnImpl, DataModel, DataModelBuilder, FutureRef, internal_exports as JsRenderInternal, MainAccessorName, 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, ResultPool, ResultPoolColumnsProvider, ResultPoolColumnsProviderImpl, StagingAccessorName, TreeNodeAccessor, _ctxProvidersCache, allPColumnsReady, blockServiceNames, buildDatasetOptions, buildServices, collectDatasetAxes, collectLinkerColumns, collectLinkerIds, compileAnnotationScript, compileFilter, compileFilters, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, createBlockStorage, createColumnValueOptions, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPeerLinkFinder, createPlDataTable, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createRowSelectionColumn, createServiceProxy, deriveAxisValuesLabels, deriveColumnOptions, deriveColumnValueOptions, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabelledColumnValueOptions, deriveLabels, deriveRecipeOptions, describePeerLinks, discoverTableColumns as discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, finalizePColumnData, findFilterColumns, findPeerLinks, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getCtxProviders, getEffectiveVisibility, getEnvironmentValue, getNumberOfRows, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResultPoolDatasetAxes, getService, getSingleColumnData, getStorageData, getUniqueAxisValuesWithLabels, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, hasColumnData, hasReachableData, hasSingleDataColumn, hitQualifications, ifDef, isBlockStorage, isColumn, isColumnHidden, isColumnOptional, isColumnProvider, isColumnsCollection, isConfigLambda, isDataColumn, isDatasetSelection, isHiddenFromGraphColumn, isHiddenFromUIColumn, isLeafColumn, isPColumnReady, isPluginOutputKey, isSheetFixedToOneValue, migrateBlockStorage, normalizeBlockStorage, parsePColumnData, parseResourceMap, peerLinkedLast, pluginOutputKey, pluginOutputPrefix, queriesQualifications, readColumnValueOptions, readOutput, registerFacadeCallbacks, splitByAxes, toColumnProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
package/dist/package.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "1.91.0";
2
+ var version = "1.92.0";
3
3
  Object.defineProperty(exports, "version", {
4
4
  enumerable: true,
5
5
  get: function() {
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "1.91.0";
2
+ var version = "1.92.0";
3
3
  export { version };
4
4
 
5
5
  //# sourceMappingURL=package.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/model",
3
- "version": "1.91.0",
3
+ "version": "1.92.0",
4
4
  "description": "Platforma.bio SDK / Block Model",
5
5
  "files": [
6
6
  "./dist/**/*",
@@ -27,9 +27,9 @@
27
27
  "dependencies": {
28
28
  "@milaboratories/helpers": "1.14.7",
29
29
  "@milaboratories/pl-error-like": "1.12.11",
30
- "@milaboratories/pl-model-common": "1.56.0",
31
- "@milaboratories/pl-model-middle-layer": "1.41.0",
32
- "@milaboratories/ptabler-expression-js": "1.2.50",
30
+ "@milaboratories/pl-model-common": "1.57.0",
31
+ "@milaboratories/pl-model-middle-layer": "1.41.1",
32
+ "@milaboratories/ptabler-expression-js": "1.2.51",
33
33
  "canonicalize": "~2.1.0",
34
34
  "es-toolkit": "^1.39.10",
35
35
  "fast-json-patch": "^3.1.1",
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@milaboratories/build-configs": "2.0.3",
42
- "@milaboratories/columns-collection-driver": "0.3.0",
43
- "@milaboratories/pf-driver": "1.9.20",
44
- "@milaboratories/pf-spec-driver": "1.6.2",
42
+ "@milaboratories/columns-collection-driver": "0.3.1",
43
+ "@milaboratories/pf-driver": "1.9.21",
44
+ "@milaboratories/pf-spec-driver": "1.6.3",
45
45
  "@milaboratories/ts-builder": "1.8.0",
46
46
  "@milaboratories/ts-configs": "1.4.1",
47
47
  "@platforma-sdk/block-kind": "1.1.1",
@@ -3,9 +3,9 @@
3
3
  * `ColumnsCollectionDriverImpl` (so the discover / filter algebra is exercised
4
4
  * end-to-end) with stub bindings backed by an in-memory `(id → spec)` map.
5
5
  *
6
- * Accessor-based source kinds (`"accessor"`, `"result_pool"`) throw — they
7
- * have no meaning outside a render ctx. Tests should stick to `"ids"` /
8
- * `"collection"` sources.
6
+ * The `"accessor"` source kind throws — it has no meaning outside a render
7
+ * ctx. A `"result_pool"` source holds the registered columns whose id names a
8
+ * block output; tests otherwise stick to `"ids"` / `"collection"` sources.
9
9
  *
10
10
  * Calling {@link TestCollectionDriverHandle.installAmbientCtx} additionally
11
11
  * installs a minimal `globalThis.cfgRenderCtx` AND plants a stub
@@ -14,6 +14,7 @@
14
14
  * `ColumnsCollection.getColumns()`).
15
15
  */
16
16
  import type {
17
+ AccessorLike,
17
18
  ColumnEntriesProvider,
18
19
  ColumnsCollectionDriverHost,
19
20
  ColumnsCollectionDriverModel,
@@ -21,8 +22,15 @@ import type {
21
22
  PObjectId,
22
23
  PObjectSpec,
23
24
  ServiceName,
25
+ UpstreamBlockCtx,
26
+ } from "@milaboratories/pl-model-common";
27
+ import {
28
+ columnProducer,
29
+ extractPObjectId,
30
+ isPColumnSpec,
31
+ ResourceTypeName,
32
+ Services,
24
33
  } from "@milaboratories/pl-model-common";
25
- import { extractPObjectId, isPColumnSpec, Services } from "@milaboratories/pl-model-common";
26
34
  import { ColumnsCollectionDriverImpl } from "@milaboratories/columns-collection-driver";
27
35
  import { SpecDriver } from "@milaboratories/pf-spec-driver";
28
36
  import type { GlobalCfgRenderCtx } from "../../render/internal";
@@ -82,7 +90,7 @@ export function createTestCollectionDriver(): TestCollectionDriverHandle {
82
90
  resolveAccessor: () => {
83
91
  throw new Error("test collection driver: no accessor support");
84
92
  },
85
- getUpstreamBlockCtxes: () => [],
93
+ getUpstreamBlockCtxes: () => buildPoolBlocks(specMap),
86
94
  getSpecDriver: () => specDriver,
87
95
  resolveSpec: (id) => specMap.get(extractPObjectId(id)),
88
96
  };
@@ -147,6 +155,38 @@ export function createTestCollectionDriver(): TestCollectionDriverHandle {
147
155
  };
148
156
  }
149
157
 
158
+ interface PoolCtxStub extends AccessorLike<PoolCtxStub> {}
159
+
160
+ /**
161
+ * Upstream blocks that export the registered columns whose id names a block
162
+ * output, one block per block id. Only the column names are served: the driver
163
+ * reads the specs through `resolveSpec`.
164
+ */
165
+ function buildPoolBlocks(
166
+ specMap: ReadonlyMap<PObjectId, PObjectSpec>,
167
+ ): UpstreamBlockCtx<PoolCtxStub>[] {
168
+ const namesByBlock = new Map<string, string[]>();
169
+ for (const id of specMap.keys()) {
170
+ const producer = columnProducer(id);
171
+ if (producer === undefined) continue;
172
+ namesByBlock.set(producer.blockId, [
173
+ ...(namesByBlock.get(producer.blockId) ?? []),
174
+ producer.name,
175
+ ]);
176
+ }
177
+ return [...namesByBlock].map(([blockId, names]) => {
178
+ const prodCtx: PoolCtxStub = {
179
+ resourceType: { name: ResourceTypeName.PFrame },
180
+ traverse: () => undefined,
181
+ listInputFields: () => names.map((name) => `${name}.spec`),
182
+ getInputsLocked: () => true,
183
+ hasData: () => false,
184
+ getDataAsJson: () => undefined,
185
+ };
186
+ return { blockId, prodCtx };
187
+ });
188
+ }
189
+
150
190
  /**
151
191
  * Construct a {@link ColumnEntriesProvider} + {@link ColumnsProvider} backed
152
192
  * by an `(id → spec)` map. Each entry carries a fake {@link TreeNodeAccessor}