@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
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let _platforma_sdk_model = require("@platforma-sdk/model");
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
const dataModel = new _platforma_sdk_model.DataModelBuilder().from("v1").upgradeLegacy(({ args, uiState }) => ({
|
|
5
|
+
...args,
|
|
6
|
+
tableState: uiState.tableState
|
|
7
|
+
})).init(() => ({
|
|
8
|
+
customBlockLabel: "",
|
|
9
|
+
tableState: (0, _platforma_sdk_model.createPlDataTableStateV2)()
|
|
10
|
+
}));
|
|
11
|
+
const platforma = _platforma_sdk_model.BlockModelV3.create(dataModel).args((data) => {
|
|
12
|
+
if (!data.inputAnchor) throw new Error("Input anchor is required");
|
|
13
|
+
return {
|
|
14
|
+
customBlockLabel: data.customBlockLabel || "Humanness Score",
|
|
15
|
+
inputAnchor: data.inputAnchor,
|
|
16
|
+
mem: data.mem
|
|
17
|
+
};
|
|
18
|
+
}).output("inputOptions", (ctx) => ctx.resultPool.getOptions([{
|
|
19
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/clonotypeKey" }],
|
|
20
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
21
|
+
}, {
|
|
22
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/scClonotypeKey" }],
|
|
23
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
24
|
+
}])).outputWithStatus("pt", (ctx) => {
|
|
25
|
+
const pCols = ctx.outputs?.resolve("outputLiabilities")?.getPColumns();
|
|
26
|
+
if (pCols === void 0) return;
|
|
27
|
+
return (0, _platforma_sdk_model.createPlDataTableV3)(ctx, {
|
|
28
|
+
tableState: ctx.data.tableState,
|
|
29
|
+
columns: new _platforma_sdk_model.ArrayColumnProvider(pCols).getAllColumns().map((column) => ({
|
|
30
|
+
column,
|
|
31
|
+
isPrimary: true
|
|
32
|
+
}))
|
|
33
|
+
});
|
|
34
|
+
}).output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false).title(() => "Humanness Score").subtitle((ctx) => ctx.data.customBlockLabel || "Humanness Score").sections((_) => [{
|
|
35
|
+
type: "link",
|
|
36
|
+
href: "/",
|
|
37
|
+
label: "Table"
|
|
38
|
+
}]).done();
|
|
39
|
+
//#endregion
|
|
40
|
+
exports.platforma = platforma;
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["DataModelBuilder","BlockModelV3","ArrayColumnProvider"],"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,IAAIA,qBAAAA,kBAAkB,CACrC,KAAgB,KAAK,CACrB,eAAoC,EAAE,MAAM,eAAe;CAC1D,GAAG;CACH,YAAY,QAAQ;CACrB,EAAE,CACF,YAAY;CACX,kBAAkB;CAClB,aAAA,GAAA,qBAAA,2BAAsC;CACvC,EAA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