@platforma-open/milaboratories.repertoire-diversity-2.model 1.5.5 → 1.5.7
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 +4 -4
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +12 -0
- package/dist/bundle.js +8 -6
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +4 -4
- package/src/index.ts +9 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-open/milaboratories.repertoire-diversity-2.model",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
4
4
|
"description": "Block model",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"./dist/model.json": "./dist/model.json"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@platforma-sdk/model": "1.51.
|
|
20
|
-
"@milaboratories/graph-maker": "1.1.
|
|
19
|
+
"@platforma-sdk/model": "1.51.5",
|
|
20
|
+
"@milaboratories/graph-maker": "1.1.206"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@milaboratories/ts-builder": "1.2.1",
|
|
24
24
|
"@milaboratories/ts-configs": "1.2.0",
|
|
25
25
|
"@platforma-sdk/block-tools": "2.6.29",
|
|
26
26
|
"@platforma-sdk/eslint-config": "1.2.0",
|
|
27
|
-
"@platforma-sdk/test": "1.51.
|
|
27
|
+
"@platforma-sdk/test": "1.51.5",
|
|
28
28
|
"typescript": "~5.6.3",
|
|
29
29
|
"vitest": "^4.0.7",
|
|
30
30
|
"eslint": "^9.25.1"
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphMakerState } from '@milaboratories/graph-maker';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PColumnIdAndSpec, PlDataTableStateV2, PlRef } from '@platforma-sdk/model';
|
|
3
3
|
import { BlockModel, createPFrameForGraphs, createPlDataTableStateV2, createPlDataTableV2 } from '@platforma-sdk/model';
|
|
4
4
|
|
|
5
5
|
export * from './converters';
|
|
@@ -23,13 +23,14 @@ export type MetricUI = Metric & {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export type BlockArgs = {
|
|
26
|
+
defaultBlockLabel: string;
|
|
27
|
+
customBlockLabel: string;
|
|
26
28
|
abundanceRef?: PlRef;
|
|
27
29
|
metrics: Metric[];
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
export type UiState = {
|
|
31
33
|
metrics: MetricUI[];
|
|
32
|
-
blockTitle: string;
|
|
33
34
|
tableState: PlDataTableStateV2;
|
|
34
35
|
graphState: GraphMakerState;
|
|
35
36
|
};
|
|
@@ -37,10 +38,11 @@ export type UiState = {
|
|
|
37
38
|
export const model = BlockModel.create()
|
|
38
39
|
.withArgs<BlockArgs>({
|
|
39
40
|
metrics: [],
|
|
41
|
+
defaultBlockLabel: 'Select abundance and metrics',
|
|
42
|
+
customBlockLabel: '',
|
|
40
43
|
})
|
|
41
44
|
|
|
42
45
|
.withUiState<UiState>({
|
|
43
|
-
blockTitle: 'Repertoire Diversity',
|
|
44
46
|
graphState: {
|
|
45
47
|
title: 'Repertoire Diversity',
|
|
46
48
|
template: 'bar',
|
|
@@ -113,7 +115,7 @@ export const model = BlockModel.create()
|
|
|
113
115
|
'pl7.app/abundance/isPrimary': 'true',
|
|
114
116
|
},
|
|
115
117
|
},
|
|
116
|
-
]),
|
|
118
|
+
], { includeNativeLabel: true }),
|
|
117
119
|
)
|
|
118
120
|
|
|
119
121
|
.outputWithStatus('pt', (ctx) => {
|
|
@@ -153,7 +155,9 @@ export const model = BlockModel.create()
|
|
|
153
155
|
|
|
154
156
|
.output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
|
|
155
157
|
|
|
156
|
-
.title((
|
|
158
|
+
.title(() => 'Repertoire Diversity')
|
|
159
|
+
|
|
160
|
+
.subtitle((ctx) => ctx.args.customBlockLabel || ctx.args.defaultBlockLabel)
|
|
157
161
|
|
|
158
162
|
.sections((_) => [
|
|
159
163
|
{ type: 'link', href: '/', label: 'Main' },
|
|
@@ -161,5 +165,3 @@ export const model = BlockModel.create()
|
|
|
161
165
|
])
|
|
162
166
|
|
|
163
167
|
.done(2);
|
|
164
|
-
|
|
165
|
-
export type BlockOutputs = InferOutputsType<typeof model>;
|