@nfdi4plants/arctrl 1.2.0 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARC.js +53 -35
- package/{Contracts/Contracts.ARCtrl.js → Contract/ARC.js} +4 -2
- package/Contract/ArcAssay.js +102 -0
- package/Contract/ArcInvestigation.js +78 -0
- package/Contract/ArcStudy.js +102 -0
- package/Contract/Contract.js +3 -3
- package/{Contracts/Contracts.Git.js → Contract/Git.js} +5 -5
- package/{ISA/ISA/ArcTypes → Core}/ArcTypes.js +307 -295
- package/Core/Comment.js +97 -0
- package/{ISA/ISA/JsonTypes → Core}/CommentList.js +12 -18
- package/Core/Conversion.js +1056 -0
- package/Core/Helper/Collections.js +318 -0
- package/Core/Helper/HashCodes.js +39 -0
- package/{ISA/ISA → Core/Helper}/Identifier.js +67 -2
- package/{ISA/ISA → Core/Helper}/Regex.js +3 -3
- package/{SemVer.js → Core/Helper/SemVer.js} +8 -8
- package/{ISA/ISA/ArcTypes → Core}/IdentifierSetters.js +1 -1
- package/Core/OntologyAnnotation.js +186 -0
- package/Core/OntologySourceReference.js +92 -0
- package/Core/Person.js +194 -0
- package/Core/Process/ColumnIndex.js +248 -0
- package/Core/Process/Component.js +188 -0
- package/{ISA/ISA/JsonTypes → Core/Process}/Data.js +8 -8
- package/{ISA/ISA/JsonTypes → Core/Process}/DataFile.js +3 -3
- package/Core/Process/Factor.js +109 -0
- package/{ISA/ISA/JsonTypes → Core/Process}/FactorValue.js +32 -13
- package/{ISA/ISA/JsonTypes → Core/Process}/Material.js +9 -9
- package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttribute.js +17 -17
- package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttributeValue.js +35 -16
- package/{ISA/ISA/JsonTypes → Core/Process}/MaterialType.js +3 -3
- package/{ISA/ISA/JsonTypes → Core/Process}/Process.js +46 -79
- package/{ISA/ISA/JsonTypes → Core/Process}/ProcessInput.js +42 -42
- package/{ISA/ISA/JsonTypes → Core/Process}/ProcessOutput.js +36 -36
- package/{ISA/ISA/JsonTypes → Core/Process}/ProcessParameterValue.js +26 -7
- package/{ISA/ISA/JsonTypes → Core/Process}/ProcessSequence.js +21 -25
- package/{ISA/ISA/JsonTypes → Core/Process}/Protocol.js +26 -57
- package/{ISA/ISA/JsonTypes → Core/Process}/ProtocolParameter.js +10 -10
- package/{ISA/ISA/JsonTypes → Core/Process}/Sample.js +12 -12
- package/{ISA/ISA/JsonTypes → Core/Process}/Source.js +9 -9
- package/{ISA/ISA/JsonTypes → Core/Process}/Value.js +13 -13
- package/Core/Publication.js +116 -0
- package/{ISA/ISA/ArcTypes → Core/Table}/ArcTable.js +43 -149
- package/Core/Table/ArcTableAux.js +532 -0
- package/{ISA/ISA/ArcTypes → Core/Table}/ArcTables.js +20 -32
- package/{ISA/ISA/ArcTypes → Core/Table}/CompositeCell.js +19 -76
- package/{ISA/ISA/ArcTypes → Core/Table}/CompositeColumn.js +6 -6
- package/{ISA/ISA/ArcTypes → Core/Table}/CompositeHeader.js +14 -34
- package/{Templates → Core}/Template.js +16 -17
- package/Core/Templates.js +84 -0
- package/FileSystem/Commit.js +2 -2
- package/FileSystem/FileSystem.js +4 -4
- package/FileSystem/FileSystemTree.js +46 -8
- package/FileSystem/Path.js +10 -2
- package/Json/ARC.js +25 -0
- package/Json/Assay.js +202 -0
- package/Json/Comment.js +130 -0
- package/Json/ConverterOptions.js +18 -0
- package/Json/Decode.js +128 -0
- package/Json/Encode.js +45 -0
- package/Json/Investigation.js +220 -0
- package/Json/OntologyAnnotation.js +169 -0
- package/Json/OntologySourceReference.js +122 -0
- package/Json/Person.js +250 -0
- package/Json/Process/AssayMaterials.js +22 -0
- package/Json/Process/Component.js +79 -0
- package/Json/Process/Data.js +102 -0
- package/Json/Process/DataFile.js +81 -0
- package/Json/Process/Factor.js +48 -0
- package/Json/Process/FactorValue.js +53 -0
- package/Json/Process/Material.js +107 -0
- package/Json/Process/MaterialAttribute.js +45 -0
- package/Json/Process/MaterialAttributeValue.js +70 -0
- package/Json/Process/MaterialType.js +60 -0
- package/Json/Process/Process.js +107 -0
- package/Json/Process/ProcessInput.js +59 -0
- package/Json/Process/ProcessOutput.js +71 -0
- package/Json/Process/ProcessParameterValue.js +69 -0
- package/Json/Process/ProcessSequence.js +53 -0
- package/Json/Process/PropertyValue.js +82 -0
- package/Json/Process/Protocol.js +147 -0
- package/Json/Process/ProtocolParameter.js +45 -0
- package/Json/Process/Sample.js +134 -0
- package/Json/Process/Source.js +101 -0
- package/Json/Process/StudyMaterials.js +24 -0
- package/Json/Process/Value.js +42 -0
- package/Json/Publication.js +142 -0
- package/Json/StringTable.js +44 -0
- package/Json/Study.js +306 -0
- package/{ISA/ISA.Json/ArcTypes → Json/Table}/ArcTable.js +53 -49
- package/Json/Table/CellTable.js +40 -0
- package/Json/Table/CompositeCell.js +65 -0
- package/{ISA/ISA.Json/ArcTypes → Json/Table}/CompositeHeader.js +22 -19
- package/Json/Table/Compression.js +38 -0
- package/Json/Table/IOType.js +37 -0
- package/Json/Table/OATable.js +40 -0
- package/Json/Table/Templates.js +107 -0
- package/Json/context/rocrate/isa_assay_context.js +32 -0
- package/Json/context/rocrate/isa_comment_context.js +23 -0
- package/Json/context/rocrate/isa_component_context.js +24 -0
- package/Json/context/rocrate/isa_data_context.js +25 -0
- package/Json/context/rocrate/isa_factor_context.js +25 -0
- package/Json/context/rocrate/isa_factor_value_context.js +23 -0
- package/{ISA/ISA.Json → Json}/context/rocrate/isa_investigation_context.js +5 -5
- package/{ISA/ISA.Json → Json}/context/rocrate/isa_material_attribute_context.js +4 -4
- package/Json/context/rocrate/isa_material_attribute_value_context.js +23 -0
- package/Json/context/rocrate/isa_material_context.js +26 -0
- package/Json/context/rocrate/isa_ontology_annotation_context.js +23 -0
- package/Json/context/rocrate/isa_ontology_source_reference_context.js +26 -0
- package/Json/context/rocrate/isa_organization_context.js +22 -0
- package/Json/context/rocrate/isa_person_context.js +33 -0
- package/Json/context/rocrate/isa_process_context.js +29 -0
- package/Json/context/rocrate/isa_process_parameter_value_context.js +23 -0
- package/Json/context/rocrate/isa_protocol_context.js +28 -0
- package/{ISA/ISA.Json → Json}/context/rocrate/isa_protocol_parameter_context.js +4 -4
- package/Json/context/rocrate/isa_publication_context.js +25 -0
- package/Json/context/rocrate/isa_sample_context.js +24 -0
- package/Json/context/rocrate/isa_source_context.js +25 -0
- package/Json/context/rocrate/isa_study_context.js +40 -0
- package/Json/context/rocrate/property_value_context.js +4 -0
- package/Json/context/rocrate/rocrate_context.js +23 -0
- package/Json.js +193 -0
- package/README.md +33 -12
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/ArcTable.js +12 -12
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeCell.js +8 -7
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeColumn.js +10 -10
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeHeader.js +10 -10
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcAssay.js +11 -11
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcInvestigation.js +34 -37
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcStudy.js +12 -12
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/CollectionAux.js +7 -7
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Assays.js +32 -32
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Comment.js +5 -5
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Contacts.js +28 -30
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Conversions.js +22 -16
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/DesignDescriptors.js +1 -1
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Factors.js +23 -22
- package/Spreadsheet/Metadata/OntologyAnnotation.js +64 -0
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/OntologySourceReference.js +22 -24
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Protocols.js +17 -17
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Publication.js +29 -31
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/SparseTable.js +23 -22
- package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Study.js +38 -40
- package/{Templates/Template.Spreadsheet.js → Spreadsheet/Template.js} +31 -31
- package/Template.Web.js +27 -0
- package/WebRequest/WebRequest.Node.js +2 -2
- package/WebRequest/WebRequest.js +2 -2
- package/Xlsx.js +85 -0
- 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.3/Cells/FsCell.fs.js +14 -14
- package/fable_modules/FsSpreadsheet.5.1.3/Cells/FsCellsCollection.fs.js +6 -6
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/CellBuilder.fs.js +4 -4
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/ColumnBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/DSL.fs.js +2 -2
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/Expression.fs.js +1 -1
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/RowBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/SheetBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/TableBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/Transform.fs.js +6 -6
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/Types.fs.js +4 -4
- package/fable_modules/FsSpreadsheet.5.1.3/DSL/WorkbookBuilder.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/FsAddress.fs.js +8 -8
- package/fable_modules/FsSpreadsheet.5.1.3/FsColumn.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/FsRow.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/FsWorkbook.fs.js +6 -6
- package/fable_modules/FsSpreadsheet.5.1.3/FsWorksheet.fs.js +9 -9
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRange.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeAddress.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeBase.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeColumn.fs.js +3 -3
- package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeRow.fs.js +1 -1
- package/fable_modules/FsSpreadsheet.5.1.3/SheetBuilder.fs.js +8 -8
- package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTable.fs.js +7 -7
- package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableField.fs.js +4 -4
- package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableRow.fs.js +1 -1
- package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js +19 -19
- package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +5 -5
- package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +2 -2
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +1 -1
- package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +2 -2
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Boolean.js +2 -2
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/CHANGELOG.md +18 -0
- package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.d.ts +9 -0
- package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.js +21 -0
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Date.js +337 -40
- package/fable_modules/fable-library-js.4.16.0/MapUtil.d.ts +12 -0
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MapUtil.js +15 -0
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Util.d.ts +6 -3
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Util.js +2 -13
- package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/package.json +1 -1
- package/fable_modules/project_cracked.json +1 -1
- package/index.js +14 -12
- package/package.json +1 -1
- package/Contracts/Contracts.ArcTypes.js +0 -268
- package/FileSystemTree.js +0 -51
- package/ISA/ISA/ArcTypes/ArcTableAux.js +0 -1155
- package/ISA/ISA/ArcTypes/CompositeRow.js +0 -111
- package/ISA/ISA/Builder/Types.js +0 -243
- package/ISA/ISA/Fable.js +0 -123
- package/ISA/ISA/Helper.js +0 -505
- package/ISA/ISA/JsonTypes/Assay.js +0 -620
- package/ISA/ISA/JsonTypes/AssayMaterials.js +0 -39
- package/ISA/ISA/JsonTypes/ColumnIndex.js +0 -246
- package/ISA/ISA/JsonTypes/Comment.js +0 -58
- package/ISA/ISA/JsonTypes/Component.js +0 -165
- package/ISA/ISA/JsonTypes/Factor.js +0 -128
- package/ISA/ISA/JsonTypes/Investigation.js +0 -204
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +0 -196
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +0 -85
- package/ISA/ISA/JsonTypes/Person.js +0 -152
- package/ISA/ISA/JsonTypes/Publication.js +0 -105
- package/ISA/ISA/JsonTypes/Study.js +0 -942
- package/ISA/ISA/JsonTypes/StudyMaterials.js +0 -45
- package/ISA/ISA/UIHelper.js +0 -19
- package/ISA/ISA.Json/ArcTypes/ArcAssay.js +0 -303
- package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +0 -122
- package/ISA/ISA.Json/ArcTypes/ArcStudy.js +0 -203
- package/ISA/ISA.Json/ArcTypes/CellTable.js +0 -40
- package/ISA/ISA.Json/ArcTypes/CompositeCell.js +0 -62
- package/ISA/ISA.Json/ArcTypes/IOType.js +0 -33
- package/ISA/ISA.Json/ArcTypes/OATable.js +0 -42
- package/ISA/ISA.Json/Assay.js +0 -129
- package/ISA/ISA.Json/Comment.js +0 -80
- package/ISA/ISA.Json/ConverterOptions.js +0 -51
- package/ISA/ISA.Json/Data.js +0 -253
- package/ISA/ISA.Json/Decode.js +0 -61
- package/ISA/ISA.Json/Factor.js +0 -194
- package/ISA/ISA.Json/GEncode.js +0 -40
- package/ISA/ISA.Json/Investigation.js +0 -89
- package/ISA/ISA.Json/Material.js +0 -232
- package/ISA/ISA.Json/Ontology.js +0 -200
- package/ISA/ISA.Json/Person.js +0 -186
- package/ISA/ISA.Json/Process.js +0 -305
- package/ISA/ISA.Json/Protocol.js +0 -281
- package/ISA/ISA.Json/Publication.js +0 -86
- package/ISA/ISA.Json/StringTable.js +0 -44
- package/ISA/ISA.Json/Study.js +0 -186
- package/ISA/ISA.Json/context/rocrate/isa_assay_context.js +0 -34
- package/ISA/ISA.Json/context/rocrate/isa_comment_context.js +0 -23
- package/ISA/ISA.Json/context/rocrate/isa_component_context.js +0 -24
- package/ISA/ISA.Json/context/rocrate/isa_data_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_factor_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_factor_value_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_material_attribute_value_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_material_context.js +0 -26
- package/ISA/ISA.Json/context/rocrate/isa_ontology_annotation_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_ontology_source_reference_context.js +0 -26
- package/ISA/ISA.Json/context/rocrate/isa_organization_context.js +0 -22
- package/ISA/ISA.Json/context/rocrate/isa_person_context.js +0 -31
- package/ISA/ISA.Json/context/rocrate/isa_process_context.js +0 -31
- package/ISA/ISA.Json/context/rocrate/isa_process_parameter_value_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_protocol_context.js +0 -30
- package/ISA/ISA.Json/context/rocrate/isa_publication_context.js +0 -27
- package/ISA/ISA.Json/context/rocrate/isa_sample_context.js +0 -26
- package/ISA/ISA.Json/context/rocrate/isa_source_context.js +0 -25
- package/ISA/ISA.Json/context/rocrate/isa_study_context.js +0 -42
- package/ISA/ISA.Json/context/rocrate/rocrate_context.js +0 -25
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +0 -65
- package/Path.js +0 -10
- package/Templates/Template.Json.js +0 -90
- package/Templates/Template.Web.js +0 -27
- package/Templates/Templates.js +0 -82
- package/fable_modules/fable-library-js.4.13.0/MapUtil.d.ts +0 -10
- /package/{ISA/ISA/JsonTypes → Core}/URI.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Array.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Array.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Async.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Async.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/AsyncBuilder.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/AsyncBuilder.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BigInt.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BigInt.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BitConverter.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BitConverter.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Boolean.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Char.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Char.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Choice.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Choice.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Date.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOffset.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOffset.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOnly.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOnly.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Decimal.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Decimal.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Double.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Double.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Encoding.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Encoding.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Event.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Event.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Collections.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Collections.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.CompilerServices.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.CompilerServices.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Global.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Global.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Guid.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Guid.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Int32.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Int32.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/List.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/List.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Long.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Long.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MailboxProcessor.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MailboxProcessor.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Map.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Map.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableMap.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableMap.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableSet.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableSet.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Native.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Native.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Numeric.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Numeric.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Observable.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Observable.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Option.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Option.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/README.md +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Random.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Random.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Range.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Range.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Reflection.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Reflection.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/RegExp.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/RegExp.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Result.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Result.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq2.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq2.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Set.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Set.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/String.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/String.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Collections.Generic.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Collections.Generic.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Text.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Text.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/SystemException.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/SystemException.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeOnly.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeOnly.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeSpan.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeSpan.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Timer.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Timer.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Types.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Types.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Unicode.13.0.0.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Unicode.13.0.0.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Uri.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Uri.js +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/big.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/lib/big.d.ts +0 -0
- /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/lib/big.js +0 -0
package/Json/Assay.js
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { empty, singleton, ofArray, choose } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
2
|
+
import { equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
|
+
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
|
+
import { defaultSpaces, tryIncludeList, tryIncludeSeq, tryInclude } from "./Encode.js";
|
|
5
|
+
import { OntologyAnnotation_ISAJson_decoder, OntologyAnnotation_ISAJson_encoder, OntologyAnnotation_ROCrate_decoderDefinedTerm, OntologyAnnotation_ROCrate_decoderPropertyValue, OntologyAnnotation_ROCrate_encoderDefinedTerm, OntologyAnnotation_ROCrate_encoderPropertyValue, OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./OntologyAnnotation.js";
|
|
6
|
+
import { ArcTable_decoderCompressed, ArcTable_encoderCompressed, ArcTable_decoder, ArcTable_encoder } from "./Table/ArcTable.js";
|
|
7
|
+
import { Person_ROCrate_decoder, Person_ROCrate_encoder, Person_decoder, Person_encoder } from "./Person.js";
|
|
8
|
+
import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decoder, Comment_ROCrate_encoder, Comment_decoder, Comment_encoder } from "./Comment.js";
|
|
9
|
+
import { map as map_1, list as list_2, string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
10
|
+
import { ArcAssay } from "../Core/ArcTypes.js";
|
|
11
|
+
import { bind, map, defaultArg, unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
12
|
+
import { Decode_objectNoAdditionalProperties, Decode_resizeArray } from "./Decode.js";
|
|
13
|
+
import { toFail, printf, toText, replace } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
14
|
+
import { Assay_tryIdentifierFromFileName, createMissingIdentifier, Assay_fileNameFromIdentifier } from "../Core/Helper/Identifier.js";
|
|
15
|
+
import { JsonTypes_decomposeTechnologyPlatform, JsonTypes_composeTechnologyPlatform, ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D, ARCtrl_ArcTables__ArcTables_GetProcesses } from "../Core/Conversion.js";
|
|
16
|
+
import { getUnits, getCharacteristics, getData } from "../Core/Process/ProcessSequence.js";
|
|
17
|
+
import { list as list_1 } from "../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
18
|
+
import { Data_ISAJson_encoder, Data_ROCrate_encoder } from "./Process/Data.js";
|
|
19
|
+
import { Process_ISAJson_decoder, Process_ISAJson_encoder, Process_ROCrate_decoder, Process_ROCrate_encoder } from "./Process/Process.js";
|
|
20
|
+
import { context_jsonvalue } from "./context/rocrate/isa_assay_context.js";
|
|
21
|
+
import { encoder } from "./Process/AssayMaterials.js";
|
|
22
|
+
import { Option_fromValueWithDefault } from "../Core/Helper/Collections.js";
|
|
23
|
+
import { MaterialAttribute_ISAJson_encoder } from "./Process/MaterialAttribute.js";
|
|
24
|
+
import { fromString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
25
|
+
import { toString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
26
|
+
import { encode, decode } from "./Table/Compression.js";
|
|
27
|
+
|
|
28
|
+
export function Assay_encoder(assay) {
|
|
29
|
+
return new Json(5, [choose((tupledArg) => {
|
|
30
|
+
const v = tupledArg[1];
|
|
31
|
+
if (equals(v, new Json(3, []))) {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return [tupledArg[0], v];
|
|
36
|
+
}
|
|
37
|
+
}, ofArray([["Identifier", new Json(0, [assay.Identifier])], tryInclude("MeasurementType", OntologyAnnotation_encoder, assay.MeasurementType), tryInclude("TechnologyType", OntologyAnnotation_encoder, assay.TechnologyType), tryInclude("TechnologyPlatform", OntologyAnnotation_encoder, assay.TechnologyPlatform), tryIncludeSeq("Tables", ArcTable_encoder, assay.Tables), tryIncludeSeq("Performers", Person_encoder, assay.Performers), tryIncludeSeq("Comments", Comment_encoder, assay.Comments)]))]);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const Assay_decoder = object((get$) => {
|
|
41
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6;
|
|
42
|
+
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoder), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))), unwrap((arg_11 = Decode_resizeArray(Person_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Performers", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Comment_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Comments", arg_13)))));
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export function Assay_encoderCompressed(stringTable, oaTable, cellTable, assay) {
|
|
46
|
+
return new Json(5, [choose((tupledArg) => {
|
|
47
|
+
const v = tupledArg[1];
|
|
48
|
+
if (equals(v, new Json(3, []))) {
|
|
49
|
+
return void 0;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return [tupledArg[0], v];
|
|
53
|
+
}
|
|
54
|
+
}, ofArray([["Identifier", new Json(0, [assay.Identifier])], tryInclude("MeasurementType", OntologyAnnotation_encoder, assay.MeasurementType), tryInclude("TechnologyType", OntologyAnnotation_encoder, assay.TechnologyType), tryInclude("TechnologyPlatform", OntologyAnnotation_encoder, assay.TechnologyPlatform), tryIncludeSeq("Tables", (table) => ArcTable_encoderCompressed(stringTable, oaTable, cellTable, table), assay.Tables), tryIncludeSeq("Performers", Person_encoder, assay.Performers), tryIncludeSeq("Comments", Comment_encoder, assay.Comments)]))]);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function Assay_decoderCompressed(stringTable, oaTable, cellTable) {
|
|
58
|
+
return object((get$) => {
|
|
59
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, arg_9, objectArg_4, arg_11, objectArg_5, arg_13, objectArg_6;
|
|
60
|
+
return ArcAssay.create((objectArg = get$.Required, objectArg.Field("Identifier", string)), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("MeasurementType", OntologyAnnotation_decoder))), unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("TechnologyType", OntologyAnnotation_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("TechnologyPlatform", OntologyAnnotation_decoder))), unwrap((arg_9 = Decode_resizeArray(ArcTable_decoderCompressed(stringTable, oaTable, cellTable)), (objectArg_4 = get$.Optional, objectArg_4.Field("Tables", arg_9)))), unwrap((arg_11 = Decode_resizeArray(Person_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("Performers", arg_11)))), unwrap((arg_13 = Decode_resizeArray(Comment_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("Comments", arg_13)))));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function Assay_ROCrate_genID(a) {
|
|
65
|
+
const matchValue = a.Identifier;
|
|
66
|
+
if (matchValue === "") {
|
|
67
|
+
return "#EmptyAssay";
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
return `#assay/${replace(matchValue, " ", "_")}`;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function Assay_ROCrate_encoder(studyName, a) {
|
|
75
|
+
let assayName;
|
|
76
|
+
const fileName = Assay_fileNameFromIdentifier(a.Identifier);
|
|
77
|
+
const processes = ARCtrl_ArcTables__ArcTables_GetProcesses(a);
|
|
78
|
+
const dataFiles = getData(processes);
|
|
79
|
+
return new Json(5, [choose((tupledArg) => {
|
|
80
|
+
const v = tupledArg[1];
|
|
81
|
+
if (equals(v, new Json(3, []))) {
|
|
82
|
+
return void 0;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
return [tupledArg[0], v];
|
|
86
|
+
}
|
|
87
|
+
}, ofArray([["@id", new Json(0, [Assay_ROCrate_genID(a)])], ["@type", list_1(singleton(new Json(0, ["Assay"])))], ["additionalType", new Json(0, ["Assay"])], ["identifier", new Json(0, [a.Identifier])], ["filename", new Json(0, [fileName])], tryInclude("measurementType", OntologyAnnotation_ROCrate_encoderPropertyValue, a.MeasurementType), tryInclude("technologyType", OntologyAnnotation_ROCrate_encoderDefinedTerm, a.TechnologyType), tryInclude("technologyPlatform", OntologyAnnotation_ROCrate_encoderDefinedTerm, a.TechnologyPlatform), tryIncludeSeq("performers", Person_ROCrate_encoder, a.Performers), tryIncludeList("dataFiles", Data_ROCrate_encoder, dataFiles), tryIncludeList("processSequence", (assayName = a.Identifier, (oa_5) => Process_ROCrate_encoder(studyName, assayName, oa_5)), processes), tryIncludeSeq("comments", Comment_ROCrate_encoder, a.Comments), ["@context", context_jsonvalue]]))]);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const Assay_ROCrate_decoder = object((get$) => {
|
|
91
|
+
let objectArg, arg_3, objectArg_1, objectArg_2, objectArg_3, objectArg_4, arg_12, objectArg_5, arg_14, objectArg_6;
|
|
92
|
+
const identifier = defaultArg((objectArg = get$.Optional, objectArg.Field("identifier", string)), createMissingIdentifier());
|
|
93
|
+
const tables = map((arg_4) => {
|
|
94
|
+
const a = ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D(arg_4);
|
|
95
|
+
return a.Tables;
|
|
96
|
+
}, (arg_3 = list_2(Process_ROCrate_decoder), (objectArg_1 = get$.Optional, objectArg_1.Field("processSequence", arg_3))));
|
|
97
|
+
return new ArcAssay(identifier, unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("measurementType", OntologyAnnotation_ROCrate_decoderPropertyValue))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("technologyType", OntologyAnnotation_ROCrate_decoderDefinedTerm))), unwrap((objectArg_4 = get$.Optional, objectArg_4.Field("technologyPlatform", OntologyAnnotation_ROCrate_decoderDefinedTerm))), unwrap(tables), unwrap((arg_12 = Decode_resizeArray(Person_ROCrate_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("performers", arg_12)))), unwrap((arg_14 = Decode_resizeArray(Comment_ROCrate_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("comments", arg_14)))));
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export function Assay_ISAJson_encoder(a) {
|
|
101
|
+
const fileName = Assay_fileNameFromIdentifier(a.Identifier);
|
|
102
|
+
const processes = ARCtrl_ArcTables__ArcTables_GetProcesses(a);
|
|
103
|
+
const dataFiles = getData(processes);
|
|
104
|
+
const characteristics = getCharacteristics(processes);
|
|
105
|
+
const units = getUnits(processes);
|
|
106
|
+
return new Json(5, [choose((tupledArg) => {
|
|
107
|
+
const v = tupledArg[1];
|
|
108
|
+
if (equals(v, new Json(3, []))) {
|
|
109
|
+
return void 0;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
return [tupledArg[0], v];
|
|
113
|
+
}
|
|
114
|
+
}, ofArray([["filename", new Json(0, [fileName])], tryInclude("measurementType", OntologyAnnotation_ISAJson_encoder, a.MeasurementType), tryInclude("technologyType", OntologyAnnotation_ISAJson_encoder, a.TechnologyType), tryInclude("technologyPlatform", (value_1) => (new Json(0, [value_1])), map(JsonTypes_composeTechnologyPlatform, a.TechnologyPlatform)), tryIncludeList("dataFiles", Data_ISAJson_encoder, dataFiles), tryInclude("materials", encoder, Option_fromValueWithDefault(empty(), processes)), tryIncludeList("characteristicCategories", MaterialAttribute_ISAJson_encoder, characteristics), tryIncludeList("unitCategories", OntologyAnnotation_ISAJson_encoder, units), tryIncludeList("processSequence", Process_ISAJson_encoder, processes), tryIncludeSeq("comments", Comment_ISAJson_encoder, a.Comments)]))]);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export const Assay_ISAJson_allowedFields = ofArray(["@id", "filename", "measurementType", "technologyType", "technologyPlatform", "dataFiles", "materials", "characteristicCategories", "unitCategories", "processSequence", "comments", "@type", "@context"]);
|
|
118
|
+
|
|
119
|
+
export const Assay_ISAJson_decoder = Decode_objectNoAdditionalProperties(Assay_ISAJson_allowedFields, (get$) => {
|
|
120
|
+
let objectArg, arg_3, objectArg_1, objectArg_2, objectArg_3, arg_10, objectArg_4, arg_12, objectArg_5;
|
|
121
|
+
const identifier = defaultArg(bind(Assay_tryIdentifierFromFileName, (objectArg = get$.Optional, objectArg.Field("filename", string))), createMissingIdentifier());
|
|
122
|
+
const tables = map((arg_4) => {
|
|
123
|
+
const a = ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D(arg_4);
|
|
124
|
+
return a.Tables;
|
|
125
|
+
}, (arg_3 = list_2(Process_ISAJson_decoder), (objectArg_1 = get$.Optional, objectArg_1.Field("processSequence", arg_3))));
|
|
126
|
+
return new ArcAssay(identifier, unwrap((objectArg_2 = get$.Optional, objectArg_2.Field("measurementType", OntologyAnnotation_ISAJson_decoder))), unwrap((objectArg_3 = get$.Optional, objectArg_3.Field("technologyType", OntologyAnnotation_ISAJson_decoder))), unwrap((arg_10 = map_1(JsonTypes_decomposeTechnologyPlatform, string), (objectArg_4 = get$.Optional, objectArg_4.Field("technologyPlatform", arg_10)))), unwrap(tables), void 0, unwrap((arg_12 = Decode_resizeArray(Comment_ISAJson_decoder), (objectArg_5 = get$.Optional, objectArg_5.Field("comments", arg_12)))));
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
export function ARCtrl_ArcAssay__ArcAssay_fromJsonString_Static_Z721C83C5(s) {
|
|
130
|
+
const matchValue = fromString(Assay_decoder, s);
|
|
131
|
+
if (matchValue.tag === 1) {
|
|
132
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
return matchValue.fields[0];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function ARCtrl_ArcAssay__ArcAssay_toJsonString_Static_71136F3F(spaces) {
|
|
140
|
+
return (obj) => {
|
|
141
|
+
const value = Assay_encoder(obj);
|
|
142
|
+
return toString(defaultSpaces(spaces), value);
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function ARCtrl_ArcAssay__ArcAssay_fromCompressedJsonString_Static_Z721C83C5(s) {
|
|
147
|
+
try {
|
|
148
|
+
const matchValue = fromString(decode(Assay_decoderCompressed), s);
|
|
149
|
+
if (matchValue.tag === 1) {
|
|
150
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
return matchValue.fields[0];
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
catch (e_1) {
|
|
157
|
+
const arg_1 = e_1.message;
|
|
158
|
+
return toFail(printf("Error. Unable to parse json string to ArcStudy: %s"))(arg_1);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function ARCtrl_ArcAssay__ArcAssay_toCompressedJsonString_Static_71136F3F(spaces) {
|
|
163
|
+
return (obj) => toString(defaultArg(spaces, 0), encode(Assay_encoderCompressed, obj));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function ARCtrl_ArcAssay__ArcAssay_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
167
|
+
const matchValue = fromString(Assay_ROCrate_decoder, s);
|
|
168
|
+
if (matchValue.tag === 1) {
|
|
169
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
return matchValue.fields[0];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* exports in json-ld format
|
|
178
|
+
*/
|
|
179
|
+
export function ARCtrl_ArcAssay__ArcAssay_toROCrateJsonString_Static_5CABCA47(studyName, spaces) {
|
|
180
|
+
return (obj) => {
|
|
181
|
+
const value = Assay_ROCrate_encoder(studyName, obj);
|
|
182
|
+
return toString(defaultSpaces(spaces), value);
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function ARCtrl_ArcAssay__ArcAssay_toISAJsonString_Static_71136F3F(spaces) {
|
|
187
|
+
return (obj) => {
|
|
188
|
+
const value = Assay_ISAJson_encoder(obj);
|
|
189
|
+
return toString(defaultSpaces(spaces), value);
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export function ARCtrl_ArcAssay__ArcAssay_fromISAJsonString_Static_Z721C83C5(s) {
|
|
194
|
+
const matchValue = fromString(Assay_ISAJson_decoder, s);
|
|
195
|
+
if (matchValue.tag === 1) {
|
|
196
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
return matchValue.fields[0];
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
package/Json/Comment.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { ofArray, choose } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
2
|
+
import { equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
|
+
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
|
+
import { defaultSpaces, tryInclude } from "./Encode.js";
|
|
5
|
+
import { map, string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
6
|
+
import { Comment$ } from "../Core/Comment.js";
|
|
7
|
+
import { value as value_6, unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
8
|
+
import { printf, toText, replace } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
9
|
+
import { context_jsonvalue } from "./context/rocrate/isa_comment_context.js";
|
|
10
|
+
import { toString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
11
|
+
import { fromString } from "../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
12
|
+
|
|
13
|
+
export function Comment_encoder(comment) {
|
|
14
|
+
return new Json(5, [choose((tupledArg) => {
|
|
15
|
+
const v = tupledArg[1];
|
|
16
|
+
if (equals(v, new Json(3, []))) {
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return [tupledArg[0], v];
|
|
21
|
+
}
|
|
22
|
+
}, ofArray([tryInclude("name", (value) => (new Json(0, [value])), comment.Name), tryInclude("value", (value_2) => (new Json(0, [value_2])), comment.Value)]))]);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const Comment_decoder = object((get$) => {
|
|
26
|
+
let objectArg, objectArg_1;
|
|
27
|
+
return new Comment$(unwrap((objectArg = get$.Optional, objectArg.Field("name", string))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("value", string))));
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function Comment_ROCrate_genID(c) {
|
|
31
|
+
const matchValue = c.Name;
|
|
32
|
+
if (matchValue == null) {
|
|
33
|
+
return "#EmptyComment";
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const n = matchValue;
|
|
37
|
+
const v = (c.Value != null) ? ("_" + replace(value_6(c.Value), " ", "_")) : "";
|
|
38
|
+
return ("#Comment_" + replace(n, " ", "_")) + v;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function Comment_ROCrate_encoder(comment) {
|
|
43
|
+
return new Json(5, [choose((tupledArg) => {
|
|
44
|
+
const v = tupledArg[1];
|
|
45
|
+
if (equals(v, new Json(3, []))) {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return [tupledArg[0], v];
|
|
50
|
+
}
|
|
51
|
+
}, ofArray([["@id", new Json(0, [Comment_ROCrate_genID(comment)])], ["@type", new Json(0, ["Comment"])], tryInclude("name", (value_2) => (new Json(0, [value_2])), comment.Name), tryInclude("value", (value_4) => (new Json(0, [value_4])), comment.Value), ["@context", context_jsonvalue]]))]);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const Comment_ROCrate_decoder = object((get$) => {
|
|
55
|
+
let objectArg, objectArg_1;
|
|
56
|
+
return new Comment$(unwrap((objectArg = get$.Optional, objectArg.Field("name", string))), unwrap((objectArg_1 = get$.Optional, objectArg_1.Field("value", string))));
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export function Comment_ROCrate_encoderDisambiguatingDescription(comment) {
|
|
60
|
+
return new Json(0, [toString(0, Comment_ROCrate_encoder(comment))]);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const Comment_ROCrate_decoderDisambiguatingDescription = map((s) => {
|
|
64
|
+
const matchValue = fromString(Comment_ROCrate_decoder, s.trim());
|
|
65
|
+
if (matchValue.tag === 1) {
|
|
66
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
return matchValue.fields[0];
|
|
70
|
+
}
|
|
71
|
+
}, string);
|
|
72
|
+
|
|
73
|
+
export const Comment_ISAJson_encoder = Comment_encoder;
|
|
74
|
+
|
|
75
|
+
export const Comment_ISAJson_decoder = Comment_decoder;
|
|
76
|
+
|
|
77
|
+
export function ARCtrl_Comment__Comment_fromJsonString_Static_Z721C83C5(s) {
|
|
78
|
+
const matchValue = fromString(Comment_decoder, s);
|
|
79
|
+
if (matchValue.tag === 1) {
|
|
80
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return matchValue.fields[0];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function ARCtrl_Comment__Comment_toJsonString_Static_71136F3F(spaces) {
|
|
88
|
+
return (c) => {
|
|
89
|
+
const value = Comment_encoder(c);
|
|
90
|
+
return toString(defaultSpaces(spaces), value);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function ARCtrl_Comment__Comment_fromROCrateJsonString_Static_Z721C83C5(s) {
|
|
95
|
+
const matchValue = fromString(Comment_ROCrate_decoder, s);
|
|
96
|
+
if (matchValue.tag === 1) {
|
|
97
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return matchValue.fields[0];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* exports in json-ld format
|
|
106
|
+
*/
|
|
107
|
+
export function ARCtrl_Comment__Comment_toROCrateJsonString_Static_71136F3F(spaces) {
|
|
108
|
+
return (c) => {
|
|
109
|
+
const value = Comment_ROCrate_encoder(c);
|
|
110
|
+
return toString(defaultSpaces(spaces), value);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function ARCtrl_Comment__Comment_toISAJsonString_Static_71136F3F(spaces) {
|
|
115
|
+
return (c) => {
|
|
116
|
+
const value = Comment_ISAJson_encoder(c);
|
|
117
|
+
return toString(defaultSpaces(spaces), value);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function ARCtrl_Comment__Comment_fromISAJsonString_Static_Z721C83C5(s) {
|
|
122
|
+
const matchValue = fromString(Comment_ISAJson_decoder, s);
|
|
123
|
+
if (matchValue.tag === 1) {
|
|
124
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
return matchValue.fields[0];
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Union } from "../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
2
|
+
import { union_type } from "../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
3
|
+
|
|
4
|
+
export class ConverterOptions extends Union {
|
|
5
|
+
constructor(tag, fields) {
|
|
6
|
+
super();
|
|
7
|
+
this.tag = tag;
|
|
8
|
+
this.fields = fields;
|
|
9
|
+
}
|
|
10
|
+
cases() {
|
|
11
|
+
return ["ARCtrl", "ROCrate", "ISAJson"];
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function ConverterOptions_$reflection() {
|
|
16
|
+
return union_type("ARCtrl.Json.ConverterOptions", [], ConverterOptions, () => [[], [], []]);
|
|
17
|
+
}
|
|
18
|
+
|
package/Json/Decode.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { helpers as helpers_1 } 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.16.0/Result.js";
|
|
4
|
+
import { printf, toText } from "../fable_modules/fable-library-js.4.16.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.16.0/Seq.js";
|
|
7
|
+
import { ofSeq, contains } from "../fable_modules/fable-library-js.4.16.0/Set.js";
|
|
8
|
+
import { int32ToString, comparePrimitives } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
9
|
+
import { head, length, isEmpty } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
10
|
+
import { fold } from "../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
11
|
+
import { tryParse, minValue } from "../fable_modules/fable-library-js.4.16.0/Date.js";
|
|
12
|
+
import { FSharpRef } from "../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
13
|
+
|
|
14
|
+
export function Helpers_prependPath(path, err_, err__1) {
|
|
15
|
+
const err = [err_, err__1];
|
|
16
|
+
return [path + err[0], err[1]];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const Decode_helpers = helpers_1;
|
|
20
|
+
|
|
21
|
+
export function Decode_isURI(s) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const Decode_uri = {
|
|
26
|
+
Decode(s, json) {
|
|
27
|
+
const matchValue = string.Decode(s, json);
|
|
28
|
+
if (matchValue.tag === 1) {
|
|
29
|
+
return new FSharpResult$2(1, [matchValue.fields[0]]);
|
|
30
|
+
}
|
|
31
|
+
else if (Decode_isURI(matchValue.fields[0])) {
|
|
32
|
+
return new FSharpResult$2(0, [matchValue.fields[0]]);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
const s_3 = matchValue.fields[0];
|
|
36
|
+
return new FSharpResult$2(1, [[s_3, new ErrorReason$1(6, [toText(printf("Expected URI, got %s"))(s_3)])]]);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export function Decode_hasUnknownFields(helpers, knownFields, json) {
|
|
42
|
+
return exists((x) => !contains(x, knownFields), helpers.getProperties(json));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function Decode_objectNoAdditionalProperties(allowedProperties, builder) {
|
|
46
|
+
const allowedProperties_1 = ofSeq(allowedProperties, {
|
|
47
|
+
Compare: comparePrimitives,
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
Decode(helpers, value) {
|
|
51
|
+
const getters = Getters$2_$ctor_Z4BE6C149(helpers, value);
|
|
52
|
+
if (Decode_hasUnknownFields(helpers, allowedProperties_1, value)) {
|
|
53
|
+
return new FSharpResult$2(1, [["Unknown fields in object", new ErrorReason$1(0, ["", value])]]);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const result = builder(getters);
|
|
57
|
+
const matchValue = Getters$2__get_Errors(getters);
|
|
58
|
+
if (!isEmpty(matchValue)) {
|
|
59
|
+
const errors = matchValue;
|
|
60
|
+
return (length(errors) > 1) ? (new FSharpResult$2(1, [["", new ErrorReason$1(7, [errors])]])) : (new FSharpResult$2(1, [head(matchValue)]));
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
return new FSharpResult$2(0, [result]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function Decode_noAdditionalProperties(allowedProperties, decoder) {
|
|
71
|
+
const allowedProperties_1 = ofSeq(allowedProperties, {
|
|
72
|
+
Compare: comparePrimitives,
|
|
73
|
+
});
|
|
74
|
+
return {
|
|
75
|
+
Decode(helpers, value) {
|
|
76
|
+
const getters = Getters$2_$ctor_Z4BE6C149(helpers, value);
|
|
77
|
+
return Decode_hasUnknownFields(helpers, allowedProperties_1, value) ? (new FSharpResult$2(1, [["Unknown fields in object", new ErrorReason$1(0, ["", value])]])) : decoder.Decode(helpers, value);
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function Decode_resizeArray(decoder) {
|
|
83
|
+
return {
|
|
84
|
+
Decode(helpers, value) {
|
|
85
|
+
if (helpers.isArray(value)) {
|
|
86
|
+
let i = -1;
|
|
87
|
+
return fold((acc, value_1) => {
|
|
88
|
+
let tupledArg;
|
|
89
|
+
i = ((i + 1) | 0);
|
|
90
|
+
if (acc.tag === 0) {
|
|
91
|
+
const acc_1 = acc.fields[0];
|
|
92
|
+
const matchValue = decoder.Decode(helpers, value_1);
|
|
93
|
+
if (matchValue.tag === 0) {
|
|
94
|
+
void (acc_1.push(matchValue.fields[0]));
|
|
95
|
+
return new FSharpResult$2(0, [acc_1]);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
return new FSharpResult$2(1, [(tupledArg = matchValue.fields[0], Helpers_prependPath((".[" + int32ToString(i)) + "]", tupledArg[0], tupledArg[1]))]);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return acc;
|
|
103
|
+
}
|
|
104
|
+
}, new FSharpResult$2(0, [[]]), helpers.asArray(value));
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return new FSharpResult$2(1, [["", new ErrorReason$1(0, ["an array", value])]]);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export const Decode_datetime = {
|
|
114
|
+
Decode(helpers, value) {
|
|
115
|
+
if (helpers.isString(value)) {
|
|
116
|
+
let matchValue;
|
|
117
|
+
let outArg = minValue();
|
|
118
|
+
matchValue = [tryParse(helpers.asString(value), new FSharpRef(() => outArg, (v) => {
|
|
119
|
+
outArg = v;
|
|
120
|
+
})), outArg];
|
|
121
|
+
return matchValue[0] ? (new FSharpResult$2(0, [matchValue[1]])) : (new FSharpResult$2(1, [["", new ErrorReason$1(0, ["a datetime", value])]]));
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
return new FSharpResult$2(1, [["", new ErrorReason$1(0, ["a datetime", value])]]);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
package/Json/Encode.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defaultArg, value as value_2 } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
2
|
+
import { Json } from "../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
3
|
+
import { map, isEmpty } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
4
|
+
import { list as list_1, seq } from "../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
5
|
+
import { item, map as map_1 } from "../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
6
|
+
import { map as map_2, isEmpty as isEmpty_1 } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
7
|
+
import { toString } from "../fable_modules/fable-library-js.4.16.0/Date.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Try to encode the given object using the given encoder, or return Encode.nil if the object is null
|
|
11
|
+
*/
|
|
12
|
+
export function tryInclude(name, encoder, value) {
|
|
13
|
+
return [name, (value != null) ? encoder(value_2(value)) : (new Json(3, []))];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Try to encode the given object using the given encoder, or return Encode.nil if the object is null
|
|
18
|
+
*/
|
|
19
|
+
export function tryIncludeSeq(name, encoder, value) {
|
|
20
|
+
return [name, isEmpty(value) ? (new Json(3, [])) : seq(map(encoder, value))];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function tryIncludeArray(name, encoder, value) {
|
|
24
|
+
return [name, (value.length === 0) ? (new Json(3, [])) : (new Json(6, [map_1(encoder, value)]))];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function tryIncludeList(name, encoder, value) {
|
|
28
|
+
return [name, isEmpty_1(value) ? (new Json(3, [])) : list_1(map_2(encoder, value))];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function tryIncludeListOpt(name, encoder, value) {
|
|
32
|
+
let o;
|
|
33
|
+
return [name, (value != null) ? ((o = value, isEmpty_1(o) ? (new Json(3, [])) : list_1(map_2(encoder, o)))) : (new Json(3, []))];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const DefaultSpaces = 0;
|
|
37
|
+
|
|
38
|
+
export function defaultSpaces(spaces) {
|
|
39
|
+
return defaultArg(spaces, DefaultSpaces);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function dateTime(d) {
|
|
43
|
+
return new Json(0, [item(0, toString(d, "O", {}).split("+"))]);
|
|
44
|
+
}
|
|
45
|
+
|