Skip to content

Commit

Permalink
wip: pframe from clone columns works, all tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolotin committed Sep 4, 2024
1 parent bbbcf54 commit 9e9da51
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 227 deletions.
16 changes: 16 additions & 0 deletions model/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ export const platforma = BlockModel.create<BlockArgs>('Heavy')
)
)

.output('clonesSpec', (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 pColumns.map((obj) => obj.spec);
// parseResourceMap(ctx.outputs?.resolve({ field: 'clones', assertFieldType: 'Input' }), (acc) =>
// acc.listInputFields()
// )
// return ctx.outputs?.resolve({ field: 'clones', assertFieldType: 'Input' })?.listInputFields();
})

.output('clones', (ctx) => {
const collection = ctx.outputs
?.resolve({ field: 'clones', assertFieldType: 'Input' })
Expand Down
Loading

0 comments on commit 9e9da51

Please sign in to comment.