@nfdi4plants/arctrl 2.0.0-alpha.8 → 2.0.0-beta.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 +12 -14
- package/Contract/ArcAssay.js +1 -1
- package/Contract/ArcInvestigation.js +9 -12
- package/Contract/ArcStudy.js +1 -1
- package/Core/ArcTypes.js +53 -53
- package/Core/Conversion.js +28 -42
- package/Spreadsheet/AnnotationTable/ArcTable.js +33 -23
- package/Spreadsheet/AnnotationTable/CompositeCell.js +22 -27
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +38 -25
- package/Spreadsheet/AnnotationTable/CompositeHeader.js +181 -339
- package/Spreadsheet/ArcInvestigation.js +5 -21
- package/Xlsx.js +1 -4
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@ import { toRows as toRows_1, fromRows as fromRows_1 } from "./Metadata/OntologyS
|
|
|
14
14
|
import { toRows as toRows_2, fromRows as fromRows_2 } from "./Metadata/Publication.js";
|
|
15
15
|
import { toRows as toRows_3, fromRows as fromRows_3 } from "./Metadata/Contacts.js";
|
|
16
16
|
import { toRows as toRows_4, fromRows as fromRows_4 } from "./Metadata/Study.js";
|
|
17
|
-
import { iterateIndexed, map as map_1, toList,
|
|
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";
|
|
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.1.2/FsWorksheet.fs.js";
|
|
@@ -239,12 +239,12 @@ export function fromRows(rows) {
|
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
export function toRows(
|
|
242
|
+
export function 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(toRows_1(ofSeq(investigation.OntologySourceReferences)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION"])), delay(() => append_1(InvestigationInfo_toRows_Z720BD3FF(investigation), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION PUBLICATIONS"])), delay(() => append_1(toRows_2("Investigation Publication", ofSeq(investigation.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION CONTACTS"])), delay(() => append_1(toRows_3("Investigation Person", ofSeq(investigation.Contacts)), delay(() =>
|
|
244
|
+
return (remarks = ofSeq(investigation.Remarks), (rows = delay(() => append_1(singleton(SparseRowModule_fromValues(["ONTOLOGY SOURCE REFERENCE"])), delay(() => append_1(toRows_1(ofSeq(investigation.OntologySourceReferences)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION"])), delay(() => append_1(InvestigationInfo_toRows_Z720BD3FF(investigation), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION PUBLICATIONS"])), delay(() => append_1(toRows_2("Investigation Publication", ofSeq(investigation.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION CONTACTS"])), delay(() => append_1(toRows_3("Investigation Person", ofSeq(investigation.Contacts)), delay(() => collect((studyIdentifier) => {
|
|
245
245
|
const study = defaultArg(investigation.TryGetStudy(studyIdentifier), new ArcStudy(studyIdentifier));
|
|
246
246
|
return append_1(singleton(SparseRowModule_fromValues(["STUDY"])), delay(() => toRows_4(study, void 0)));
|
|
247
|
-
}, investigation.RegisteredStudyIdentifiers)
|
|
247
|
+
}, investigation.RegisteredStudyIdentifiers)))))))))))))))))), (() => {
|
|
248
248
|
try {
|
|
249
249
|
const rm = ofList(map((remark) => Remark.toTuple(remark), remarks), {
|
|
250
250
|
Compare: comparePrimitives,
|
|
@@ -302,23 +302,7 @@ export function toFsWorkbook(investigation) {
|
|
|
302
302
|
const sheet = new FsWorksheet("isa_investigation");
|
|
303
303
|
iterateIndexed((rowI, r) => {
|
|
304
304
|
SparseRowModule_writeToSheet(rowI + 1, r, sheet);
|
|
305
|
-
}, toRows(
|
|
306
|
-
wb.AddWorksheet(sheet);
|
|
307
|
-
return wb;
|
|
308
|
-
}
|
|
309
|
-
catch (err) {
|
|
310
|
-
const arg = err.message;
|
|
311
|
-
return toFail(printf("Could not write investigation to spreadsheet: %s"))(arg);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
export function toLightFsWorkbook(investigation) {
|
|
316
|
-
try {
|
|
317
|
-
const wb = new FsWorkbook();
|
|
318
|
-
const sheet = new FsWorksheet("isa_investigation");
|
|
319
|
-
iterateIndexed((rowI, r) => {
|
|
320
|
-
SparseRowModule_writeToSheet(rowI + 1, r, sheet);
|
|
321
|
-
}, toRows(true, investigation));
|
|
305
|
+
}, toRows(investigation));
|
|
322
306
|
wb.AddWorksheet(sheet);
|
|
323
307
|
return wb;
|
|
324
308
|
}
|
package/Xlsx.js
CHANGED
|
@@ -4,7 +4,7 @@ import { toFsWorkbook as toFsWorkbook_1, fromFsWorkbook as fromFsWorkbook_1 } fr
|
|
|
4
4
|
import { ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_353D0DB7, ARCtrl_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D } from "./Spreadsheet/ArcStudy.js";
|
|
5
5
|
import { map, unwrap } 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 { toFsWorkbook as toFsWorkbook_2, fromFsWorkbook as fromFsWorkbook_2 } from "./Spreadsheet/ArcInvestigation.js";
|
|
8
8
|
|
|
9
9
|
export class XlsxHelper_DatamapXlsx {
|
|
10
10
|
constructor() {
|
|
@@ -72,9 +72,6 @@ export class XlsxHelper_InvestigationXlsx {
|
|
|
72
72
|
toFsWorkbook(investigation) {
|
|
73
73
|
return toFsWorkbook_2(investigation);
|
|
74
74
|
}
|
|
75
|
-
toLightFsWorkbook(investigation) {
|
|
76
|
-
return toLightFsWorkbook(investigation);
|
|
77
|
-
}
|
|
78
75
|
}
|
|
79
76
|
|
|
80
77
|
export function XlsxHelper_InvestigationXlsx_$reflection() {
|