@platforma-open/milaboratories.humanization-score.model 0.2.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/.turbo/turbo-build.log +18 -0
- package/.turbo/turbo-lint.log +5 -0
- package/.turbo/turbo-type-check.log +6 -0
- package/CHANGELOG.md +5 -0
- package/dist/bundle.js +10211 -0
- package/dist/bundle.js.map +1 -0
- package/dist/index.cjs +42 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1687 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -0
- package/dist/model.json +1 -0
- package/eslint.config.mjs +4 -0
- package/package.json +29 -0
- package/src/index.ts +93 -0
- package/tsconfig.json +9 -0
- package/vitest.config.mts +8 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;KAuBY,SAAA;EACV,gBAAA;EACA,WAAA,GAAc,KAAA;EACd,GAAA;EACA,UAAA,EAAY,kBAAA;AAAA;AAAA,cAcD,SAAA,EAAS,uBAAA,CAAA,iBAAA,yBAAA,WAAA,CAAA,SAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ArrayColumnProvider, BlockModelV3, DataModelBuilder, createPlDataTableStateV2, createPlDataTableV3 } from "@platforma-sdk/model";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
const dataModel = new DataModelBuilder().from("v1").upgradeLegacy(({ args, uiState }) => ({
|
|
4
|
+
...args,
|
|
5
|
+
tableState: uiState.tableState
|
|
6
|
+
})).init(() => ({
|
|
7
|
+
customBlockLabel: "",
|
|
8
|
+
tableState: createPlDataTableStateV2()
|
|
9
|
+
}));
|
|
10
|
+
const platforma = BlockModelV3.create(dataModel).args((data) => {
|
|
11
|
+
if (!data.inputAnchor) throw new Error("Input anchor is required");
|
|
12
|
+
return {
|
|
13
|
+
customBlockLabel: data.customBlockLabel || "Humanness Score",
|
|
14
|
+
inputAnchor: data.inputAnchor,
|
|
15
|
+
mem: data.mem
|
|
16
|
+
};
|
|
17
|
+
}).output("inputOptions", (ctx) => ctx.resultPool.getOptions([{
|
|
18
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/clonotypeKey" }],
|
|
19
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
20
|
+
}, {
|
|
21
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/scClonotypeKey" }],
|
|
22
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
23
|
+
}])).outputWithStatus("pt", (ctx) => {
|
|
24
|
+
const pCols = ctx.outputs?.resolve("outputLiabilities")?.getPColumns();
|
|
25
|
+
if (pCols === void 0) return;
|
|
26
|
+
return createPlDataTableV3(ctx, {
|
|
27
|
+
tableState: ctx.data.tableState,
|
|
28
|
+
columns: new ArrayColumnProvider(pCols).getAllColumns().map((column) => ({
|
|
29
|
+
column,
|
|
30
|
+
isPrimary: true
|
|
31
|
+
}))
|
|
32
|
+
});
|
|
33
|
+
}).output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false).title(() => "Humanness Score").subtitle((ctx) => ctx.data.customBlockLabel || "Humanness Score").sections((_) => [{
|
|
34
|
+
type: "link",
|
|
35
|
+
href: "/",
|
|
36
|
+
label: "Table"
|
|
37
|
+
}]).done();
|
|
38
|
+
//#endregion
|
|
39
|
+
export { platforma };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type {\n PlDataTableStateV2,\n PlRef,\n} from '@platforma-sdk/model';\nimport {\n ArrayColumnProvider,\n BlockModelV3,\n DataModelBuilder,\n createPlDataTableStateV2,\n createPlDataTableV3,\n} from '@platforma-sdk/model';\nexport type * from '@milaboratories/helpers';\n\ntype OldArgs = {\n customBlockLabel: string;\n inputAnchor?: PlRef;\n mem?: number;\n};\n\ntype OldUiState = {\n tableState: PlDataTableStateV2;\n};\n\nexport type BlockData = {\n customBlockLabel: string;\n inputAnchor?: PlRef;\n mem?: number;\n tableState: PlDataTableStateV2;\n};\n\nconst dataModel = new DataModelBuilder()\n .from<BlockData>('v1')\n .upgradeLegacy<OldArgs, OldUiState>(({ args, uiState }) => ({\n ...args,\n tableState: uiState.tableState,\n }))\n .init(() => ({\n customBlockLabel: '',\n tableState: createPlDataTableStateV2(),\n }));\n\nexport const platforma = BlockModelV3.create(dataModel)\n\n .args((data) => {\n if (!data.inputAnchor) throw new Error('Input anchor is required');\n\n return {\n customBlockLabel: data.customBlockLabel || 'Humanness Score',\n inputAnchor: data.inputAnchor,\n mem: data.mem,\n };\n })\n\n .output('inputOptions', (ctx) =>\n ctx.resultPool.getOptions([{\n axes: [\n { name: 'pl7.app/sampleId' },\n { name: 'pl7.app/vdj/clonotypeKey' },\n ],\n annotations: { 'pl7.app/isAnchor': 'true' },\n }, {\n axes: [\n { name: 'pl7.app/sampleId' },\n { name: 'pl7.app/vdj/scClonotypeKey' },\n ],\n annotations: { 'pl7.app/isAnchor': 'true' },\n }]),\n )\n\n .outputWithStatus('pt', (ctx) => {\n const pCols = ctx.outputs?.resolve('outputLiabilities')?.getPColumns();\n if (pCols === undefined) {\n return undefined;\n }\n return createPlDataTableV3(ctx, {\n tableState: ctx.data.tableState,\n columns: new ArrayColumnProvider(pCols)\n .getAllColumns()\n .map((column) => ({ column, isPrimary: true })),\n });\n })\n\n .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n\n .title(() => 'Humanness Score')\n\n .subtitle((ctx) => ctx.data.customBlockLabel || 'Humanness Score')\n\n .sections((_) => [\n { type: 'link', href: '/', label: 'Table' },\n ])\n\n .done();\n"],"mappings":";;AA8BA,MAAM,YAAY,IAAI,kBAAkB,CACrC,KAAgB,KAAK,CACrB,eAAoC,EAAE,MAAM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