@platforma-sdk/model 1.69.0 → 1.71.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/columns/column_collection_builder.cjs +1 -4
- package/dist/columns/column_collection_builder.cjs.map +1 -1
- package/dist/columns/column_collection_builder.d.ts +0 -2
- package/dist/columns/column_collection_builder.d.ts.map +1 -1
- package/dist/columns/column_collection_builder.js +1 -4
- package/dist/columns/column_collection_builder.js.map +1 -1
- package/dist/columns/column_snapshot_provider.cjs +26 -2
- package/dist/columns/column_snapshot_provider.cjs.map +1 -1
- package/dist/columns/column_snapshot_provider.d.ts +2 -1
- package/dist/columns/column_snapshot_provider.d.ts.map +1 -1
- package/dist/columns/column_snapshot_provider.js +25 -2
- package/dist/columns/column_snapshot_provider.js.map +1 -1
- package/dist/columns/ctx_column_sources.cjs +5 -8
- package/dist/columns/ctx_column_sources.cjs.map +1 -1
- package/dist/columns/ctx_column_sources.d.ts +4 -7
- package/dist/columns/ctx_column_sources.d.ts.map +1 -1
- package/dist/columns/ctx_column_sources.js +5 -8
- package/dist/columns/ctx_column_sources.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs +41 -24
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js +42 -25
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.cjs +1 -2
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.js +1 -2
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.cjs +16 -4
- package/dist/components/PlDataTable/createPlDataTable/utils.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.js +16 -5
- package/dist/components/PlDataTable/createPlDataTable/utils.js.map +1 -1
- package/dist/components/PlDatasetSelector/build_dataset_options.cjs +23 -11
- package/dist/components/PlDatasetSelector/build_dataset_options.cjs.map +1 -1
- package/dist/components/PlDatasetSelector/build_dataset_options.d.ts +9 -2
- package/dist/components/PlDatasetSelector/build_dataset_options.d.ts.map +1 -1
- package/dist/components/PlDatasetSelector/build_dataset_options.js +22 -11
- package/dist/components/PlDatasetSelector/build_dataset_options.js.map +1 -1
- package/dist/components/PlDatasetSelector/dataset_selection.cjs +20 -0
- package/dist/components/PlDatasetSelector/dataset_selection.cjs.map +1 -0
- package/dist/components/PlDatasetSelector/dataset_selection.d.ts +23 -0
- package/dist/components/PlDatasetSelector/dataset_selection.d.ts.map +1 -0
- package/dist/components/PlDatasetSelector/dataset_selection.js +19 -0
- package/dist/components/PlDatasetSelector/dataset_selection.js.map +1 -0
- package/dist/components/PlDatasetSelector/enrichment_discovery.cjs +75 -0
- package/dist/components/PlDatasetSelector/enrichment_discovery.cjs.map +1 -0
- package/dist/components/PlDatasetSelector/enrichment_discovery.js +73 -0
- package/dist/components/PlDatasetSelector/enrichment_discovery.js.map +1 -0
- package/dist/components/PlDatasetSelector/index.cjs +1 -0
- package/dist/components/PlDatasetSelector/index.d.ts +1 -0
- package/dist/components/PlDatasetSelector/index.js +1 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/labels/derive_distinct_tooltips.cjs +0 -3
- package/dist/labels/derive_distinct_tooltips.cjs.map +1 -1
- package/dist/labels/derive_distinct_tooltips.js +0 -3
- package/dist/labels/derive_distinct_tooltips.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/render/api.cjs +3 -14
- package/dist/render/api.cjs.map +1 -1
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/api.js +4 -15
- package/dist/render/api.js.map +1 -1
- package/dist/render/index.cjs +1 -1
- package/dist/render/index.js +1 -1
- package/package.json +9 -9
- package/src/columns/column_collection_builder.ts +0 -3
- package/src/columns/column_snapshot_provider.ts +30 -14
- package/src/columns/ctx_column_sources.ts +6 -12
- package/src/components/PlDataTable/createPlDataTable/createPlDataTableV3.ts +58 -44
- package/src/components/PlDataTable/createPlDataTable/discoverColumns.ts +0 -1
- package/src/components/PlDataTable/createPlDataTable/utils.ts +25 -3
- package/src/components/PlDatasetSelector/build_dataset_options.ts +48 -17
- package/src/components/PlDatasetSelector/dataset_selection.ts +37 -0
- package/src/components/PlDatasetSelector/enrichment_discovery.ts +111 -0
- package/src/components/PlDatasetSelector/index.ts +1 -0
- package/src/labels/derive_distinct_tooltips.test.ts +6 -16
- package/src/labels/derive_distinct_tooltips.ts +0 -3
- package/src/render/api.ts +5 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrichment_discovery.cjs","names":["Annotation","deriveDistinctLabels"],"sources":["../../../src/components/PlDatasetSelector/enrichment_discovery.ts"],"sourcesContent":["import { Annotation, createEnrichmentRef } from \"@milaboratories/pl-model-common\";\nimport type {\n EnrichmentStep,\n LabeledEnrichmentRef,\n LabeledEnrichmentRefs,\n MultiColumnSelector,\n PObjectId,\n PObjectSpec,\n} from \"@milaboratories/pl-model-common\";\nimport type {\n AnchoredColumnCollection,\n ColumnVariant,\n} from \"../../columns/column_collection_builder\";\nimport {\n deriveDistinctLabels,\n type DeriveLabelsOptions,\n type Entry,\n} from \"../../labels/derive_distinct_labels\";\n\n/**\n * True for global-form ids — `canonicalize({__isRef: true, blockId, name})` —\n * which the workflow can resolve via bquery. Local-form ids (`resolvePath`)\n * fail this check and are excluded from auto-discovery; prerun/outputs hops\n * must be supplied as resolved `{spec, data}` instead.\n */\nfunction isGloballyAddressable(id: PObjectId): boolean {\n try {\n const decoded = JSON.parse(id);\n return (\n typeof decoded === \"object\" &&\n decoded !== null &&\n decoded.__isRef === true &&\n typeof decoded.blockId === \"string\" &&\n typeof decoded.name === \"string\"\n );\n } catch {\n return false;\n }\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(\n collection: AnchoredColumnCollection,\n options?: {\n maxHops?: number;\n include?: MultiColumnSelector | MultiColumnSelector[];\n predicate?: (spec: PObjectSpec) => boolean;\n },\n): ColumnVariant[] {\n const include =\n options?.include === undefined\n ? undefined\n : Array.isArray(options.include)\n ? options.include\n : [options.include];\n const variants = collection.findColumnVariants({\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 const predicate = options?.predicate;\n return variants.filter((v) => {\n if (v.path.length === 0) return false;\n if (predicate !== undefined && !predicate(v.column.spec)) return false;\n if (!isGloballyAddressable(v.column.id)) return false;\n if (v.path.some((p) => !isGloballyAddressable(p.linker.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: ColumnVariant[],\n labelOptions?: DeriveLabelsOptions,\n): LabeledEnrichmentRefs {\n if (variants.length === 0) return [];\n\n const entries: Entry[] = variants.map((variant) => ({\n spec: variant.column.spec,\n linkerPath: variant.path.map((p) => ({ spec: p.linker.spec })),\n qualifications: variant.qualifications,\n }));\n const labels = deriveDistinctLabels(entries, labelOptions);\n\n return variants.map((variant, i): LabeledEnrichmentRef => {\n const path: EnrichmentStep[] = variant.path.map((step) => ({\n type: \"linker\",\n linker: step.linker.id,\n }));\n return {\n ref: createEnrichmentRef(variant.column.id, {\n path,\n qualifications: variant.qualifications.forHit,\n }),\n label: labels[i],\n };\n });\n}\n"],"mappings":";;;;;;;;;;AAyBA,SAAS,sBAAsB,IAAwB;AACrD,KAAI;EACF,MAAM,UAAU,KAAK,MAAM,GAAG;AAC9B,SACE,OAAO,YAAY,YACnB,YAAY,QACZ,QAAQ,YAAY,QACpB,OAAO,QAAQ,YAAY,YAC3B,OAAO,QAAQ,SAAS;SAEpB;AACN,SAAO;;;;;;;;AASX,SAAgB,sBACd,YACA,SAKiB;CACjB,MAAM,UACJ,SAAS,YAAY,KAAA,IACjB,KAAA,IACA,MAAM,QAAQ,QAAQ,QAAQ,GAC5B,QAAQ,UACR,CAAC,QAAQ,QAAQ;CACzB,MAAM,WAAW,WAAW,mBAAmB;EAC7C,MAAM;EACN,SAAS,SAAS,WAAW;EAC7B;EACA,SAAS;GACP,EAAE,aAAa,GAAGA,gCAAAA,WAAW,WAAW,QAAQ,EAAE;GAClD,EAAE,aAAa,GAAGA,gCAAAA,WAAW,iBAAiB,QAAQ,EAAE;GACxD,EAAE,MAAMA,gCAAAA,WAAW,OAAO;GAC3B;EACF,CAAC;CACF,MAAM,YAAY,SAAS;AAC3B,QAAO,SAAS,QAAQ,MAAM;AAC5B,MAAI,EAAE,KAAK,WAAW,EAAG,QAAO;AAChC,MAAI,cAAc,KAAA,KAAa,CAAC,UAAU,EAAE,OAAO,KAAK,CAAE,QAAO;AACjE,MAAI,CAAC,sBAAsB,EAAE,OAAO,GAAG,CAAE,QAAO;AAChD,MAAI,EAAE,KAAK,MAAM,MAAM,CAAC,sBAAsB,EAAE,OAAO,GAAG,CAAC,CAAE,QAAO;AACpE,SAAO;GACP;;;;;;;AAQJ,SAAgB,yBACd,UACA,cACuB;AACvB,KAAI,SAAS,WAAW,EAAG,QAAO,EAAE;CAOpC,MAAM,SAASC,+BAAAA,qBALU,SAAS,KAAK,aAAa;EAClD,MAAM,QAAQ,OAAO;EACrB,YAAY,QAAQ,KAAK,KAAK,OAAO,EAAE,MAAM,EAAE,OAAO,MAAM,EAAE;EAC9D,gBAAgB,QAAQ;EACzB,EAAE,EAC0C,aAAa;AAE1D,QAAO,SAAS,KAAK,SAAS,MAA4B;EACxD,MAAM,OAAyB,QAAQ,KAAK,KAAK,UAAU;GACzD,MAAM;GACN,QAAQ,KAAK,OAAO;GACrB,EAAE;AACH,SAAO;GACL,MAAA,GAAA,gCAAA,qBAAyB,QAAQ,OAAO,IAAI;IAC1C;IACA,gBAAgB,QAAQ,eAAe;IACxC,CAAC;GACF,OAAO,OAAO;GACf;GACD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { deriveDistinctLabels } from "../../labels/derive_distinct_labels.js";
|
|
2
|
+
import { Annotation, createEnrichmentRef } from "@milaboratories/pl-model-common";
|
|
3
|
+
//#region src/components/PlDatasetSelector/enrichment_discovery.ts
|
|
4
|
+
/**
|
|
5
|
+
* True for global-form ids — `canonicalize({__isRef: true, blockId, name})` —
|
|
6
|
+
* which the workflow can resolve via bquery. Local-form ids (`resolvePath`)
|
|
7
|
+
* fail this check and are excluded from auto-discovery; prerun/outputs hops
|
|
8
|
+
* must be supplied as resolved `{spec, data}` instead.
|
|
9
|
+
*/
|
|
10
|
+
function isGloballyAddressable(id) {
|
|
11
|
+
try {
|
|
12
|
+
const decoded = JSON.parse(id);
|
|
13
|
+
return typeof decoded === "object" && decoded !== null && decoded.__isRef === true && typeof decoded.blockId === "string" && typeof decoded.name === "string";
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Linker-reached hits attached to the anchor primary. Drops zero-hop variants
|
|
20
|
+
* (filters / the primary itself) and structural hits (subset, linker, label
|
|
21
|
+
* columns). Narrow further with `include` selectors or a `predicate`.
|
|
22
|
+
*/
|
|
23
|
+
function findEnrichmentColumns(collection, options) {
|
|
24
|
+
const include = options?.include === void 0 ? void 0 : Array.isArray(options.include) ? options.include : [options.include];
|
|
25
|
+
const variants = collection.findColumnVariants({
|
|
26
|
+
mode: "enrichment",
|
|
27
|
+
maxHops: options?.maxHops ?? 4,
|
|
28
|
+
include,
|
|
29
|
+
exclude: [
|
|
30
|
+
{ annotations: { [Annotation.IsSubset]: "true" } },
|
|
31
|
+
{ annotations: { [Annotation.IsLinkerColumn]: "true" } },
|
|
32
|
+
{ name: Annotation.Label }
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
const predicate = options?.predicate;
|
|
36
|
+
return variants.filter((v) => {
|
|
37
|
+
if (v.path.length === 0) return false;
|
|
38
|
+
if (predicate !== void 0 && !predicate(v.column.spec)) return false;
|
|
39
|
+
if (!isGloballyAddressable(v.column.id)) return false;
|
|
40
|
+
if (v.path.some((p) => !isGloballyAddressable(p.linker.id))) return false;
|
|
41
|
+
return true;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Pair each variant with a path-disambiguated label (so export headers stay
|
|
46
|
+
* unique) and carry hit/linker `PObjectId`s through verbatim. Propagates
|
|
47
|
+
* `qualifications.forHit`; `forQueries` is re-derived by the table builder.
|
|
48
|
+
*/
|
|
49
|
+
function enrichmentVariantsToRefs(variants, labelOptions) {
|
|
50
|
+
if (variants.length === 0) return [];
|
|
51
|
+
const labels = deriveDistinctLabels(variants.map((variant) => ({
|
|
52
|
+
spec: variant.column.spec,
|
|
53
|
+
linkerPath: variant.path.map((p) => ({ spec: p.linker.spec })),
|
|
54
|
+
qualifications: variant.qualifications
|
|
55
|
+
})), labelOptions);
|
|
56
|
+
return variants.map((variant, i) => {
|
|
57
|
+
const path = variant.path.map((step) => ({
|
|
58
|
+
type: "linker",
|
|
59
|
+
linker: step.linker.id
|
|
60
|
+
}));
|
|
61
|
+
return {
|
|
62
|
+
ref: createEnrichmentRef(variant.column.id, {
|
|
63
|
+
path,
|
|
64
|
+
qualifications: variant.qualifications.forHit
|
|
65
|
+
}),
|
|
66
|
+
label: labels[i]
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { enrichmentVariantsToRefs, findEnrichmentColumns };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=enrichment_discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrichment_discovery.js","names":[],"sources":["../../../src/components/PlDatasetSelector/enrichment_discovery.ts"],"sourcesContent":["import { Annotation, createEnrichmentRef } from \"@milaboratories/pl-model-common\";\nimport type {\n EnrichmentStep,\n LabeledEnrichmentRef,\n LabeledEnrichmentRefs,\n MultiColumnSelector,\n PObjectId,\n PObjectSpec,\n} from \"@milaboratories/pl-model-common\";\nimport type {\n AnchoredColumnCollection,\n ColumnVariant,\n} from \"../../columns/column_collection_builder\";\nimport {\n deriveDistinctLabels,\n type DeriveLabelsOptions,\n type Entry,\n} from \"../../labels/derive_distinct_labels\";\n\n/**\n * True for global-form ids — `canonicalize({__isRef: true, blockId, name})` —\n * which the workflow can resolve via bquery. Local-form ids (`resolvePath`)\n * fail this check and are excluded from auto-discovery; prerun/outputs hops\n * must be supplied as resolved `{spec, data}` instead.\n */\nfunction isGloballyAddressable(id: PObjectId): boolean {\n try {\n const decoded = JSON.parse(id);\n return (\n typeof decoded === \"object\" &&\n decoded !== null &&\n decoded.__isRef === true &&\n typeof decoded.blockId === \"string\" &&\n typeof decoded.name === \"string\"\n );\n } catch {\n return false;\n }\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(\n collection: AnchoredColumnCollection,\n options?: {\n maxHops?: number;\n include?: MultiColumnSelector | MultiColumnSelector[];\n predicate?: (spec: PObjectSpec) => boolean;\n },\n): ColumnVariant[] {\n const include =\n options?.include === undefined\n ? undefined\n : Array.isArray(options.include)\n ? options.include\n : [options.include];\n const variants = collection.findColumnVariants({\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 const predicate = options?.predicate;\n return variants.filter((v) => {\n if (v.path.length === 0) return false;\n if (predicate !== undefined && !predicate(v.column.spec)) return false;\n if (!isGloballyAddressable(v.column.id)) return false;\n if (v.path.some((p) => !isGloballyAddressable(p.linker.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: ColumnVariant[],\n labelOptions?: DeriveLabelsOptions,\n): LabeledEnrichmentRefs {\n if (variants.length === 0) return [];\n\n const entries: Entry[] = variants.map((variant) => ({\n spec: variant.column.spec,\n linkerPath: variant.path.map((p) => ({ spec: p.linker.spec })),\n qualifications: variant.qualifications,\n }));\n const labels = deriveDistinctLabels(entries, labelOptions);\n\n return variants.map((variant, i): LabeledEnrichmentRef => {\n const path: EnrichmentStep[] = variant.path.map((step) => ({\n type: \"linker\",\n linker: step.linker.id,\n }));\n return {\n ref: createEnrichmentRef(variant.column.id, {\n path,\n qualifications: variant.qualifications.forHit,\n }),\n label: labels[i],\n };\n });\n}\n"],"mappings":";;;;;;;;;AAyBA,SAAS,sBAAsB,IAAwB;AACrD,KAAI;EACF,MAAM,UAAU,KAAK,MAAM,GAAG;AAC9B,SACE,OAAO,YAAY,YACnB,YAAY,QACZ,QAAQ,YAAY,QACpB,OAAO,QAAQ,YAAY,YAC3B,OAAO,QAAQ,SAAS;SAEpB;AACN,SAAO;;;;;;;;AASX,SAAgB,sBACd,YACA,SAKiB;CACjB,MAAM,UACJ,SAAS,YAAY,KAAA,IACjB,KAAA,IACA,MAAM,QAAQ,QAAQ,QAAQ,GAC5B,QAAQ,UACR,CAAC,QAAQ,QAAQ;CACzB,MAAM,WAAW,WAAW,mBAAmB;EAC7C,MAAM;EACN,SAAS,SAAS,WAAW;EAC7B;EACA,SAAS;GACP,EAAE,aAAa,GAAG,WAAW,WAAW,QAAQ,EAAE;GAClD,EAAE,aAAa,GAAG,WAAW,iBAAiB,QAAQ,EAAE;GACxD,EAAE,MAAM,WAAW,OAAO;GAC3B;EACF,CAAC;CACF,MAAM,YAAY,SAAS;AAC3B,QAAO,SAAS,QAAQ,MAAM;AAC5B,MAAI,EAAE,KAAK,WAAW,EAAG,QAAO;AAChC,MAAI,cAAc,KAAA,KAAa,CAAC,UAAU,EAAE,OAAO,KAAK,CAAE,QAAO;AACjE,MAAI,CAAC,sBAAsB,EAAE,OAAO,GAAG,CAAE,QAAO;AAChD,MAAI,EAAE,KAAK,MAAM,MAAM,CAAC,sBAAsB,EAAE,OAAO,GAAG,CAAC,CAAE,QAAO;AACpE,SAAO;GACP;;;;;;;AAQJ,SAAgB,yBACd,UACA,cACuB;AACvB,KAAI,SAAS,WAAW,EAAG,QAAO,EAAE;CAOpC,MAAM,SAAS,qBALU,SAAS,KAAK,aAAa;EAClD,MAAM,QAAQ,OAAO;EACrB,YAAY,QAAQ,KAAK,KAAK,OAAO,EAAE,MAAM,EAAE,OAAO,MAAM,EAAE;EAC9D,gBAAgB,QAAQ;EACzB,EAAE,EAC0C,aAAa;AAE1D,QAAO,SAAS,KAAK,SAAS,MAA4B;EACxD,MAAM,OAAyB,QAAQ,KAAK,KAAK,UAAU;GACzD,MAAM;GACN,QAAQ,KAAK,OAAO;GACrB,EAAE;AACH,SAAO;GACL,KAAK,oBAAoB,QAAQ,OAAO,IAAI;IAC1C;IACA,gBAAgB,QAAQ,eAAe;IACxC,CAAC;GACF,OAAO,OAAO;GACf;GACD"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { DatasetOption, DatasetSelection, createDatasetSelection, isDatasetSelection } from "./dataset_selection.js";
|
|
1
2
|
import { buildRefMap, filterMatchesToOptions, findFilterColumns } from "./filter_discovery.js";
|
|
2
3
|
import { BuildDatasetOptions, buildDatasetOptions } from "./build_dataset_options.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require("../pframe_utils/axes.cjs");
|
|
2
2
|
require("./PFrameForGraphs.cjs");
|
|
3
3
|
require("./PlAnnotations/filters_ui.cjs");
|
|
4
|
+
require("./PlDatasetSelector/dataset_selection.cjs");
|
|
4
5
|
require("./PlDatasetSelector/filter_discovery.cjs");
|
|
5
6
|
require("./PlDatasetSelector/build_dataset_options.cjs");
|
|
6
7
|
require("./PlDatasetSelector/index.cjs");
|
|
@@ -2,6 +2,7 @@ import { AxesVault, enrichCompatible, getAvailableWithLinkersAxes } from "../pfr
|
|
|
2
2
|
import { createPFrameForGraphs, isHiddenFromGraphColumn, isHiddenFromUIColumn } from "./PFrameForGraphs.js";
|
|
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
|
+
import { DatasetOption, DatasetSelection, createDatasetSelection, isDatasetSelection } from "./PlDatasetSelector/dataset_selection.js";
|
|
5
6
|
import { buildRefMap, filterMatchesToOptions, findFilterColumns } from "./PlDatasetSelector/filter_discovery.js";
|
|
6
7
|
import { BuildDatasetOptions, buildDatasetOptions } from "./PlDatasetSelector/build_dataset_options.js";
|
|
7
8
|
import { PTableParamsV2, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlTableColumnId, PlTableColumnIdJson } from "./PlDataTable/typesV5.js";
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "../pframe_utils/axes.js";
|
|
2
2
|
import "./PFrameForGraphs.js";
|
|
3
3
|
import "./PlAnnotations/filters_ui.js";
|
|
4
|
+
import "./PlDatasetSelector/dataset_selection.js";
|
|
4
5
|
import "./PlDatasetSelector/filter_discovery.js";
|
|
5
6
|
import "./PlDatasetSelector/build_dataset_options.js";
|
|
6
7
|
import "./PlDatasetSelector/index.js";
|
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ const require_axes = require("./pframe_utils/axes.cjs");
|
|
|
31
31
|
const require_columns = require("./pframe_utils/columns.cjs");
|
|
32
32
|
const require_PFrameForGraphs = require("./components/PFrameForGraphs.cjs");
|
|
33
33
|
const require_filters_ui = require("./components/PlAnnotations/filters_ui.cjs");
|
|
34
|
+
const require_dataset_selection = require("./components/PlDatasetSelector/dataset_selection.cjs");
|
|
34
35
|
const require_filter_discovery = require("./components/PlDatasetSelector/filter_discovery.cjs");
|
|
35
36
|
const require_column_selector = require("./columns/column_selector.cjs");
|
|
36
37
|
const require_column_snapshot_provider = require("./columns/column_snapshot_provider.cjs");
|
|
@@ -130,6 +131,7 @@ exports.convertRelaxedAxisSelectorToMultiAxisSelector = require_column_selector.
|
|
|
130
131
|
exports.convertRelaxedColumnSelectorToMultiColumnSelector = require_column_selector.convertRelaxedColumnSelectorToMultiColumnSelector;
|
|
131
132
|
exports.createBlockStorage = require_block_storage.createBlockStorage;
|
|
132
133
|
exports.createColumnSnapshot = require_column_snapshot.createColumnSnapshot;
|
|
134
|
+
exports.createDatasetSelection = require_dataset_selection.createDatasetSelection;
|
|
133
135
|
exports.createDefaultPTableParams = require_state_migration.createDefaultPTableParams;
|
|
134
136
|
exports.createPFrameForGraphs = require_PFrameForGraphs.createPFrameForGraphs;
|
|
135
137
|
exports.createPlDataTable = require_index$6.createPlDataTable;
|
|
@@ -201,6 +203,7 @@ exports.isColumnHidden = require_utils.isColumnHidden;
|
|
|
201
203
|
exports.isColumnOptional = require_utils.isColumnOptional;
|
|
202
204
|
exports.isColumnSnapshotProvider = require_column_snapshot_provider.isColumnSnapshotProvider;
|
|
203
205
|
exports.isConfigLambda = require_types.isConfigLambda;
|
|
206
|
+
exports.isDatasetSelection = require_dataset_selection.isDatasetSelection;
|
|
204
207
|
exports.isEmpty = require_actions.isEmpty;
|
|
205
208
|
exports.isHiddenFromGraphColumn = require_PFrameForGraphs.isHiddenFromGraphColumn;
|
|
206
209
|
exports.isHiddenFromUIColumn = require_PFrameForGraphs.isHiddenFromUIColumn;
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ import { distillFilterSpec } from "./filters/distill.js";
|
|
|
48
48
|
import { AnnotationSpec, AnnotationSpecUi, ExpressionSpec, FilterSpecUi } from "./annotations/types.js";
|
|
49
49
|
import { convertFilterSpecsToExpressionSpecs } from "./annotations/converter.js";
|
|
50
50
|
import { AnnotationScriptUi, AnnotationStepUi, AnyForm, FilterUi, FilterUiOfType, FilterUiType, FormField, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, compileAnnotationScript, compileFilter, compileFilters, unreachable } from "./components/PlAnnotations/filters_ui.js";
|
|
51
|
+
import { DatasetOption, DatasetSelection, createDatasetSelection, isDatasetSelection } from "./components/PlDatasetSelector/dataset_selection.js";
|
|
51
52
|
import { buildRefMap, filterMatchesToOptions, findFilterColumns } from "./components/PlDatasetSelector/filter_discovery.js";
|
|
52
53
|
import { BuildDatasetOptions, buildDatasetOptions } from "./components/PlDatasetSelector/build_dataset_options.js";
|
|
53
54
|
import { PTableParamsV2, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlTableColumnId, PlTableColumnIdJson } from "./components/PlDataTable/typesV5.js";
|
|
@@ -73,4 +74,4 @@ import { getService } from "./services/get_services.js";
|
|
|
73
74
|
import { getEnvironmentValue } from "./env_value.js";
|
|
74
75
|
export * from "@milaboratories/pl-model-common";
|
|
75
76
|
export * from "@milaboratories/pl-error-like";
|
|
76
|
-
export { ActAnd, ActExtractArchiveAndGetURL, ActFlatten, ActGetBlobContent, ActGetBlobContentAsJson, ActGetBlobContentAsString, ActGetDownloadedBlobContent, ActGetField, ActGetFromCtx, ActGetImmediate, ActGetLastLogs, ActGetLogHandle, ActGetOnDemandBlobContent, ActGetProgressLog, ActGetProgressLogWithInfo, ActGetResourceField, ActGetResourceValueAsJson, ActImportProgress, ActIsEmpty, ActIsolate, ActMakeArray, ActMakeObject, ActMapArrayValues, ActMapRecordValues, ActMapResourceFields, ActNot, ActOr, ActionResult, AnchorEntry, AnchoredBuildOptions, AnchoredColumnCollection, AnchoredFindColumnsOptions, AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationSpec, AnnotationSpecUi, AnnotationStep, AnnotationStepUi, AnyForm, Args, ArrayColumnProvider, AxesVault, AxisLabelProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockApiV1, BlockApiV2, BlockConfig, BlockConfigV3, BlockConfigV4, BlockDefaultModelServices, BlockDefaultUiServices, BlockModel, BlockModelInfo, BlockModelV3, BlockRenderCtx, BlockServiceFlags, BlockStatePatch, type BlockStorage, BlockStorageFacade, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, type BlockStorageSchemaVersion, BuildDatasetOptions, BuildOptions, CancelSubscription, Cfg, CfgAnd, CfgBlobContent, CfgBlobContentAsJson, CfgBlobContentAsString, CfgDownloadedBlobContent, CfgExtractArchiveAndGetURL, CfgFlatten, CfgGetFromCtx, CfgGetJsonField, CfgGetResourceField, CfgImmediate, CfgImportProgress, CfgIsEmpty, CfgIsolate, CfgLastLogs, CfgLogHandle, CfgMakeArray, CfgMakeObject, CfgMapArrayValues, CfgMapRecordValues, CfgMapResourceFields, CfgNot, CfgOnDemandBlobContent, CfgOr, CfgProgressLog, CfgProgressLogWithInfo, CfgRenderingMode, CfgResourceValueAsJson, Checked, ColumnCollection, ColumnCollectionBuilder, ColumnData, ColumnDataStatus, ColumnMatch, ColumnMatcher, ColumnOrderRule, ColumnProvider, ColumnSelector, ColumnSnapshot, ColumnSnapshotProvider, ColumnSource, ColumnVariant, ColumnVisibilityRule, ColumnsDisplayOptions, ColumnsSelectorConfig, CommonFieldTraverseOps, CommonTraversalOps, ConfAction, ConfigRenderLambda, ConfigRenderLambdaFlags, ConfigResult, CurrentSdkInfo, DataModel, DataModelBuilder, DeriveHref, DeriveLabelsFormatters, DeriveLabelsOptions, Entry, ExpandByPartitionOpts, ExpandByPartitionResult, ExpressionSpec, ExtractAction, ExtractFunctionHandleReturn, ExtractFutureRefType, FieldTraversalStep, FieldType, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilterSpecUi, FilterUi, FilterUiOfType, FilterUiType, FindColumnsOptions, FormField, FutureRef, GetFieldStep, InferArgsType, InferBlockState, InferBlockStatePatch, InferDataType, InferFactoryData, InferFactoryModelServices, InferFactoryOutputs, InferFactoryParams, InferFactoryUiServices, InferHrefType, InferOutputType, InferOutputsFromConfigs, InferOutputsFromLambdas, InferOutputsType, InferPluginData, InferPluginHandle, InferPluginHandles, InferPluginNames, InferRenderFunctionReturn, InferUiState, InferVarTypeSafe, IsNA, It, internal_d_exports as JsRenderInternal, DeriveLabelsOptions as LabelDerivationOps, LinkerStep, Log10, MainOutputs, MatchQualifications, MatchVariant, MatchingMode, type MigrateBlockStorageConfig, type MigrationFailure, type MigrationResult, type MigrationSuccess, ModelServices, type MutateStoragePayload, NotFilter, NumericalComparisonFilter, OptionalPlResourceEntry, OrFilter, OutputColumnProvider, OutputColumnProviderOpts, OutputError, PColumnCollection, PColumnDataUniversal, PColumnEntryUniversal, PColumnEntryWithLabel, PColumnKeyList, PColumnLazyUniversal, PColumnLazyWithLabel, PColumnPredicate, PColumnResourceMapData, PColumnResourceMapEntry, PFrameImpl, POCExtractAction, PTableKey, PTableParamsV2, type ParamsInput, Patch, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, PlResourceEntry, PlSelectionModel, PlTableColumnId, PlTableColumnIdJson, Platforma, PlatformaApiVersion, PlatformaExtended, PlatformaFactory, PlatformaSDKVersion, PlatformaV1, PlatformaV2, PlatformaV3, type PluginConfig, type PluginData, PluginDataModel, PluginDataModelBuilder, type PluginDataModelVersions, type PluginFactory, PluginFactoryLike, PluginHandle, PluginInstance, PluginModel, type PluginName, type PluginOutputs, type PluginParams, type PluginRecord, type PluginRegistry, PluginRenderCtx, PrimitiveOrConfig, PrimitiveToCfg, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RelaxedAxisSelector, RelaxedColumnSelector, RelaxedRecord, RelaxedStringMatchers, RenderCtx, RenderCtxBase, RenderCtxLegacy, RenderFunction, RenderFunctionLegacy, ResolveCfgType, ResolveModelServices, ResolveUiServices, ResourceTraversalOps, ResourceType, ResultPool, ResultPoolColumnSnapshotProvider, SdkInfo, ServiceProxy, SimplifiedPColumnSpec, SimplifiedUniversalPColumnEntry, SnapshotColumnProvider, SortedCumulativeSum, Entry as SpecExtractorResult, SplitAxis, StagingOutputs, StdCtx, StdCtxArgsOnly, StringMatcher, TooltipEntry, Trace, TraceEntry, TransformedColumn, TreeNodeAccessor, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, TypedConfig, TypedConfigOrConfigLambda, TypedConfigOrString, UiServices, UiState, Unionize, UniversalColumnOption, UnwrapFutureRef, ValueRank, type VersionedData, allPColumnsReady, and, blockServiceNames, buildDatasetOptions, buildRefMap, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableOptionsV3, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, createServiceProxy, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, findFilterColumns, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getService, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
|
|
77
|
+
export { ActAnd, ActExtractArchiveAndGetURL, ActFlatten, ActGetBlobContent, ActGetBlobContentAsJson, ActGetBlobContentAsString, ActGetDownloadedBlobContent, ActGetField, ActGetFromCtx, ActGetImmediate, ActGetLastLogs, ActGetLogHandle, ActGetOnDemandBlobContent, ActGetProgressLog, ActGetProgressLogWithInfo, ActGetResourceField, ActGetResourceValueAsJson, ActImportProgress, ActIsEmpty, ActIsolate, ActMakeArray, ActMakeObject, ActMapArrayValues, ActMapRecordValues, ActMapResourceFields, ActNot, ActOr, ActionResult, AnchorEntry, AnchoredBuildOptions, AnchoredColumnCollection, AnchoredFindColumnsOptions, AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationSpec, AnnotationSpecUi, AnnotationStep, AnnotationStepUi, AnyForm, Args, ArrayColumnProvider, AxesVault, AxisLabelProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockApiV1, BlockApiV2, BlockConfig, BlockConfigV3, BlockConfigV4, BlockDefaultModelServices, BlockDefaultUiServices, BlockModel, BlockModelInfo, BlockModelV3, BlockRenderCtx, BlockServiceFlags, BlockStatePatch, type BlockStorage, BlockStorageFacade, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, type BlockStorageSchemaVersion, BuildDatasetOptions, BuildOptions, CancelSubscription, Cfg, CfgAnd, CfgBlobContent, CfgBlobContentAsJson, CfgBlobContentAsString, CfgDownloadedBlobContent, CfgExtractArchiveAndGetURL, CfgFlatten, CfgGetFromCtx, CfgGetJsonField, CfgGetResourceField, CfgImmediate, CfgImportProgress, CfgIsEmpty, CfgIsolate, CfgLastLogs, CfgLogHandle, CfgMakeArray, CfgMakeObject, CfgMapArrayValues, CfgMapRecordValues, CfgMapResourceFields, CfgNot, CfgOnDemandBlobContent, CfgOr, CfgProgressLog, CfgProgressLogWithInfo, CfgRenderingMode, CfgResourceValueAsJson, Checked, ColumnCollection, ColumnCollectionBuilder, ColumnData, ColumnDataStatus, ColumnMatch, ColumnMatcher, ColumnOrderRule, ColumnProvider, ColumnSelector, ColumnSnapshot, ColumnSnapshotProvider, ColumnSource, ColumnVariant, ColumnVisibilityRule, ColumnsDisplayOptions, ColumnsSelectorConfig, CommonFieldTraverseOps, CommonTraversalOps, ConfAction, ConfigRenderLambda, ConfigRenderLambdaFlags, ConfigResult, CurrentSdkInfo, DataModel, DataModelBuilder, DatasetOption, DatasetSelection, DeriveHref, DeriveLabelsFormatters, DeriveLabelsOptions, Entry, ExpandByPartitionOpts, ExpandByPartitionResult, ExpressionSpec, ExtractAction, ExtractFunctionHandleReturn, ExtractFutureRefType, FieldTraversalStep, FieldType, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilterSpecUi, FilterUi, FilterUiOfType, FilterUiType, FindColumnsOptions, FormField, FutureRef, GetFieldStep, InferArgsType, InferBlockState, InferBlockStatePatch, InferDataType, InferFactoryData, InferFactoryModelServices, InferFactoryOutputs, InferFactoryParams, InferFactoryUiServices, InferHrefType, InferOutputType, InferOutputsFromConfigs, InferOutputsFromLambdas, InferOutputsType, InferPluginData, InferPluginHandle, InferPluginHandles, InferPluginNames, InferRenderFunctionReturn, InferUiState, InferVarTypeSafe, IsNA, It, internal_d_exports as JsRenderInternal, DeriveLabelsOptions as LabelDerivationOps, LinkerStep, Log10, MainOutputs, MatchQualifications, MatchVariant, MatchingMode, type MigrateBlockStorageConfig, type MigrationFailure, type MigrationResult, type MigrationSuccess, ModelServices, type MutateStoragePayload, NotFilter, NumericalComparisonFilter, OptionalPlResourceEntry, OrFilter, OutputColumnProvider, OutputColumnProviderOpts, OutputError, PColumnCollection, PColumnDataUniversal, PColumnEntryUniversal, PColumnEntryWithLabel, PColumnKeyList, PColumnLazyUniversal, PColumnLazyWithLabel, PColumnPredicate, PColumnResourceMapData, PColumnResourceMapEntry, PFrameImpl, POCExtractAction, PTableKey, PTableParamsV2, type ParamsInput, Patch, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, PlResourceEntry, PlSelectionModel, PlTableColumnId, PlTableColumnIdJson, Platforma, PlatformaApiVersion, PlatformaExtended, PlatformaFactory, PlatformaSDKVersion, PlatformaV1, PlatformaV2, PlatformaV3, type PluginConfig, type PluginData, PluginDataModel, PluginDataModelBuilder, type PluginDataModelVersions, type PluginFactory, PluginFactoryLike, PluginHandle, PluginInstance, PluginModel, type PluginName, type PluginOutputs, type PluginParams, type PluginRecord, type PluginRegistry, PluginRenderCtx, PrimitiveOrConfig, PrimitiveToCfg, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RelaxedAxisSelector, RelaxedColumnSelector, RelaxedRecord, RelaxedStringMatchers, RenderCtx, RenderCtxBase, RenderCtxLegacy, RenderFunction, RenderFunctionLegacy, ResolveCfgType, ResolveModelServices, ResolveUiServices, ResourceTraversalOps, ResourceType, ResultPool, ResultPoolColumnSnapshotProvider, SdkInfo, ServiceProxy, SimplifiedPColumnSpec, SimplifiedUniversalPColumnEntry, SnapshotColumnProvider, SortedCumulativeSum, Entry as SpecExtractorResult, SplitAxis, StagingOutputs, StdCtx, StdCtxArgsOnly, StringMatcher, TooltipEntry, Trace, TraceEntry, TransformedColumn, TreeNodeAccessor, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, TypedConfig, TypedConfigOrConfigLambda, TypedConfigOrString, UiServices, UiState, Unionize, UniversalColumnOption, UnwrapFutureRef, ValueRank, type VersionedData, allPColumnsReady, and, blockServiceNames, buildDatasetOptions, buildRefMap, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableOptionsV3, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, createServiceProxy, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, findFilterColumns, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getService, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isDatasetSelection, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ import { enrichCompatible, getAvailableWithLinkersAxes } from "./pframe_utils/ax
|
|
|
30
30
|
import { getAllRelatedColumns, getRelatedColumns } from "./pframe_utils/columns.js";
|
|
31
31
|
import { createPFrameForGraphs, isHiddenFromGraphColumn, isHiddenFromUIColumn } from "./components/PFrameForGraphs.js";
|
|
32
32
|
import { compileAnnotationScript, compileFilter, compileFilters, unreachable } from "./components/PlAnnotations/filters_ui.js";
|
|
33
|
+
import { createDatasetSelection, isDatasetSelection } from "./components/PlDatasetSelector/dataset_selection.js";
|
|
33
34
|
import { buildRefMap, filterMatchesToOptions, findFilterColumns } from "./components/PlDatasetSelector/filter_discovery.js";
|
|
34
35
|
import { convertColumnSelectorToMultiColumnSelector, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector } from "./columns/column_selector.js";
|
|
35
36
|
import { ArrayColumnProvider, OutputColumnProvider, SnapshotColumnProvider, isColumnSnapshotProvider, toColumnSnapshotProvider } from "./columns/column_snapshot_provider.js";
|
|
@@ -64,4 +65,4 @@ import { getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, g
|
|
|
64
65
|
import { getEnvironmentValue } from "./env_value.js";
|
|
65
66
|
export * from "@milaboratories/pl-model-common";
|
|
66
67
|
export * from "@milaboratories/pl-error-like";
|
|
67
|
-
export { Args, ArrayColumnProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockModel, BlockModelV3, BlockRenderCtx, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, ColumnCollectionBuilder, CurrentSdkInfo, DataModel, DataModelBuilder, FutureRef, It, internal_exports as JsRenderInternal, MainOutputs, OutputColumnProvider, OutputError, PColumnCollection, PFrameImpl, PlatformaSDKVersion, PluginDataModel, PluginDataModelBuilder, PluginInstance, PluginModel, PluginRenderCtx, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RenderCtxBase, RenderCtxLegacy, ResultPool, ResultPoolColumnSnapshotProvider, SnapshotColumnProvider, StagingOutputs, TreeNodeAccessor, UiState, allPColumnsReady, and, blockServiceNames, buildDatasetOptions, buildRefMap, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, createServiceProxy, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, findFilterColumns, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getService, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
|
|
68
|
+
export { Args, ArrayColumnProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockModel, BlockModelV3, BlockRenderCtx, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, ColumnCollectionBuilder, CurrentSdkInfo, DataModel, DataModelBuilder, FutureRef, It, internal_exports as JsRenderInternal, MainOutputs, OutputColumnProvider, OutputError, PColumnCollection, PFrameImpl, PlatformaSDKVersion, PluginDataModel, PluginDataModelBuilder, PluginInstance, PluginModel, PluginRenderCtx, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RenderCtxBase, RenderCtxLegacy, ResultPool, ResultPoolColumnSnapshotProvider, SnapshotColumnProvider, StagingOutputs, TreeNodeAccessor, UiState, allPColumnsReady, and, blockServiceNames, buildDatasetOptions, buildRefMap, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDatasetSelection, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, createServiceProxy, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, findFilterColumns, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getService, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isDatasetSelection, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
|
|
@@ -20,7 +20,6 @@ function formatTooltip(entry) {
|
|
|
20
20
|
return sections.join("\n\n");
|
|
21
21
|
}
|
|
22
22
|
const BULLET_1 = " • ";
|
|
23
|
-
const SUB_BULLET = " ";
|
|
24
23
|
function formatHeader(entry) {
|
|
25
24
|
const lines = [];
|
|
26
25
|
if (entry.variantCount !== void 0 && entry.variantCount > 1) lines.push(`Variant: ${entry.variantIndex ?? "?"} of ${entry.variantCount}`);
|
|
@@ -33,8 +32,6 @@ function formatOriginPath(entry) {
|
|
|
33
32
|
path.forEach((step, i) => {
|
|
34
33
|
const label = (0, _milaboratories_pl_model_common.readAnnotation)(step.linker.spec, _milaboratories_pl_model_common.Annotation.LinkLabel) ?? (0, _milaboratories_pl_model_common.readAnnotation)(step.linker.spec, _milaboratories_pl_model_common.Annotation.Label) ?? step.linker.spec.name;
|
|
35
34
|
lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);
|
|
36
|
-
const qs = formatAxisQualifications(step.qualifications);
|
|
37
|
-
if (qs !== void 0) lines.push(`${SUB_BULLET}qualifies: ${qs}`);
|
|
38
35
|
});
|
|
39
36
|
const hitName = (0, _milaboratories_pl_model_common.readAnnotation)(entry.spec, _milaboratories_pl_model_common.Annotation.Label) ?? entry.spec.name;
|
|
40
37
|
lines.push(`${BULLET_1}hit column: ${hitName}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive_distinct_tooltips.cjs","names":["Annotation"],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"sourcesContent":["import {\n Annotation,\n PObjectId,\n readAnnotation,\n type AxisQualification,\n type PColumnSpec,\n} from \"@milaboratories/pl-model-common\";\nimport { isNil } from \"es-toolkit\";\nimport type { MatchQualifications, MatchVariant } from \"../columns\";\n\nexport type TooltipEntry = {\n /** Main column spec — used for column-name fallback when no label. */\n spec: PColumnSpec;\n /** Qualifications carried by this variant. */\n qualifications?: MatchQualifications;\n /** Linker steps traversed to reach the hit column. */\n linkerPath?: MatchVariant[\"path\"];\n /** Position of this variant within the same physical column (1-based). */\n variantIndex?: number;\n /** Total variants for the same physical column. */\n variantCount?: number;\n};\n\n/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */\nexport function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[] {\n return entries.map(formatTooltip);\n}\n\nfunction formatTooltip(entry: TooltipEntry): undefined | string {\n const sections: string[] = [];\n\n const header = formatHeader(entry);\n if (header !== undefined) sections.push(header);\n\n const origin = formatOriginPath(entry);\n if (origin !== undefined) sections.push(origin);\n\n const anchors = formatAnchors(entry.qualifications);\n if (anchors !== undefined) sections.push(anchors);\n\n const hit = formatHit(entry.qualifications);\n if (hit !== undefined) sections.push(hit);\n\n if (sections.length <= 1) return undefined;\n return sections.join(\"\\n\\n\");\n}\n\nconst BULLET_1 = \" • \";\
|
|
1
|
+
{"version":3,"file":"derive_distinct_tooltips.cjs","names":["Annotation"],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"sourcesContent":["import {\n Annotation,\n PObjectId,\n readAnnotation,\n type AxisQualification,\n type PColumnSpec,\n} from \"@milaboratories/pl-model-common\";\nimport { isNil } from \"es-toolkit\";\nimport type { MatchQualifications, MatchVariant } from \"../columns\";\n\nexport type TooltipEntry = {\n /** Main column spec — used for column-name fallback when no label. */\n spec: PColumnSpec;\n /** Qualifications carried by this variant. */\n qualifications?: MatchQualifications;\n /** Linker steps traversed to reach the hit column. */\n linkerPath?: MatchVariant[\"path\"];\n /** Position of this variant within the same physical column (1-based). */\n variantIndex?: number;\n /** Total variants for the same physical column. */\n variantCount?: number;\n};\n\n/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */\nexport function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[] {\n return entries.map(formatTooltip);\n}\n\nfunction formatTooltip(entry: TooltipEntry): undefined | string {\n const sections: string[] = [];\n\n const header = formatHeader(entry);\n if (header !== undefined) sections.push(header);\n\n const origin = formatOriginPath(entry);\n if (origin !== undefined) sections.push(origin);\n\n const anchors = formatAnchors(entry.qualifications);\n if (anchors !== undefined) sections.push(anchors);\n\n const hit = formatHit(entry.qualifications);\n if (hit !== undefined) sections.push(hit);\n\n if (sections.length <= 1) return undefined;\n return sections.join(\"\\n\\n\");\n}\n\nconst BULLET_1 = \" • \";\n\nfunction formatHeader(entry: TooltipEntry): undefined | string {\n const lines: string[] = [];\n if (entry.variantCount !== undefined && entry.variantCount > 1) {\n lines.push(`Variant: ${entry.variantIndex ?? \"?\"} of ${entry.variantCount}`);\n }\n return lines.join(\"\\n\");\n}\n\nfunction formatOriginPath(entry: TooltipEntry): undefined | string {\n const path = entry.linkerPath ?? [];\n if (path.length === 0) return undefined;\n\n const lines = [\"Origin path\"];\n path.forEach((step, i) => {\n const label =\n readAnnotation(step.linker.spec, Annotation.LinkLabel) ??\n readAnnotation(step.linker.spec, Annotation.Label) ??\n step.linker.spec.name;\n lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);\n });\n const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;\n lines.push(`${BULLET_1}hit column: ${hitName}`);\n return lines.join(\"\\n\");\n}\n\nfunction formatAnchors(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const ids = Object.keys(q.forQueries);\n if (ids.length === 0) return undefined;\n\n const lines = [];\n for (const id of ids) {\n const item = q.forQueries[id as PObjectId];\n if (item.length === 0) continue;\n const rendered = formatAxisQualifications(item);\n lines.push(`${BULLET_1}${id}${rendered !== undefined ? ` ${rendered}` : \"\"}`);\n }\n return lines.length > 0\n ? [\"Anchors (bound via this variant)\"].concat(lines).join(\"\\n\")\n : undefined;\n}\n\nfunction formatHit(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q) || q.forHit.length === 0) return undefined;\n const rendered = formatAxisQualifications(q.forHit);\n if (rendered === undefined) return undefined;\n return [\"Hit column qualifications\", `${BULLET_1}${rendered}`].join(\"\\n\");\n}\n\nfunction formatAxisQualifications(qs: AxisQualification[]): undefined | string {\n if (qs.length === 0) return undefined;\n return qs.map(formatQualification).join(\"; \");\n}\n\nfunction formatQualification(q: AxisQualification): string {\n const axisName = typeof q.axis === \"string\" ? q.axis : (q.axis.name ?? JSON.stringify(q.axis));\n const entries = Object.entries(q.contextDomain);\n if (entries.length === 0) return axisName;\n const kv = entries.map(([k, v]) => `${k}=${v}`).join(\", \");\n return `${axisName} context: ${kv}`;\n}\n"],"mappings":"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"}
|
|
@@ -19,7 +19,6 @@ function formatTooltip(entry) {
|
|
|
19
19
|
return sections.join("\n\n");
|
|
20
20
|
}
|
|
21
21
|
const BULLET_1 = " • ";
|
|
22
|
-
const SUB_BULLET = " ";
|
|
23
22
|
function formatHeader(entry) {
|
|
24
23
|
const lines = [];
|
|
25
24
|
if (entry.variantCount !== void 0 && entry.variantCount > 1) lines.push(`Variant: ${entry.variantIndex ?? "?"} of ${entry.variantCount}`);
|
|
@@ -32,8 +31,6 @@ function formatOriginPath(entry) {
|
|
|
32
31
|
path.forEach((step, i) => {
|
|
33
32
|
const label = readAnnotation(step.linker.spec, Annotation.LinkLabel) ?? readAnnotation(step.linker.spec, Annotation.Label) ?? step.linker.spec.name;
|
|
34
33
|
lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);
|
|
35
|
-
const qs = formatAxisQualifications(step.qualifications);
|
|
36
|
-
if (qs !== void 0) lines.push(`${SUB_BULLET}qualifies: ${qs}`);
|
|
37
34
|
});
|
|
38
35
|
const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;
|
|
39
36
|
lines.push(`${BULLET_1}hit column: ${hitName}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive_distinct_tooltips.js","names":[],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"sourcesContent":["import {\n Annotation,\n PObjectId,\n readAnnotation,\n type AxisQualification,\n type PColumnSpec,\n} from \"@milaboratories/pl-model-common\";\nimport { isNil } from \"es-toolkit\";\nimport type { MatchQualifications, MatchVariant } from \"../columns\";\n\nexport type TooltipEntry = {\n /** Main column spec — used for column-name fallback when no label. */\n spec: PColumnSpec;\n /** Qualifications carried by this variant. */\n qualifications?: MatchQualifications;\n /** Linker steps traversed to reach the hit column. */\n linkerPath?: MatchVariant[\"path\"];\n /** Position of this variant within the same physical column (1-based). */\n variantIndex?: number;\n /** Total variants for the same physical column. */\n variantCount?: number;\n};\n\n/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */\nexport function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[] {\n return entries.map(formatTooltip);\n}\n\nfunction formatTooltip(entry: TooltipEntry): undefined | string {\n const sections: string[] = [];\n\n const header = formatHeader(entry);\n if (header !== undefined) sections.push(header);\n\n const origin = formatOriginPath(entry);\n if (origin !== undefined) sections.push(origin);\n\n const anchors = formatAnchors(entry.qualifications);\n if (anchors !== undefined) sections.push(anchors);\n\n const hit = formatHit(entry.qualifications);\n if (hit !== undefined) sections.push(hit);\n\n if (sections.length <= 1) return undefined;\n return sections.join(\"\\n\\n\");\n}\n\nconst BULLET_1 = \" • \";\
|
|
1
|
+
{"version":3,"file":"derive_distinct_tooltips.js","names":[],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"sourcesContent":["import {\n Annotation,\n PObjectId,\n readAnnotation,\n type AxisQualification,\n type PColumnSpec,\n} from \"@milaboratories/pl-model-common\";\nimport { isNil } from \"es-toolkit\";\nimport type { MatchQualifications, MatchVariant } from \"../columns\";\n\nexport type TooltipEntry = {\n /** Main column spec — used for column-name fallback when no label. */\n spec: PColumnSpec;\n /** Qualifications carried by this variant. */\n qualifications?: MatchQualifications;\n /** Linker steps traversed to reach the hit column. */\n linkerPath?: MatchVariant[\"path\"];\n /** Position of this variant within the same physical column (1-based). */\n variantIndex?: number;\n /** Total variants for the same physical column. */\n variantCount?: number;\n};\n\n/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */\nexport function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[] {\n return entries.map(formatTooltip);\n}\n\nfunction formatTooltip(entry: TooltipEntry): undefined | string {\n const sections: string[] = [];\n\n const header = formatHeader(entry);\n if (header !== undefined) sections.push(header);\n\n const origin = formatOriginPath(entry);\n if (origin !== undefined) sections.push(origin);\n\n const anchors = formatAnchors(entry.qualifications);\n if (anchors !== undefined) sections.push(anchors);\n\n const hit = formatHit(entry.qualifications);\n if (hit !== undefined) sections.push(hit);\n\n if (sections.length <= 1) return undefined;\n return sections.join(\"\\n\\n\");\n}\n\nconst BULLET_1 = \" • \";\n\nfunction formatHeader(entry: TooltipEntry): undefined | string {\n const lines: string[] = [];\n if (entry.variantCount !== undefined && entry.variantCount > 1) {\n lines.push(`Variant: ${entry.variantIndex ?? \"?\"} of ${entry.variantCount}`);\n }\n return lines.join(\"\\n\");\n}\n\nfunction formatOriginPath(entry: TooltipEntry): undefined | string {\n const path = entry.linkerPath ?? [];\n if (path.length === 0) return undefined;\n\n const lines = [\"Origin path\"];\n path.forEach((step, i) => {\n const label =\n readAnnotation(step.linker.spec, Annotation.LinkLabel) ??\n readAnnotation(step.linker.spec, Annotation.Label) ??\n step.linker.spec.name;\n lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);\n });\n const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;\n lines.push(`${BULLET_1}hit column: ${hitName}`);\n return lines.join(\"\\n\");\n}\n\nfunction formatAnchors(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const ids = Object.keys(q.forQueries);\n if (ids.length === 0) return undefined;\n\n const lines = [];\n for (const id of ids) {\n const item = q.forQueries[id as PObjectId];\n if (item.length === 0) continue;\n const rendered = formatAxisQualifications(item);\n lines.push(`${BULLET_1}${id}${rendered !== undefined ? ` ${rendered}` : \"\"}`);\n }\n return lines.length > 0\n ? [\"Anchors (bound via this variant)\"].concat(lines).join(\"\\n\")\n : undefined;\n}\n\nfunction formatHit(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q) || q.forHit.length === 0) return undefined;\n const rendered = formatAxisQualifications(q.forHit);\n if (rendered === undefined) return undefined;\n return [\"Hit column qualifications\", `${BULLET_1}${rendered}`].join(\"\\n\");\n}\n\nfunction formatAxisQualifications(qs: AxisQualification[]): undefined | string {\n if (qs.length === 0) return undefined;\n return qs.map(formatQualification).join(\"; \");\n}\n\nfunction formatQualification(q: AxisQualification): string {\n const axisName = typeof q.axis === \"string\" ? q.axis : (q.axis.name ?? JSON.stringify(q.axis));\n const entries = Object.entries(q.contextDomain);\n if (entries.length === 0) return axisName;\n const kv = entries.map(([k, v]) => `${k}=${v}`).join(\", \");\n return `${axisName} context: ${kv}`;\n}\n"],"mappings":"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"}
|
package/dist/package.cjs
CHANGED
package/dist/package.js
CHANGED
package/dist/render/api.cjs
CHANGED
|
@@ -9,6 +9,7 @@ const require_column_collection = require("./util/column_collection.cjs");
|
|
|
9
9
|
const require_pframe_upgraders = require("./util/pframe_upgraders.cjs");
|
|
10
10
|
const require_get_services = require("../services/get_services.cjs");
|
|
11
11
|
require("../services/index.cjs");
|
|
12
|
+
require("./util/index.cjs");
|
|
12
13
|
let _milaboratories_pl_model_common = require("@milaboratories/pl-model-common");
|
|
13
14
|
let canonicalize = require("canonicalize");
|
|
14
15
|
canonicalize = require_runtime.__toESM(canonicalize);
|
|
@@ -34,7 +35,7 @@ function transformPColumnData(data) {
|
|
|
34
35
|
return (0, _milaboratories_pl_model_common.mapPObjectData)(data, (d) => {
|
|
35
36
|
if (d instanceof require_accessor.TreeNodeAccessor) return d.handle;
|
|
36
37
|
else if ((0, _milaboratories_pl_model_common.isDataInfo)(d)) return (0, _milaboratories_pl_model_common.mapDataInfo)(d, (accessor) => accessor.handle);
|
|
37
|
-
else return d;
|
|
38
|
+
else return d ?? [];
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
var ResultPool = class {
|
|
@@ -374,8 +375,6 @@ var RenderCtxBase = class {
|
|
|
374
375
|
return def;
|
|
375
376
|
}
|
|
376
377
|
createPFrame(def) {
|
|
377
|
-
if (!require_pcolumn_data.allPColumnsReady(def)) return void 0;
|
|
378
|
-
this.verifyInlineAndExplicitColumnsSupport(def);
|
|
379
378
|
return this.ctx.createPFrame(def.map((c) => transformPColumnData(c)));
|
|
380
379
|
}
|
|
381
380
|
createPTable(def) {
|
|
@@ -399,17 +398,7 @@ var RenderCtxBase = class {
|
|
|
399
398
|
return this.ctx.createPTable((0, _milaboratories_pl_model_common.mapPTableDef)(rawDef, (po) => transformPColumnData(po)));
|
|
400
399
|
}
|
|
401
400
|
createPTableV2(def) {
|
|
402
|
-
|
|
403
|
-
if (!require_pcolumn_data.allPColumnsReady(columns)) return void 0;
|
|
404
|
-
this.verifyInlineAndExplicitColumnsSupport(columns);
|
|
405
|
-
return this.ctx.createPTableV2((0, _milaboratories_pl_model_common.mapPTableDefV2)(def, (po) => {
|
|
406
|
-
if (po.data === void 0) throw new Error("unreachable: column data undefined after readiness check");
|
|
407
|
-
return transformPColumnData({
|
|
408
|
-
id: po.id,
|
|
409
|
-
spec: po.spec,
|
|
410
|
-
data: po.data
|
|
411
|
-
});
|
|
412
|
-
}));
|
|
401
|
+
return this.ctx.createPTableV2((0, _milaboratories_pl_model_common.mapPTableDefV2)(def, (po) => transformPColumnData(po)));
|
|
413
402
|
}
|
|
414
403
|
/** @deprecated scheduled for removal from SDK */
|
|
415
404
|
getBlockLabel(blockId) {
|