@nfdi4plants/arctrl 2.0.0-alpha.8 → 2.0.0-beta.2

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.
Files changed (103) hide show
  1. package/ARC.js +13 -15
  2. package/Contract/ArcAssay.js +1 -1
  3. package/Contract/ArcInvestigation.js +9 -12
  4. package/Contract/ArcStudy.js +1 -1
  5. package/Core/ArcTypes.js +53 -53
  6. package/Core/Conversion.js +28 -42
  7. package/Spreadsheet/AnnotationTable/ArcTable.js +34 -24
  8. package/Spreadsheet/AnnotationTable/CompositeCell.js +22 -27
  9. package/Spreadsheet/AnnotationTable/CompositeColumn.js +38 -25
  10. package/Spreadsheet/AnnotationTable/CompositeHeader.js +181 -339
  11. package/Spreadsheet/ArcAssay.js +2 -2
  12. package/Spreadsheet/ArcInvestigation.js +7 -23
  13. package/Spreadsheet/ArcStudy.js +2 -2
  14. package/Spreadsheet/DataMap.js +1 -1
  15. package/Spreadsheet/DataMapTable/DataMapColumn.js +1 -1
  16. package/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
  17. package/Spreadsheet/DataMapTable/DataMapTable.js +5 -5
  18. package/Spreadsheet/Metadata/SparseTable.js +7 -7
  19. package/Spreadsheet/Template.js +2 -2
  20. package/Xlsx.js +1 -4
  21. package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsSpreadsheet.fableproj +1 -0
  22. package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorksheet.fs +4 -0
  23. package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorksheet.fs.js +9 -1
  24. package/fable_modules/FsSpreadsheet.6.2.0/Json/Cell.fs +45 -0
  25. package/fable_modules/FsSpreadsheet.6.2.0/Json/Cell.fs.js +38 -0
  26. package/fable_modules/FsSpreadsheet.6.2.0/Json/Column.fs +28 -0
  27. package/fable_modules/FsSpreadsheet.6.2.0/Json/Column.fs.js +24 -0
  28. package/fable_modules/FsSpreadsheet.6.2.0/Json/Row.fs +28 -0
  29. package/fable_modules/FsSpreadsheet.6.2.0/Json/Row.fs.js +24 -0
  30. package/fable_modules/FsSpreadsheet.6.2.0/Json/Workbook.fs +33 -0
  31. package/fable_modules/FsSpreadsheet.6.2.0/Json/Workbook.fs.js +35 -0
  32. package/fable_modules/FsSpreadsheet.6.2.0/Json/Worksheet.fs +148 -0
  33. package/fable_modules/FsSpreadsheet.6.2.0/Json/Worksheet.fs.js +109 -0
  34. package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
  35. package/fable_modules/project_cracked.json +1 -1
  36. package/package.json +1 -1
  37. package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs +0 -23
  38. package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs.js +0 -21
  39. package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs +0 -23
  40. package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs.js +0 -19
  41. package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs +0 -20
  42. package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs.js +0 -21
  43. package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs +0 -49
  44. package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs.js +0 -44
  45. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCell.fs +0 -0
  46. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCell.fs.js +0 -0
  47. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCellsCollection.fs +0 -0
  48. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Cells/FsCellsCollection.fs.js +0 -0
  49. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/CellBuilder.fs +0 -0
  50. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/CellBuilder.fs.js +0 -0
  51. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/ColumnBuilder.fs +0 -0
  52. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/ColumnBuilder.fs.js +0 -0
  53. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/DSL.fs +0 -0
  54. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/DSL.fs.js +0 -0
  55. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Expression.fs +0 -0
  56. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Expression.fs.js +0 -0
  57. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Operators.fs +0 -0
  58. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Operators.fs.js +0 -0
  59. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/RowBuilder.fs +0 -0
  60. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/RowBuilder.fs.js +0 -0
  61. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/SheetBuilder.fs +0 -0
  62. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/SheetBuilder.fs.js +0 -0
  63. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/TableBuilder.fs +0 -0
  64. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/TableBuilder.fs.js +0 -0
  65. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Transform.fs +0 -0
  66. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Transform.fs.js +0 -0
  67. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Types.fs +0 -0
  68. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/Types.fs.js +0 -0
  69. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/WorkbookBuilder.fs +0 -0
  70. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/DSL/WorkbookBuilder.fs.js +0 -0
  71. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsAddress.fs +0 -0
  72. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsAddress.fs.js +0 -0
  73. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsColumn.fs +0 -0
  74. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsColumn.fs.js +0 -0
  75. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsRow.fs +0 -0
  76. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsRow.fs.js +0 -0
  77. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorkbook.fs +0 -0
  78. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/FsWorkbook.fs.js +0 -0
  79. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Table.fs +0 -0
  80. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Table.fs.js +0 -0
  81. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Value.fs +0 -0
  82. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Json/Value.fs.js +0 -0
  83. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRange.fs +0 -0
  84. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRange.fs.js +0 -0
  85. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeAddress.fs +0 -0
  86. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeAddress.fs.js +0 -0
  87. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeBase.fs +0 -0
  88. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeBase.fs.js +0 -0
  89. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeColumn.fs +0 -0
  90. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeColumn.fs.js +0 -0
  91. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeRow.fs +0 -0
  92. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Ranges/FsRangeRow.fs.js +0 -0
  93. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/SheetBuilder.fs +0 -0
  94. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/SheetBuilder.fs.js +0 -0
  95. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTable.fs +0 -0
  96. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTable.fs.js +0 -0
  97. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableField.fs +0 -0
  98. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableField.fs.js +0 -0
  99. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableRow.fs +0 -0
  100. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/Tables/FsTableRow.fs.js +0 -0
  101. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  102. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
  103. /package/fable_modules/{FsSpreadsheet.6.1.2 → FsSpreadsheet.6.2.0}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
package/ARC.js CHANGED
@@ -2,11 +2,11 @@ import { concat, fold, map, exactlyOne, tryPick, choose } from "./fable_modules/
2
2
  import { ARCtrl_ArcAssay__ArcAssay_ToUpdateContract, ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49, ARCtrl_ArcAssay__ArcAssay_ToDeleteContract, ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F } from "./Contract/ArcAssay.js";
3
3
  import { ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static } from "./Contract/Datamap.js";
4
4
  import { ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49, ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F } from "./Contract/ArcStudy.js";
5
- import { ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49, ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F } from "./Contract/ArcInvestigation.js";
5
+ import { ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract, ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F } from "./Contract/ArcInvestigation.js";
6
6
  import { collect, empty, iterate, find, tryFind, map as map_1, singleton, append, delay, toList, contains, toArray } from "./fable_modules/fable-library-js.4.16.0/Seq.js";
7
7
  import { FileSystemTree } from "./FileSystem/FileSystemTree.js";
8
8
  import { FileSystem } from "./FileSystem/FileSystem.js";
9
- import { bind, map as map_2, value as value_2, defaultArg, unwrap } from "./fable_modules/fable-library-js.4.16.0/Option.js";
9
+ import { bind, map as map_2, defaultArg, value as value_2, unwrap } from "./fable_modules/fable-library-js.4.16.0/Option.js";
10
10
  import { comparePrimitives, safeHash, stringHash } from "./fable_modules/fable-library-js.4.16.0/Util.js";
11
11
  import { getStudyFolderPath, getAssayFolderPath } from "./FileSystem/Path.js";
12
12
  import { printf, toText, replace } from "./fable_modules/fable-library-js.4.16.0/String.js";
@@ -15,14 +15,14 @@ import { ofArray } from "./fable_modules/fable-library-js.4.16.0/List.js";
15
15
  import { tryISAReadContractFromPath } from "./Contract/ARC.js";
16
16
  import { ArcTables } from "./Core/Table/ArcTables.js";
17
17
  import { addToDict } from "./fable_modules/fable-library-js.4.16.0/MapUtil.js";
18
- import { toFsWorkbook, toLightFsWorkbook } from "./Spreadsheet/ArcInvestigation.js";
18
+ import { toFsWorkbook } from "./Spreadsheet/ArcInvestigation.js";
19
19
  import { ArcInvestigation } from "./Core/ArcTypes.js";
20
20
  import { Assay_datamapFileNameFromIdentifier, Assay_fileNameFromIdentifier, Study_datamapFileNameFromIdentifier, Study_fileNameFromIdentifier } from "./Core/Helper/Identifier.js";
21
21
  import { ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_353D0DB7 } from "./Spreadsheet/ArcStudy.js";
22
22
  import { DataMap__get_StaticHash, DataMap__set_StaticHash_Z524259A4 } from "./Core/Table/DataMap.js";
23
23
  import { toFsWorkbook as toFsWorkbook_1 } from "./Spreadsheet/DataMap.js";
24
24
  import { toFsWorkbook as toFsWorkbook_2 } from "./Spreadsheet/ArcAssay.js";
25
- import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.6.1.2/Cells/FsCellsCollection.fs.js";
25
+ import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.6.2.0/Cells/FsCellsCollection.fs.js";
26
26
  import { Clone_createCloneContract_5000466F, Init_createAddRemoteContract_Z721C83C5, gitignoreContract, gitattributesContract, Init_createInitContract_6DFDD678 } from "./Contract/Git.js";
27
27
  import { FSharpSet__Contains, ofSeq, unionMany } from "./fable_modules/fable-library-js.4.16.0/Set.js";
28
28
  import { ofSeq as ofSeq_1 } from "./fable_modules/fable-library-js.4.16.0/Map.js";
@@ -142,7 +142,7 @@ export class ARC {
142
142
  const assayFolderPath = getAssayFolderPath(assayIdentifier);
143
143
  const filteredPaths = paths.filter((p) => !(p.indexOf(assayFolderPath) === 0));
144
144
  this$.SetFilePaths(filteredPaths);
145
- const collection = toList(delay(() => append(singleton(ARCtrl_ArcAssay__ArcAssay_ToDeleteContract(assay)), delay(() => append(singleton(ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49(isa)), delay(() => map_1(ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, studies)))))));
145
+ const collection = toList(delay(() => append(singleton(ARCtrl_ArcAssay__ArcAssay_ToDeleteContract(assay)), delay(() => append(singleton(ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract(isa)), delay(() => map_1(ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, studies)))))));
146
146
  return Array.from(collection);
147
147
  }
148
148
  RenameAssay(oldAssayIdentifier, newAssayIdentifier) {
@@ -187,7 +187,7 @@ export class ARC {
187
187
  const studyFolderPath = getStudyFolderPath(studyIdentifier);
188
188
  const filteredPaths = paths.filter((p) => !(p.indexOf(studyFolderPath) === 0));
189
189
  this$.SetFilePaths(filteredPaths);
190
- const collection = ofArray([Contract.createDelete(studyFolderPath), ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49(isa)]);
190
+ const collection = ofArray([Contract.createDelete(studyFolderPath), ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract(isa)]);
191
191
  return Array.from(collection);
192
192
  }
193
193
  RenameStudy(oldStudyIdentifier, newStudyIdentifier) {
@@ -292,17 +292,16 @@ export class ARC {
292
292
  newFS = ARCAux_updateFSByCWL(this$._cwl, fs);
293
293
  this$._fs = newFS;
294
294
  }
295
- GetWriteContracts(isLight) {
295
+ GetWriteContracts() {
296
296
  const this$ = this;
297
- const isLight_1 = defaultArg(isLight, true);
298
297
  const workbooks = new Map([]);
299
298
  const matchValue = this$.ISA;
300
299
  if (matchValue == null) {
301
- addToDict(workbooks, "isa.investigation.xlsx", ["ISA_Investigation", toLightFsWorkbook(ArcInvestigation.create("MISSING_IDENTIFIER_"))]);
300
+ addToDict(workbooks, "isa.investigation.xlsx", ["ISA_Investigation", toFsWorkbook(ArcInvestigation.create("MISSING_IDENTIFIER_"))]);
302
301
  }
303
302
  else {
304
303
  const inv = matchValue;
305
- addToDict(workbooks, "isa.investigation.xlsx", ["ISA_Investigation", (isLight_1 ? (toLightFsWorkbook) : (toFsWorkbook))(inv)]);
304
+ addToDict(workbooks, "isa.investigation.xlsx", ["ISA_Investigation", toFsWorkbook(inv)]);
306
305
  inv.StaticHash = (inv.GetLightHashCode() | 0);
307
306
  iterate((s) => {
308
307
  s.StaticHash = (s.GetLightHashCode() | 0);
@@ -335,14 +334,13 @@ export class ARC {
335
334
  }
336
335
  }, this$._fs.Tree.ToFilePaths(true));
337
336
  }
338
- GetUpdateContracts(isLight) {
337
+ GetUpdateContracts() {
339
338
  let inv, inv_1, inv_2;
340
339
  const this$ = this;
341
- const isLight_1 = defaultArg(isLight, true);
342
340
  const matchValue = this$.ISA;
343
- return (matchValue != null) ? (((inv = matchValue, inv.StaticHash === 0)) ? ((inv_1 = matchValue, this$.GetWriteContracts(isLight_1))) : ((inv_2 = matchValue, toArray(delay(() => {
341
+ return (matchValue != null) ? (((inv = matchValue, inv.StaticHash === 0)) ? ((inv_1 = matchValue, this$.GetWriteContracts())) : ((inv_2 = matchValue, toArray(delay(() => {
344
342
  const hash = inv_2.GetLightHashCode() | 0;
345
- return append((inv_2.StaticHash !== hash) ? singleton(ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49(inv_2, isLight_1)) : empty(), delay(() => {
343
+ return append((inv_2.StaticHash !== hash) ? singleton(ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract(inv_2)) : empty(), delay(() => {
346
344
  inv_2.StaticHash = (hash | 0);
347
345
  return append(collect((s) => {
348
346
  const hash_1 = s.GetLightHashCode() | 0;
@@ -424,7 +422,7 @@ export class ARC {
424
422
  }));
425
423
  }, inv_2.Assays)));
426
424
  }));
427
- }))))) : this$.GetWriteContracts(isLight_1);
425
+ }))))) : this$.GetWriteContracts();
428
426
  }
429
427
  GetGitInitContracts(branch, repositoryAddress, defaultGitignore) {
430
428
  const defaultGitignore_1 = defaultArg(defaultGitignore, false);
@@ -42,7 +42,7 @@ export function ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49(this$, WithF
42
42
  const c = Contract.createCreate(path, "ISA_Assay", toFsWorkbook(this$));
43
43
  return toArray(delay(() => {
44
44
  let folderFS;
45
- return append(withFolder ? ((folderFS = FileSystemTree.createAssayFolder(this$.Identifier), collect((p) => ((p !== path) ? singleton(Contract.createCreate(p, "PlainText")) : empty()), folderFS.ToFilePaths(false)))) : empty(), delay(() => singleton(c)));
45
+ return append(withFolder ? ((folderFS = FileSystemTree.createAssaysFolder([FileSystemTree.createAssayFolder(this$.Identifier)]), collect((p) => (((p !== path) && (p !== "assays/.gitkeep")) ? singleton(Contract.createCreate(p, "PlainText")) : empty()), folderFS.ToFilePaths(false)))) : empty(), delay(() => singleton(c)));
46
46
  }));
47
47
  }
48
48
 
@@ -1,9 +1,8 @@
1
1
  import { combineMany } from "../FileSystem/Path.js";
2
2
  import { item, equalsWith } from "../fable_modules/fable-library-js.4.16.0/Array.js";
3
3
  import { defaultOf } from "../fable_modules/fable-library-js.4.16.0/Util.js";
4
- import { unwrap, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
5
- import { fromFsWorkbook, toFsWorkbook, toLightFsWorkbook } from "../Spreadsheet/ArcInvestigation.js";
6
4
  import { Contract } from "./Contract.js";
5
+ import { fromFsWorkbook, toFsWorkbook } from "../Spreadsheet/ArcInvestigation.js";
7
6
 
8
7
  export function $007CInvestigationPath$007C_$007C(input) {
9
8
  let matchResult;
@@ -26,22 +25,20 @@ export function $007CInvestigationPath$007C_$007C(input) {
26
25
  }
27
26
  }
28
27
 
29
- export function ARCtrl_ArcInvestigation__ArcInvestigation_ToCreateContract_6FCE9E49(this$, isLight) {
30
- const converter = defaultArg(isLight, true) ? (toLightFsWorkbook) : (toFsWorkbook);
31
- return Contract.createCreate("isa.investigation.xlsx", "ISA_Investigation", converter(this$));
28
+ export function ARCtrl_ArcInvestigation__ArcInvestigation_ToCreateContract(this$) {
29
+ return Contract.createCreate("isa.investigation.xlsx", "ISA_Investigation", toFsWorkbook(this$));
32
30
  }
33
31
 
34
- export function ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49(this$, isLight) {
35
- const converter = defaultArg(isLight, true) ? (toLightFsWorkbook) : (toFsWorkbook);
36
- return Contract.createUpdate("isa.investigation.xlsx", "ISA_Investigation", converter(this$));
32
+ export function ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract(this$) {
33
+ return Contract.createUpdate("isa.investigation.xlsx", "ISA_Investigation", toFsWorkbook(this$));
37
34
  }
38
35
 
39
- export function ARCtrl_ArcInvestigation__ArcInvestigation_toCreateContract_Static_23B73268(inv, isLight) {
40
- return ARCtrl_ArcInvestigation__ArcInvestigation_ToCreateContract_6FCE9E49(inv, unwrap(isLight));
36
+ export function ARCtrl_ArcInvestigation__ArcInvestigation_toCreateContract_Static_Z720BD3FF(inv) {
37
+ return ARCtrl_ArcInvestigation__ArcInvestigation_ToCreateContract(inv);
41
38
  }
42
39
 
43
- export function ARCtrl_ArcInvestigation__ArcInvestigation_toUpdateContract_Static_23B73268(inv, isLight) {
44
- return ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49(inv, unwrap(isLight));
40
+ export function ARCtrl_ArcInvestigation__ArcInvestigation_toUpdateContract_Static_Z720BD3FF(inv) {
41
+ return ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract(inv);
45
42
  }
46
43
 
47
44
  export function ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F(c) {
@@ -42,7 +42,7 @@ export function ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49(this$, WithF
42
42
  const c = Contract.createCreate(path, "ISA_Study", ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_353D0DB7(this$));
43
43
  return toArray(delay(() => {
44
44
  let folderFS;
45
- return append(withFolder ? ((folderFS = FileSystemTree.createStudiesFolder([FileSystemTree.createStudyFolder(this$.Identifier)]), collect((p) => ((p !== path) ? singleton(Contract.createCreate(p, "PlainText")) : empty()), folderFS.ToFilePaths(false)))) : empty(), delay(() => singleton(c)));
45
+ return append(withFolder ? ((folderFS = FileSystemTree.createStudiesFolder([FileSystemTree.createStudyFolder(this$.Identifier)]), collect((p) => (((p !== path) && (p !== "studies/.gitkeep")) ? singleton(Contract.createCreate(p, "PlainText")) : empty()), folderFS.ToFilePaths(false)))) : empty(), delay(() => singleton(c)));
46
46
  }));
47
47
  }
48
48
 
package/Core/ArcTypes.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { value as value_4, defaultArg, map, unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
2
- import { collect, append as append_3, tryFind, removeAt, iterateIndexed, iterate, tryFindIndex, exists, choose, item, map as map_1, delay, toList, fold, length, forAll, contains, filter, toArray } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
2
+ import { collect, append as append_3, tryFind, removeAt, iterate, tryFindIndex, exists, choose, item, map as map_1, delay, toList, fold, length, forAll, contains, filter, toArray } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
3
3
  import { defaultOf, safeHash, equals, disposeSafe, getEnumerator, stringHash } from "../fable_modules/fable-library-js.4.16.0/Util.js";
4
4
  import { ResizeArray_choose, ResizeArray_filter, ResizeArray_map } from "./Helper/Collections.js";
5
5
  import { DataMap__Copy } from "./Table/DataMap.js";
@@ -1276,7 +1276,7 @@ export class ArcStudy extends ArcTables {
1276
1276
  }
1277
1277
  GetLightHashCode() {
1278
1278
  const this$ = this;
1279
- return boxHashArray([this$.Identifier, boxHashOption(this$.Title), boxHashOption(this$.Description), boxHashOption(this$.SubmissionDate), boxHashOption(this$.PublicReleaseDate), boxHashSeq(this$.Publications), boxHashSeq(this$.Contacts), boxHashSeq(this$.StudyDesignDescriptors), boxHashSeq(this$.Tables), boxHashSeq(this$.Comments)]) | 0;
1279
+ return boxHashArray([this$.Identifier, boxHashOption(this$.Title), boxHashOption(this$.Description), boxHashOption(this$.SubmissionDate), boxHashOption(this$.PublicReleaseDate), boxHashSeq(this$.Publications), boxHashSeq(this$.Contacts), boxHashSeq(this$.StudyDesignDescriptors), boxHashSeq(this$.Tables), boxHashSeq(this$.RegisteredAssayIdentifiers), boxHashSeq(this$.Comments)]) | 0;
1280
1280
  }
1281
1281
  }
1282
1282
 
@@ -1324,125 +1324,125 @@ export class ArcInvestigation {
1324
1324
  const registeredStudyIdentifiers_1 = defaultArg(registeredStudyIdentifiers, []);
1325
1325
  const comments_1 = defaultArg(comments, []);
1326
1326
  const remarks_1 = defaultArg(remarks, []);
1327
- this["identifier@1118"] = identifier;
1328
- this["title@1119"] = title;
1329
- this["description@1120"] = description;
1330
- this["submissionDate@1121"] = submissionDate;
1331
- this["publicReleaseDate@1122"] = publicReleaseDate;
1332
- this["ontologySourceReferences@1123-1"] = ontologySourceReferences_1;
1333
- this["publications@1124-1"] = publications_1;
1334
- this["contacts@1125-1"] = contacts_1;
1335
- this["assays@1126-1"] = assays_1;
1336
- this["studies@1127-1"] = studies_1;
1337
- this["registeredStudyIdentifiers@1128-1"] = registeredStudyIdentifiers_1;
1338
- this["comments@1129-1"] = comments_1;
1339
- this["remarks@1130-1"] = remarks_1;
1327
+ this["identifier@1119"] = identifier;
1328
+ this["title@1120"] = title;
1329
+ this["description@1121"] = description;
1330
+ this["submissionDate@1122"] = submissionDate;
1331
+ this["publicReleaseDate@1123"] = publicReleaseDate;
1332
+ this["ontologySourceReferences@1124-1"] = ontologySourceReferences_1;
1333
+ this["publications@1125-1"] = publications_1;
1334
+ this["contacts@1126-1"] = contacts_1;
1335
+ this["assays@1127-1"] = assays_1;
1336
+ this["studies@1128-1"] = studies_1;
1337
+ this["registeredStudyIdentifiers@1129-1"] = registeredStudyIdentifiers_1;
1338
+ this["comments@1130-1"] = comments_1;
1339
+ this["remarks@1131-1"] = remarks_1;
1340
1340
  this.staticHash = 0;
1341
- this["init@1099"] = 1;
1341
+ this["init@1100"] = 1;
1342
1342
  }
1343
1343
  get Identifier() {
1344
1344
  const this$ = this;
1345
- return this$["identifier@1118"];
1345
+ return this$["identifier@1119"];
1346
1346
  }
1347
1347
  set Identifier(i) {
1348
1348
  const this$ = this;
1349
- this$["identifier@1118"] = i;
1349
+ this$["identifier@1119"] = i;
1350
1350
  }
1351
1351
  get Title() {
1352
1352
  const this$ = this;
1353
- return unwrap(this$["title@1119"]);
1353
+ return unwrap(this$["title@1120"]);
1354
1354
  }
1355
1355
  set Title(n) {
1356
1356
  const this$ = this;
1357
- this$["title@1119"] = n;
1357
+ this$["title@1120"] = n;
1358
1358
  }
1359
1359
  get Description() {
1360
1360
  const this$ = this;
1361
- return unwrap(this$["description@1120"]);
1361
+ return unwrap(this$["description@1121"]);
1362
1362
  }
1363
1363
  set Description(n) {
1364
1364
  const this$ = this;
1365
- this$["description@1120"] = n;
1365
+ this$["description@1121"] = n;
1366
1366
  }
1367
1367
  get SubmissionDate() {
1368
1368
  const this$ = this;
1369
- return unwrap(this$["submissionDate@1121"]);
1369
+ return unwrap(this$["submissionDate@1122"]);
1370
1370
  }
1371
1371
  set SubmissionDate(n) {
1372
1372
  const this$ = this;
1373
- this$["submissionDate@1121"] = n;
1373
+ this$["submissionDate@1122"] = n;
1374
1374
  }
1375
1375
  get PublicReleaseDate() {
1376
1376
  const this$ = this;
1377
- return unwrap(this$["publicReleaseDate@1122"]);
1377
+ return unwrap(this$["publicReleaseDate@1123"]);
1378
1378
  }
1379
1379
  set PublicReleaseDate(n) {
1380
1380
  const this$ = this;
1381
- this$["publicReleaseDate@1122"] = n;
1381
+ this$["publicReleaseDate@1123"] = n;
1382
1382
  }
1383
1383
  get OntologySourceReferences() {
1384
1384
  const this$ = this;
1385
- return this$["ontologySourceReferences@1123-1"];
1385
+ return this$["ontologySourceReferences@1124-1"];
1386
1386
  }
1387
1387
  set OntologySourceReferences(n) {
1388
1388
  const this$ = this;
1389
- this$["ontologySourceReferences@1123-1"] = n;
1389
+ this$["ontologySourceReferences@1124-1"] = n;
1390
1390
  }
1391
1391
  get Publications() {
1392
1392
  const this$ = this;
1393
- return this$["publications@1124-1"];
1393
+ return this$["publications@1125-1"];
1394
1394
  }
1395
1395
  set Publications(n) {
1396
1396
  const this$ = this;
1397
- this$["publications@1124-1"] = n;
1397
+ this$["publications@1125-1"] = n;
1398
1398
  }
1399
1399
  get Contacts() {
1400
1400
  const this$ = this;
1401
- return this$["contacts@1125-1"];
1401
+ return this$["contacts@1126-1"];
1402
1402
  }
1403
1403
  set Contacts(n) {
1404
1404
  const this$ = this;
1405
- this$["contacts@1125-1"] = n;
1405
+ this$["contacts@1126-1"] = n;
1406
1406
  }
1407
1407
  get Assays() {
1408
1408
  const this$ = this;
1409
- return this$["assays@1126-1"];
1409
+ return this$["assays@1127-1"];
1410
1410
  }
1411
1411
  set Assays(n) {
1412
1412
  const this$ = this;
1413
- this$["assays@1126-1"] = n;
1413
+ this$["assays@1127-1"] = n;
1414
1414
  }
1415
1415
  get Studies() {
1416
1416
  const this$ = this;
1417
- return this$["studies@1127-1"];
1417
+ return this$["studies@1128-1"];
1418
1418
  }
1419
1419
  set Studies(n) {
1420
1420
  const this$ = this;
1421
- this$["studies@1127-1"] = n;
1421
+ this$["studies@1128-1"] = n;
1422
1422
  }
1423
1423
  get RegisteredStudyIdentifiers() {
1424
1424
  const this$ = this;
1425
- return this$["registeredStudyIdentifiers@1128-1"];
1425
+ return this$["registeredStudyIdentifiers@1129-1"];
1426
1426
  }
1427
1427
  set RegisteredStudyIdentifiers(n) {
1428
1428
  const this$ = this;
1429
- this$["registeredStudyIdentifiers@1128-1"] = n;
1429
+ this$["registeredStudyIdentifiers@1129-1"] = n;
1430
1430
  }
1431
1431
  get Comments() {
1432
1432
  const this$ = this;
1433
- return this$["comments@1129-1"];
1433
+ return this$["comments@1130-1"];
1434
1434
  }
1435
1435
  set Comments(n) {
1436
1436
  const this$ = this;
1437
- this$["comments@1129-1"] = n;
1437
+ this$["comments@1130-1"] = n;
1438
1438
  }
1439
1439
  get Remarks() {
1440
1440
  const this$ = this;
1441
- return this$["remarks@1130-1"];
1441
+ return this$["remarks@1131-1"];
1442
1442
  }
1443
1443
  set Remarks(n) {
1444
1444
  const this$ = this;
1445
- this$["remarks@1130-1"] = n;
1445
+ this$["remarks@1131-1"] = n;
1446
1446
  }
1447
1447
  get StaticHash() {
1448
1448
  const this$ = this;
@@ -1584,11 +1584,11 @@ export class ArcInvestigation {
1584
1584
  }
1585
1585
  }, this$.Assays);
1586
1586
  iterate((s) => {
1587
- iterateIndexed((i, ai) => {
1588
- if (ai === oldIdentifier) {
1589
- s.RegisteredAssayIdentifiers[i] = newIdentifier;
1590
- }
1591
- }, s.RegisteredAssayIdentifiers);
1587
+ const index = tryFindIndex((ai) => (ai === oldIdentifier), s.RegisteredAssayIdentifiers);
1588
+ if (index != null) {
1589
+ const index_1 = index | 0;
1590
+ s.RegisteredAssayIdentifiers[index_1] = newIdentifier;
1591
+ }
1592
1592
  }, this$.Studies);
1593
1593
  }
1594
1594
  static renameAssay(oldIdentifier, newIdentifier) {
@@ -1839,11 +1839,11 @@ export class ArcInvestigation {
1839
1839
  s.Identifier = newIdentifier;
1840
1840
  }
1841
1841
  }, this$.Studies);
1842
- iterateIndexed((i, si) => {
1843
- if (si === oldIdentifier) {
1844
- this$.RegisteredStudyIdentifiers[i] = newIdentifier;
1845
- }
1846
- }, this$.RegisteredStudyIdentifiers);
1842
+ const index = tryFindIndex((si) => (si === oldIdentifier), this$.RegisteredStudyIdentifiers);
1843
+ if (index != null) {
1844
+ const index_1 = index | 0;
1845
+ this$.RegisteredStudyIdentifiers[index_1] = newIdentifier;
1846
+ }
1847
1847
  }
1848
1848
  static renameStudy(oldIdentifier, newIdentifier) {
1849
1849
  return (inv) => {
@@ -2249,7 +2249,7 @@ export class ArcInvestigation {
2249
2249
  }
2250
2250
  GetLightHashCode() {
2251
2251
  const this$ = this;
2252
- return boxHashArray([this$.Identifier, boxHashOption(this$.Title), boxHashOption(this$.Description), boxHashOption(this$.SubmissionDate), boxHashOption(this$.PublicReleaseDate), boxHashSeq(this$.Publications), boxHashSeq(this$.Contacts), boxHashSeq(this$.OntologySourceReferences), boxHashSeq(this$.Comments), boxHashSeq(this$.Remarks)]) | 0;
2252
+ return boxHashArray([this$.Identifier, boxHashOption(this$.Title), boxHashOption(this$.Description), boxHashOption(this$.SubmissionDate), boxHashOption(this$.PublicReleaseDate), boxHashSeq(this$.Publications), boxHashSeq(this$.Contacts), boxHashSeq(this$.OntologySourceReferences), boxHashSeq(this$.RegisteredStudyIdentifiers), boxHashSeq(this$.Comments), boxHashSeq(this$.Remarks)]) | 0;
2253
2253
  }
2254
2254
  }
2255
2255
 
@@ -12,7 +12,7 @@ import { Factor } from "./Process/Factor.js";
12
12
  import { toString } from "../fable_modules/fable-library-js.4.16.0/Types.js";
13
13
  import { MaterialAttributeValue_create_BE8DE56 } from "./Process/MaterialAttributeValue.js";
14
14
  import { MaterialAttribute_create_A220A8A } from "./Process/MaterialAttribute.js";
15
- import { ProcessInput_getCharacteristicValues_5B3D5BA9, ProcessInput__isMaterial, ProcessInput__isData, ProcessInput_setCharacteristicValues, ProcessInput__get_Name, ProcessInput__isSource, ProcessInput__isSample, ProcessInput, ProcessInput_createRawData_Z721C83C5, ProcessInput_createMaterial_4452CB4C, ProcessInput_createSample_Z598187B7, ProcessInput_createSource_Z5E00540E } from "./Process/ProcessInput.js";
15
+ import { ProcessInput_getCharacteristicValues_5B3D5BA9, ProcessInput__isMaterial, ProcessInput__isData, ProcessInput_setCharacteristicValues, ProcessInput__get_Name, ProcessInput__isSource, ProcessInput__isSample, ProcessInput, ProcessInput_createSource_Z5E00540E, ProcessInput_createRawData_Z721C83C5, ProcessInput_createMaterial_4452CB4C, ProcessInput_createSample_Z598187B7 } from "./Process/ProcessInput.js";
16
16
  import { ProcessOutput_getFactorValues_Z42C11600, ProcessOutput__isMaterial, ProcessOutput__isData, ProcessOutput_setFactorValues, ProcessOutput__get_Name, ProcessOutput__isSample, ProcessOutput, ProcessOutput_createRawData_Z721C83C5, ProcessOutput_createMaterial_4452CB4C, ProcessOutput_createSample_Z598187B7 } from "./Process/ProcessOutput.js";
17
17
  import { CompositeCell } from "./Table/CompositeCell.js";
18
18
  import { OntologyAnnotation } from "./OntologyAnnotation.js";
@@ -21,7 +21,7 @@ import { IOType, CompositeHeader } from "./Table/CompositeHeader.js";
21
21
  import { ActivePatterns_$007CRegex$007C_$007C } from "./Helper/Regex.js";
22
22
  import { ARCtrl_Process_Component__Component_TryGetColumnIndex, ARCtrl_Process_ProtocolParameter__ProtocolParameter_TryGetColumnIndex, tryGetFactorColumnIndex, tryGetCharacteristicColumnIndex, tryGetComponentIndex, tryGetParameterColumnIndex, ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static, ARCtrl_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4 } from "./Process/ColumnIndex.js";
23
23
  import { getItemFromDict } from "../fable_modules/fable-library-js.4.16.0/MapUtil.js";
24
- import { initialize, zip, append as append_1, sortBy, head, tryPick as tryPick_1, collect, mapIndexed, item, length, map as map_2, empty, ofArray, isEmpty, singleton, choose as choose_1 } from "../fable_modules/fable-library-js.4.16.0/List.js";
24
+ import { initialize, zip, append as append_1, sortBy, head, tryPick as tryPick_1, collect, mapIndexed, item, map as map_2, empty, length, ofArray, isEmpty, singleton, choose as choose_1 } from "../fable_modules/fable-library-js.4.16.0/List.js";
25
25
  import { Source_create_Z5CA08497 } from "./Process/Source.js";
26
26
  import { Sample_create_62424AD2 } from "./Process/Sample.js";
27
27
  import { Process_create_Z7C1F7FA9, Process_decomposeName_Z721C83C5, Process_make, Process_composeName } from "./Process/Process.js";
@@ -171,47 +171,30 @@ export function JsonTypes_composeCharacteristicValue(header, value) {
171
171
  return MaterialAttributeValue_create_BE8DE56(void 0, MaterialAttribute_create_A220A8A(void 0, header.ToTerm()), unwrap(patternInput[0]), unwrap(patternInput[1]));
172
172
  }
173
173
 
174
+ export function JsonTypes_composeFreetextMaterialName(headerFT, name) {
175
+ return `${headerFT}=${name}`;
176
+ }
177
+
174
178
  /**
175
179
  * Convert a CompositeHeader and Cell tuple to a ISA ProcessInput
176
180
  */
177
181
  export function JsonTypes_composeProcessInput(header, value) {
178
- let matchResult;
179
182
  if (header.tag === 11) {
180
183
  switch (header.fields[0].tag) {
181
- case 0: {
182
- matchResult = 0;
183
- break;
184
- }
185
- case 1: {
186
- matchResult = 1;
187
- break;
188
- }
189
- case 3: {
190
- matchResult = 2;
191
- break;
192
- }
193
- case 2: {
194
- matchResult = 3;
195
- break;
196
- }
184
+ case 1:
185
+ return ProcessInput_createSample_Z598187B7(toString(value));
186
+ case 3:
187
+ return ProcessInput_createMaterial_4452CB4C(toString(value));
188
+ case 2:
189
+ return ProcessInput_createRawData_Z721C83C5(toString(value));
190
+ case 4:
191
+ return ProcessInput_createMaterial_4452CB4C(JsonTypes_composeFreetextMaterialName(header.fields[0].fields[0], toString(value)));
197
192
  default:
198
- matchResult = 4;
193
+ return ProcessInput_createSource_Z5E00540E(toString(value));
199
194
  }
200
195
  }
201
196
  else {
202
- matchResult = 4;
203
- }
204
- switch (matchResult) {
205
- case 0:
206
- return ProcessInput_createSource_Z5E00540E(toString(value));
207
- case 1:
208
- return ProcessInput_createSample_Z598187B7(toString(value));
209
- case 2:
210
- return ProcessInput_createMaterial_4452CB4C(toString(value));
211
- case 3:
212
- return ProcessInput_createRawData_Z721C83C5(toString(value));
213
- default:
214
- return toFail(printf("Could not parse input header %O"))(header);
197
+ return toFail(printf("Could not parse input header %O"))(header);
215
198
  }
216
199
  }
217
200
 
@@ -219,13 +202,9 @@ export function JsonTypes_composeProcessInput(header, value) {
219
202
  * Convert a CompositeHeader and Cell tuple to a ISA ProcessOutput
220
203
  */
221
204
  export function JsonTypes_composeProcessOutput(header, value) {
222
- let matchResult;
205
+ let matchResult, ft;
223
206
  if (header.tag === 12) {
224
207
  switch (header.fields[0].tag) {
225
- case 1: {
226
- matchResult = 0;
227
- break;
228
- }
229
208
  case 3: {
230
209
  matchResult = 1;
231
210
  break;
@@ -234,12 +213,17 @@ export function JsonTypes_composeProcessOutput(header, value) {
234
213
  matchResult = 2;
235
214
  break;
236
215
  }
237
- default:
216
+ case 4: {
238
217
  matchResult = 3;
218
+ ft = header.fields[0].fields[0];
219
+ break;
220
+ }
221
+ default:
222
+ matchResult = 0;
239
223
  }
240
224
  }
241
225
  else {
242
- matchResult = 3;
226
+ matchResult = 4;
243
227
  }
244
228
  switch (matchResult) {
245
229
  case 0:
@@ -248,6 +232,8 @@ export function JsonTypes_composeProcessOutput(header, value) {
248
232
  return ProcessOutput_createMaterial_4452CB4C(toString(value));
249
233
  case 2:
250
234
  return ProcessOutput_createRawData_Z721C83C5(toString(value));
235
+ case 3:
236
+ return ProcessOutput_createMaterial_4452CB4C(JsonTypes_composeFreetextMaterialName(ft, toString(value)));
251
237
  default:
252
238
  return toFail(printf("Could not parse output header %O"))(header);
253
239
  }
@@ -641,7 +627,7 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
641
627
  inputGetter_1 = ((matrix) => ((i) => {
642
628
  const chars = toList(map_1((f) => f(matrix)(i), charGetters));
643
629
  const input = inputGetter(matrix)(i);
644
- return (!(ProcessInput__isSample(input) ? true : ProcessInput__isSource(input)) && !isEmpty(chars)) ? ofArray([input, ProcessInput_createSample_Z598187B7(ProcessInput__get_Name(input), chars)]) : singleton(ProcessInput_setCharacteristicValues(chars, input));
630
+ return (!(ProcessInput__isSample(input) ? true : ProcessInput__isSource(input)) && !isEmpty(chars)) ? ofArray([input, ProcessInput_createSample_Z598187B7(ProcessInput__get_Name(input), chars)]) : singleton((length(chars) > 0) ? ProcessInput_setCharacteristicValues(chars, input) : input);
645
631
  }));
646
632
  }
647
633
  let outputGetter_1;
@@ -654,7 +640,7 @@ export function ProcessParsing_getProcessGetter(processNameRoot, headers) {
654
640
  outputGetter_1 = ((matrix_2) => ((i_2) => {
655
641
  const factors = toList(map_1((f_2) => f_2(matrix_2)(i_2), factorValueGetters));
656
642
  const output = outputGetter(matrix_2)(i_2);
657
- return (!ProcessOutput__isSample(output) && !isEmpty(factors)) ? ofArray([output, ProcessOutput_createSample_Z598187B7(ProcessOutput__get_Name(output), void 0, factors)]) : singleton(ProcessOutput_setFactorValues(factors, output));
643
+ return (!ProcessOutput__isSample(output) && !isEmpty(factors)) ? ofArray([output, ProcessOutput_createSample_Z598187B7(ProcessOutput__get_Name(output), void 0, factors)]) : singleton((length(factors) > 0) ? ProcessOutput_setFactorValues(factors, output) : output);
658
644
  }));
659
645
  }
660
646
  return (matrix_4) => ((i_4) => {
@@ -1,15 +1,17 @@
1
- import { iterateIndexed, length, sortBy, collect, toArray, exists, ofArray, empty, tail, head, isEmpty, cons, singleton, fold, map, reverse } from "../../fable_modules/fable-library-js.4.16.0/List.js";
2
- import { map as map_1, toList, tryFind } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
3
- import { toFsColumns, fixDeprecatedIOHeader, fromFsColumns } from "./CompositeColumn.js";
1
+ import { iterateIndexed, length, sortBy, collect as collect_1, exists, toArray, ofArray, empty, tail, head, isEmpty, cons, singleton, fold, map, reverse } from "../../fable_modules/fable-library-js.4.16.0/List.js";
2
+ import { item, map as map_1 } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
3
+ import { singleton as singleton_1, collect, map as map_2, delay, toArray as toArray_1, tryFind } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
4
+ import { toStringCellColumns, fixDeprecatedIOHeader, fromStringCellColumns } from "./CompositeColumn.js";
4
5
  import { printf, toFail } from "../../fable_modules/fable-library-js.4.16.0/String.js";
6
+ import { Dictionary_tryGet, FsCellsCollection__TryGetCell_Z37302880 } from "../../fable_modules/FsSpreadsheet.6.2.0/Cells/FsCellsCollection.fs.js";
7
+ import { rangeDouble } from "../../fable_modules/fable-library-js.4.16.0/Range.js";
8
+ import { FsAddress_$ctor_Z37302880, FsAddress__get_ColumnNumber, FsAddress__get_RowNumber } from "../../fable_modules/FsSpreadsheet.6.2.0/FsAddress.fs.js";
9
+ import { FsRangeAddress_$ctor_7E77A4A0, FsRangeAddress__get_LastAddress } from "../../fable_modules/FsSpreadsheet.6.2.0/Ranges/FsRangeAddress.fs.js";
10
+ import { FsRangeBase__Cell_Z3407A44B, FsRangeBase__get_RangeAddress } from "../../fable_modules/FsSpreadsheet.6.2.0/Ranges/FsRangeBase.fs.js";
5
11
  import { ArcTable } from "../../Core/Table/ArcTable.js";
6
- import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.6.1.2/FsWorksheet.fs.js";
12
+ import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.6.2.0/FsWorksheet.fs.js";
7
13
  import { comparePrimitives } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
8
- import { FsRangeAddress_$ctor_7E77A4A0 } from "../../fable_modules/FsSpreadsheet.6.1.2/Ranges/FsRangeAddress.fs.js";
9
- import { FsAddress_$ctor_Z37302880 } from "../../fable_modules/FsSpreadsheet.6.1.2/FsAddress.fs.js";
10
- import { Dictionary_tryGet } from "../../fable_modules/FsSpreadsheet.6.1.2/Cells/FsCellsCollection.fs.js";
11
14
  import { addToDict } from "../../fable_modules/fable-library-js.4.16.0/MapUtil.js";
12
- import { FsRangeBase__Cell_Z3407A44B } from "../../fable_modules/FsSpreadsheet.6.1.2/Ranges/FsRangeBase.fs.js";
13
15
 
14
16
  /**
15
17
  * Iterates over elements of the input list and groups adjacent elements.
@@ -64,11 +66,11 @@ export function classifyColumnOrder(column) {
64
66
 
65
67
  export const helperColumnStrings = ofArray(["Term Source REF", "Term Accession Number", "Unit", "Data Format", "Data Selector Format"]);
66
68
 
67
- export function groupColumnsByHeader(columns) {
68
- return Aux_List_groupWhen((c) => {
69
- const v = c.Item(1).ValueAsString();
69
+ export function groupColumnsByHeader(stringCellColumns) {
70
+ return map_1(toArray, toArray(Aux_List_groupWhen((c) => {
71
+ const v = item(0, c);
70
72
  return !exists((s) => (v.indexOf(s) === 0), helperColumnStrings);
71
- }, columns);
73
+ }, ofArray(stringCellColumns))));
72
74
  }
73
75
 
74
76
  /**
@@ -81,8 +83,8 @@ export function tryAnnotationTable(sheet) {
81
83
  /**
82
84
  * Groups and parses a collection of single columns into the according ISA composite columns
83
85
  */
84
- export function composeColumns(columns) {
85
- return toArray(map(fromFsColumns, groupColumnsByHeader(toList(columns))));
86
+ export function composeColumns(stringCellColumns) {
87
+ return map_1(fromStringCellColumns, groupColumnsByHeader(stringCellColumns));
86
88
  }
87
89
 
88
90
  /**
@@ -96,7 +98,16 @@ export function tryFromFsWorksheet(sheet) {
96
98
  }
97
99
  else {
98
100
  const t = matchValue;
99
- const compositeColumns = composeColumns(map_1(fixDeprecatedIOHeader, t.GetColumns(sheet.CellCollection)));
101
+ const compositeColumns = composeColumns(map_1(fixDeprecatedIOHeader, toArray_1(delay(() => map_2((c) => toArray_1(delay(() => collect((r) => {
102
+ const matchValue_1 = FsCellsCollection__TryGetCell_Z37302880(sheet.CellCollection, r, c);
103
+ if (matchValue_1 == null) {
104
+ return singleton_1("");
105
+ }
106
+ else {
107
+ const cell = matchValue_1;
108
+ return singleton_1(cell.ValueAsString());
109
+ }
110
+ }, rangeDouble(1, 1, FsAddress__get_RowNumber(FsRangeAddress__get_LastAddress(FsRangeBase__get_RangeAddress(t))))))), rangeDouble(1, 1, FsAddress__get_ColumnNumber(FsRangeAddress__get_LastAddress(FsRangeBase__get_RangeAddress(t)))))))));
100
111
  return ArcTable.addColumns(compositeColumns, void 0, true)(ArcTable.init(sheet.Name));
101
112
  }
102
113
  }
@@ -114,30 +125,29 @@ export function toFsWorksheet(table) {
114
125
  return ws;
115
126
  }
116
127
  else {
117
- const columns = collect(toFsColumns, sortBy(classifyColumnOrder, ofArray(table.Columns), {
128
+ const columns = collect_1(toStringCellColumns, sortBy(classifyColumnOrder, ofArray(table.Columns), {
118
129
  Compare: comparePrimitives,
119
130
  }));
120
131
  const maxRow = length(head(columns)) | 0;
121
132
  const maxCol = length(columns) | 0;
122
133
  const fsTable = ws.Table("annotationTable", FsRangeAddress_$ctor_7E77A4A0(FsAddress_$ctor_Z37302880(1, 1), FsAddress_$ctor_Z37302880(maxRow, maxCol)));
123
134
  iterateIndexed((colI, col) => {
124
- iterateIndexed((rowI, cell) => {
135
+ iterateIndexed((rowI, stringCell) => {
125
136
  let value;
126
- const v = cell.ValueAsString();
127
137
  if (rowI === 0) {
128
- const matchValue = Dictionary_tryGet(v, stringCount);
138
+ const matchValue = Dictionary_tryGet(stringCell, stringCount);
129
139
  if (matchValue == null) {
130
- addToDict(stringCount, cell.ValueAsString(), "");
131
- value = v;
140
+ addToDict(stringCount, stringCell, "");
141
+ value = stringCell;
132
142
  }
133
143
  else {
134
144
  const spaces = matchValue;
135
- stringCount.set(v, spaces + " ");
136
- value = ((v + " ") + spaces);
145
+ stringCount.set(stringCell, spaces + " ");
146
+ value = ((stringCell + " ") + spaces);
137
147
  }
138
148
  }
139
149
  else {
140
- value = v;
150
+ value = stringCell;
141
151
  }
142
152
  const address = FsAddress_$ctor_Z37302880(rowI + 1, colI + 1);
143
153
  FsRangeBase__Cell_Z3407A44B(fsTable, address, ws.CellCollection).SetValueAs(value);