@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.
- package/ARC.js +47 -11
- package/Contract/Contract.js +3 -3
- package/Contracts/Contracts.ArcTypes.js +30 -18
- package/Contracts/Contracts.Git.js +4 -4
- package/FileSystem/Commit.js +2 -2
- package/FileSystem/FileSystem.js +4 -4
- package/FileSystem/FileSystemTree.js +8 -8
- package/FileSystem/Path.js +2 -2
- package/FileSystemTree.js +1 -1
- package/ISA/ISA/ArcTypes/ArcTable.js +23 -31
- package/ISA/ISA/ArcTypes/ArcTableAux.js +27 -16
- package/ISA/ISA/ArcTypes/ArcTables.js +11 -11
- package/ISA/ISA/ArcTypes/ArcTypes.js +118 -83
- package/ISA/ISA/ArcTypes/CompositeCell.js +4 -4
- package/ISA/ISA/ArcTypes/CompositeColumn.js +8 -7
- package/ISA/ISA/ArcTypes/CompositeHeader.js +5 -5
- package/ISA/ISA/ArcTypes/CompositeRow.js +1 -1
- package/ISA/ISA/Builder/Types.js +5 -5
- package/ISA/ISA/Fable.js +6 -6
- package/ISA/ISA/Helper.js +15 -13
- package/ISA/ISA/Identifier.js +1 -1
- package/ISA/ISA/JsonTypes/Assay.js +8 -8
- package/ISA/ISA/JsonTypes/AssayMaterials.js +4 -4
- package/ISA/ISA/JsonTypes/ColumnIndex.js +5 -5
- package/ISA/ISA/JsonTypes/Comment.js +3 -3
- package/ISA/ISA/JsonTypes/CommentList.js +4 -4
- package/ISA/ISA/JsonTypes/Component.js +4 -4
- package/ISA/ISA/JsonTypes/Data.js +4 -4
- package/ISA/ISA/JsonTypes/DataFile.js +2 -2
- package/ISA/ISA/JsonTypes/Factor.js +6 -6
- package/ISA/ISA/JsonTypes/FactorValue.js +5 -5
- package/ISA/ISA/JsonTypes/Investigation.js +6 -6
- package/ISA/ISA/JsonTypes/Material.js +5 -5
- package/ISA/ISA/JsonTypes/MaterialAttribute.js +3 -3
- package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +5 -5
- package/ISA/ISA/JsonTypes/MaterialType.js +2 -2
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +6 -6
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +6 -6
- package/ISA/ISA/JsonTypes/Person.js +23 -8
- package/ISA/ISA/JsonTypes/Process.js +13 -13
- package/ISA/ISA/JsonTypes/ProcessInput.js +5 -5
- package/ISA/ISA/JsonTypes/ProcessOutput.js +5 -5
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +5 -5
- package/ISA/ISA/JsonTypes/ProcessSequence.js +6 -6
- package/ISA/ISA/JsonTypes/Protocol.js +6 -6
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +3 -3
- package/ISA/ISA/JsonTypes/Publication.js +6 -6
- package/ISA/ISA/JsonTypes/Sample.js +5 -5
- package/ISA/ISA/JsonTypes/Source.js +5 -5
- package/ISA/ISA/JsonTypes/Study.js +8 -8
- package/ISA/ISA/JsonTypes/StudyMaterials.js +4 -4
- package/ISA/ISA/JsonTypes/Value.js +22 -29
- package/ISA/ISA/Regex.js +3 -3
- package/ISA/ISA.Json/ArcTypes/ArcAssay.js +157 -65
- package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +78 -49
- package/ISA/ISA.Json/ArcTypes/ArcStudy.js +136 -24
- package/ISA/ISA.Json/ArcTypes/ArcTable.js +183 -21
- package/ISA/ISA.Json/ArcTypes/CellTable.js +40 -0
- package/ISA/ISA.Json/ArcTypes/CompositeCell.js +34 -23
- package/ISA/ISA.Json/ArcTypes/CompositeHeader.js +18 -46
- package/ISA/ISA.Json/ArcTypes/IOType.js +11 -13
- package/ISA/ISA.Json/ArcTypes/OATable.js +42 -0
- package/ISA/ISA.Json/Assay.js +71 -47
- package/ISA/ISA.Json/Comment.js +31 -35
- package/ISA/ISA.Json/ConverterOptions.js +19 -1
- package/ISA/ISA.Json/Data.js +119 -137
- package/ISA/ISA.Json/Decode.js +51 -36
- package/ISA/ISA.Json/Factor.js +90 -90
- package/ISA/ISA.Json/GEncode.js +31 -6
- package/ISA/ISA.Json/Investigation.js +54 -79
- package/ISA/ISA.Json/Material.js +103 -104
- package/ISA/ISA.Json/Ontology.js +99 -92
- package/ISA/ISA.Json/Person.js +47 -65
- package/ISA/ISA.Json/Process.js +144 -130
- package/ISA/ISA.Json/Protocol.js +144 -105
- package/ISA/ISA.Json/Publication.js +34 -40
- package/ISA/ISA.Json/StringTable.js +44 -0
- package/ISA/ISA.Json/Study.js +70 -96
- package/ISA/ISA.Json/context/rocrate/isa_assay_context.js +34 -0
- package/ISA/ISA.Json/context/rocrate/isa_comment_context.js +23 -0
- package/ISA/ISA.Json/context/rocrate/isa_component_context.js +24 -0
- package/ISA/ISA.Json/context/rocrate/isa_data_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_factor_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_factor_value_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_investigation_context.js +33 -0
- package/ISA/ISA.Json/context/rocrate/isa_material_attribute_context.js +23 -0
- package/ISA/ISA.Json/context/rocrate/isa_material_attribute_value_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_material_context.js +26 -0
- package/ISA/ISA.Json/context/rocrate/isa_ontology_annotation_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_ontology_source_reference_context.js +26 -0
- package/ISA/ISA.Json/context/rocrate/isa_organization_context.js +22 -0
- package/ISA/ISA.Json/context/rocrate/isa_person_context.js +31 -0
- package/ISA/ISA.Json/context/rocrate/isa_process_context.js +31 -0
- package/ISA/ISA.Json/context/rocrate/isa_process_parameter_value_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_protocol_context.js +30 -0
- package/ISA/ISA.Json/context/rocrate/isa_protocol_parameter_context.js +23 -0
- package/ISA/ISA.Json/context/rocrate/isa_publication_context.js +27 -0
- package/ISA/ISA.Json/context/rocrate/isa_sample_context.js +26 -0
- package/ISA/ISA.Json/context/rocrate/isa_source_context.js +25 -0
- package/ISA/ISA.Json/context/rocrate/isa_study_context.js +42 -0
- package/ISA/ISA.Json/context/rocrate/rocrate_context.js +25 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +56 -43
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +3 -3
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +11 -11
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +5 -5
- package/ISA/ISA.Spreadsheet/ArcAssay.js +100 -88
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +12 -12
- package/ISA/ISA.Spreadsheet/ArcStudy.js +36 -24
- package/ISA/ISA.Spreadsheet/CollectionAux.js +8 -8
- package/ISA/ISA.Spreadsheet/Metadata/Assays.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/Comment.js +31 -20
- package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +1 -1
- package/ISA/ISA.Spreadsheet/Metadata/Factors.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/Publication.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +28 -23
- package/ISA/ISA.Spreadsheet/Metadata/Study.js +8 -8
- package/README.md +20 -3
- package/SemVer.js +6 -6
- package/Templates/Template.Json.js +43 -36
- package/Templates/Template.Spreadsheet.js +12 -12
- package/Templates/Template.Web.js +4 -4
- package/Templates/Template.js +7 -7
- package/Templates/Templates.js +7 -7
- package/WebRequest/WebRequest.Node.js +15 -0
- package/WebRequest/WebRequest.js +10 -29
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +7 -7
- package/fable_modules/Fable.Promise.2.2.2/Promise.fs.js +3 -3
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +8 -8
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +2 -2
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs.js +14 -14
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs.js +6 -6
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs.js +4 -4
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/DSL.fs.js +2 -2
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Expression.fs.js +1 -1
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Transform.fs.js +6 -6
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Types.fs.js +4 -4
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsAddress.fs +22 -8
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsAddress.fs.js +24 -14
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsColumn.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsRow.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorkbook.fs.js +6 -6
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorksheet.fs +12 -6
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorksheet.fs.js +21 -17
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs.js +4 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs.js +1 -1
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/SheetBuilder.fs.js +8 -8
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs.js +7 -7
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs.js +4 -4
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs.js +1 -1
- package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
- package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs +1390 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js +1230 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs +233 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +113 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Thoth.Json.Core.fableproj +28 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs +76 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +33 -0
- package/fable_modules/Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- 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
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs +79 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +85 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs +32 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +45 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Thoth.Json.JavaScript.fableproj +21 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +18 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +19 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Array.d.ts +4 -1
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Array.js +124 -86
- package/fable_modules/fable-library-js.4.13.0/CHANGELOG.md +29 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Choice.d.ts +0 -17
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Choice.js +0 -43
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Date.js +3 -2
- package/fable_modules/fable-library-js.4.13.0/FSharp.Core.CompilerServices.d.ts +12 -0
- package/fable_modules/fable-library-js.4.13.0/FSharp.Core.CompilerServices.js +27 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/List.js +3 -3
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Map.js +3 -3
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableMap.js +2 -1
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableSet.js +2 -1
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Random.js +7 -7
- package/fable_modules/fable-library-js.4.13.0/Result.d.ts +37 -0
- package/fable_modules/fable-library-js.4.13.0/Result.js +165 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Set.js +2 -2
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/String.d.ts +1 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/String.js +8 -5
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Collections.Generic.d.ts +15 -7
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Collections.Generic.js +46 -36
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Text.d.ts +9 -1
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/System.Text.js +60 -8
- package/fable_modules/fable-library-js.4.13.0/big.d.ts +338 -0
- package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/package.json +4 -3
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/ISA/ISA.Json/Validation/Fable.js +0 -69
- package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +0 -88
- package/ISA/ISA.Json/Validation/ValidationResult.js +0 -45
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs +0 -1366
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +0 -1798
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs +0 -621
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +0 -472
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs +0 -31
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +0 -8
- package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +0 -30
- package/fable_modules/Thoth.Json.10.1.0/Types.fs +0 -59
- package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +0 -98
- package/fable_modules/Thoth.Json.10.1.0/package.json +0 -5
- package/fable_modules/fable-library.4.5.0/CHANGELOG.md +0 -11
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCell.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Cells/FsCellsCollection.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/CellBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/ColumnBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/DSL.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Expression.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Operators.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Operators.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/RowBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/TableBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Transform.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/Types.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/DSL/WorkbookBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsSpreadsheet.fableproj +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/FsWorkbook.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRange.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeBase.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Ranges/FsRangeRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTable.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableField.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/Tables/FsTableRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.2 → FsSpreadsheet.5.1.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Async.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Async.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/AsyncBuilder.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/AsyncBuilder.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BigInt.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BigInt.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BitConverter.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/BitConverter.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Boolean.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Boolean.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Char.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Char.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Date.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOffset.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOffset.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOnly.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/DateOnly.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Decimal.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Decimal.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Double.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Double.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Encoding.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Encoding.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Event.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Event.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Collections.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Collections.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Core.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/FSharp.Core.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Global.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Global.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Guid.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Guid.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Int32.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Int32.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/List.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Long.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Long.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MailboxProcessor.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MailboxProcessor.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Map.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MapUtil.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MapUtil.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableMap.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/MutableSet.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Native.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Native.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Numeric.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Numeric.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Observable.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Observable.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Option.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Option.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/README.md +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Random.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Range.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Range.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Reflection.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Reflection.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/RegExp.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/RegExp.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq2.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Seq2.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Set.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/SystemException.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/SystemException.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeOnly.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeOnly.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeSpan.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/TimeSpan.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Timer.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Timer.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Types.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Types.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Unicode.13.0.0.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Unicode.13.0.0.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Uri.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Uri.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Util.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/Util.js +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/lib/big.d.ts +0 -0
- /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.13.0}/lib/big.js +0 -0
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { defaultArg, value as value_7 } from "../../../fable_modules/fable-library.4.
|
|
1
|
+
import { map, empty, singleton, append, delay, toList } from "../../../fable_modules/fable-library-js.4.13.0/Seq.js";
|
|
2
|
+
import { Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
3
|
+
import { map as map_1, defaultArg, value as value_7 } from "../../../fable_modules/fable-library-js.4.13.0/Option.js";
|
|
4
4
|
import { JsonHelper_tryGetComments, JsonHelper_tryGetFactors, JsonHelper_tryGetStringResizeArray, JsonHelper_tryGetTables, JsonHelper_tryGetOAs, JsonHelper_tryGetPersons, JsonHelper_tryGetPublications, JsonHelper_EncoderComments, JsonHelper_EncoderFactors, JsonHelper_EncoderTables, JsonHelper_EncoderOAs, JsonHelper_EncoderPersons, JsonHelper_EncoderPublications } from "./ArcAssay.js";
|
|
5
|
-
import {
|
|
5
|
+
import { seq } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
6
|
+
import { array, string, object } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
6
7
|
import { ArcStudy } from "../../ISA/ArcTypes/ArcTypes.js";
|
|
8
|
+
import { ArcTable_compressedDecoder, ArcTable_compressedEncoder } from "./ArcTable.js";
|
|
9
|
+
import { toString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
7
10
|
import { Study_decoder, Study_encoder } from "../Study.js";
|
|
8
|
-
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor } from "../ConverterOptions.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
11
|
+
import { ConverterOptions__set_IncludeContext_Z1FBCCD16, ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor } from "../ConverterOptions.js";
|
|
12
|
+
import { fromString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
13
|
+
import { toFail, printf, toText } from "../../../fable_modules/fable-library-js.4.13.0/String.js";
|
|
14
|
+
import { StringTable_arrayFromMap, StringTable_encoder, StringTable_decoder } from "../StringTable.js";
|
|
15
|
+
import { OATable_arrayFromMap, OATable_encoder, OATable_decoder } from "./OATable.js";
|
|
16
|
+
import { CellTable_arrayFromMap, CellTable_encoder, CellTable_decoder } from "./CellTable.js";
|
|
17
|
+
import { Dictionary } from "../../../fable_modules/fable-library-js.4.13.0/MutableMap.js";
|
|
18
|
+
import { safeHash, equals } from "../../../fable_modules/fable-library-js.4.13.0/Util.js";
|
|
12
19
|
|
|
13
20
|
export function ArcStudy_encoder(study) {
|
|
14
|
-
return
|
|
21
|
+
return new Json(5, [toList(delay(() => append(singleton(["Identifier", new Json(0, [study.Identifier])]), delay(() => append((study.Title != null) ? singleton(["Title", new Json(0, [value_7(study.Title)])]) : empty(), delay(() => append((study.Description != null) ? singleton(["Description", new Json(0, [value_7(study.Description)])]) : empty(), delay(() => append((study.SubmissionDate != null) ? singleton(["SubmissionDate", new Json(0, [value_7(study.SubmissionDate)])]) : empty(), delay(() => append((study.PublicReleaseDate != null) ? singleton(["PublicReleaseDate", new Json(0, [value_7(study.PublicReleaseDate)])]) : empty(), delay(() => append((study.Publications.length !== 0) ? singleton(["Publications", JsonHelper_EncoderPublications(study.Publications)]) : empty(), delay(() => append((study.Contacts.length !== 0) ? singleton(["Contacts", JsonHelper_EncoderPersons(study.Contacts)]) : empty(), delay(() => append((study.StudyDesignDescriptors.length !== 0) ? singleton(["StudyDesignDescriptors", JsonHelper_EncoderOAs(study.StudyDesignDescriptors)]) : empty(), delay(() => append((study.TableCount !== 0) ? singleton(["Tables", JsonHelper_EncoderTables(study.Tables)]) : empty(), delay(() => append((study.RegisteredAssayIdentifiers.length !== 0) ? singleton(["RegisteredAssayIdentifiers", seq(map((value_5) => (new Json(0, [value_5])), study.RegisteredAssayIdentifiers))]) : empty(), delay(() => append((study.Factors.length !== 0) ? singleton(["Factors", JsonHelper_EncoderFactors(study.Factors)]) : empty(), delay(() => ((study.Comments.length !== 0) ? singleton(["Comments", JsonHelper_EncoderComments(study.Comments)]) : empty())))))))))))))))))))))))))]);
|
|
15
22
|
}
|
|
16
23
|
|
|
17
|
-
export const ArcStudy_decoder = (
|
|
24
|
+
export const ArcStudy_decoder = object((get$) => {
|
|
18
25
|
let identifier;
|
|
19
26
|
const objectArg = get$.Required;
|
|
20
27
|
identifier = objectArg.Field("Identifier", string);
|
|
@@ -38,19 +45,64 @@ export const ArcStudy_decoder = (path_5) => ((v) => object_1((get$) => {
|
|
|
38
45
|
const factors = JsonHelper_tryGetFactors(get$, "Factors");
|
|
39
46
|
const comments = JsonHelper_tryGetComments(get$, "Comments");
|
|
40
47
|
return ArcStudy.make(identifier, title, description, submissionDate, publicReleaseDate, publications, contacts, studyDesignDescriptors, tables, registeredAssayIdentifiers, factors, comments);
|
|
41
|
-
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export function ArcStudy_compressedEncoder(stringTable, oaTable, cellTable, study) {
|
|
51
|
+
return new Json(5, [toList(delay(() => append(singleton(["Identifier", new Json(0, [study.Identifier])]), delay(() => append((study.Title != null) ? singleton(["Title", new Json(0, [value_7(study.Title)])]) : empty(), delay(() => append((study.Description != null) ? singleton(["Description", new Json(0, [value_7(study.Description)])]) : empty(), delay(() => append((study.SubmissionDate != null) ? singleton(["SubmissionDate", new Json(0, [value_7(study.SubmissionDate)])]) : empty(), delay(() => append((study.PublicReleaseDate != null) ? singleton(["PublicReleaseDate", new Json(0, [value_7(study.PublicReleaseDate)])]) : empty(), delay(() => append((study.Publications.length !== 0) ? singleton(["Publications", JsonHelper_EncoderPublications(study.Publications)]) : empty(), delay(() => append((study.Contacts.length !== 0) ? singleton(["Contacts", JsonHelper_EncoderPersons(study.Contacts)]) : empty(), delay(() => append((study.StudyDesignDescriptors.length !== 0) ? singleton(["StudyDesignDescriptors", JsonHelper_EncoderOAs(study.StudyDesignDescriptors)]) : empty(), delay(() => append((study.TableCount !== 0) ? singleton(["Tables", seq(map((table) => ArcTable_compressedEncoder(stringTable, oaTable, cellTable, table), study.Tables))]) : empty(), delay(() => append((study.RegisteredAssayIdentifiers.length !== 0) ? singleton(["RegisteredAssayIdentifiers", seq(map((value_5) => (new Json(0, [value_5])), study.RegisteredAssayIdentifiers))]) : empty(), delay(() => append((study.Factors.length !== 0) ? singleton(["Factors", JsonHelper_EncoderFactors(study.Factors)]) : empty(), delay(() => ((study.Comments.length !== 0) ? singleton(["Comments", JsonHelper_EncoderComments(study.Comments)]) : empty())))))))))))))))))))))))))]);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function ArcStudy_compressedDecoder(stringTable, oaTable, cellTable) {
|
|
55
|
+
return object((get$) => {
|
|
56
|
+
let arg_1, objectArg;
|
|
57
|
+
const tables = defaultArg(map_1((collection) => Array.from(collection), (arg_1 = array(ArcTable_compressedDecoder(stringTable, oaTable, cellTable)), (objectArg = get$.Optional, objectArg.Field("Tables", arg_1)))), []);
|
|
58
|
+
let identifier;
|
|
59
|
+
const objectArg_1 = get$.Required;
|
|
60
|
+
identifier = objectArg_1.Field("Identifier", string);
|
|
61
|
+
let title;
|
|
62
|
+
const objectArg_2 = get$.Optional;
|
|
63
|
+
title = objectArg_2.Field("Title", string);
|
|
64
|
+
let description;
|
|
65
|
+
const objectArg_3 = get$.Optional;
|
|
66
|
+
description = objectArg_3.Field("Description", string);
|
|
67
|
+
let submissionDate;
|
|
68
|
+
const objectArg_4 = get$.Optional;
|
|
69
|
+
submissionDate = objectArg_4.Field("SubmissionDate", string);
|
|
70
|
+
let publicReleaseDate;
|
|
71
|
+
const objectArg_5 = get$.Optional;
|
|
72
|
+
publicReleaseDate = objectArg_5.Field("PublicReleaseDate", string);
|
|
73
|
+
const publications = JsonHelper_tryGetPublications(get$, "Publications");
|
|
74
|
+
const contacts = JsonHelper_tryGetPersons(get$, "Contacts");
|
|
75
|
+
const studyDesignDescriptors = JsonHelper_tryGetOAs(get$, "StudyDesignDescriptors");
|
|
76
|
+
const registeredAssayIdentifiers = JsonHelper_tryGetStringResizeArray(get$, "RegisteredAssayIdentifiers");
|
|
77
|
+
const factors = JsonHelper_tryGetFactors(get$, "Factors");
|
|
78
|
+
const comments = JsonHelper_tryGetComments(get$, "Comments");
|
|
79
|
+
return ArcStudy.make(identifier, title, description, submissionDate, publicReleaseDate, publications, contacts, studyDesignDescriptors, tables, registeredAssayIdentifiers, factors, comments);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
42
82
|
|
|
43
83
|
/**
|
|
44
84
|
* exports in json-ld format
|
|
45
85
|
*/
|
|
46
|
-
export function
|
|
86
|
+
export function ArcStudy_toJsonldString(a, assays) {
|
|
47
87
|
let returnVal;
|
|
48
88
|
return toString(2, Study_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), a.ToStudy(assays)));
|
|
49
89
|
}
|
|
50
90
|
|
|
91
|
+
export function ArcStudy_toJsonldStringWithContext(a, assays) {
|
|
92
|
+
let returnVal;
|
|
93
|
+
return toString(2, Study_encoder((returnVal = ConverterOptions_$ctor(), (((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), ConverterOptions__set_IncludeContext_Z1FBCCD16(returnVal, true)), returnVal)), a.ToStudy(assays)));
|
|
94
|
+
}
|
|
95
|
+
|
|
51
96
|
export function ArcStudy_fromJsonString(s) {
|
|
52
|
-
|
|
53
|
-
|
|
97
|
+
let s_2;
|
|
98
|
+
const matchValue = fromString(Study_decoder(ConverterOptions_$ctor()), s);
|
|
99
|
+
if (matchValue.tag === 1) {
|
|
100
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
s_2 = matchValue.fields[0];
|
|
104
|
+
}
|
|
105
|
+
return ArcStudy.fromStudy(s_2);
|
|
54
106
|
}
|
|
55
107
|
|
|
56
108
|
export function ArcStudy_toJsonString(a, assays) {
|
|
@@ -62,22 +114,34 @@ export function ArcStudy_toArcJsonString(a) {
|
|
|
62
114
|
}
|
|
63
115
|
|
|
64
116
|
export function ArcStudy_fromArcJsonString(jsonString) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
117
|
+
try {
|
|
118
|
+
const matchValue = fromString(ArcStudy_decoder, jsonString);
|
|
119
|
+
if (matchValue.tag === 1) {
|
|
120
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
return matchValue.fields[0];
|
|
124
|
+
}
|
|
68
125
|
}
|
|
69
|
-
|
|
70
|
-
|
|
126
|
+
catch (e_1) {
|
|
127
|
+
const arg_1 = e_1.message;
|
|
128
|
+
return toFail(printf("Error. Unable to parse json string to ArcStudy: %s"))(arg_1);
|
|
71
129
|
}
|
|
72
130
|
}
|
|
73
131
|
|
|
74
132
|
export function ARCtrl_ISA_ArcStudy__ArcStudy_fromArcJsonString_Static_Z721C83C5(jsonString) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
133
|
+
try {
|
|
134
|
+
const matchValue = fromString(ArcStudy_decoder, jsonString);
|
|
135
|
+
if (matchValue.tag === 1) {
|
|
136
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
return matchValue.fields[0];
|
|
140
|
+
}
|
|
78
141
|
}
|
|
79
|
-
|
|
80
|
-
|
|
142
|
+
catch (e_1) {
|
|
143
|
+
const arg_1 = e_1.message;
|
|
144
|
+
return toFail(printf("Error. Unable to parse json string to ArcStudy: %s"))(arg_1);
|
|
81
145
|
}
|
|
82
146
|
}
|
|
83
147
|
|
|
@@ -89,3 +153,51 @@ export function ARCtrl_ISA_ArcStudy__ArcStudy_toArcJsonString_Static_1B3D5E9B(a)
|
|
|
89
153
|
return ARCtrl_ISA_ArcStudy__ArcStudy_ToArcJsonString_71136F3F(a);
|
|
90
154
|
}
|
|
91
155
|
|
|
156
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_fromCompressedJsonString_Static_Z721C83C5(jsonString) {
|
|
157
|
+
const decoder = object((get$) => {
|
|
158
|
+
let arg_5, objectArg_2;
|
|
159
|
+
let stringTable;
|
|
160
|
+
const objectArg = get$.Required;
|
|
161
|
+
stringTable = objectArg.Field("stringTable", StringTable_decoder);
|
|
162
|
+
let oaTable;
|
|
163
|
+
const arg_3 = OATable_decoder(stringTable);
|
|
164
|
+
const objectArg_1 = get$.Required;
|
|
165
|
+
oaTable = objectArg_1.Field("oaTable", arg_3);
|
|
166
|
+
const arg_7 = ArcStudy_compressedDecoder(stringTable, oaTable, (arg_5 = CellTable_decoder(stringTable, oaTable), (objectArg_2 = get$.Required, objectArg_2.Field("cellTable", arg_5))));
|
|
167
|
+
const objectArg_3 = get$.Required;
|
|
168
|
+
return objectArg_3.Field("study", arg_7);
|
|
169
|
+
});
|
|
170
|
+
try {
|
|
171
|
+
const matchValue = fromString(decoder, jsonString);
|
|
172
|
+
if (matchValue.tag === 1) {
|
|
173
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
return matchValue.fields[0];
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
catch (e_1) {
|
|
180
|
+
const arg_9 = e_1.message;
|
|
181
|
+
return toFail(printf("Error. Unable to parse json string to ArcAssay: %s"))(arg_9);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_ToCompressedJsonString_71136F3F(this$, spaces) {
|
|
186
|
+
const spaces_1 = defaultArg(spaces, 0) | 0;
|
|
187
|
+
const stringTable = new Map([]);
|
|
188
|
+
const oaTable = new Dictionary([], {
|
|
189
|
+
Equals: equals,
|
|
190
|
+
GetHashCode: safeHash,
|
|
191
|
+
});
|
|
192
|
+
const cellTable = new Dictionary([], {
|
|
193
|
+
Equals: equals,
|
|
194
|
+
GetHashCode: safeHash,
|
|
195
|
+
});
|
|
196
|
+
const arcStudy = ArcStudy_compressedEncoder(stringTable, oaTable, cellTable, this$);
|
|
197
|
+
return toString(spaces_1, new Json(5, [[["cellTable", CellTable_encoder(stringTable, oaTable, CellTable_arrayFromMap(cellTable))], ["oaTable", OATable_encoder(stringTable, OATable_arrayFromMap(oaTable))], ["stringTable", StringTable_encoder(StringTable_arrayFromMap(stringTable))], ["study", arcStudy]]]));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export function ARCtrl_ISA_ArcStudy__ArcStudy_toCompressedJsonString_Static_1B3D5E9B(s) {
|
|
201
|
+
return ARCtrl_ISA_ArcStudy__ArcStudy_ToCompressedJsonString_71136F3F(s);
|
|
202
|
+
}
|
|
203
|
+
|
|
@@ -1,46 +1,167 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { toArray, collect, empty, map, singleton, append, delay, toList } from "../../../fable_modules/fable-library-js.4.13.0/Seq.js";
|
|
2
|
+
import { ErrorReason$1, Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
3
|
+
import { tuple2, map as map_1, list } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
3
4
|
import { CompositeHeader_decoder, CompositeHeader_encoder } from "./CompositeHeader.js";
|
|
4
5
|
import { CompositeCell_decoder, CompositeCell_encoder } from "./CompositeCell.js";
|
|
5
|
-
import { empty as empty_2, ofSeq } from "../../../fable_modules/fable-library.4.
|
|
6
|
-
import { arrayHash, equalArrays,
|
|
7
|
-
import {
|
|
8
|
-
import { defaultArg } from "../../../fable_modules/fable-library.4.
|
|
9
|
-
import { empty as empty_1 } from "../../../fable_modules/fable-library.4.
|
|
10
|
-
import { Dictionary } from "../../../fable_modules/fable-library.4.
|
|
6
|
+
import { empty as empty_2, ofSeq } from "../../../fable_modules/fable-library-js.4.13.0/Map.js";
|
|
7
|
+
import { safeHash, int32ToString, equals, arrayHash, equalArrays, compareArrays } from "../../../fable_modules/fable-library-js.4.13.0/Util.js";
|
|
8
|
+
import { Helpers_prependPath, array as array_1, string, int, tuple2 as tuple2_1, map$0027, list as list_1, object } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
9
|
+
import { defaultArg } from "../../../fable_modules/fable-library-js.4.13.0/Option.js";
|
|
10
|
+
import { empty as empty_1 } from "../../../fable_modules/fable-library-js.4.13.0/List.js";
|
|
11
|
+
import { Dictionary } from "../../../fable_modules/fable-library-js.4.13.0/MutableMap.js";
|
|
11
12
|
import { ArcTable } from "../../ISA/ArcTypes/ArcTable.js";
|
|
12
|
-
import {
|
|
13
|
+
import { CellTable_arrayFromMap, CellTable_encoder, CellTable_decoder, CellTable_decodeCell, CellTable_encodeCell } from "./CellTable.js";
|
|
14
|
+
import { addToDict, getItemFromDict } from "../../../fable_modules/fable-library-js.4.13.0/MapUtil.js";
|
|
15
|
+
import { rangeDouble } from "../../../fable_modules/fable-library-js.4.13.0/Range.js";
|
|
16
|
+
import { FSharpResult$2 } from "../../../fable_modules/fable-library-js.4.13.0/Result.js";
|
|
17
|
+
import { fill, setItem, fold, iterateIndexed } from "../../../fable_modules/fable-library-js.4.13.0/Array.js";
|
|
18
|
+
import { StringTable_arrayFromMap, StringTable_encoder, StringTable_decoder, StringTable_decodeString, StringTable_encodeString } from "../StringTable.js";
|
|
19
|
+
import { fromString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
20
|
+
import { printf, toText } from "../../../fable_modules/fable-library-js.4.13.0/String.js";
|
|
21
|
+
import { toString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
22
|
+
import { OATable_arrayFromMap, OATable_encoder, OATable_decoder } from "./OATable.js";
|
|
13
23
|
|
|
14
24
|
export function ArcTable_encoder(table) {
|
|
15
|
-
return
|
|
25
|
+
return new Json(5, [toList(delay(() => append(singleton(["name", new Json(0, [table.Name])]), delay(() => append((table.Headers.length !== 0) ? singleton(["header", list(toList(delay(() => map(CompositeHeader_encoder, table.Headers))))]) : empty(), delay(() => ((table.Values.size !== 0) ? singleton(["values", map_1((tupledArg) => tuple2((value) => (new Json(7, [value >>> 0])), (value_2) => (new Json(7, [value_2 >>> 0])), tupledArg[0], tupledArg[1]), CompositeCell_encoder, ofSeq(toList(delay(() => collect((matchValue) => {
|
|
16
26
|
const activePatternResult = matchValue;
|
|
17
27
|
return singleton([activePatternResult[0], activePatternResult[1]]);
|
|
18
28
|
}, table.Values))), {
|
|
19
29
|
Compare: compareArrays,
|
|
20
|
-
}))]) : empty()))))))));
|
|
30
|
+
}))]) : empty())))))))]);
|
|
21
31
|
}
|
|
22
32
|
|
|
23
|
-
export const ArcTable_decoder = (
|
|
24
|
-
let objectArg,
|
|
33
|
+
export const ArcTable_decoder = object((get$) => {
|
|
34
|
+
let arg_1, objectArg, arg_3, objectArg_1, objectArg_2;
|
|
25
35
|
let decodedHeader;
|
|
26
|
-
const collection = defaultArg((objectArg = get$.Optional, objectArg.Field("header",
|
|
36
|
+
const collection = defaultArg((arg_1 = list_1(CompositeHeader_decoder), (objectArg = get$.Optional, objectArg.Field("header", arg_1))), empty_1());
|
|
27
37
|
decodedHeader = Array.from(collection);
|
|
28
|
-
const decodedValues = new Dictionary(defaultArg((
|
|
29
|
-
const clo = CompositeCell_decoder(arg_2);
|
|
30
|
-
return clo;
|
|
31
|
-
})), (objectArg_1 = get$.Optional, objectArg_1.Field("values", uncurry2(arg_5)))), empty_2({
|
|
38
|
+
const decodedValues = new Dictionary(defaultArg((arg_3 = map$0027(tuple2_1(int, int), CompositeCell_decoder), (objectArg_1 = get$.Optional, objectArg_1.Field("values", arg_3))), empty_2({
|
|
32
39
|
Compare: compareArrays,
|
|
33
40
|
})), {
|
|
34
41
|
Equals: equalArrays,
|
|
35
42
|
GetHashCode: arrayHash,
|
|
36
43
|
});
|
|
37
44
|
return ArcTable.create((objectArg_2 = get$.Required, objectArg_2.Field("name", string)), decodedHeader, decodedValues);
|
|
38
|
-
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function ArcTable_compressedColumnEncoder(columnIndex, rowCount, cellTable, table) {
|
|
48
|
+
if (table.Headers[columnIndex].IsIOType ? true : (rowCount < 100)) {
|
|
49
|
+
return new Json(6, [toArray(delay(() => map((r) => CellTable_encodeCell(cellTable, getItemFromDict(table.Values, [columnIndex, r])), rangeDouble(0, 1, rowCount - 1))))]);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
let current = getItemFromDict(table.Values, [columnIndex, 0]);
|
|
53
|
+
let from = 0;
|
|
54
|
+
return new Json(6, [toArray(delay(() => append(collect((i) => {
|
|
55
|
+
let value, value_1;
|
|
56
|
+
const next = getItemFromDict(table.Values, [columnIndex, i]);
|
|
57
|
+
return !equals(next, current) ? append(singleton(new Json(5, [[["f", (value = (from | 0), new Json(7, [value >>> 0]))], ["t", (value_1 = ((i - 1) | 0), new Json(7, [value_1 >>> 0]))], ["v", CellTable_encodeCell(cellTable, current)]]])), delay(() => {
|
|
58
|
+
current = next;
|
|
59
|
+
from = (i | 0);
|
|
60
|
+
return empty();
|
|
61
|
+
})) : empty();
|
|
62
|
+
}, rangeDouble(1, 1, rowCount - 1)), delay(() => {
|
|
63
|
+
let value_2, value_3;
|
|
64
|
+
return singleton(new Json(5, [[["f", (value_2 = (from | 0), new Json(7, [value_2 >>> 0]))], ["t", (value_3 = ((rowCount - 1) | 0), new Json(7, [value_3 >>> 0]))], ["v", CellTable_encodeCell(cellTable, current)]]]));
|
|
65
|
+
}))))]);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ArcTable_compressedColumnDecoder(cellTable, table, columnIndex) {
|
|
70
|
+
return {
|
|
71
|
+
Decode(helper, column) {
|
|
72
|
+
const matchValue = array_1(CellTable_decodeCell(cellTable)).Decode(helper, column);
|
|
73
|
+
if (matchValue.tag === 1) {
|
|
74
|
+
const rangeDecoder = object((get$) => {
|
|
75
|
+
let from;
|
|
76
|
+
const objectArg = get$.Required;
|
|
77
|
+
from = objectArg.Field("f", int);
|
|
78
|
+
let to_;
|
|
79
|
+
const objectArg_1 = get$.Required;
|
|
80
|
+
to_ = objectArg_1.Field("t", int);
|
|
81
|
+
let value;
|
|
82
|
+
const arg_5 = CellTable_decodeCell(cellTable);
|
|
83
|
+
const objectArg_2 = get$.Required;
|
|
84
|
+
value = objectArg_2.Field("v", arg_5);
|
|
85
|
+
for (let i = from; i <= to_; i++) {
|
|
86
|
+
addToDict(table.Values, [columnIndex, i], value);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
const matchValue_1 = array_1(rangeDecoder).Decode(helper, column);
|
|
90
|
+
return (matchValue_1.tag === 1) ? (new FSharpResult$2(1, [matchValue_1.fields[0]])) : (new FSharpResult$2(0, [void 0]));
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
iterateIndexed((r, cell) => {
|
|
94
|
+
addToDict(table.Values, [columnIndex, r], cell);
|
|
95
|
+
}, matchValue.fields[0]);
|
|
96
|
+
return new FSharpResult$2(0, [void 0]);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function ArcTable_arrayi(decoderi) {
|
|
103
|
+
return {
|
|
104
|
+
Decode(helpers, value) {
|
|
105
|
+
if (helpers.isArray(value)) {
|
|
106
|
+
let i = -1;
|
|
107
|
+
const tokens = helpers.asArray(value);
|
|
108
|
+
return fold((acc, value_1) => {
|
|
109
|
+
let tupledArg;
|
|
110
|
+
i = ((i + 1) | 0);
|
|
111
|
+
if (acc.tag === 0) {
|
|
112
|
+
const acc_1 = acc.fields[0];
|
|
113
|
+
const matchValue = decoderi(i).Decode(helpers, value_1);
|
|
114
|
+
if (matchValue.tag === 0) {
|
|
115
|
+
setItem(acc_1, i, matchValue.fields[0]);
|
|
116
|
+
return new FSharpResult$2(0, [acc_1]);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
return new FSharpResult$2(1, [(tupledArg = matchValue.fields[0], Helpers_prependPath((".[" + int32ToString(i)) + "]", tupledArg[0], tupledArg[1]))]);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
return acc;
|
|
124
|
+
}
|
|
125
|
+
}, new FSharpResult$2(0, [fill(new Array(tokens.length), 0, tokens.length, null)]), tokens);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
return new FSharpResult$2(1, [["", new ErrorReason$1(0, ["an array", value])]]);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function ArcTable_compressedEncoder(stringTable, oaTable, cellTable, table) {
|
|
135
|
+
return new Json(5, [toList(delay(() => append(singleton(["n", StringTable_encodeString(stringTable, table.Name)]), delay(() => append((table.Headers.length !== 0) ? singleton(["h", list(toList(delay(() => map(CompositeHeader_encoder, table.Headers))))]) : empty(), delay(() => {
|
|
136
|
+
if (table.Values.size !== 0) {
|
|
137
|
+
const rowCount = table.RowCount | 0;
|
|
138
|
+
return singleton(["c", new Json(6, [toArray(delay(() => map((c) => ArcTable_compressedColumnEncoder(c, rowCount, cellTable, table), rangeDouble(0, 1, table.ColumnCount - 1))))])]);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
return empty();
|
|
142
|
+
}
|
|
143
|
+
}))))))]);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function ArcTable_compressedDecoder(stringTable, oaTable, cellTable) {
|
|
147
|
+
return object((get$) => {
|
|
148
|
+
let arg_1, objectArg, arg_3, objectArg_1, arg_5, objectArg_2;
|
|
149
|
+
let decodedHeader;
|
|
150
|
+
const collection = defaultArg((arg_1 = list_1(CompositeHeader_decoder), (objectArg = get$.Optional, objectArg.Field("h", arg_1))), empty_1());
|
|
151
|
+
decodedHeader = Array.from(collection);
|
|
152
|
+
const table = ArcTable.create((arg_3 = StringTable_decodeString(stringTable), (objectArg_1 = get$.Required, objectArg_1.Field("n", arg_3))), decodedHeader, new Dictionary([], {
|
|
153
|
+
Equals: equalArrays,
|
|
154
|
+
GetHashCode: arrayHash,
|
|
155
|
+
}));
|
|
156
|
+
(arg_5 = ArcTable_arrayi((columnIndex) => ArcTable_compressedColumnDecoder(cellTable, table, columnIndex)), (objectArg_2 = get$.Optional, objectArg_2.Field("c", arg_5)));
|
|
157
|
+
return table;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
39
160
|
|
|
40
161
|
export function ARCtrl_ISA_ArcTable__ArcTable_fromJsonString_Static_Z721C83C5(jsonString) {
|
|
41
|
-
const matchValue = fromString(
|
|
162
|
+
const matchValue = fromString(ArcTable_decoder, jsonString);
|
|
42
163
|
if (matchValue.tag === 1) {
|
|
43
|
-
|
|
164
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
44
165
|
}
|
|
45
166
|
else {
|
|
46
167
|
return matchValue.fields[0];
|
|
@@ -55,3 +176,44 @@ export function ARCtrl_ISA_ArcTable__ArcTable_toJsonString_Static_1B2566EA(a) {
|
|
|
55
176
|
return ARCtrl_ISA_ArcTable__ArcTable_ToJsonString_71136F3F(a);
|
|
56
177
|
}
|
|
57
178
|
|
|
179
|
+
export function ARCtrl_ISA_ArcTable__ArcTable_fromCompressedJsonString_Static_Z721C83C5(jsonString) {
|
|
180
|
+
const matchValue = fromString(object((get$) => {
|
|
181
|
+
let arg_5, objectArg_2;
|
|
182
|
+
let stringTable;
|
|
183
|
+
const objectArg = get$.Required;
|
|
184
|
+
stringTable = objectArg.Field("stringTable", StringTable_decoder);
|
|
185
|
+
let oaTable;
|
|
186
|
+
const arg_3 = OATable_decoder(stringTable);
|
|
187
|
+
const objectArg_1 = get$.Required;
|
|
188
|
+
oaTable = objectArg_1.Field("oaTable", arg_3);
|
|
189
|
+
const arg_7 = ArcTable_compressedDecoder(stringTable, oaTable, (arg_5 = CellTable_decoder(stringTable, oaTable), (objectArg_2 = get$.Required, objectArg_2.Field("cellTable", arg_5))));
|
|
190
|
+
const objectArg_3 = get$.Required;
|
|
191
|
+
return objectArg_3.Field("table", arg_7);
|
|
192
|
+
}), jsonString);
|
|
193
|
+
if (matchValue.tag === 1) {
|
|
194
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
return matchValue.fields[0];
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function ARCtrl_ISA_ArcTable__ArcTable_ToCompressedJsonString_71136F3F(this$, spaces) {
|
|
202
|
+
const spaces_1 = defaultArg(spaces, 0) | 0;
|
|
203
|
+
const stringTable = new Map([]);
|
|
204
|
+
const oaTable = new Dictionary([], {
|
|
205
|
+
Equals: equals,
|
|
206
|
+
GetHashCode: safeHash,
|
|
207
|
+
});
|
|
208
|
+
const cellTable = new Dictionary([], {
|
|
209
|
+
Equals: equals,
|
|
210
|
+
GetHashCode: safeHash,
|
|
211
|
+
});
|
|
212
|
+
const arcTable = ArcTable_compressedEncoder(stringTable, oaTable, cellTable, this$);
|
|
213
|
+
return toString(spaces_1, new Json(5, [[["cellTable", CellTable_encoder(stringTable, oaTable, CellTable_arrayFromMap(cellTable))], ["oaTable", OATable_encoder(stringTable, OATable_arrayFromMap(oaTable))], ["stringTable", StringTable_encoder(StringTable_arrayFromMap(stringTable))], ["table", arcTable]]]));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function ARCtrl_ISA_ArcTable__ArcTable_toCompressedJsonString_Static_1B2566EA(a) {
|
|
217
|
+
return ARCtrl_ISA_ArcTable__ArcTable_ToCompressedJsonString_71136F3F(a);
|
|
218
|
+
}
|
|
219
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { sortBy, map, toArray } from "../../../fable_modules/fable-library-js.4.13.0/Seq.js";
|
|
2
|
+
import { comparePrimitives } from "../../../fable_modules/fable-library-js.4.13.0/Util.js";
|
|
3
|
+
import { item, map as map_1 } from "../../../fable_modules/fable-library-js.4.13.0/Array.js";
|
|
4
|
+
import { CompositeCell_compressedDecoder, CompositeCell_compressedEncoder } from "./CompositeCell.js";
|
|
5
|
+
import { Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
6
|
+
import { int, object, array as array_1 } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
7
|
+
import { Dict_tryFind } from "../../ISA/Helper.js";
|
|
8
|
+
import { addToDict } from "../../../fable_modules/fable-library-js.4.13.0/MapUtil.js";
|
|
9
|
+
|
|
10
|
+
export function CellTable_arrayFromMap(otm) {
|
|
11
|
+
return toArray(map((kv_1) => kv_1[0], sortBy((kv) => kv[1], otm, {
|
|
12
|
+
Compare: comparePrimitives,
|
|
13
|
+
})));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function CellTable_encoder(stringTable, oaTable, ot) {
|
|
17
|
+
return new Json(6, [map_1((cc) => CompositeCell_compressedEncoder(stringTable, oaTable, cc), ot)]);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function CellTable_decoder(stringTable, oaTable) {
|
|
21
|
+
return array_1(CompositeCell_compressedDecoder(stringTable, oaTable));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function CellTable_encodeCell(otm, cc) {
|
|
25
|
+
const matchValue = Dict_tryFind(cc, otm);
|
|
26
|
+
if (matchValue == null) {
|
|
27
|
+
const i_1 = otm.size | 0;
|
|
28
|
+
addToDict(otm, cc, i_1);
|
|
29
|
+
return new Json(7, [i_1 >>> 0]);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const i = matchValue | 0;
|
|
33
|
+
return new Json(7, [i >>> 0]);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function CellTable_decodeCell(ot) {
|
|
38
|
+
return object((get$) => item(get$.Required.Raw(int), ot));
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -1,40 +1,51 @@
|
|
|
1
1
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../Ontology.js";
|
|
2
2
|
import { ConverterOptions_$ctor } from "../ConverterOptions.js";
|
|
3
|
-
import { ofArray, singleton } from "../../../fable_modules/fable-library.4.
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { ofArray, singleton } from "../../../fable_modules/fable-library-js.4.13.0/List.js";
|
|
4
|
+
import { Json } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
5
|
+
import { list } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
6
|
+
import { index, string, object } from "../../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
6
7
|
import { CompositeCell } from "../../ISA/ArcTypes/CompositeCell.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { toText, printf, toFail } from "../../../fable_modules/fable-library-js.4.13.0/String.js";
|
|
9
|
+
import { OATable_decodeOA, OATable_encodeOA } from "./OATable.js";
|
|
10
|
+
import { StringTable_decodeString, StringTable_encodeString } from "../StringTable.js";
|
|
11
|
+
import { fromString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
12
|
+
import { toString } from "../../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
13
|
+
import { defaultArg } from "../../../fable_modules/fable-library-js.4.13.0/Option.js";
|
|
10
14
|
|
|
11
15
|
export function CompositeCell_encoder(cc) {
|
|
12
16
|
const oaToJsonString = (oa) => OntologyAnnotation_encoder(ConverterOptions_$ctor(), oa);
|
|
13
|
-
const patternInput = (cc.tag === 0) ? ["Term", singleton(oaToJsonString(cc.fields[0]))] : ((cc.tag === 2) ? ["Unitized", ofArray([cc.fields[0], oaToJsonString(cc.fields[1])])] : ["FreeText", singleton(cc.fields[0])]);
|
|
14
|
-
return
|
|
17
|
+
const patternInput = (cc.tag === 0) ? ["Term", singleton(oaToJsonString(cc.fields[0]))] : ((cc.tag === 2) ? ["Unitized", ofArray([new Json(0, [cc.fields[0]]), oaToJsonString(cc.fields[1])])] : ["FreeText", singleton(new Json(0, [cc.fields[0]]))]);
|
|
18
|
+
return new Json(5, [[["celltype", new Json(0, [patternInput[0]])], ["values", list(patternInput[1])]]]);
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
export const CompositeCell_decoder = (
|
|
18
|
-
let objectArg_1, arg_5,
|
|
21
|
+
export const CompositeCell_decoder = object((get$) => {
|
|
22
|
+
let arg_3, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, arg_9, objectArg_4;
|
|
19
23
|
let matchValue;
|
|
20
24
|
const objectArg = get$.Required;
|
|
21
25
|
matchValue = objectArg.Field("celltype", string);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
return (matchValue === "FreeText") ? (new CompositeCell(1, [(arg_3 = index(0, string), (objectArg_1 = get$.Required, objectArg_1.Field("values", arg_3)))])) : ((matchValue === "Term") ? (new CompositeCell(0, [(arg_5 = index(0, OntologyAnnotation_decoder(ConverterOptions_$ctor())), (objectArg_2 = get$.Required, objectArg_2.Field("values", arg_5)))])) : ((matchValue === "Unitized") ? (new CompositeCell(2, [(arg_7 = index(0, string), (objectArg_3 = get$.Required, objectArg_3.Field("values", arg_7))), (arg_9 = index(1, OntologyAnnotation_decoder(ConverterOptions_$ctor())), (objectArg_4 = get$.Required, objectArg_4.Field("values", arg_9)))])) : toFail(printf("Error reading CompositeCell from json string: %A"))(matchValue)));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function CompositeCell_compressedEncoder(stringTable, oaTable, cc) {
|
|
30
|
+
const patternInput = (cc.tag === 0) ? ["Term", singleton(OATable_encodeOA(oaTable, cc.fields[0]))] : ((cc.tag === 2) ? ["Unitized", ofArray([StringTable_encodeString(stringTable, cc.fields[0]), OATable_encodeOA(oaTable, cc.fields[1])])] : ["FreeText", singleton(StringTable_encodeString(stringTable, cc.fields[0]))]);
|
|
31
|
+
return new Json(5, [[["t", StringTable_encodeString(stringTable, patternInput[0])], ["v", list(patternInput[1])]]]);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function CompositeCell_compressedDecoder(stringTable, oaTable) {
|
|
35
|
+
return object((get$) => {
|
|
36
|
+
let arg_3, objectArg_1, arg_5, objectArg_2, arg_7, objectArg_3, arg_9, objectArg_4;
|
|
37
|
+
let matchValue;
|
|
38
|
+
const arg_1 = StringTable_decodeString(stringTable);
|
|
39
|
+
const objectArg = get$.Required;
|
|
40
|
+
matchValue = objectArg.Field("t", arg_1);
|
|
41
|
+
return (matchValue === "FreeText") ? (new CompositeCell(1, [(arg_3 = index(0, StringTable_decodeString(stringTable)), (objectArg_1 = get$.Required, objectArg_1.Field("v", arg_3)))])) : ((matchValue === "Term") ? (new CompositeCell(0, [(arg_5 = index(0, OATable_decodeOA(oaTable)), (objectArg_2 = get$.Required, objectArg_2.Field("v", arg_5)))])) : ((matchValue === "Unitized") ? (new CompositeCell(2, [(arg_7 = index(0, StringTable_decodeString(stringTable)), (objectArg_3 = get$.Required, objectArg_3.Field("v", arg_7))), (arg_9 = index(1, OATable_decodeOA(oaTable)), (objectArg_4 = get$.Required, objectArg_4.Field("v", arg_9)))])) : toFail(printf("Error reading CompositeCell from json string: %A"))(matchValue)));
|
|
42
|
+
});
|
|
43
|
+
}
|
|
33
44
|
|
|
34
45
|
export function ARCtrl_ISA_CompositeCell__CompositeCell_fromJsonString_Static_Z721C83C5(jsonString) {
|
|
35
|
-
const matchValue = fromString(
|
|
46
|
+
const matchValue = fromString(CompositeCell_decoder, jsonString);
|
|
36
47
|
if (matchValue.tag === 1) {
|
|
37
|
-
|
|
48
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
38
49
|
}
|
|
39
50
|
else {
|
|
40
51
|
return matchValue.fields[0];
|