@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
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { toArray, collect, empty, map, singleton, append, delay, toList } from "
|
|
2
|
-
import { ErrorReason$1, Json } from "
|
|
3
|
-
import { tuple2, map as map_1, list } from "
|
|
1
|
+
import { toArray, collect, empty, map, singleton, append, delay, toList } from "../../fable_modules/fable-library-js.4.16.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";
|
|
4
4
|
import { CompositeHeader_decoder, CompositeHeader_encoder } from "./CompositeHeader.js";
|
|
5
5
|
import { CompositeCell_decoder, CompositeCell_encoder } from "./CompositeCell.js";
|
|
6
|
-
import { empty as empty_2, ofSeq } from "
|
|
7
|
-
import { safeHash, int32ToString, equals, arrayHash, equalArrays, compareArrays } from "
|
|
8
|
-
import { Helpers_prependPath, array as array_1, string, int, tuple2 as tuple2_1, map$0027, list as list_1, object } from "
|
|
9
|
-
import { defaultArg } from "
|
|
10
|
-
import { empty as empty_1 } from "
|
|
11
|
-
import { Dictionary } from "
|
|
12
|
-
import { ArcTable } from "../../
|
|
13
|
-
import {
|
|
14
|
-
import { addToDict, getItemFromDict } from "
|
|
15
|
-
import { rangeDouble } from "
|
|
16
|
-
import { FSharpResult$2 } from "
|
|
17
|
-
import { fill, setItem, fold, iterateIndexed } from "
|
|
18
|
-
import {
|
|
19
|
-
import { fromString } from "
|
|
20
|
-
import { printf, toText } from "
|
|
21
|
-
import { toString } from "
|
|
22
|
-
import {
|
|
6
|
+
import { empty as empty_2, ofSeq } from "../../fable_modules/fable-library-js.4.16.0/Map.js";
|
|
7
|
+
import { safeHash, int32ToString, equals, arrayHash, equalArrays, compareArrays } from "../../fable_modules/fable-library-js.4.16.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 { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
|
+
import { empty as empty_1 } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
11
|
+
import { Dictionary } from "../../fable_modules/fable-library-js.4.16.0/MutableMap.js";
|
|
12
|
+
import { ArcTable } from "../../Core/Table/ArcTable.js";
|
|
13
|
+
import { arrayFromMap, encoder, decoder as decoder_4, decodeCell, encodeCell } from "./CellTable.js";
|
|
14
|
+
import { addToDict, getItemFromDict } from "../../fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
15
|
+
import { rangeDouble } from "../../fable_modules/fable-library-js.4.16.0/Range.js";
|
|
16
|
+
import { FSharpResult$2 } from "../../fable_modules/fable-library-js.4.16.0/Result.js";
|
|
17
|
+
import { fill, setItem, fold, iterateIndexed } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
18
|
+
import { arrayFromMap as arrayFromMap_2, encoder as encoder_2, decoder as decoder_2, decodeString, 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.16.0/String.js";
|
|
21
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
22
|
+
import { defaultSpaces } from "../Encode.js";
|
|
23
|
+
import { arrayFromMap as arrayFromMap_1, encoder as encoder_1, decoder as decoder_3 } from "./OATable.js";
|
|
23
24
|
|
|
24
25
|
export function ArcTable_encoder(table) {
|
|
25
26
|
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) => {
|
|
@@ -44,9 +45,9 @@ export const ArcTable_decoder = object((get$) => {
|
|
|
44
45
|
return ArcTable.create((objectArg_2 = get$.Required, objectArg_2.Field("name", string)), decodedHeader, decodedValues);
|
|
45
46
|
});
|
|
46
47
|
|
|
47
|
-
export function
|
|
48
|
+
export function ArcTable_encoderCompressedColumn(columnIndex, rowCount, cellTable, table) {
|
|
48
49
|
if (table.Headers[columnIndex].IsIOType ? true : (rowCount < 100)) {
|
|
49
|
-
return new Json(6, [toArray(delay(() => map((r) =>
|
|
50
|
+
return new Json(6, [toArray(delay(() => map((r) => encodeCell(cellTable, getItemFromDict(table.Values, [columnIndex, r])), rangeDouble(0, 1, rowCount - 1))))]);
|
|
50
51
|
}
|
|
51
52
|
else {
|
|
52
53
|
let current = getItemFromDict(table.Values, [columnIndex, 0]);
|
|
@@ -54,22 +55,22 @@ export function ArcTable_compressedColumnEncoder(columnIndex, rowCount, cellTabl
|
|
|
54
55
|
return new Json(6, [toArray(delay(() => append(collect((i) => {
|
|
55
56
|
let value, value_1;
|
|
56
57
|
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",
|
|
58
|
+
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", encodeCell(cellTable, current)]]])), delay(() => {
|
|
58
59
|
current = next;
|
|
59
60
|
from = (i | 0);
|
|
60
61
|
return empty();
|
|
61
62
|
})) : empty();
|
|
62
63
|
}, rangeDouble(1, 1, rowCount - 1)), delay(() => {
|
|
63
64
|
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",
|
|
65
|
+
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", encodeCell(cellTable, current)]]]));
|
|
65
66
|
}))))]);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
export function
|
|
70
|
+
export function ArcTable_decoderCompressedColumn(cellTable, table, columnIndex) {
|
|
70
71
|
return {
|
|
71
72
|
Decode(helper, column) {
|
|
72
|
-
const matchValue = array_1(
|
|
73
|
+
const matchValue = array_1(decodeCell(cellTable)).Decode(helper, column);
|
|
73
74
|
if (matchValue.tag === 1) {
|
|
74
75
|
const rangeDecoder = object((get$) => {
|
|
75
76
|
let from;
|
|
@@ -79,7 +80,7 @@ export function ArcTable_compressedColumnDecoder(cellTable, table, columnIndex)
|
|
|
79
80
|
const objectArg_1 = get$.Required;
|
|
80
81
|
to_ = objectArg_1.Field("t", int);
|
|
81
82
|
let value;
|
|
82
|
-
const arg_5 =
|
|
83
|
+
const arg_5 = decodeCell(cellTable);
|
|
83
84
|
const objectArg_2 = get$.Required;
|
|
84
85
|
value = objectArg_2.Field("v", arg_5);
|
|
85
86
|
for (let i = from; i <= to_; i++) {
|
|
@@ -131,11 +132,11 @@ export function ArcTable_arrayi(decoderi) {
|
|
|
131
132
|
};
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
export function
|
|
135
|
-
return new Json(5, [toList(delay(() => append(singleton(["n",
|
|
135
|
+
export function ArcTable_encoderCompressed(stringTable, oaTable, cellTable, table) {
|
|
136
|
+
return new Json(5, [toList(delay(() => append(singleton(["n", encodeString(stringTable, table.Name)]), delay(() => append((table.Headers.length !== 0) ? singleton(["h", list(toList(delay(() => map(CompositeHeader_encoder, table.Headers))))]) : empty(), delay(() => {
|
|
136
137
|
if (table.Values.size !== 0) {
|
|
137
138
|
const rowCount = table.RowCount | 0;
|
|
138
|
-
return singleton(["c", new Json(6, [toArray(delay(() => map((c) =>
|
|
139
|
+
return singleton(["c", new Json(6, [toArray(delay(() => map((c) => ArcTable_encoderCompressedColumn(c, rowCount, cellTable, table), rangeDouble(0, 1, table.ColumnCount - 1))))])]);
|
|
139
140
|
}
|
|
140
141
|
else {
|
|
141
142
|
return empty();
|
|
@@ -143,23 +144,23 @@ export function ArcTable_compressedEncoder(stringTable, oaTable, cellTable, tabl
|
|
|
143
144
|
}))))))]);
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
export function
|
|
147
|
+
export function ArcTable_decoderCompressed(stringTable, oaTable, cellTable) {
|
|
147
148
|
return object((get$) => {
|
|
148
149
|
let arg_1, objectArg, arg_3, objectArg_1, arg_5, objectArg_2;
|
|
149
150
|
let decodedHeader;
|
|
150
151
|
const collection = defaultArg((arg_1 = list_1(CompositeHeader_decoder), (objectArg = get$.Optional, objectArg.Field("h", arg_1))), empty_1());
|
|
151
152
|
decodedHeader = Array.from(collection);
|
|
152
|
-
const table = ArcTable.create((arg_3 =
|
|
153
|
+
const table = ArcTable.create((arg_3 = decodeString(stringTable), (objectArg_1 = get$.Required, objectArg_1.Field("n", arg_3))), decodedHeader, new Dictionary([], {
|
|
153
154
|
Equals: equalArrays,
|
|
154
155
|
GetHashCode: arrayHash,
|
|
155
156
|
}));
|
|
156
|
-
(arg_5 = ArcTable_arrayi((columnIndex) =>
|
|
157
|
+
(arg_5 = ArcTable_arrayi((columnIndex) => ArcTable_decoderCompressedColumn(cellTable, table, columnIndex)), (objectArg_2 = get$.Optional, objectArg_2.Field("c", arg_5)));
|
|
157
158
|
return table;
|
|
158
159
|
});
|
|
159
160
|
}
|
|
160
161
|
|
|
161
|
-
export function
|
|
162
|
-
const matchValue = fromString(ArcTable_decoder,
|
|
162
|
+
export function ARCtrl_ArcTable__ArcTable_fromJsonString_Static_Z721C83C5(s) {
|
|
163
|
+
const matchValue = fromString(ArcTable_decoder, s);
|
|
163
164
|
if (matchValue.tag === 1) {
|
|
164
165
|
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
165
166
|
}
|
|
@@ -168,25 +169,28 @@ export function ARCtrl_ISA_ArcTable__ArcTable_fromJsonString_Static_Z721C83C5(js
|
|
|
168
169
|
}
|
|
169
170
|
}
|
|
170
171
|
|
|
171
|
-
export function
|
|
172
|
-
return
|
|
172
|
+
export function ARCtrl_ArcTable__ArcTable_toJsonString_Static_71136F3F(spaces) {
|
|
173
|
+
return (obj) => {
|
|
174
|
+
const value = ArcTable_encoder(obj);
|
|
175
|
+
return toString(defaultSpaces(spaces), value);
|
|
176
|
+
};
|
|
173
177
|
}
|
|
174
178
|
|
|
175
|
-
export function
|
|
176
|
-
return
|
|
179
|
+
export function ARCtrl_ArcTable__ArcTable_ToJsonString_71136F3F(this$, spaces) {
|
|
180
|
+
return ARCtrl_ArcTable__ArcTable_toJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
177
181
|
}
|
|
178
182
|
|
|
179
|
-
export function
|
|
183
|
+
export function ARCtrl_ArcTable__ArcTable_fromCompressedJsonString_Static_Z721C83C5(jsonString) {
|
|
180
184
|
const matchValue = fromString(object((get$) => {
|
|
181
185
|
let arg_5, objectArg_2;
|
|
182
186
|
let stringTable;
|
|
183
187
|
const objectArg = get$.Required;
|
|
184
|
-
stringTable = objectArg.Field("stringTable",
|
|
188
|
+
stringTable = objectArg.Field("stringTable", decoder_2);
|
|
185
189
|
let oaTable;
|
|
186
|
-
const arg_3 =
|
|
190
|
+
const arg_3 = decoder_3(stringTable);
|
|
187
191
|
const objectArg_1 = get$.Required;
|
|
188
192
|
oaTable = objectArg_1.Field("oaTable", arg_3);
|
|
189
|
-
const arg_7 =
|
|
193
|
+
const arg_7 = ArcTable_decoderCompressed(stringTable, oaTable, (arg_5 = decoder_4(stringTable, oaTable), (objectArg_2 = get$.Required, objectArg_2.Field("cellTable", arg_5))));
|
|
190
194
|
const objectArg_3 = get$.Required;
|
|
191
195
|
return objectArg_3.Field("table", arg_7);
|
|
192
196
|
}), jsonString);
|
|
@@ -198,8 +202,8 @@ export function ARCtrl_ISA_ArcTable__ArcTable_fromCompressedJsonString_Static_Z7
|
|
|
198
202
|
}
|
|
199
203
|
}
|
|
200
204
|
|
|
201
|
-
export function
|
|
202
|
-
const spaces_1 =
|
|
205
|
+
export function ARCtrl_ArcTable__ArcTable_ToCompressedJsonString_71136F3F(this$, spaces) {
|
|
206
|
+
const spaces_1 = defaultSpaces(spaces) | 0;
|
|
203
207
|
const stringTable = new Map([]);
|
|
204
208
|
const oaTable = new Dictionary([], {
|
|
205
209
|
Equals: equals,
|
|
@@ -209,11 +213,11 @@ export function ARCtrl_ISA_ArcTable__ArcTable_ToCompressedJsonString_71136F3F(th
|
|
|
209
213
|
Equals: equals,
|
|
210
214
|
GetHashCode: safeHash,
|
|
211
215
|
});
|
|
212
|
-
const arcTable =
|
|
213
|
-
return toString(spaces_1, new Json(5, [[["cellTable",
|
|
216
|
+
const arcTable = ArcTable_encoderCompressed(stringTable, oaTable, cellTable, this$);
|
|
217
|
+
return toString(spaces_1, new Json(5, [[["cellTable", encoder(stringTable, oaTable, arrayFromMap(cellTable))], ["oaTable", encoder_1(stringTable, arrayFromMap_1(oaTable))], ["stringTable", encoder_2(arrayFromMap_2(stringTable))], ["table", arcTable]]]));
|
|
214
218
|
}
|
|
215
219
|
|
|
216
|
-
export function
|
|
217
|
-
return
|
|
220
|
+
export function ARCtrl_ArcTable__ArcTable_toCompressedJsonString_Static_71136F3F(spaces) {
|
|
221
|
+
return (obj) => ARCtrl_ArcTable__ArcTable_ToCompressedJsonString_71136F3F(obj, unwrap(spaces));
|
|
218
222
|
}
|
|
219
223
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { sortBy, map, toArray } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
2
|
+
import { comparePrimitives } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
|
+
import { item, map as map_1 } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
4
|
+
import { CompositeCell_decoderCompressed, CompositeCell_encoderCompressed } 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 { Dictionary_tryFind } from "../../Core/Helper/Collections.js";
|
|
8
|
+
import { addToDict } from "../../fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
9
|
+
|
|
10
|
+
export function 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 encoder(stringTable, oaTable, ot) {
|
|
17
|
+
return new Json(6, [map_1((cc) => CompositeCell_encoderCompressed(stringTable, oaTable, cc), ot)]);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function decoder(stringTable, oaTable) {
|
|
21
|
+
return array_1(CompositeCell_decoderCompressed(stringTable, oaTable));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function encodeCell(otm, cc) {
|
|
25
|
+
const matchValue = Dictionary_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 decodeCell(ot) {
|
|
38
|
+
return object((get$) => item(get$.Required.Raw(int), ot));
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../OntologyAnnotation.js";
|
|
2
|
+
import { ofArray, singleton } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
3
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
4
|
+
import { list } from "../../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
5
|
+
import { index, string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
6
|
+
import { CompositeCell } from "../../Core/Table/CompositeCell.js";
|
|
7
|
+
import { toText, printf, toFail } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
8
|
+
import { decodeOA, encodeOA } from "./OATable.js";
|
|
9
|
+
import { decodeString, encodeString } from "../StringTable.js";
|
|
10
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
11
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
12
|
+
import { defaultSpaces } from "../Encode.js";
|
|
13
|
+
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
14
|
+
|
|
15
|
+
export function CompositeCell_encoder(cc) {
|
|
16
|
+
const oaToJsonString = OntologyAnnotation_encoder;
|
|
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])]]]);
|
|
19
|
+
}
|
|
20
|
+
|
|
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;
|
|
23
|
+
let matchValue;
|
|
24
|
+
const objectArg = get$.Required;
|
|
25
|
+
matchValue = objectArg.Field("celltype", string);
|
|
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), (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), (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_encoderCompressed(stringTable, oaTable, cc) {
|
|
30
|
+
const patternInput = (cc.tag === 0) ? ["Term", singleton(encodeOA(oaTable, cc.fields[0]))] : ((cc.tag === 2) ? ["Unitized", ofArray([encodeString(stringTable, cc.fields[0]), encodeOA(oaTable, cc.fields[1])])] : ["FreeText", singleton(encodeString(stringTable, cc.fields[0]))]);
|
|
31
|
+
return new Json(5, [[["t", encodeString(stringTable, patternInput[0])], ["v", list(patternInput[1])]]]);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function CompositeCell_decoderCompressed(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 = 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, decodeString(stringTable)), (objectArg_1 = get$.Required, objectArg_1.Field("v", arg_3)))])) : ((matchValue === "Term") ? (new CompositeCell(0, [(arg_5 = index(0, decodeOA(oaTable)), (objectArg_2 = get$.Required, objectArg_2.Field("v", arg_5)))])) : ((matchValue === "Unitized") ? (new CompositeCell(2, [(arg_7 = index(0, decodeString(stringTable)), (objectArg_3 = get$.Required, objectArg_3.Field("v", arg_7))), (arg_9 = index(1, decodeOA(oaTable)), (objectArg_4 = get$.Required, objectArg_4.Field("v", arg_9)))])) : toFail(printf("Error reading CompositeCell from json string: %A"))(matchValue)));
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ARCtrl_CompositeCell__CompositeCell_fromJsonString_Static_Z721C83C5(s) {
|
|
46
|
+
const matchValue = fromString(CompositeCell_decoder, s);
|
|
47
|
+
if (matchValue.tag === 1) {
|
|
48
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return matchValue.fields[0];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ARCtrl_CompositeCell__CompositeCell_toJsonString_Static_71136F3F(spaces) {
|
|
56
|
+
return (obj) => {
|
|
57
|
+
const value = CompositeCell_encoder(obj);
|
|
58
|
+
return toString(defaultSpaces(spaces), value);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function ARCtrl_CompositeCell__CompositeCell_ToJsonString_71136F3F(this$, spaces) {
|
|
63
|
+
return ARCtrl_CompositeCell__CompositeCell_toJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
64
|
+
}
|
|
65
|
+
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../
|
|
2
|
-
import {
|
|
3
|
-
import { empty, singleton } from "../../../fable_modules/fable-library-js.4.13.0/List.js";
|
|
1
|
+
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../OntologyAnnotation.js";
|
|
2
|
+
import { empty, singleton } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
3
|
import { IOType_decoder, IOType_encoder } from "./IOType.js";
|
|
5
|
-
import { Json } from "
|
|
6
|
-
import { list } from "
|
|
7
|
-
import { index, string, object } from "
|
|
8
|
-
import { CompositeHeader } from "../../
|
|
9
|
-
import { fromString } from "
|
|
10
|
-
import { printf, toText } from "
|
|
11
|
-
import { toString } from "
|
|
12
|
-
import {
|
|
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";
|
|
7
|
+
import { CompositeHeader } from "../../Core/Table/CompositeHeader.js";
|
|
8
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
9
|
+
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
10
|
+
import { toString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
11
|
+
import { defaultSpaces } from "../Encode.js";
|
|
12
|
+
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
13
13
|
|
|
14
14
|
export function CompositeHeader_encoder(ch) {
|
|
15
|
-
const oaToJsonString =
|
|
15
|
+
const oaToJsonString = OntologyAnnotation_encoder;
|
|
16
16
|
const patternInput = (ch.tag === 3) ? ["Parameter", singleton(oaToJsonString(ch.fields[0]))] : ((ch.tag === 2) ? ["Factor", singleton(oaToJsonString(ch.fields[0]))] : ((ch.tag === 1) ? ["Characteristic", singleton(oaToJsonString(ch.fields[0]))] : ((ch.tag === 0) ? ["Component", singleton(oaToJsonString(ch.fields[0]))] : ((ch.tag === 4) ? ["ProtocolType", empty()] : ((ch.tag === 8) ? ["ProtocolREF", empty()] : ((ch.tag === 5) ? ["ProtocolDescription", empty()] : ((ch.tag === 6) ? ["ProtocolUri", empty()] : ((ch.tag === 7) ? ["ProtocolVersion", empty()] : ((ch.tag === 9) ? ["Performer", empty()] : ((ch.tag === 10) ? ["Date", empty()] : ((ch.tag === 11) ? ["Input", singleton(IOType_encoder(ch.fields[0]))] : ((ch.tag === 12) ? ["Output", singleton(IOType_encoder(ch.fields[0]))] : [ch.fields[0], empty()]))))))))))));
|
|
17
17
|
return new Json(5, [[["headertype", new Json(0, [patternInput[0]])], ["values", list(patternInput[1])]]]);
|
|
18
18
|
}
|
|
@@ -22,7 +22,7 @@ export const CompositeHeader_decoder = object((get$) => {
|
|
|
22
22
|
const objectArg = get$.Required;
|
|
23
23
|
headerType = objectArg.Field("headertype", string);
|
|
24
24
|
const oa = () => {
|
|
25
|
-
const arg_3 = index(0, OntologyAnnotation_decoder
|
|
25
|
+
const arg_3 = index(0, OntologyAnnotation_decoder);
|
|
26
26
|
const objectArg_1 = get$.Required;
|
|
27
27
|
return objectArg_1.Field("values", arg_3);
|
|
28
28
|
};
|
|
@@ -34,8 +34,8 @@ export const CompositeHeader_decoder = object((get$) => {
|
|
|
34
34
|
return (headerType === "Characteristic") ? (new CompositeHeader(1, [oa()])) : ((headerType === "Parameter") ? (new CompositeHeader(3, [oa()])) : ((headerType === "Component") ? (new CompositeHeader(0, [oa()])) : ((headerType === "Factor") ? (new CompositeHeader(2, [oa()])) : ((headerType === "Input") ? (new CompositeHeader(11, [io()])) : ((headerType === "Output") ? (new CompositeHeader(12, [io()])) : ((headerType === "ProtocolType") ? (new CompositeHeader(4, [])) : ((headerType === "ProtocolREF") ? (new CompositeHeader(8, [])) : ((headerType === "ProtocolDescription") ? (new CompositeHeader(5, [])) : ((headerType === "ProtocolUri") ? (new CompositeHeader(6, [])) : ((headerType === "ProtocolVersion") ? (new CompositeHeader(7, [])) : ((headerType === "Performer") ? (new CompositeHeader(9, [])) : ((headerType === "Date") ? (new CompositeHeader(10, [])) : (new CompositeHeader(13, [headerType]))))))))))))));
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
export function
|
|
38
|
-
const matchValue = fromString(CompositeHeader_decoder,
|
|
37
|
+
export function ARCtrl_CompositeHeader__CompositeHeader_fromJsonString_Static_Z721C83C5(s) {
|
|
38
|
+
const matchValue = fromString(CompositeHeader_decoder, s);
|
|
39
39
|
if (matchValue.tag === 1) {
|
|
40
40
|
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
41
41
|
}
|
|
@@ -44,11 +44,14 @@ export function ARCtrl_ISA_CompositeHeader__CompositeHeader_fromJsonString_Stati
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export function
|
|
48
|
-
return
|
|
47
|
+
export function ARCtrl_CompositeHeader__CompositeHeader_toJsonString_Static_71136F3F(spaces) {
|
|
48
|
+
return (obj) => {
|
|
49
|
+
const value = CompositeHeader_encoder(obj);
|
|
50
|
+
return toString(defaultSpaces(spaces), value);
|
|
51
|
+
};
|
|
49
52
|
}
|
|
50
53
|
|
|
51
|
-
export function
|
|
52
|
-
return
|
|
54
|
+
export function ARCtrl_CompositeHeader__CompositeHeader_ToJsonString_71136F3F(this$, spaces) {
|
|
55
|
+
return ARCtrl_CompositeHeader__CompositeHeader_toJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
53
56
|
}
|
|
54
57
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Dictionary } from "../../fable_modules/fable-library-js.4.16.0/MutableMap.js";
|
|
2
|
+
import { safeHash, equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
|
+
import { decoder as decoder_3, arrayFromMap, encoder as encoder_1 } from "./CellTable.js";
|
|
4
|
+
import { decoder as decoder_2, arrayFromMap as arrayFromMap_1, encoder as encoder_2 } from "./OATable.js";
|
|
5
|
+
import { decoder as decoder_1, arrayFromMap as arrayFromMap_2, encoder as encoder_3 } from "../StringTable.js";
|
|
6
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
7
|
+
import { object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
8
|
+
|
|
9
|
+
export function encode(encoder, obj) {
|
|
10
|
+
const stringTable = new Map([]);
|
|
11
|
+
const oaTable = new Dictionary([], {
|
|
12
|
+
Equals: equals,
|
|
13
|
+
GetHashCode: safeHash,
|
|
14
|
+
});
|
|
15
|
+
const cellTable = new Dictionary([], {
|
|
16
|
+
Equals: equals,
|
|
17
|
+
GetHashCode: safeHash,
|
|
18
|
+
});
|
|
19
|
+
const arcStudy = encoder(stringTable, oaTable, cellTable, obj);
|
|
20
|
+
return new Json(5, [[["cellTable", encoder_1(stringTable, oaTable, arrayFromMap(cellTable))], ["oaTable", encoder_2(stringTable, arrayFromMap_1(oaTable))], ["stringTable", encoder_3(arrayFromMap_2(stringTable))], ["object", arcStudy]]]);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function decode(decoder) {
|
|
24
|
+
return object((get$) => {
|
|
25
|
+
let arg_5, objectArg_2;
|
|
26
|
+
let stringTable;
|
|
27
|
+
const objectArg = get$.Required;
|
|
28
|
+
stringTable = objectArg.Field("stringTable", decoder_1);
|
|
29
|
+
let oaTable;
|
|
30
|
+
const arg_3 = decoder_2(stringTable);
|
|
31
|
+
const objectArg_1 = get$.Required;
|
|
32
|
+
oaTable = objectArg_1.Field("oaTable", arg_3);
|
|
33
|
+
const arg_7 = decoder(stringTable, oaTable, (arg_5 = decoder_3(stringTable, oaTable), (objectArg_2 = get$.Required, objectArg_2.Field("cellTable", arg_5))));
|
|
34
|
+
const objectArg_3 = get$.Required;
|
|
35
|
+
return objectArg_3.Field("object", arg_7);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
2
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
3
|
+
import { string, succeed, andThen } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
4
|
+
import { IOType } from "../../Core/Table/CompositeHeader.js";
|
|
5
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
6
|
+
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
7
|
+
import { toString as toString_1 } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
8
|
+
import { defaultSpaces } from "../Encode.js";
|
|
9
|
+
import { unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
|
+
|
|
11
|
+
export function IOType_encoder(io) {
|
|
12
|
+
return new Json(0, [toString(io)]);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const IOType_decoder = andThen((s) => succeed(IOType.ofString(s)), string);
|
|
16
|
+
|
|
17
|
+
export function ARCtrl_IOType__IOType_fromJsonString_Static_Z721C83C5(s) {
|
|
18
|
+
const matchValue = fromString(IOType_decoder, s);
|
|
19
|
+
if (matchValue.tag === 1) {
|
|
20
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return matchValue.fields[0];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function ARCtrl_IOType__IOType_toJsonString_Static_71136F3F(spaces) {
|
|
28
|
+
return (obj) => {
|
|
29
|
+
const value = IOType_encoder(obj);
|
|
30
|
+
return toString_1(defaultSpaces(spaces), value);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function ARCtrl_IOType__IOType_ToJsonString_71136F3F(this$, spaces) {
|
|
35
|
+
return ARCtrl_IOType__IOType_toJsonString_Static_71136F3F(unwrap(spaces))(this$);
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { sortBy, map, toArray } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
2
|
+
import { comparePrimitives } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
|
+
import { item, map as map_1 } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
4
|
+
import { OntologyAnnotation_compressedDecoder, OntologyAnnotation_compressedEncoder } from "../OntologyAnnotation.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 { Dictionary_tryFind } from "../../Core/Helper/Collections.js";
|
|
8
|
+
import { addToDict } from "../../fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
9
|
+
|
|
10
|
+
export function 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 encoder(stringTable, ot) {
|
|
17
|
+
return new Json(6, [map_1((oa) => OntologyAnnotation_compressedEncoder(stringTable, oa), ot)]);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function decoder(stringTable) {
|
|
21
|
+
return array_1(OntologyAnnotation_compressedDecoder(stringTable));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function encodeOA(otm, oa) {
|
|
25
|
+
const matchValue = Dictionary_tryFind(oa, otm);
|
|
26
|
+
if (matchValue == null) {
|
|
27
|
+
const i_1 = otm.size | 0;
|
|
28
|
+
addToDict(otm, oa, 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 decodeOA(ot) {
|
|
38
|
+
return object((get$) => item(get$.Required.Raw(int), ot));
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
2
|
+
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
3
|
+
import { dict, datetimeUtc, guid, object, string, succeed, andThen } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
4
|
+
import { Template, Organisation } from "../../Core/Template.js";
|
|
5
|
+
import { ArcTable_decoderCompressed, ArcTable_encoderCompressed, ArcTable_decoder, ArcTable_encoder } from "./ArcTable.js";
|
|
6
|
+
import { defaultSpaces, dateTime, tryIncludeSeq } from "../Encode.js";
|
|
7
|
+
import { Person_decoder, Person_encoder } from "../Person.js";
|
|
8
|
+
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../OntologyAnnotation.js";
|
|
9
|
+
import { defaultArg, unwrap } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
|
+
import { Decode_datetime, Decode_resizeArray } from "../Decode.js";
|
|
11
|
+
import { toString as toString_1 } from "../../fable_modules/fable-library-js.4.16.0/Date.js";
|
|
12
|
+
import { map } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
13
|
+
import { toText, printf, toFail } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
14
|
+
import { fromString } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
15
|
+
import { toString as toString_2 } from "../../fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
16
|
+
import { encode, decode } from "./Compression.js";
|
|
17
|
+
|
|
18
|
+
export const Template_Organisation_encoder = (arg) => (new Json(0, [toString(arg)]));
|
|
19
|
+
|
|
20
|
+
export const Template_Organisation_decoder = andThen((textValue) => succeed(Organisation.ofString(textValue)), string);
|
|
21
|
+
|
|
22
|
+
export function Template_encoder(template) {
|
|
23
|
+
let copyOfStruct;
|
|
24
|
+
return new Json(5, [[["id", new Json(0, [(copyOfStruct = template.Id, copyOfStruct)])], ["table", ArcTable_encoder(template.Table)], ["name", new Json(0, [template.Name])], ["description", new Json(0, [template.Description])], ["organisation", Template_Organisation_encoder(template.Organisation)], ["version", new Json(0, [template.Version])], tryIncludeSeq("authors", Person_encoder, template.Authors), tryIncludeSeq("endpoint_repositories", OntologyAnnotation_encoder, template.EndpointRepositories), tryIncludeSeq("tags", OntologyAnnotation_encoder, template.Tags), ["last_updated", dateTime(template.LastUpdated)]]]);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const Template_decoder = object((get$) => {
|
|
28
|
+
let objectArg, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8, objectArg_9;
|
|
29
|
+
return Template.create((objectArg = get$.Required, objectArg.Field("id", guid)), (objectArg_1 = get$.Required, objectArg_1.Field("table", ArcTable_decoder)), (objectArg_2 = get$.Required, objectArg_2.Field("name", string)), (objectArg_3 = get$.Required, objectArg_3.Field("description", string)), (objectArg_4 = get$.Required, objectArg_4.Field("organisation", Template_Organisation_decoder)), (objectArg_5 = get$.Required, objectArg_5.Field("version", string)), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("authors", arg_13)))), unwrap((arg_15 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("endpoint_repositories", arg_15)))), unwrap((arg_17 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_8 = get$.Optional, objectArg_8.Field("tags", arg_17)))), (objectArg_9 = get$.Required, objectArg_9.Field("last_updated", Decode_datetime)));
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export function Template_encoderCompressed(stringTable, oaTable, cellTable, template) {
|
|
33
|
+
let copyOfStruct;
|
|
34
|
+
return new Json(5, [[["id", new Json(0, [(copyOfStruct = template.Id, copyOfStruct)])], ["table", ArcTable_encoderCompressed(stringTable, oaTable, cellTable, template.Table)], ["name", new Json(0, [template.Name])], ["description", new Json(0, [template.Description])], ["organisation", Template_Organisation_encoder(template.Organisation)], ["version", new Json(0, [template.Version])], tryIncludeSeq("authors", Person_encoder, template.Authors), tryIncludeSeq("endpoint_repositories", OntologyAnnotation_encoder, template.EndpointRepositories), tryIncludeSeq("tags", OntologyAnnotation_encoder, template.Tags), ["last_updated", new Json(0, [toString_1(template.LastUpdated, "O", {})])]]]);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function Template_decoderCompressed(stringTable, oaTable, cellTable) {
|
|
38
|
+
return object((get$) => {
|
|
39
|
+
let objectArg, arg_3, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, arg_13, objectArg_6, arg_15, objectArg_7, arg_17, objectArg_8, objectArg_9;
|
|
40
|
+
return Template.create((objectArg = get$.Required, objectArg.Field("id", guid)), (arg_3 = ArcTable_decoderCompressed(stringTable, oaTable, cellTable), (objectArg_1 = get$.Required, objectArg_1.Field("table", arg_3))), (objectArg_2 = get$.Required, objectArg_2.Field("name", string)), (objectArg_3 = get$.Required, objectArg_3.Field("description", string)), (objectArg_4 = get$.Required, objectArg_4.Field("organisation", Template_Organisation_decoder)), (objectArg_5 = get$.Required, objectArg_5.Field("version", string)), unwrap((arg_13 = Decode_resizeArray(Person_decoder), (objectArg_6 = get$.Optional, objectArg_6.Field("authors", arg_13)))), unwrap((arg_15 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_7 = get$.Optional, objectArg_7.Field("endpoint_repositories", arg_15)))), unwrap((arg_17 = Decode_resizeArray(OntologyAnnotation_decoder), (objectArg_8 = get$.Optional, objectArg_8.Field("tags", arg_17)))), (objectArg_9 = get$.Required, objectArg_9.Field("last_updated", datetimeUtc)));
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function Templates_encoder(templates) {
|
|
45
|
+
return new Json(6, [map(Template_encoder, templates)]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const Templates_decoder = dict(Template_decoder);
|
|
49
|
+
|
|
50
|
+
export function Templates_fromJsonString(jsonString) {
|
|
51
|
+
try {
|
|
52
|
+
const matchValue = fromString(Templates_decoder, jsonString);
|
|
53
|
+
if (matchValue.tag === 1) {
|
|
54
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return matchValue.fields[0];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (exn) {
|
|
61
|
+
return toFail(printf("Error. Given json string cannot be parsed to Templates map: %A"))(exn);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function Templates_toJsonString(spaces, templates) {
|
|
66
|
+
return toString_2(spaces, Templates_encoder(templates));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ARCtrl_Template__Template_fromJsonString_Static_Z721C83C5(jsonString) {
|
|
70
|
+
try {
|
|
71
|
+
const matchValue = fromString(Template_decoder, jsonString);
|
|
72
|
+
if (matchValue.tag === 1) {
|
|
73
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
return matchValue.fields[0];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch (exn) {
|
|
80
|
+
return toFail(printf("Error. Given json string cannot be parsed to Template: %A"))(exn);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function ARCtrl_Template__Template_toJsonString_Static_71136F3F(spaces) {
|
|
85
|
+
return (template) => toString_2(defaultSpaces(spaces), Template_encoder(template));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function ARCtrl_Template__Template_fromCompressedJsonString_Static_Z721C83C5(s) {
|
|
89
|
+
try {
|
|
90
|
+
const matchValue = fromString(decode(Template_decoderCompressed), s);
|
|
91
|
+
if (matchValue.tag === 1) {
|
|
92
|
+
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return matchValue.fields[0];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
catch (e_1) {
|
|
99
|
+
const arg_1 = e_1.message;
|
|
100
|
+
return toFail(printf("Error. Unable to parse json string to ArcStudy: %s"))(arg_1);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ARCtrl_Template__Template_toCompressedJsonString_Static_71136F3F(spaces) {
|
|
105
|
+
return (obj) => toString_2(defaultArg(spaces, 0), encode(Template_encoderCompressed, obj));
|
|
106
|
+
}
|
|
107
|
+
|