@nfdi4plants/arctrl 2.0.0-beta.8 → 2.0.1
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/ARC.js +44 -11
- package/Contract/ArcInvestigation.js +4 -4
- package/Contract/ValidationPackagesConfig.js +19 -18
- package/Core/ArcTypes.js +95 -92
- package/Core/Table/ArcTable.js +99 -11
- package/Core/Table/CompositeCell.js +26 -0
- package/Core/Table/CompositeColumn.js +7 -30
- package/Core/Table/CompositeHeader.js +5 -215
- package/FileSystem/Path.js +9 -1
- package/Json/context/rocrate/isa_data_context.js +1 -1
- package/Json/context/rocrate/isa_investigation_context.js +1 -1
- package/Spreadsheet/AnnotationTable/ArcTable.js +3 -2
- package/Spreadsheet/ArcAssay.js +40 -20
- package/Spreadsheet/ArcInvestigation.js +59 -38
- package/Spreadsheet/ArcStudy.js +31 -16
- package/Spreadsheet/Template.js +1 -1
- package/ValidationPackages/ValidationPackage.js +9 -2
- package/ValidationPackages/ValidationPackagesConfig.js +42 -9
- package/Xlsx.js +3 -3
- package/Yaml/ValidationPackagesConfig.js +2 -2
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
|
@@ -10,17 +10,17 @@ import { Option_fromValueWithDefault, ResizeArray_iter } from "../Core/Helper/Co
|
|
|
10
10
|
import { List_distinctBy, List_distinct } from "../fable_modules/fable-library-js.4.16.0/Seq2.js";
|
|
11
11
|
import { comparePrimitives, getEnumerator, stringHash } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
12
12
|
import { ArcStudy, ArcInvestigation } from "../Core/ArcTypes.js";
|
|
13
|
-
import { toRows
|
|
14
|
-
import { toRows as
|
|
15
|
-
import { toRows as
|
|
16
|
-
import { toRows as
|
|
17
|
-
import { iterateIndexed, map as map_1, toList, collect, singleton, append as append_1, delay } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
13
|
+
import { toRows, fromRows } from "./Metadata/OntologySourceReference.js";
|
|
14
|
+
import { toRows as toRows_1, fromRows as fromRows_1 } from "./Metadata/Publication.js";
|
|
15
|
+
import { toRows as toRows_2, fromRows as fromRows_2 } from "./Metadata/Contacts.js";
|
|
16
|
+
import { toRows as toRows_3, fromRows as fromRows_3 } from "./Metadata/Study.js";
|
|
17
|
+
import { iterateIndexed, map as map_1, tryFind as tryFind_1, toList, collect, singleton, append as append_1, delay } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
18
18
|
import { tryFind, ofList } from "../fable_modules/fable-library-js.4.16.0/Map.js";
|
|
19
19
|
import { printf, toFail } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
20
20
|
import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorksheet.fs.js";
|
|
21
21
|
import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorkbook.fs.js";
|
|
22
22
|
|
|
23
|
-
export class
|
|
23
|
+
export class ArcInvestigation_InvestigationInfo extends Record {
|
|
24
24
|
constructor(Identifier, Title, Description, SubmissionDate, PublicReleaseDate, Comments) {
|
|
25
25
|
super();
|
|
26
26
|
this.Identifier = Identifier;
|
|
@@ -32,25 +32,25 @@ export class InvestigationInfo extends Record {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
export function
|
|
36
|
-
return record_type("ARCtrl.Spreadsheet.ArcInvestigation.InvestigationInfo", [],
|
|
35
|
+
export function ArcInvestigation_InvestigationInfo_$reflection() {
|
|
36
|
+
return record_type("ARCtrl.Spreadsheet.ArcInvestigation.InvestigationInfo", [], ArcInvestigation_InvestigationInfo, () => [["Identifier", string_type], ["Title", string_type], ["Description", string_type], ["SubmissionDate", string_type], ["PublicReleaseDate", string_type], ["Comments", list_type(Comment$_$reflection())]]);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export function
|
|
40
|
-
return new
|
|
39
|
+
export function ArcInvestigation_InvestigationInfo_create(identifier, title, description, submissionDate, publicReleaseDate, comments) {
|
|
40
|
+
return new ArcInvestigation_InvestigationInfo(identifier, title, description, submissionDate, publicReleaseDate, comments);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export function
|
|
43
|
+
export function ArcInvestigation_InvestigationInfo_get_Labels() {
|
|
44
44
|
return ofArray(["Investigation Identifier", "Investigation Title", "Investigation Description", "Investigation Submission Date", "Investigation Public Release Date"]);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export function
|
|
47
|
+
export function ArcInvestigation_InvestigationInfo_FromSparseTable_3ECCA699(matrix) {
|
|
48
48
|
const comments = map((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, 0])), matrix.CommentKeys);
|
|
49
|
-
return
|
|
49
|
+
return ArcInvestigation_InvestigationInfo_create(SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Identifier", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Title", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Description", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Submission Date", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Public Release Date", 0]), comments);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
export function
|
|
53
|
-
const matrix = SparseTable_Create_Z2192E64B(void 0,
|
|
52
|
+
export function ArcInvestigation_InvestigationInfo_ToSparseTable_Z720BD3FF(investigation) {
|
|
53
|
+
const matrix = SparseTable_Create_Z2192E64B(void 0, ArcInvestigation_InvestigationInfo_get_Labels(), void 0, 2);
|
|
54
54
|
let commentKeys = empty();
|
|
55
55
|
addToDict(matrix.Matrix, ["Investigation Identifier", 1], investigation.Identifier);
|
|
56
56
|
addToDict(matrix.Matrix, ["Investigation Title", 1], defaultArg(investigation.Title, ""));
|
|
@@ -69,16 +69,16 @@ export function InvestigationInfo_ToSparseTable_Z720BD3FF(investigation) {
|
|
|
69
69
|
})), matrix.ColumnCount);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export function
|
|
73
|
-
const tupledArg = SparseTable_FromRows_Z5579EC29(rows,
|
|
74
|
-
return [tupledArg[0], tupledArg[1], tupledArg[2],
|
|
72
|
+
export function ArcInvestigation_InvestigationInfo_fromRows(lineNumber, rows) {
|
|
73
|
+
const tupledArg = SparseTable_FromRows_Z5579EC29(rows, ArcInvestigation_InvestigationInfo_get_Labels(), lineNumber);
|
|
74
|
+
return [tupledArg[0], tupledArg[1], tupledArg[2], ArcInvestigation_InvestigationInfo_FromSparseTable_3ECCA699(tupledArg[3])];
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export function
|
|
78
|
-
return SparseTable_ToRows_759CAFC1(
|
|
77
|
+
export function ArcInvestigation_InvestigationInfo_toRows_Z720BD3FF(investigation) {
|
|
78
|
+
return SparseTable_ToRows_759CAFC1(ArcInvestigation_InvestigationInfo_ToSparseTable_Z720BD3FF(investigation));
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
export function
|
|
81
|
+
export function ArcInvestigation_fromParts(investigationInfo, ontologySourceReference, publications, contacts, studies, assays, remarks) {
|
|
82
82
|
const studyIdentifiers = map((s) => s.Identifier, studies);
|
|
83
83
|
const title = Option_fromValueWithDefault("", investigationInfo.Title);
|
|
84
84
|
const description = Option_fromValueWithDefault("", investigationInfo.Description);
|
|
@@ -95,9 +95,9 @@ export function fromParts(investigationInfo, ontologySourceReference, publicatio
|
|
|
95
95
|
return ArcInvestigation.make(investigationInfo.Identifier, title, description, submissionDate, publicReleaseDate, ontologySourceReferences, publications_1, contacts_1, assays_1, studies_1, registeredStudyIdentifiers, comments, remarks_1);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
export function
|
|
98
|
+
export function ArcInvestigation_fromRows(rows) {
|
|
99
99
|
const en = getEnumerator(rows);
|
|
100
|
-
const emptyInvestigationInfo =
|
|
100
|
+
const emptyInvestigationInfo = ArcInvestigation_InvestigationInfo_create("", "", "", "", "", empty());
|
|
101
101
|
const loop = (lastLine_mut, ontologySourceReferences_mut, investigationInfo_mut, publications_mut, contacts_mut, studies_mut, remarks_mut, lineNumber_mut) => {
|
|
102
102
|
loop:
|
|
103
103
|
while (true) {
|
|
@@ -142,7 +142,7 @@ export function fromRows(rows) {
|
|
|
142
142
|
}
|
|
143
143
|
switch (matchResult) {
|
|
144
144
|
case 0: {
|
|
145
|
-
const patternInput =
|
|
145
|
+
const patternInput = fromRows(lineNumber + 1, en);
|
|
146
146
|
lastLine_mut = patternInput[0];
|
|
147
147
|
ontologySourceReferences_mut = patternInput[3];
|
|
148
148
|
investigationInfo_mut = investigationInfo;
|
|
@@ -154,7 +154,7 @@ export function fromRows(rows) {
|
|
|
154
154
|
continue loop;
|
|
155
155
|
}
|
|
156
156
|
case 1: {
|
|
157
|
-
const patternInput_1 =
|
|
157
|
+
const patternInput_1 = ArcInvestigation_InvestigationInfo_fromRows(lineNumber + 1, en);
|
|
158
158
|
lastLine_mut = patternInput_1[0];
|
|
159
159
|
ontologySourceReferences_mut = ontologySourceReferences;
|
|
160
160
|
investigationInfo_mut = patternInput_1[3];
|
|
@@ -166,7 +166,7 @@ export function fromRows(rows) {
|
|
|
166
166
|
continue loop;
|
|
167
167
|
}
|
|
168
168
|
case 2: {
|
|
169
|
-
const patternInput_2 =
|
|
169
|
+
const patternInput_2 = fromRows_1("Investigation Publication", lineNumber + 1, en);
|
|
170
170
|
lastLine_mut = patternInput_2[0];
|
|
171
171
|
ontologySourceReferences_mut = ontologySourceReferences;
|
|
172
172
|
investigationInfo_mut = investigationInfo;
|
|
@@ -178,7 +178,7 @@ export function fromRows(rows) {
|
|
|
178
178
|
continue loop;
|
|
179
179
|
}
|
|
180
180
|
case 3: {
|
|
181
|
-
const patternInput_3 =
|
|
181
|
+
const patternInput_3 = fromRows_2("Investigation Person", lineNumber + 1, en);
|
|
182
182
|
lastLine_mut = patternInput_3[0];
|
|
183
183
|
ontologySourceReferences_mut = ontologySourceReferences;
|
|
184
184
|
investigationInfo_mut = investigationInfo;
|
|
@@ -190,7 +190,7 @@ export function fromRows(rows) {
|
|
|
190
190
|
continue loop;
|
|
191
191
|
}
|
|
192
192
|
case 4: {
|
|
193
|
-
const patternInput_4 =
|
|
193
|
+
const patternInput_4 = fromRows_3(lineNumber + 1, en);
|
|
194
194
|
const study = patternInput_4[3];
|
|
195
195
|
const newRemarks_4 = patternInput_4[2];
|
|
196
196
|
const lineNumber_6 = patternInput_4[1] | 0;
|
|
@@ -225,7 +225,7 @@ export function fromRows(rows) {
|
|
|
225
225
|
Equals: (x, y) => (x === y),
|
|
226
226
|
GetHashCode: stringHash,
|
|
227
227
|
})];
|
|
228
|
-
return
|
|
228
|
+
return ArcInvestigation_fromParts(investigationInfo, ontologySourceReferences, publications, contacts, patternInput_5[0], patternInput_5[1], remarks);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
break;
|
|
@@ -239,11 +239,11 @@ export function fromRows(rows) {
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
export function
|
|
242
|
+
export function ArcInvestigation_toRows(investigation) {
|
|
243
243
|
let remarks, rows;
|
|
244
|
-
return (remarks = ofSeq(investigation.Remarks), (rows = delay(() => append_1(singleton(SparseRowModule_fromValues(["ONTOLOGY SOURCE REFERENCE"])), delay(() => append_1(
|
|
244
|
+
return (remarks = ofSeq(investigation.Remarks), (rows = delay(() => append_1(singleton(SparseRowModule_fromValues(["ONTOLOGY SOURCE REFERENCE"])), delay(() => append_1(toRows(ofSeq(investigation.OntologySourceReferences)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION"])), delay(() => append_1(ArcInvestigation_InvestigationInfo_toRows_Z720BD3FF(investigation), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION PUBLICATIONS"])), delay(() => append_1(toRows_1("Investigation Publication", ofSeq(investigation.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION CONTACTS"])), delay(() => append_1(toRows_2("Investigation Person", ofSeq(investigation.Contacts)), delay(() => collect((studyIdentifier) => {
|
|
245
245
|
const study = defaultArg(investigation.TryGetStudy(studyIdentifier), new ArcStudy(studyIdentifier));
|
|
246
|
-
return append_1(singleton(SparseRowModule_fromValues(["STUDY"])), delay(() =>
|
|
246
|
+
return append_1(singleton(SparseRowModule_fromValues(["STUDY"])), delay(() => toRows_3(study, void 0)));
|
|
247
247
|
}, investigation.RegisteredStudyIdentifiers)))))))))))))))))), (() => {
|
|
248
248
|
try {
|
|
249
249
|
const rm = ofList(map((remark) => Remark.toTuple(remark), remarks), {
|
|
@@ -283,12 +283,29 @@ export function toRows(investigation) {
|
|
|
283
283
|
})()));
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
export function
|
|
287
|
-
|
|
286
|
+
export function ArcInvestigation_isMetadataSheetName(name) {
|
|
287
|
+
if (name === "isa_investigation") {
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
return name === "Investigation";
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export function ArcInvestigation_isMetadataSheet(sheet) {
|
|
296
|
+
return ArcInvestigation_isMetadataSheetName(sheet.Name);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export function ArcInvestigation_tryGetMetadataSheet(doc) {
|
|
300
|
+
return tryFind_1(ArcInvestigation_isMetadataSheet, doc.GetWorksheets());
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export function ARCtrl_ArcInvestigation__ArcInvestigation_fromFsWorkbook_Static_32154C9D(doc) {
|
|
304
|
+
let sheet_1, matchValue;
|
|
288
305
|
try {
|
|
289
|
-
return
|
|
306
|
+
return ArcInvestigation_fromRows(map_1(SparseRowModule_fromFsRow, (sheet_1 = ((matchValue = ArcInvestigation_tryGetMetadataSheet(doc), (matchValue == null) ? (() => {
|
|
290
307
|
throw new Error("Could not find metadata sheet with sheetname \"isa_investigation\" or deprecated sheetname \"Investigation\"");
|
|
291
|
-
})() :
|
|
308
|
+
})() : matchValue)), FsWorksheet.getRows(sheet_1))));
|
|
292
309
|
}
|
|
293
310
|
catch (err) {
|
|
294
311
|
const arg = err.message;
|
|
@@ -296,13 +313,13 @@ export function fromFsWorkbook(doc) {
|
|
|
296
313
|
}
|
|
297
314
|
}
|
|
298
315
|
|
|
299
|
-
export function
|
|
316
|
+
export function ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(investigation) {
|
|
300
317
|
try {
|
|
301
318
|
const wb = new FsWorkbook();
|
|
302
319
|
const sheet = new FsWorksheet("isa_investigation");
|
|
303
320
|
iterateIndexed((rowI, r) => {
|
|
304
321
|
SparseRowModule_writeToSheet(rowI + 1, r, sheet);
|
|
305
|
-
},
|
|
322
|
+
}, ArcInvestigation_toRows(investigation));
|
|
306
323
|
wb.AddWorksheet(sheet);
|
|
307
324
|
return wb;
|
|
308
325
|
}
|
|
@@ -312,3 +329,7 @@ export function toFsWorkbook(investigation) {
|
|
|
312
329
|
}
|
|
313
330
|
}
|
|
314
331
|
|
|
332
|
+
export function ARCtrl_ArcInvestigation__ArcInvestigation_ToFsWorkbook(this$) {
|
|
333
|
+
return ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(this$);
|
|
334
|
+
}
|
|
335
|
+
|
package/Spreadsheet/ArcStudy.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorksheet.fs.js";
|
|
2
|
-
import { iterate, tryPick, map, append, iterateIndexed } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
2
|
+
import { iterate, tryPick, tryFind, map, append, iterateIndexed } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
3
3
|
import { SparseRowModule_fromFsRow, SparseRowModule_fromValues, SparseRowModule_writeToSheet } from "./Metadata/SparseTable.js";
|
|
4
4
|
import { fromRows as fromRows_1, toRows } from "./Metadata/Study.js";
|
|
5
5
|
import { toConsole, printf, toFail } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
6
|
-
import { toArray, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
6
|
+
import { unwrap, toArray, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
7
7
|
import { getEnumerator } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
8
8
|
import { ArcStudy } from "../Core/ArcTypes.js";
|
|
9
9
|
import { createMissingIdentifier } from "../Core/Helper/Identifier.js";
|
|
10
10
|
import { empty } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
11
|
-
import {
|
|
11
|
+
import { ResizeArray_isEmpty, ResizeArray_choose } from "../Core/Helper/Collections.js";
|
|
12
12
|
import { toFsWorksheet as toFsWorksheet_1, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
|
|
13
13
|
import { toFsWorksheet, tryFromFsWorksheet as tryFromFsWorksheet_1 } from "./DataMapTable/DataMapTable.js";
|
|
14
14
|
import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorkbook.fs.js";
|
|
@@ -33,22 +33,33 @@ export function ArcStudy_fromMetadataSheet(sheet) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
export function ArcStudy_isMetadataSheetName(name) {
|
|
37
|
+
if (name === "isa_study") {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return name === "Study";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ArcStudy_isMetadataSheet(sheet) {
|
|
46
|
+
return ArcStudy_isMetadataSheetName(sheet.Name);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ArcStudy_tryGetMetadataSheet(doc) {
|
|
50
|
+
return tryFind(ArcStudy_isMetadataSheet, doc.GetWorksheets());
|
|
51
|
+
}
|
|
52
|
+
|
|
36
53
|
/**
|
|
37
54
|
* Reads an assay from a spreadsheet
|
|
38
55
|
*/
|
|
39
56
|
export function ARCtrl_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D(doc) {
|
|
40
57
|
try {
|
|
41
58
|
let patternInput;
|
|
42
|
-
const matchValue = doc
|
|
59
|
+
const matchValue = ArcStudy_tryGetMetadataSheet(doc);
|
|
43
60
|
if (matchValue == null) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
toConsole(printf("Cannot retrieve metadata: Study file does not contain \"%s\" or \"%s\" sheet."))("isa_study")("Study");
|
|
47
|
-
patternInput = [ArcStudy.create(createMissingIdentifier()), empty()];
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
patternInput = ArcStudy_fromMetadataSheet(matchValue_1);
|
|
51
|
-
}
|
|
61
|
+
toConsole(printf("Cannot retrieve metadata: Study file does not contain \"%s\" or \"%s\" sheet."))("isa_study")("Study");
|
|
62
|
+
patternInput = [ArcStudy.create(createMissingIdentifier()), empty()];
|
|
52
63
|
}
|
|
53
64
|
else {
|
|
54
65
|
patternInput = ArcStudy_fromMetadataSheet(matchValue);
|
|
@@ -77,18 +88,22 @@ export function ARCtrl_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D(doc) {
|
|
|
77
88
|
export function ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522(study, assays, datamapSheet) {
|
|
78
89
|
const datamapSheet_1 = defaultArg(datamapSheet, true);
|
|
79
90
|
const doc = new FsWorkbook();
|
|
80
|
-
const
|
|
81
|
-
doc.AddWorksheet(
|
|
91
|
+
const metadataSheet = ArcStudy_toMetadataSheet(study, assays);
|
|
92
|
+
doc.AddWorksheet(metadataSheet);
|
|
82
93
|
if (datamapSheet_1) {
|
|
83
94
|
iterate((arg) => {
|
|
84
95
|
const sheet = toFsWorksheet(arg);
|
|
85
96
|
doc.AddWorksheet(sheet);
|
|
86
97
|
}, toArray(study.DataMap));
|
|
87
98
|
}
|
|
88
|
-
|
|
89
|
-
const sheet_1 = toFsWorksheet_1(arg_1);
|
|
99
|
+
iterateIndexed((i, arg_1) => {
|
|
100
|
+
const sheet_1 = toFsWorksheet_1(i, arg_1);
|
|
90
101
|
doc.AddWorksheet(sheet_1);
|
|
91
102
|
}, study.Tables);
|
|
92
103
|
return doc;
|
|
93
104
|
}
|
|
94
105
|
|
|
106
|
+
export function ARCtrl_ArcStudy__ArcStudy_ToFsWorkbook_257FC1F0(this$, assays, datamapSheet) {
|
|
107
|
+
return ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522(this$, unwrap(assays), unwrap(datamapSheet));
|
|
108
|
+
}
|
|
109
|
+
|
package/Spreadsheet/Template.js
CHANGED
|
@@ -324,7 +324,7 @@ export function Template_toFsWorkbook(template) {
|
|
|
324
324
|
const doc = new FsWorkbook();
|
|
325
325
|
const metaDataSheet = Template_toMetadataSheet(template);
|
|
326
326
|
doc.AddWorksheet(metaDataSheet);
|
|
327
|
-
const sheet = toFsWorksheet(template.Table);
|
|
327
|
+
const sheet = toFsWorksheet(void 0, template.Table);
|
|
328
328
|
doc.AddWorksheet(sheet);
|
|
329
329
|
return doc;
|
|
330
330
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
1
|
+
import { value as value_1, unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
2
|
+
import { join } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
3
|
+
import { empty, singleton, append, delay, toList } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
2
4
|
import { stringHash, equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
5
|
import { boxHashOption, boxHashArray } from "../Core/Helper/HashCodes.js";
|
|
4
6
|
import { class_type } from "../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
5
7
|
|
|
6
8
|
export class ValidationPackage {
|
|
7
9
|
constructor(name, version) {
|
|
10
|
+
this.version = version;
|
|
8
11
|
this._name = name;
|
|
9
|
-
this._version = version;
|
|
12
|
+
this._version = this.version;
|
|
10
13
|
}
|
|
11
14
|
get Name() {
|
|
12
15
|
const this$ = this;
|
|
@@ -33,6 +36,10 @@ export class ValidationPackage {
|
|
|
33
36
|
const version = this$.Version;
|
|
34
37
|
return ValidationPackage.make(name, version);
|
|
35
38
|
}
|
|
39
|
+
toString() {
|
|
40
|
+
const this$ = this;
|
|
41
|
+
return join("\n", toList(delay(() => append(singleton("{"), delay(() => append(singleton(` Name = ${this$.Name}`), delay(() => append((this$.version != null) ? singleton(` Version = ${value_1(this$.Version)}`) : empty(), delay(() => singleton("}"))))))))));
|
|
42
|
+
}
|
|
36
43
|
Equals(obj) {
|
|
37
44
|
let other_vp;
|
|
38
45
|
const this$ = this;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { value, unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
2
|
+
import { join } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
3
|
+
import { item, fold, length, map, empty, singleton, append, delay, toList } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
4
|
+
import { toString } from "../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
5
|
+
import { sortBy } from "../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
6
|
+
import { equals, compareArrays } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
7
|
+
import { rangeDouble } from "../fable_modules/fable-library-js.4.16.0/Range.js";
|
|
8
|
+
import { boxHashSeq, boxHashOption, boxHashArray } from "../Core/Helper/HashCodes.js";
|
|
5
9
|
import { class_type } from "../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
6
10
|
|
|
7
11
|
export class ValidationPackagesConfig {
|
|
8
12
|
constructor(validation_packages, arc_specification) {
|
|
9
|
-
this._validation_packages = validation_packages;
|
|
10
13
|
this._arc_specification = arc_specification;
|
|
14
|
+
this._validation_packages = validation_packages;
|
|
11
15
|
}
|
|
12
16
|
get ValidationPackages() {
|
|
13
17
|
const this$ = this;
|
|
@@ -34,14 +38,43 @@ export class ValidationPackagesConfig {
|
|
|
34
38
|
const arc_specification = this$.ARCSpecification;
|
|
35
39
|
return ValidationPackagesConfig.make(validation_packages, arc_specification);
|
|
36
40
|
}
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
toString() {
|
|
42
|
+
const this$ = this;
|
|
43
|
+
return join("\n", toList(delay(() => append(singleton("{"), delay(() => append((this$.ARCSpecification != null) ? singleton(` ARCSpecification = ${value(this$.ARCSpecification)}`) : empty(), delay(() => append(singleton(" ValidationPackages = ["), delay(() => append(singleton(join(`;${"\n"}`, map(toString, this$.ValidationPackages))), delay(() => append(singleton("]"), delay(() => singleton("}"))))))))))))));
|
|
44
|
+
}
|
|
45
|
+
StructurallyEquals(other) {
|
|
46
|
+
const this$ = this;
|
|
47
|
+
const sort = (arg) => sortBy((vp) => [vp.Name, vp.Version], Array.from(arg), {
|
|
48
|
+
Compare: compareArrays,
|
|
49
|
+
});
|
|
50
|
+
if (equals(this$.ARCSpecification, other.ARCSpecification)) {
|
|
51
|
+
const a = sort(this$.ValidationPackages);
|
|
52
|
+
const b = sort(other.ValidationPackages);
|
|
53
|
+
return (length(a) === length(b)) && fold((acc, e) => {
|
|
54
|
+
if (acc) {
|
|
55
|
+
return e;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}, true, toList(delay(() => map((i) => equals(item(i, a), item(i, b)), rangeDouble(0, 1, length(a) - 1)))));
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
ReferenceEquals(other) {
|
|
67
|
+
const this$ = this;
|
|
68
|
+
return this$ === other;
|
|
69
|
+
}
|
|
70
|
+
Equals(other) {
|
|
71
|
+
let other_vp;
|
|
39
72
|
const this$ = this;
|
|
40
|
-
return (
|
|
73
|
+
return (other instanceof ValidationPackagesConfig) && ((other_vp = other, this$.StructurallyEquals(other_vp)));
|
|
41
74
|
}
|
|
42
75
|
GetHashCode() {
|
|
43
76
|
const this$ = this;
|
|
44
|
-
return boxHashArray([
|
|
77
|
+
return boxHashArray([boxHashOption(this$.ARCSpecification), boxHashSeq(this$.ValidationPackages)]) | 0;
|
|
45
78
|
}
|
|
46
79
|
}
|
|
47
80
|
|
package/Xlsx.js
CHANGED
|
@@ -4,7 +4,7 @@ import { ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F, ARCtrl_ArcAssa
|
|
|
4
4
|
import { ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522, ARCtrl_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D } from "./Spreadsheet/ArcStudy.js";
|
|
5
5
|
import { map } from "./fable_modules/fable-library-js.4.16.0/Option.js";
|
|
6
6
|
import { ofSeq } from "./fable_modules/fable-library-js.4.16.0/List.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF, ARCtrl_ArcInvestigation__ArcInvestigation_fromFsWorkbook_Static_32154C9D } from "./Spreadsheet/ArcInvestigation.js";
|
|
8
8
|
|
|
9
9
|
export class XlsxHelper_DatamapXlsx {
|
|
10
10
|
constructor() {
|
|
@@ -67,10 +67,10 @@ export class XlsxHelper_InvestigationXlsx {
|
|
|
67
67
|
constructor() {
|
|
68
68
|
}
|
|
69
69
|
fromFsWorkbook(fswb) {
|
|
70
|
-
return
|
|
70
|
+
return ARCtrl_ArcInvestigation__ArcInvestigation_fromFsWorkbook_Static_32154C9D(fswb);
|
|
71
71
|
}
|
|
72
72
|
toFsWorkbook(investigation) {
|
|
73
|
-
return
|
|
73
|
+
return ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(investigation);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ofArray, choose } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
2
2
|
import { equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
3
|
import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
|
|
4
|
-
import { string, tryInclude
|
|
4
|
+
import { resizearray, string, tryInclude } from "../fable_modules/YAMLicious.0.0.1/Encode.fs.js";
|
|
5
5
|
import { ValidationPackage_decoder, ValidationPackage_encoder } from "./ValidationPackage.js";
|
|
6
6
|
import { singleton, collect, delay, toList } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
7
7
|
import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
|
|
@@ -21,7 +21,7 @@ export function ValidationPackagesConfig_encoder(validationpackage) {
|
|
|
21
21
|
else {
|
|
22
22
|
return [tupledArg[0], v];
|
|
23
23
|
}
|
|
24
|
-
}, ofArray([
|
|
24
|
+
}, ofArray([tryInclude("arc_specification", string, validationpackage.ARCSpecification), ["validation_packages", resizearray(ValidationPackage_encoder, validationpackage.ValidationPackages)]]));
|
|
25
25
|
return new YAMLElement(3, [toList(delay(() => collect((matchValue) => singleton(new YAMLElement(0, [YAMLContent_create_27AED5E3(matchValue[0]), matchValue[1]])), objSeq)))]);
|
|
26
26
|
}
|
|
27
27
|
|