Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolotin committed Sep 2, 2024
1 parent 3b60d12 commit 6f7e9bf
Show file tree
Hide file tree
Showing 13 changed files with 146 additions and 132 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist/
block-pack/
dev/
work/
.test_auth.json
21 changes: 16 additions & 5 deletions model/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
BlockModel,
InferHrefType,
Option,
isPColumn,
isPColumnSpec,
type InferOutputsType
} from '@milaboratory/sdk-ui';
Expand Down Expand Up @@ -32,11 +33,21 @@ export const platforma = BlockModel.create<BlockArgs>('Heavy')
)
)

.output('clones', (ctx) =>
parseResourceMap(ctx.outputs?.resolve({ field: 'clones', assertFieldType: 'Input' }), (acc) =>
acc.listInputFields()
)
)
.output('clones', (ctx) => {
// const collection = ctx.outputs
// ?.resolve({ field: 'clones', assertFieldType: 'Input' })
// ?.parsePObjectCollection();
// if (collection === undefined) return undefined;
// // if (collection === undefined || !collection.isComplete) return undefined;
// const pColumns = Object.entries(collection)
// .map(([id, obj]) => obj)
// .filter(isPColumn);
// return ctx.createPFrame(pColumns);
// parseResourceMap(ctx.outputs?.resolve({ field: 'clones', assertFieldType: 'Input' }), (acc) =>
// acc.listInputFields()
// )
return ctx.outputs?.resolve({ field: 'clones', assertFieldType: 'Input' })?.listInputFields();
})

.output('inputOptions', (ctx) => {
const spectFromPool = ctx.resultPool.getSpecsFromResultPool();
Expand Down
Loading

0 comments on commit 6f7e9bf

Please sign in to comment.