@nfdi4plants/arctrl 1.0.7 → 1.2.0

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 (335) hide show
  1. package/ARC.js +47 -11
  2. package/Contract/Contract.js +3 -3
  3. package/Contracts/Contracts.ArcTypes.js +30 -18
  4. package/Contracts/Contracts.Git.js +4 -4
  5. package/FileSystem/Commit.js +2 -2
  6. package/FileSystem/FileSystem.js +4 -4
  7. package/FileSystem/FileSystemTree.js +8 -8
  8. package/FileSystem/Path.js +2 -2
  9. package/FileSystemTree.js +1 -1
  10. package/ISA/ISA/ArcTypes/ArcTable.js +23 -31
  11. package/ISA/ISA/ArcTypes/ArcTableAux.js +27 -16
  12. package/ISA/ISA/ArcTypes/ArcTables.js +11 -11
  13. package/ISA/ISA/ArcTypes/ArcTypes.js +118 -83
  14. package/ISA/ISA/ArcTypes/CompositeCell.js +4 -4
  15. package/ISA/ISA/ArcTypes/CompositeColumn.js +8 -7
  16. package/ISA/ISA/ArcTypes/CompositeHeader.js +5 -5
  17. package/ISA/ISA/ArcTypes/CompositeRow.js +1 -1
  18. package/ISA/ISA/Builder/Types.js +5 -5
  19. package/ISA/ISA/Fable.js +6 -6
  20. package/ISA/ISA/Helper.js +15 -13
  21. package/ISA/ISA/Identifier.js +1 -1
  22. package/ISA/ISA/JsonTypes/Assay.js +8 -8
  23. package/ISA/ISA/JsonTypes/AssayMaterials.js +4 -4
  24. package/ISA/ISA/JsonTypes/ColumnIndex.js +5 -5
  25. package/ISA/ISA/JsonTypes/Comment.js +3 -3
  26. package/ISA/ISA/JsonTypes/CommentList.js +4 -4
  27. package/ISA/ISA/JsonTypes/Component.js +4 -4
  28. package/ISA/ISA/JsonTypes/Data.js +4 -4
  29. package/ISA/ISA/JsonTypes/DataFile.js +2 -2
  30. package/ISA/ISA/JsonTypes/Factor.js +6 -6
  31. package/ISA/ISA/JsonTypes/FactorValue.js +5 -5
  32. package/ISA/ISA/JsonTypes/Investigation.js +6 -6
  33. package/ISA/ISA/JsonTypes/Material.js +5 -5
  34. package/ISA/ISA/JsonTypes/MaterialAttribute.js +3 -3
  35. package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +5 -5
  36. package/ISA/ISA/JsonTypes/MaterialType.js +2 -2
  37. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +6 -6
  38. package/ISA/ISA/JsonTypes/OntologySourceReference.js +6 -6
  39. package/ISA/ISA/JsonTypes/Person.js +23 -8
  40. package/ISA/ISA/JsonTypes/Process.js +13 -13
  41. package/ISA/ISA/JsonTypes/ProcessInput.js +5 -5
  42. package/ISA/ISA/JsonTypes/ProcessOutput.js +5 -5
  43. package/ISA/ISA/JsonTypes/ProcessParameterValue.js +5 -5
  44. package/ISA/ISA/JsonTypes/ProcessSequence.js +6 -6
  45. package/ISA/ISA/JsonTypes/Protocol.js +6 -6
  46. package/ISA/ISA/JsonTypes/ProtocolParameter.js +3 -3
  47. package/ISA/ISA/JsonTypes/Publication.js +6 -6
  48. package/ISA/ISA/JsonTypes/Sample.js +5 -5
  49. package/ISA/ISA/JsonTypes/Source.js +5 -5
  50. package/ISA/ISA/JsonTypes/Study.js +8 -8
  51. package/ISA/ISA/JsonTypes/StudyMaterials.js +4 -4
  52. package/ISA/ISA/JsonTypes/Value.js +22 -29
  53. package/ISA/ISA/Regex.js +3 -3
  54. package/ISA/ISA.Json/ArcTypes/ArcAssay.js +157 -65
  55. package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +78 -49
  56. package/ISA/ISA.Json/ArcTypes/ArcStudy.js +136 -24
  57. package/ISA/ISA.Json/ArcTypes/ArcTable.js +183 -21
  58. package/ISA/ISA.Json/ArcTypes/CellTable.js +40 -0
  59. package/ISA/ISA.Json/ArcTypes/CompositeCell.js +34 -23
  60. package/ISA/ISA.Json/ArcTypes/CompositeHeader.js +18 -46
  61. package/ISA/ISA.Json/ArcTypes/IOType.js +11 -13
  62. package/ISA/ISA.Json/ArcTypes/OATable.js +42 -0
  63. package/ISA/ISA.Json/Assay.js +71 -47
  64. package/ISA/ISA.Json/Comment.js +31 -35
  65. package/ISA/ISA.Json/ConverterOptions.js +19 -1
  66. package/ISA/ISA.Json/Data.js +119 -137
  67. package/ISA/ISA.Json/Decode.js +51 -36
  68. package/ISA/ISA.Json/Factor.js +90 -90
  69. package/ISA/ISA.Json/GEncode.js +31 -6
  70. package/ISA/ISA.Json/Investigation.js +54 -79
  71. package/ISA/ISA.Json/Material.js +103 -104
  72. package/ISA/ISA.Json/Ontology.js +99 -92
  73. package/ISA/ISA.Json/Person.js +47 -65
  74. package/ISA/ISA.Json/Process.js +144 -130
  75. package/ISA/ISA.Json/Protocol.js +144 -105
  76. package/ISA/ISA.Json/Publication.js +34 -40
  77. package/ISA/ISA.Json/StringTable.js +44 -0
  78. package/ISA/ISA.Json/Study.js +70 -96
  79. package/ISA/ISA.Json/context/rocrate/isa_assay_context.js +34 -0
  80. package/ISA/ISA.Json/context/rocrate/isa_comment_context.js +23 -0
  81. package/ISA/ISA.Json/context/rocrate/isa_component_context.js +24 -0
  82. package/ISA/ISA.Json/context/rocrate/isa_data_context.js +25 -0
  83. package/ISA/ISA.Json/context/rocrate/isa_factor_context.js +25 -0
  84. package/ISA/ISA.Json/context/rocrate/isa_factor_value_context.js +25 -0
  85. package/ISA/ISA.Json/context/rocrate/isa_investigation_context.js +33 -0
  86. package/ISA/ISA.Json/context/rocrate/isa_material_attribute_context.js +23 -0
  87. package/ISA/ISA.Json/context/rocrate/isa_material_attribute_value_context.js +25 -0
  88. package/ISA/ISA.Json/context/rocrate/isa_material_context.js +26 -0
  89. package/ISA/ISA.Json/context/rocrate/isa_ontology_annotation_context.js +25 -0
  90. package/ISA/ISA.Json/context/rocrate/isa_ontology_source_reference_context.js +26 -0
  91. package/ISA/ISA.Json/context/rocrate/isa_organization_context.js +22 -0
  92. package/ISA/ISA.Json/context/rocrate/isa_person_context.js +31 -0
  93. package/ISA/ISA.Json/context/rocrate/isa_process_context.js +31 -0
  94. package/ISA/ISA.Json/context/rocrate/isa_process_parameter_value_context.js +25 -0
  95. package/ISA/ISA.Json/context/rocrate/isa_protocol_context.js +30 -0
  96. package/ISA/ISA.Json/context/rocrate/isa_protocol_parameter_context.js +23 -0
  97. package/ISA/ISA.Json/context/rocrate/isa_publication_context.js +27 -0
  98. package/ISA/ISA.Json/context/rocrate/isa_sample_context.js +26 -0
  99. package/ISA/ISA.Json/context/rocrate/isa_source_context.js +25 -0
  100. package/ISA/ISA.Json/context/rocrate/isa_study_context.js +42 -0
  101. package/ISA/ISA.Json/context/rocrate/rocrate_context.js +25 -0
  102. package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +56 -43
  103. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +3 -3
  104. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +11 -11
  105. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +5 -5
  106. package/ISA/ISA.Spreadsheet/ArcAssay.js +100 -88
  107. package/ISA/ISA.Spreadsheet/ArcInvestigation.js +12 -12
  108. package/ISA/ISA.Spreadsheet/ArcStudy.js +36 -24
  109. package/ISA/ISA.Spreadsheet/CollectionAux.js +8 -8
  110. package/ISA/ISA.Spreadsheet/Metadata/Assays.js +5 -5
  111. package/ISA/ISA.Spreadsheet/Metadata/Comment.js +31 -20
  112. package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +5 -5
  113. package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +5 -5
  114. package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +1 -1
  115. package/ISA/ISA.Spreadsheet/Metadata/Factors.js +5 -5
  116. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +5 -5
  117. package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +5 -5
  118. package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +5 -5
  119. package/ISA/ISA.Spreadsheet/Metadata/Publication.js +5 -5
  120. package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +28 -23
  121. package/ISA/ISA.Spreadsheet/Metadata/Study.js +8 -8
  122. package/README.md +20 -3
  123. package/SemVer.js +6 -6
  124. package/Templates/Template.Json.js +43 -36
  125. package/Templates/Template.Spreadsheet.js +12 -12
  126. package/Templates/Template.Web.js +4 -4
  127. package/Templates/Template.js +7 -7
  128. package/Templates/Templates.js +7 -7
  129. package/WebRequest/WebRequest.Node.js +15 -0
  130. package/WebRequest/WebRequest.js +10 -29
  131. package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +7 -7
  132. package/fable_modules/Fable.Promise.2.2.2/Promise.fs.js +3 -3
  133. package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +8 -8
  134. package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +2 -2
  135. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs.js +14 -14
  136. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs.js +6 -6
  137. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs.js +4 -4
  138. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs.js +3 -3
  139. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/DSL.fs.js +2 -2
  140. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Expression.fs.js +1 -1
  141. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs.js +3 -3
  142. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs.js +3 -3
  143. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs.js +3 -3
  144. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Transform.fs.js +6 -6
  145. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Types.fs.js +4 -4
  146. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs.js +3 -3
  147. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsAddress.fs +22 -8
  148. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsAddress.fs.js +24 -14
  149. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsColumn.fs.js +3 -3
  150. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsRow.fs.js +3 -3
  151. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorkbook.fs.js +6 -6
  152. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorksheet.fs +12 -6
  153. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorksheet.fs.js +21 -17
  154. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs.js +3 -3
  155. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs.js +4 -3
  156. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs.js +3 -3
  157. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs.js +3 -3
  158. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs.js +1 -1
  159. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/SheetBuilder.fs.js +8 -8
  160. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs.js +7 -7
  161. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs.js +4 -4
  162. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs.js +1 -1
  163. package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
  164. package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs +1390 -0
  165. package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js +1230 -0
  166. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs +233 -0
  167. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +113 -0
  168. package/fable_modules/Thoth.Json.Core.0.2.1/Thoth.Json.Core.fableproj +28 -0
  169. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs +76 -0
  170. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +33 -0
  171. package/fable_modules/Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  172. package/fable_modules/{Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs → Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/Thoth.Json.Core.AssemblyInfo.fs} +8 -7
  173. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs +79 -0
  174. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +85 -0
  175. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs +32 -0
  176. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +45 -0
  177. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Thoth.Json.JavaScript.fableproj +21 -0
  178. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  179. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +18 -0
  180. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  181. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +19 -0
  182. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Array.d.ts +4 -1
  183. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Array.js +124 -86
  184. package/fable_modules/fable-library-js.4.13.0/CHANGELOG.md +29 -0
  185. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Choice.d.ts +0 -17
  186. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Choice.js +0 -43
  187. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Date.js +3 -2
  188. package/fable_modules/fable-library-js.4.13.0/FSharp.Core.CompilerServices.d.ts +12 -0
  189. package/fable_modules/fable-library-js.4.13.0/FSharp.Core.CompilerServices.js +27 -0
  190. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/List.js +3 -3
  191. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Map.js +3 -3
  192. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableMap.js +2 -1
  193. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableSet.js +2 -1
  194. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Random.js +7 -7
  195. package/fable_modules/fable-library-js.4.13.0/Result.d.ts +37 -0
  196. package/fable_modules/fable-library-js.4.13.0/Result.js +165 -0
  197. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Set.js +2 -2
  198. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/String.d.ts +1 -0
  199. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/String.js +8 -5
  200. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Collections.Generic.d.ts +15 -7
  201. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Collections.Generic.js +46 -36
  202. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Text.d.ts +9 -1
  203. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Text.js +60 -8
  204. package/fable_modules/fable-library-js.4.13.0/big.d.ts +338 -0
  205. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/package.json +4 -3
  206. package/fable_modules/project_cracked.json +1 -1
  207. package/package.json +1 -1
  208. package/ISA/ISA.Json/Validation/Fable.js +0 -69
  209. package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +0 -88
  210. package/ISA/ISA.Json/Validation/ValidationResult.js +0 -45
  211. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +0 -1366
  212. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +0 -1798
  213. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +0 -621
  214. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +0 -472
  215. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +0 -31
  216. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +0 -8
  217. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +0 -30
  218. package/fable_modules/Thoth.Json.10.1.0/Types.fs +0 -59
  219. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +0 -98
  220. package/fable_modules/Thoth.Json.10.1.0/package.json +0 -5
  221. package/fable_modules/fable-library.4.5.0/CHANGELOG.md +0 -11
  222. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs +0 -0
  223. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs +0 -0
  224. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs +0 -0
  225. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs +0 -0
  226. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/DSL.fs +0 -0
  227. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Expression.fs +0 -0
  228. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Operators.fs +0 -0
  229. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Operators.fs.js +0 -0
  230. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs +0 -0
  231. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs +0 -0
  232. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs +0 -0
  233. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Transform.fs +0 -0
  234. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Types.fs +0 -0
  235. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs +0 -0
  236. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsColumn.fs +0 -0
  237. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsRow.fs +0 -0
  238. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsSpreadsheet.fableproj +0 -0
  239. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorkbook.fs +0 -0
  240. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs +0 -0
  241. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs +0 -0
  242. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs +0 -0
  243. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs +0 -0
  244. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs +0 -0
  245. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/SheetBuilder.fs +0 -0
  246. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs +0 -0
  247. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs +0 -0
  248. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs +0 -0
  249. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  250. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
  251. /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  252. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Async.d.ts +0 -0
  253. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Async.js +0 -0
  254. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/AsyncBuilder.d.ts +0 -0
  255. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/AsyncBuilder.js +0 -0
  256. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BigInt.d.ts +0 -0
  257. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BigInt.js +0 -0
  258. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BitConverter.d.ts +0 -0
  259. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BitConverter.js +0 -0
  260. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Boolean.d.ts +0 -0
  261. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Boolean.js +0 -0
  262. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Char.d.ts +0 -0
  263. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Char.js +0 -0
  264. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Date.d.ts +0 -0
  265. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOffset.d.ts +0 -0
  266. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOffset.js +0 -0
  267. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOnly.d.ts +0 -0
  268. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOnly.js +0 -0
  269. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Decimal.d.ts +0 -0
  270. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Decimal.js +0 -0
  271. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Double.d.ts +0 -0
  272. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Double.js +0 -0
  273. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Encoding.d.ts +0 -0
  274. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Encoding.js +0 -0
  275. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Event.d.ts +0 -0
  276. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Event.js +0 -0
  277. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Collections.d.ts +0 -0
  278. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Collections.js +0 -0
  279. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Core.d.ts +0 -0
  280. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Core.js +0 -0
  281. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Global.d.ts +0 -0
  282. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Global.js +0 -0
  283. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Guid.d.ts +0 -0
  284. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Guid.js +0 -0
  285. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Int32.d.ts +0 -0
  286. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Int32.js +0 -0
  287. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/List.d.ts +0 -0
  288. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Long.d.ts +0 -0
  289. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Long.js +0 -0
  290. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MailboxProcessor.d.ts +0 -0
  291. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MailboxProcessor.js +0 -0
  292. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Map.d.ts +0 -0
  293. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MapUtil.d.ts +0 -0
  294. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MapUtil.js +0 -0
  295. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableMap.d.ts +0 -0
  296. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableSet.d.ts +0 -0
  297. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Native.d.ts +0 -0
  298. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Native.js +0 -0
  299. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Numeric.d.ts +0 -0
  300. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Numeric.js +0 -0
  301. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Observable.d.ts +0 -0
  302. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Observable.js +0 -0
  303. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Option.d.ts +0 -0
  304. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Option.js +0 -0
  305. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/README.md +0 -0
  306. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Random.d.ts +0 -0
  307. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Range.d.ts +0 -0
  308. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Range.js +0 -0
  309. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Reflection.d.ts +0 -0
  310. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Reflection.js +0 -0
  311. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/RegExp.d.ts +0 -0
  312. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/RegExp.js +0 -0
  313. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq.d.ts +0 -0
  314. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq.js +0 -0
  315. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq2.d.ts +0 -0
  316. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq2.js +0 -0
  317. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Set.d.ts +0 -0
  318. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/SystemException.d.ts +0 -0
  319. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/SystemException.js +0 -0
  320. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeOnly.d.ts +0 -0
  321. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeOnly.js +0 -0
  322. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeSpan.d.ts +0 -0
  323. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeSpan.js +0 -0
  324. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Timer.d.ts +0 -0
  325. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Timer.js +0 -0
  326. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Types.d.ts +0 -0
  327. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Types.js +0 -0
  328. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Unicode.13.0.0.d.ts +0 -0
  329. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Unicode.13.0.0.js +0 -0
  330. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Uri.d.ts +0 -0
  331. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Uri.js +0 -0
  332. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Util.d.ts +0 -0
  333. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Util.js +0 -0
  334. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/lib/big.d.ts +0 -0
  335. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/lib/big.js +0 -0
@@ -1,59 +1,62 @@
1
+ import { ErrorReason$1, Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
2
+ import { list as list_2, string } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
3
+ import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.13.0/Result.js";
1
4
  import { DataFile } from "../ISA/JsonTypes/DataFile.js";
2
- import { toString, object as object_10, nil } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
3
- import { list as list_1, object as object_11, string } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
4
- import { FSharpResult$2 } from "../../fable_modules/fable-library.4.5.0/Choice.js";
5
- import { ErrorReason } from "../../fable_modules/Thoth.Json.10.1.0/Types.fs.js";
5
+ import { printf, toText, replace } from "../../fable_modules/fable-library-js.4.13.0/String.js";
6
6
  import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
7
- import { ofArray, choose } from "../../fable_modules/fable-library.4.5.0/List.js";
8
- import { uncurry2, equals } from "../../fable_modules/fable-library.4.5.0/Util.js";
9
- import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.5.0/Seq.js";
10
- import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
11
- import { tryInclude } from "./GEncode.js";
12
- import { decoder as decoder_3, encoder } from "./Comment.js";
13
- import { fromJsonString, uri, hasUnknownFields } from "./Decode.js";
7
+ import { ofArray, choose } from "../../fable_modules/fable-library-js.4.13.0/List.js";
8
+ import { equals } from "../../fable_modules/fable-library-js.4.13.0/Util.js";
9
+ import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library-js.4.13.0/Seq.js";
10
+ import { ConverterOptions__set_IncludeContext_Z1FBCCD16, ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeContext, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
11
+ import { tryIncludeList, tryInclude } from "./GEncode.js";
12
+ import { list as list_1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
13
+ import { decoder as decoder_1, encoder } from "./Comment.js";
14
+ import { context_jsonvalue } from "./context/rocrate/isa_data_context.js";
15
+ import { uri, object } from "./Decode.js";
14
16
  import { Data } from "../ISA/JsonTypes/Data.js";
15
- import { replace } from "../../fable_modules/fable-library.4.5.0/String.js";
17
+ import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
18
+ import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
16
19
  import { MaterialAttributeValue_decoder, MaterialAttributeValue_encoder } from "./Material.js";
20
+ import { context_jsonvalue as context_jsonvalue_1 } from "./context/rocrate/isa_source_context.js";
17
21
  import { Source } from "../ISA/JsonTypes/Source.js";
18
22
  import { FactorValue_decoder, FactorValue_encoder } from "./Factor.js";
23
+ import { context_jsonvalue as context_jsonvalue_2 } from "./context/rocrate/isa_sample_context.js";
19
24
  import { Sample } from "../ISA/JsonTypes/Sample.js";
20
25
 
21
26
  export function DataFile_encoder(options, value) {
22
- if (value instanceof DataFile) {
23
- if (value.tag === 1) {
24
- return "Derived Data File";
25
- }
26
- else if (value.tag === 2) {
27
- return "Image File";
28
- }
29
- else {
30
- return "Raw Data File";
31
- }
32
- }
33
- else {
34
- return nil;
35
- }
36
- }
37
-
38
- export function DataFile_decoder(options, s, json) {
39
- const matchValue = string(s, json);
40
- if (matchValue.tag === 1) {
41
- return new FSharpResult$2(1, [matchValue.fields[0]]);
42
- }
43
- else {
44
- switch (matchValue.fields[0]) {
45
- case "Raw Data File":
46
- return new FSharpResult$2(0, [new DataFile(0, [])]);
47
- case "Derived Data File":
48
- return new FSharpResult$2(0, [new DataFile(1, [])]);
49
- case "Image File":
50
- return new FSharpResult$2(0, [new DataFile(2, [])]);
51
- default: {
52
- const s_1 = matchValue.fields[0];
53
- return new FSharpResult$2(1, [[`Could not parse ${s_1}.`, new ErrorReason(0, [s_1, nil])]]);
27
+ switch (value.tag) {
28
+ case 1:
29
+ return new Json(0, ["Derived Data File"]);
30
+ case 2:
31
+ return new Json(0, ["Image File"]);
32
+ default:
33
+ return new Json(0, ["Raw Data File"]);
34
+ }
35
+ }
36
+
37
+ export function DataFile_decoder(options) {
38
+ return {
39
+ Decode(s, json) {
40
+ const matchValue = string.Decode(s, json);
41
+ if (matchValue.tag === 1) {
42
+ return new FSharpResult$2(1, [matchValue.fields[0]]);
54
43
  }
55
- }
56
- }
44
+ else {
45
+ switch (matchValue.fields[0]) {
46
+ case "Raw Data File":
47
+ return new FSharpResult$2(0, [new DataFile(0, [])]);
48
+ case "Derived Data File":
49
+ return new FSharpResult$2(0, [new DataFile(1, [])]);
50
+ case "Image File":
51
+ return new FSharpResult$2(0, [new DataFile(2, [])]);
52
+ default: {
53
+ const s_1 = matchValue.fields[0];
54
+ return new FSharpResult$2(1, [[`Could not parse ${s_1}.`, new ErrorReason$1(0, [s_1, json])]]);
55
+ }
56
+ }
57
+ }
58
+ },
59
+ };
57
60
  }
58
61
 
59
62
  export function Data_genID(d) {
@@ -64,7 +67,7 @@ export function Data_genID(d) {
64
67
  return "#EmptyData";
65
68
  }
66
69
  else {
67
- return matchValue_1;
70
+ return replace(matchValue_1, " ", "_");
68
71
  }
69
72
  }
70
73
  else {
@@ -73,46 +76,34 @@ export function Data_genID(d) {
73
76
  }
74
77
 
75
78
  export function Data_encoder(options, oa) {
76
- return object_10(choose((tupledArg) => {
79
+ return new Json(5, [choose((tupledArg) => {
77
80
  const v = tupledArg[1];
78
- if (equals(v, nil)) {
81
+ if (equals(v, new Json(3, []))) {
79
82
  return void 0;
80
83
  }
81
84
  else {
82
85
  return [tupledArg[0], v];
83
86
  }
84
- }, toList(delay(() => {
85
- let value, s;
86
- return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Data_genID(oa), (typeof value === "string") ? ((s = value, s)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
87
- let s_1;
88
- const value_3 = value_2;
89
- return (typeof value_3 === "string") ? ((s_1 = value_3, s_1)) : nil;
90
- }, oa["ID"])), delay(() => {
91
- let value_5, s_2;
92
- return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Data", (typeof value_5 === "string") ? ((s_2 = value_5, s_2)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
93
- let s_3;
94
- const value_8 = value_7;
95
- return (typeof value_8 === "string") ? ((s_3 = value_8, s_3)) : nil;
96
- }, oa["Name"])), delay(() => append(singleton(tryInclude("type", (value_10) => DataFile_encoder(options, value_10), oa["DataType"])), delay(() => singleton(tryInclude("comments", (comment) => encoder(options, comment), oa["Comments"]))))))));
97
- }));
98
- }))));
87
+ }, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Data_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["Data"]), new Json(0, ["ArcData"])]))]) : empty(), delay(() => append(singleton(tryInclude("name", (value_5) => (new Json(0, [value_5])), oa.Name)), delay(() => append(singleton(tryInclude("type", (value_7) => DataFile_encoder(options, value_7), oa.DataType)), delay(() => append(singleton(tryIncludeList("comments", (comment) => encoder(options, comment), oa.Comments)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue]) : empty()))))))))))))))]);
99
88
  }
100
89
 
101
- export function Data_decoder(options, s, json) {
102
- if (hasUnknownFields(ofArray(["@id", "name", "type", "comments", "@type"]), json)) {
103
- return new FSharpResult$2(1, [["Unknown fields in Data", new ErrorReason(0, [s, nil])]]);
104
- }
105
- else {
106
- return object_11((get$) => {
107
- let objectArg, objectArg_1, objectArg_2, arg_7, decoder, objectArg_3;
108
- return new Data((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (objectArg_2 = get$.Optional, objectArg_2.Field("type", (s_2, json_2) => DataFile_decoder(options, s_2, json_2))), (arg_7 = ((decoder = decoder_3(options), (path_1) => ((value_1) => list_1(uncurry2(decoder), path_1, value_1)))), (objectArg_3 = get$.Optional, objectArg_3.Field("comments", uncurry2(arg_7)))));
109
- }, s, json);
110
- }
90
+ export const Data_allowedFields = ofArray(["@id", "name", "type", "comments", "@type", "@context"]);
91
+
92
+ export function Data_decoder(options) {
93
+ return object(Data_allowedFields, (get$) => {
94
+ let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3;
95
+ return new Data((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = DataFile_decoder(options), (objectArg_2 = get$.Optional, objectArg_2.Field("type", arg_5))), (arg_7 = list_2(decoder_1(options)), (objectArg_3 = get$.Optional, objectArg_3.Field("comments", arg_7))));
96
+ });
111
97
  }
112
98
 
113
99
  export function Data_fromJsonString(s) {
114
- let options;
115
- return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Data_decoder(options, s_1, json)))), s);
100
+ const matchValue = fromString(Data_decoder(ConverterOptions_$ctor()), s);
101
+ if (matchValue.tag === 1) {
102
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
103
+ }
104
+ else {
105
+ return matchValue.fields[0];
106
+ }
116
107
  }
117
108
 
118
109
  export function Data_toJsonString(m) {
@@ -122,11 +113,16 @@ export function Data_toJsonString(m) {
122
113
  /**
123
114
  * exports in json-ld format
124
115
  */
125
- export function Data_toStringLD(d) {
116
+ export function Data_toJsonldString(d) {
126
117
  let returnVal;
127
118
  return toString(2, Data_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), d));
128
119
  }
129
120
 
121
+ export function Data_toJsonldStringWithContext(a) {
122
+ let returnVal;
123
+ return toString(2, Data_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
124
+ }
125
+
130
126
  export function Source_genID(s) {
131
127
  const matchValue = s.ID;
132
128
  if (matchValue == null) {
@@ -144,46 +140,34 @@ export function Source_genID(s) {
144
140
  }
145
141
 
146
142
  export function Source_encoder(options, oa) {
147
- return object_10(choose((tupledArg) => {
143
+ return new Json(5, [choose((tupledArg) => {
148
144
  const v = tupledArg[1];
149
- if (equals(v, nil)) {
145
+ if (equals(v, new Json(3, []))) {
150
146
  return void 0;
151
147
  }
152
148
  else {
153
149
  return [tupledArg[0], v];
154
150
  }
155
- }, toList(delay(() => {
156
- let value, s_1;
157
- return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Source_genID(oa), (typeof value === "string") ? ((s_1 = value, s_1)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
158
- let s_2;
159
- const value_3 = value_2;
160
- return (typeof value_3 === "string") ? ((s_2 = value_3, s_2)) : nil;
161
- }, oa["ID"])), delay(() => {
162
- let value_5, s_3;
163
- return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Source", (typeof value_5 === "string") ? ((s_3 = value_5, s_3)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
164
- let s_4;
165
- const value_8 = value_7;
166
- return (typeof value_8 === "string") ? ((s_4 = value_8, s_4)) : nil;
167
- }, oa["Name"])), delay(() => singleton(tryInclude("characteristics", (oa_1) => MaterialAttributeValue_encoder(options, oa_1), oa["Characteristics"]))))));
168
- }));
169
- }))));
151
+ }, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Source_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["Source"]), new Json(0, ["ArcSource"])]))]) : empty(), delay(() => append(singleton(tryInclude("name", (value_5) => (new Json(0, [value_5])), oa.Name)), delay(() => append(singleton(tryIncludeList("characteristics", (oa_1) => MaterialAttributeValue_encoder(options, oa_1), oa.Characteristics)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_1]) : empty()))))))))))))]);
170
152
  }
171
153
 
172
- export function Source_decoder(options, s, json) {
173
- if (hasUnknownFields(ofArray(["@id", "name", "characteristics", "@type"]), json)) {
174
- return new FSharpResult$2(1, [["Unknown fields in Source", new ErrorReason(0, [s, nil])]]);
175
- }
176
- else {
177
- return object_11((get$) => {
178
- let objectArg, objectArg_1, arg_5, decoder, objectArg_2;
179
- return new Source((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = ((decoder = MaterialAttributeValue_decoder(options), (path_1) => ((value_1) => list_1(uncurry2(decoder), path_1, value_1)))), (objectArg_2 = get$.Optional, objectArg_2.Field("characteristics", uncurry2(arg_5)))));
180
- }, s, json);
181
- }
154
+ export const Source_allowedFields = ofArray(["@id", "name", "characteristics", "@type", "@context"]);
155
+
156
+ export function Source_decoder(options) {
157
+ return object(Source_allowedFields, (get$) => {
158
+ let objectArg, objectArg_1, arg_5, objectArg_2;
159
+ return new Source((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = list_2(MaterialAttributeValue_decoder(options)), (objectArg_2 = get$.Optional, objectArg_2.Field("characteristics", arg_5))));
160
+ });
182
161
  }
183
162
 
184
163
  export function Source_fromJsonString(s) {
185
- let options;
186
- return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Source_decoder(options, s_1, json)))), s);
164
+ const matchValue = fromString(Source_decoder(ConverterOptions_$ctor()), s);
165
+ if (matchValue.tag === 1) {
166
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
167
+ }
168
+ else {
169
+ return matchValue.fields[0];
170
+ }
187
171
  }
188
172
 
189
173
  export function Source_toJsonString(m) {
@@ -193,11 +177,16 @@ export function Source_toJsonString(m) {
193
177
  /**
194
178
  * exports in json-ld format
195
179
  */
196
- export function Source_toStringLD(s) {
180
+ export function Source_toJsonldString(s) {
197
181
  let returnVal;
198
182
  return toString(2, Source_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), s));
199
183
  }
200
184
 
185
+ export function Source_toJsonldStringWithContext(a) {
186
+ let returnVal;
187
+ return toString(2, Source_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
188
+ }
189
+
201
190
  export function Sample_genID(s) {
202
191
  const matchValue = s.ID;
203
192
  if (matchValue == null) {
@@ -215,46 +204,34 @@ export function Sample_genID(s) {
215
204
  }
216
205
 
217
206
  export function Sample_encoder(options, oa) {
218
- return object_10(choose((tupledArg) => {
207
+ return new Json(5, [choose((tupledArg) => {
219
208
  const v = tupledArg[1];
220
- if (equals(v, nil)) {
209
+ if (equals(v, new Json(3, []))) {
221
210
  return void 0;
222
211
  }
223
212
  else {
224
213
  return [tupledArg[0], v];
225
214
  }
226
- }, toList(delay(() => {
227
- let value, s_1;
228
- return append(ConverterOptions__get_SetID(options) ? singleton(["@id", (value = Sample_genID(oa), (typeof value === "string") ? ((s_1 = value, s_1)) : nil)]) : singleton(tryInclude("@id", (value_2) => {
229
- let s_2;
230
- const value_3 = value_2;
231
- return (typeof value_3 === "string") ? ((s_2 = value_3, s_2)) : nil;
232
- }, oa["ID"])), delay(() => {
233
- let value_5, s_3;
234
- return append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", (value_5 = "Sample", (typeof value_5 === "string") ? ((s_3 = value_5, s_3)) : nil)]) : empty(), delay(() => append(singleton(tryInclude("name", (value_7) => {
235
- let s_4;
236
- const value_8 = value_7;
237
- return (typeof value_8 === "string") ? ((s_4 = value_8, s_4)) : nil;
238
- }, oa["Name"])), delay(() => append(singleton(tryInclude("characteristics", (oa_1) => MaterialAttributeValue_encoder(options, oa_1), oa["Characteristics"])), delay(() => append(singleton(tryInclude("factorValues", (oa_2) => FactorValue_encoder(options, oa_2), oa["FactorValues"])), delay(() => singleton(tryInclude("derivesFrom", (oa_3) => Source_encoder(options, oa_3), oa["DerivesFrom"]))))))))));
239
- }));
240
- }))));
215
+ }, toList(delay(() => append(ConverterOptions__get_SetID(options) ? singleton(["@id", new Json(0, [Sample_genID(oa)])]) : singleton(tryInclude("@id", (value_1) => (new Json(0, [value_1])), oa.ID)), delay(() => append(ConverterOptions__get_IncludeType(options) ? singleton(["@type", list_1(ofArray([new Json(0, ["Sample"]), new Json(0, ["ArcSample"])]))]) : empty(), delay(() => append(singleton(tryInclude("name", (value_5) => (new Json(0, [value_5])), oa.Name)), delay(() => append(singleton(tryIncludeList("characteristics", (oa_1) => MaterialAttributeValue_encoder(options, oa_1), oa.Characteristics)), delay(() => append(singleton(tryIncludeList("factorValues", (oa_2) => FactorValue_encoder(options, oa_2), oa.FactorValues)), delay(() => append(singleton(tryIncludeList("derivesFrom", (oa_3) => Source_encoder(options, oa_3), oa.DerivesFrom)), delay(() => (ConverterOptions__get_IncludeContext(options) ? singleton(["@context", context_jsonvalue_2]) : empty()))))))))))))))))]);
241
216
  }
242
217
 
243
- export function Sample_decoder(options, s, json) {
244
- if (hasUnknownFields(ofArray(["@id", "name", "characteristics", "factorValues", "derivesFrom", "@type"]), json)) {
245
- return new FSharpResult$2(1, [["Unknown fields in Sample", new ErrorReason(0, [s, nil])]]);
246
- }
247
- else {
248
- return object_11((get$) => {
249
- let objectArg, objectArg_1, arg_5, decoder, objectArg_2, arg_7, decoder_1, objectArg_3, objectArg_4;
250
- return new Sample((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = ((decoder = MaterialAttributeValue_decoder(options), (path_1) => ((value_1) => list_1(uncurry2(decoder), path_1, value_1)))), (objectArg_2 = get$.Optional, objectArg_2.Field("characteristics", uncurry2(arg_5)))), (arg_7 = ((decoder_1 = FactorValue_decoder(options), (path_2) => ((value_2) => list_1(uncurry2(decoder_1), path_2, value_2)))), (objectArg_3 = get$.Optional, objectArg_3.Field("factorValues", uncurry2(arg_7)))), (objectArg_4 = get$.Optional, objectArg_4.Field("derivesFrom", (path_3, value_3) => list_1((s_2, json_2) => Source_decoder(options, s_2, json_2), path_3, value_3))));
251
- }, s, json);
252
- }
218
+ export const Sample_allowedFields = ofArray(["@id", "name", "characteristics", "factorValues", "derivesFrom", "@type", "@context"]);
219
+
220
+ export function Sample_decoder(options) {
221
+ return object(Sample_allowedFields, (get$) => {
222
+ let objectArg, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, arg_9, objectArg_4;
223
+ return new Sample((objectArg = get$.Optional, objectArg.Field("@id", uri)), (objectArg_1 = get$.Optional, objectArg_1.Field("name", string)), (arg_5 = list_2(MaterialAttributeValue_decoder(options)), (objectArg_2 = get$.Optional, objectArg_2.Field("characteristics", arg_5))), (arg_7 = list_2(FactorValue_decoder(options)), (objectArg_3 = get$.Optional, objectArg_3.Field("factorValues", arg_7))), (arg_9 = list_2(Source_decoder(options)), (objectArg_4 = get$.Optional, objectArg_4.Field("derivesFrom", arg_9))));
224
+ });
253
225
  }
254
226
 
255
227
  export function Sample_fromJsonString(s) {
256
- let options;
257
- return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Sample_decoder(options, s_1, json)))), s);
228
+ const matchValue = fromString(Sample_decoder(ConverterOptions_$ctor()), s);
229
+ if (matchValue.tag === 1) {
230
+ throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
231
+ }
232
+ else {
233
+ return matchValue.fields[0];
234
+ }
258
235
  }
259
236
 
260
237
  export function Sample_toJsonString(m) {
@@ -264,8 +241,13 @@ export function Sample_toJsonString(m) {
264
241
  /**
265
242
  * exports in json-ld format
266
243
  */
267
- export function Sample_toStringLD(s) {
244
+ export function Sample_toJsonldString(s) {
268
245
  let returnVal;
269
246
  return toString(2, Sample_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), s));
270
247
  }
271
248
 
249
+ export function Sample_toJsonldStringWithContext(a) {
250
+ let returnVal;
251
+ return toString(2, Sample_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a));
252
+ }
253
+
@@ -1,46 +1,61 @@
1
- import { fromString, string } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
2
- import { FSharpResult$2 } from "../../fable_modules/fable-library.4.5.0/Choice.js";
3
- import { printf, toText } from "../../fable_modules/fable-library.4.5.0/String.js";
4
- import { ErrorReason } from "../../fable_modules/Thoth.Json.10.1.0/Types.fs.js";
5
- import { contains, exists } from "../../fable_modules/fable-library.4.5.0/Seq.js";
6
- import { stringHash } from "../../fable_modules/fable-library.4.5.0/Util.js";
1
+ import { helpers as helpers_2 } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
2
+ import { Getters$2__get_Errors, Getters$2_$ctor_Z4BE6C149, string } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
3
+ import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.13.0/Result.js";
4
+ import { printf, toText } from "../../fable_modules/fable-library-js.4.13.0/String.js";
5
+ import { ErrorReason$1 } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
6
+ import { exists } from "../../fable_modules/fable-library-js.4.13.0/Seq.js";
7
+ import { ofSeq, contains } from "../../fable_modules/fable-library-js.4.13.0/Set.js";
8
+ import { comparePrimitives } from "../../fable_modules/fable-library-js.4.13.0/Util.js";
9
+ import { head, length, isEmpty } from "../../fable_modules/fable-library-js.4.13.0/List.js";
10
+
11
+ export const helpers = helpers_2;
7
12
 
8
13
  export function isURI(s) {
9
14
  return true;
10
15
  }
11
16
 
12
- export function uri(s, json) {
13
- const matchValue = string(s, json);
14
- if (matchValue.tag === 1) {
15
- return new FSharpResult$2(1, [matchValue.fields[0]]);
16
- }
17
- else if (isURI(matchValue.fields[0])) {
18
- return new FSharpResult$2(0, [matchValue.fields[0]]);
19
- }
20
- else {
21
- const s_3 = matchValue.fields[0];
22
- return new FSharpResult$2(1, [[s_3, new ErrorReason(6, [toText(printf("Expected URI, got %s"))(s_3)])]]);
23
- }
24
- }
25
-
26
- export function fromJsonString(decoder, s) {
27
- const matchValue = fromString(decoder, s);
28
- if (matchValue.tag === 1) {
29
- throw new Error(toText(printf("Error decoding string: %s"))(matchValue.fields[0]));
30
- }
31
- else {
32
- return matchValue.fields[0];
33
- }
34
- }
17
+ export const uri = {
18
+ Decode(s, json) {
19
+ const matchValue = string.Decode(s, json);
20
+ if (matchValue.tag === 1) {
21
+ return new FSharpResult$2(1, [matchValue.fields[0]]);
22
+ }
23
+ else if (isURI(matchValue.fields[0])) {
24
+ return new FSharpResult$2(0, [matchValue.fields[0]]);
25
+ }
26
+ else {
27
+ const s_3 = matchValue.fields[0];
28
+ return new FSharpResult$2(1, [[s_3, new ErrorReason$1(6, [toText(printf("Expected URI, got %s"))(s_3)])]]);
29
+ }
30
+ },
31
+ };
35
32
 
36
- export function getFieldNames(json) {
37
- return Object.getOwnPropertyNames(json);
33
+ export function hasUnknownFields(helpers_1, knownFields, json) {
34
+ return exists((x) => !contains(x, knownFields), helpers_1.getProperties(json));
38
35
  }
39
36
 
40
- export function hasUnknownFields(knownFields, json) {
41
- return exists((x) => !contains(x, knownFields, {
42
- Equals: (x_1, y) => (x_1 === y),
43
- GetHashCode: stringHash,
44
- }), getFieldNames(json));
37
+ export function object(allowedFields, builder) {
38
+ const allowedFields_1 = ofSeq(allowedFields, {
39
+ Compare: comparePrimitives,
40
+ });
41
+ return {
42
+ Decode(helpers_1, value) {
43
+ const getters = Getters$2_$ctor_Z4BE6C149(helpers_1, value);
44
+ if (hasUnknownFields(helpers_1, allowedFields_1, value)) {
45
+ return new FSharpResult$2(1, [["Unknown fields in object", new ErrorReason$1(0, ["", value])]]);
46
+ }
47
+ else {
48
+ const result = builder(getters);
49
+ const matchValue = Getters$2__get_Errors(getters);
50
+ if (!isEmpty(matchValue)) {
51
+ const errors = matchValue;
52
+ return (length(errors) > 1) ? (new FSharpResult$2(1, [["", new ErrorReason$1(7, [errors])]])) : (new FSharpResult$2(1, [head(matchValue)]));
53
+ }
54
+ else {
55
+ return new FSharpResult$2(0, [result]);
56
+ }
57
+ }
58
+ },
59
+ };
45
60
  }
46
61