@nfdi4plants/arctrl 3.0.0-beta.7 → 3.0.0-beta.9
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/dist/ts/ts/ARC.d.ts +17 -7
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +217 -92
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts +1 -1
- package/dist/ts/ts/Contract/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ArcWorkflow.js +4 -5
- package/dist/ts/ts/Contract/Datamap.d.ts.map +1 -1
- package/dist/ts/ts/Contract/Datamap.js +27 -8
- package/dist/ts/ts/Conversion.d.ts.map +1 -1
- package/dist/ts/ts/Conversion.js +5 -5
- package/dist/ts/ts/Core/ArcTypes.d.ts +57 -92
- package/dist/ts/ts/Core/ArcTypes.d.ts.map +1 -1
- package/dist/ts/ts/Core/ArcTypes.js +425 -311
- package/dist/ts/ts/Core/DataMap.d.ts +18 -17
- package/dist/ts/ts/Core/DataMap.d.ts.map +1 -1
- package/dist/ts/ts/Core/DataMap.js +82 -64
- package/dist/ts/ts/Core/IdentifierSetters.d.ts.map +1 -1
- package/dist/ts/ts/Core/IdentifierSetters.js +1 -2
- package/dist/ts/ts/Json/DataMap/DataMap.d.ts.map +1 -1
- package/dist/ts/ts/Json/DataMap/DataMap.js +3 -3
- package/dist/ts/ts/Json/Workflow.d.ts +1 -1
- package/dist/ts/ts/Json/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Json/Workflow.js +17 -17
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +7 -6
- package/dist/ts/ts/Spreadsheet/DataMap.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMap.js +2 -2
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +4 -4
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +23 -13
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ import { map } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
|
4
4
|
import { OntologyAnnotation } from '../../Core/OntologyAnnotation.js';
|
|
5
5
|
import { Option_fromValueWithDefault, ResizeArray_iter } from '../../Core/Helper/Collections.js';
|
|
6
6
|
import { ProtocolParameter_fromAggregatedStrings, Component_fromAggregatedStrings, ProtocolParameter_toAggregatedStrings, Component_toAggregatedStrings } from './Conversions.js';
|
|
7
|
-
import { ArcWorkflow_make, ArcWorkflow__get_Identifier, ArcWorkflow__get_WorkflowType, ArcWorkflow__get_Parameters, ArcWorkflow__get_Components, ArcWorkflow__get_SubWorkflowIdentifiers, ArcWorkflow__get_Title, ArcWorkflow__get_Description, ArcWorkflow__get_URI, ArcWorkflow__get_Version, ArcWorkflow__get_Comments } from '../../Core/ArcTypes.js';
|
|
8
7
|
import { createMissingIdentifier, Workflow_tryIdentifierFromFileName, Workflow_fileNameFromIdentifier } from '../../Core/Helper/Identifier.js';
|
|
8
|
+
import { ArcWorkflow } from '../../Core/ArcTypes.js';
|
|
9
9
|
import { Comment_fromString, Comment_toString } from './Comment.js';
|
|
10
10
|
import { SparseTable__TryGetValueDefault_5BAE6133, SparseTable__TryGetValue_11FD62A8, SparseTable_Create_Z2192E64B, SparseTable, SparseTable_FromRows_Z5579EC29, SparseTable_ToRows_759CAFC1 } from './SparseTable.js';
|
|
11
11
|
import { join } from '../../../node_modules/@fable-org/fable-library-js/String.js';
|
|
@@ -32,7 +32,6 @@ const componentsTypeTermSourceREFLabel = "Components Type Term Source REF";
|
|
|
32
32
|
const fileNameLabel = "File Name";
|
|
33
33
|
const labels = ofArray([identifierLabel, titleLabel, descriptionLabel, workflowTypeLabel, typeTermAccessionNumberLabel, typeTermSourceREFLabel, subWorkflowIdentifiersLabel, uriLabel, versionLabel, parametersNameLabel, parametersTermAccessionNumberLabel, parametersTermSourceREFLabel, componentsNameLabel, componentsTypeLabel, componentsTypeTermAccessionNumberLabel, componentsTypeTermSourceREFLabel, fileNameLabel]);
|
|
34
34
|
function fromString(identifier, title, description, workflowType, workflowTypeTermAccessionNumber, workflowTypeTermSourceREF, subworkflowIdentifiers, uri, version, parametersName, parametersTermAccessionNumber, parametersTermSourceREF, componentsName, componentsType, componentsTypeTermAccessionNumber, componentsTypeTermSourceREF, fileName, comments) {
|
|
35
|
-
let matchValue;
|
|
36
35
|
let subworkflowIdentifiers_2;
|
|
37
36
|
if (subworkflowIdentifiers == null) {
|
|
38
37
|
subworkflowIdentifiers_2 = [];
|
|
@@ -50,7 +49,18 @@ function fromString(identifier, title, description, workflowType, workflowTypeTe
|
|
|
50
49
|
let components;
|
|
51
50
|
const collection_2 = Component_fromAggregatedStrings(";", componentsName, componentsType, componentsTypeTermSourceREF, componentsTypeTermAccessionNumber);
|
|
52
51
|
components = Array.from(collection_2);
|
|
53
|
-
|
|
52
|
+
let identifier_4;
|
|
53
|
+
if (identifier == null) {
|
|
54
|
+
if (fileName == null) {
|
|
55
|
+
identifier_4 = createMissingIdentifier();
|
|
56
|
+
} else {
|
|
57
|
+
const matchValue = Workflow_tryIdentifierFromFileName(value(fileName));
|
|
58
|
+
identifier_4 = matchValue != null ? value(matchValue) : createMissingIdentifier();
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
identifier_4 = value(identifier);
|
|
62
|
+
}
|
|
63
|
+
return ArcWorkflow.make(identifier_4, title, description, workflowType_1, uri, version, subworkflowIdentifiers_2, parameters, components, void 0, [], comments);
|
|
54
64
|
}
|
|
55
65
|
function fromSparseTable(matrix) {
|
|
56
66
|
const comments = map$1((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, 0])), matrix.CommentKeys);
|
|
@@ -59,22 +69,22 @@ function fromSparseTable(matrix) {
|
|
|
59
69
|
function toSparseTable(workflow) {
|
|
60
70
|
const matrix = SparseTable_Create_Z2192E64B(void 0, labels, void 0, 2);
|
|
61
71
|
let commentKeys = empty();
|
|
62
|
-
const patternInput =
|
|
72
|
+
const patternInput = workflow.Identifier.startsWith("MISSING_IDENTIFIER_") ? ["", ""] : [workflow.Identifier, Workflow_fileNameFromIdentifier(workflow.Identifier)];
|
|
63
73
|
let wt;
|
|
64
|
-
const tt = defaultArg(
|
|
74
|
+
const tt = defaultArg(workflow.WorkflowType, new OntologyAnnotation());
|
|
65
75
|
wt = OntologyAnnotation.toStringObject(tt, true);
|
|
66
|
-
const pAgg = ProtocolParameter_toAggregatedStrings(";", ofSeq(
|
|
67
|
-
const cAgg = Component_toAggregatedStrings(";", ofSeq(
|
|
68
|
-
const subWorkflowsAgg = join(";",
|
|
76
|
+
const pAgg = ProtocolParameter_toAggregatedStrings(";", ofSeq(workflow.Parameters));
|
|
77
|
+
const cAgg = Component_toAggregatedStrings(";", ofSeq(workflow.Components));
|
|
78
|
+
const subWorkflowsAgg = join(";", workflow.SubWorkflowIdentifiers);
|
|
69
79
|
addToDict(matrix.Matrix, [identifierLabel, 1], patternInput[0]);
|
|
70
|
-
addToDict(matrix.Matrix, [titleLabel, 1], defaultArg(
|
|
71
|
-
addToDict(matrix.Matrix, [descriptionLabel, 1], defaultArg(
|
|
80
|
+
addToDict(matrix.Matrix, [titleLabel, 1], defaultArg(workflow.Title, ""));
|
|
81
|
+
addToDict(matrix.Matrix, [descriptionLabel, 1], defaultArg(workflow.Description, ""));
|
|
72
82
|
addToDict(matrix.Matrix, [workflowTypeLabel, 1], wt.TermName);
|
|
73
83
|
addToDict(matrix.Matrix, [typeTermAccessionNumberLabel, 1], wt.TermAccessionNumber);
|
|
74
84
|
addToDict(matrix.Matrix, [typeTermSourceREFLabel, 1], wt.TermSourceREF);
|
|
75
85
|
addToDict(matrix.Matrix, [subWorkflowIdentifiersLabel, 1], subWorkflowsAgg);
|
|
76
|
-
addToDict(matrix.Matrix, [uriLabel, 1], defaultArg(
|
|
77
|
-
addToDict(matrix.Matrix, [versionLabel, 1], defaultArg(
|
|
86
|
+
addToDict(matrix.Matrix, [uriLabel, 1], defaultArg(workflow.URI, ""));
|
|
87
|
+
addToDict(matrix.Matrix, [versionLabel, 1], defaultArg(workflow.Version, ""));
|
|
78
88
|
addToDict(matrix.Matrix, [parametersNameLabel, 1], pAgg.TermNameAgg);
|
|
79
89
|
addToDict(matrix.Matrix, [parametersTermAccessionNumberLabel, 1], pAgg.TermAccessionNumberAgg);
|
|
80
90
|
addToDict(matrix.Matrix, [parametersTermSourceREFLabel, 1], pAgg.TermSourceREFAgg);
|
|
@@ -88,7 +98,7 @@ function toSparseTable(workflow) {
|
|
|
88
98
|
const n = patternInput_1[0];
|
|
89
99
|
commentKeys = cons(n, commentKeys);
|
|
90
100
|
addToDict(matrix.Matrix, [n, 1], patternInput_1[1]);
|
|
91
|
-
},
|
|
101
|
+
}, workflow.Comments);
|
|
92
102
|
return new SparseTable(matrix.Matrix, matrix.Keys, reverse(List_distinct(commentKeys, {
|
|
93
103
|
Equals: (x, y) => x === y,
|
|
94
104
|
GetHashCode: stringHash
|