@nfdi4plants/arctrl 3.0.0-beta.3 → 3.0.0-beta.4
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/README.md +2 -0
- package/dist/ts/index.js +63 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +354 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +28 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/AsyncBuilder.js +186 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +8 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Boolean.js +24 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +73 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +31 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +574 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +59 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +65 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +30 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +5 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +5 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +48 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +120 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +680 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +40 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +655 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +105 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +320 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +204 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Native.js +10 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Numeric.js +73 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +65 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +23 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +111 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +114 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +36 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +846 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +65 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +1160 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +364 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +40 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +193 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Unicode.13.0.0.js +6 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Uri.js +160 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +367 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +825 -0
- package/dist/ts/ts/ARC.js +914 -0
- package/dist/ts/ts/Contract/ARC.js +52 -0
- package/dist/ts/ts/Contract/ArcAssay.js +80 -0
- package/dist/ts/ts/Contract/ArcInvestigation.js +57 -0
- package/dist/ts/ts/Contract/ArcRun.js +76 -0
- package/dist/ts/ts/Contract/ArcStudy.js +76 -0
- package/dist/ts/ts/Contract/ArcWorkflow.js +77 -0
- package/dist/ts/ts/Contract/Contract.js +45 -0
- package/dist/ts/ts/Contract/Datamap.js +221 -0
- package/dist/ts/ts/Contract/Git.js +57 -0
- package/dist/ts/ts/Contract/ValidationPackagesConfig.js +57 -0
- package/dist/ts/ts/ContractIO/ContractIO.js +202 -0
- package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts +1 -1
- package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts.map +1 -1
- package/dist/ts/ts/ContractIO/FileSystemHelper.js +273 -0
- package/dist/ts/ts/Conversion.js +1247 -0
- package/dist/ts/ts/Core/ArcTypes.js +3393 -0
- package/dist/ts/ts/Core/Comment.js +91 -0
- package/dist/ts/ts/Core/CommentList.js +27 -0
- package/dist/ts/ts/Core/Conversion.js +923 -0
- package/dist/ts/ts/Core/Data.js +179 -0
- package/dist/ts/ts/Core/DataContext.js +108 -0
- package/dist/ts/ts/Core/DataFile.js +50 -0
- package/dist/ts/ts/Core/DataMap.js +53 -0
- package/dist/ts/ts/Core/Helper/Collections.js +323 -0
- package/dist/ts/ts/Core/Helper/HashCodes.js +35 -0
- package/dist/ts/ts/Core/Helper/Identifier.js +96 -0
- package/dist/ts/ts/Core/Helper/ORCID.js +34 -0
- package/dist/ts/ts/Core/Helper/Regex.js +296 -0
- package/dist/ts/ts/Core/Helper/SemVer.js +31 -0
- package/dist/ts/ts/Core/Helper/Url.js +32 -0
- package/dist/ts/ts/Core/IdentifierSetters.js +9 -0
- package/dist/ts/ts/Core/OntologyAnnotation.js +207 -0
- package/dist/ts/ts/Core/OntologySourceReference.js +84 -0
- package/dist/ts/ts/Core/Person.js +183 -0
- package/dist/ts/ts/Core/Process/ColumnIndex.js +73 -0
- package/dist/ts/ts/Core/Process/Component.js +121 -0
- package/dist/ts/ts/Core/Process/Factor.js +104 -0
- package/dist/ts/ts/Core/Process/FactorValue.js +68 -0
- package/dist/ts/ts/Core/Process/Material.js +49 -0
- package/dist/ts/ts/Core/Process/MaterialAttribute.js +30 -0
- package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +68 -0
- package/dist/ts/ts/Core/Process/MaterialType.js +28 -0
- package/dist/ts/ts/Core/Process/Process.js +136 -0
- package/dist/ts/ts/Core/Process/ProcessInput.js +207 -0
- package/dist/ts/ts/Core/Process/ProcessOutput.js +178 -0
- package/dist/ts/ts/Core/Process/ProcessParameterValue.js +135 -0
- package/dist/ts/ts/Core/Process/ProcessSequence.js +56 -0
- package/dist/ts/ts/Core/Process/Protocol.js +54 -0
- package/dist/ts/ts/Core/Process/ProtocolParameter.js +69 -0
- package/dist/ts/ts/Core/Process/Sample.js +44 -0
- package/dist/ts/ts/Core/Process/Source.js +38 -0
- package/dist/ts/ts/Core/Publication.js +108 -0
- package/dist/ts/ts/Core/Table/ArcTable.js +889 -0
- package/dist/ts/ts/Core/Table/ArcTableAux.js +993 -0
- package/dist/ts/ts/Core/Table/ArcTables.js +415 -0
- package/dist/ts/ts/Core/Table/CompositeCell.js +334 -0
- package/dist/ts/ts/Core/Table/CompositeColumn.js +52 -0
- package/dist/ts/ts/Core/Table/CompositeHeader.js +792 -0
- package/dist/ts/ts/Core/Template.js +180 -0
- package/dist/ts/ts/Core/Templates.js +75 -0
- package/dist/ts/ts/Core/URI.js +8 -0
- package/dist/ts/ts/Core/Value.js +194 -0
- package/dist/ts/ts/CrossAsync.js +20 -0
- package/dist/ts/ts/FileSystem/DefaultGitattributes.js +3 -0
- package/dist/ts/ts/FileSystem/DefaultGitignore.js +3 -0
- package/dist/ts/ts/FileSystem/FileSystem.js +48 -0
- package/dist/ts/ts/FileSystem/FileSystemTree.js +339 -0
- package/dist/ts/ts/FileSystem/Path.js +36 -0
- package/dist/ts/ts/Json/Assay.d.ts +1 -1
- package/dist/ts/ts/Json/Assay.js +221 -0
- package/dist/ts/ts/Json/Comment.d.ts +1 -1
- package/dist/ts/ts/Json/Comment.js +112 -0
- package/dist/ts/ts/Json/Data.d.ts +1 -1
- package/dist/ts/ts/Json/Data.js +138 -0
- package/dist/ts/ts/Json/DataFile.d.ts +1 -1
- package/dist/ts/ts/Json/DataFile.js +55 -0
- package/dist/ts/ts/Json/DataMap/DataContext.d.ts +1 -1
- package/dist/ts/ts/Json/DataMap/DataContext.js +39 -0
- package/dist/ts/ts/Json/DataMap/DataMap.d.ts +1 -1
- package/dist/ts/ts/Json/DataMap/DataMap.js +27 -0
- package/dist/ts/ts/Json/Decode.d.ts +2 -2
- package/dist/ts/ts/Json/Decode.js +209 -0
- package/dist/ts/ts/Json/Encode.d.ts +1 -1
- package/dist/ts/ts/Json/Encode.js +65 -0
- package/dist/ts/ts/Json/IDTable.d.ts +1 -1
- package/dist/ts/ts/Json/IDTable.js +28 -0
- package/dist/ts/ts/Json/Investigation.d.ts +1 -1
- package/dist/ts/ts/Json/Investigation.js +229 -0
- package/dist/ts/ts/Json/OntologyAnnotation.d.ts +1 -1
- package/dist/ts/ts/Json/OntologyAnnotation.js +194 -0
- package/dist/ts/ts/Json/OntologySourceReference.d.ts +1 -1
- package/dist/ts/ts/Json/OntologySourceReference.js +119 -0
- package/dist/ts/ts/Json/Person.d.ts +1 -1
- package/dist/ts/ts/Json/Person.js +316 -0
- package/dist/ts/ts/Json/Process/AssayMaterials.d.ts +1 -1
- package/dist/ts/ts/Json/Process/AssayMaterials.js +21 -0
- package/dist/ts/ts/Json/Process/Component.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Component.js +41 -0
- package/dist/ts/ts/Json/Process/Factor.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Factor.js +53 -0
- package/dist/ts/ts/Json/Process/FactorValue.d.ts +1 -1
- package/dist/ts/ts/Json/Process/FactorValue.js +44 -0
- package/dist/ts/ts/Json/Process/Material.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Material.js +112 -0
- package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttribute.js +43 -0
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +44 -0
- package/dist/ts/ts/Json/Process/MaterialType.d.ts +1 -1
- package/dist/ts/ts/Json/Process/MaterialType.js +45 -0
- package/dist/ts/ts/Json/Process/Process.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Process.js +103 -0
- package/dist/ts/ts/Json/Process/ProcessInput.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProcessInput.js +42 -0
- package/dist/ts/ts/Json/Process/ProcessOutput.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProcessOutput.js +35 -0
- package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProcessParameterValue.js +28 -0
- package/dist/ts/ts/Json/Process/Protocol.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Protocol.js +166 -0
- package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProtocolParameter.js +43 -0
- package/dist/ts/ts/Json/Process/Sample.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Sample.js +165 -0
- package/dist/ts/ts/Json/Process/Source.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Source.js +133 -0
- package/dist/ts/ts/Json/Process/StudyMaterials.d.ts +1 -1
- package/dist/ts/ts/Json/Process/StudyMaterials.js +23 -0
- package/dist/ts/ts/Json/Process/Value.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Value.js +41 -0
- package/dist/ts/ts/Json/PropertyValue.d.ts +1 -1
- package/dist/ts/ts/Json/PropertyValue.js +280 -0
- package/dist/ts/ts/Json/Publication.d.ts +1 -1
- package/dist/ts/ts/Json/Publication.js +123 -0
- package/dist/ts/ts/Json/ROCrate/LDContext.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDContext.js +115 -0
- package/dist/ts/ts/Json/ROCrate/LDGraph.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDGraph.js +83 -0
- package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDNode.js +190 -0
- package/dist/ts/ts/Json/ROCrate/LDRef.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDRef.js +24 -0
- package/dist/ts/ts/Json/ROCrate/LDValue.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDValue.js +63 -0
- package/dist/ts/ts/Json/StringTable.d.ts +1 -1
- package/dist/ts/ts/Json/StringTable.js +66 -0
- package/dist/ts/ts/Json/Study.d.ts +1 -1
- package/dist/ts/ts/Json/Study.js +326 -0
- package/dist/ts/ts/Json/Table/ArcTable.d.ts +1 -1
- package/dist/ts/ts/Json/Table/ArcTable.js +210 -0
- package/dist/ts/ts/Json/Table/CellTable.d.ts +1 -1
- package/dist/ts/ts/Json/Table/CellTable.js +53 -0
- package/dist/ts/ts/Json/Table/CompositeCell.d.ts +1 -1
- package/dist/ts/ts/Json/Table/CompositeCell.js +106 -0
- package/dist/ts/ts/Json/Table/CompositeHeader.d.ts +1 -1
- package/dist/ts/ts/Json/Table/CompositeHeader.js +121 -0
- package/dist/ts/ts/Json/Table/IOType.d.ts +1 -1
- package/dist/ts/ts/Json/Table/IOType.js +15 -0
- package/dist/ts/ts/Json/Table/OATable.d.ts +1 -1
- package/dist/ts/ts/Json/Table/OATable.js +50 -0
- package/dist/ts/ts/Json/Table/Templates.d.ts +1 -1
- package/dist/ts/ts/Json/Table/Templates.js +15 -0
- package/dist/ts/ts/Json/context/rocrate/isa_assay_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +61 -0
- package/dist/ts/ts/Json/context/rocrate/isa_comment_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +29 -0
- package/dist/ts/ts/Json/context/rocrate/isa_data_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +41 -0
- package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +69 -0
- package/dist/ts/ts/Json/context/rocrate/isa_material_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +37 -0
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +37 -0
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +41 -0
- package/dist/ts/ts/Json/context/rocrate/isa_organization_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +25 -0
- package/dist/ts/ts/Json/context/rocrate/isa_person_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +86 -0
- package/dist/ts/ts/Json/context/rocrate/isa_process_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +57 -0
- package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +61 -0
- package/dist/ts/ts/Json/context/rocrate/isa_publication_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +45 -0
- package/dist/ts/ts/Json/context/rocrate/isa_sample_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +33 -0
- package/dist/ts/ts/Json/context/rocrate/isa_source_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +33 -0
- package/dist/ts/ts/Json/context/rocrate/isa_study_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +77 -0
- package/dist/ts/ts/Json/context/rocrate/property_value_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/property_value_context.js +61 -0
- package/dist/ts/ts/Json/context/rocrate/rocrate_context.d.ts +1 -1
- package/dist/ts/ts/Json.js +171 -0
- package/dist/ts/ts/JsonIO/Assay.js +77 -0
- package/dist/ts/ts/JsonIO/Investigation.js +77 -0
- package/dist/ts/ts/JsonIO/LDObject.js +77 -0
- package/dist/ts/ts/JsonIO/OntologyAnnotation.js +56 -0
- package/dist/ts/ts/JsonIO/Study.js +77 -0
- package/dist/ts/ts/JsonIO/Table/Compression.d.ts +1 -1
- package/dist/ts/ts/JsonIO/Table/Compression.js +39 -0
- package/dist/ts/ts/JsonIO/Table/Templates.d.ts +1 -1
- package/dist/ts/ts/JsonIO/Table/Templates.js +25 -0
- package/dist/ts/ts/ROCrate/Generic/Comment.js +103 -0
- package/dist/ts/ts/ROCrate/Generic/Dataset.js +624 -0
- package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +103 -0
- package/dist/ts/ts/ROCrate/Generic/File.js +184 -0
- package/dist/ts/ts/ROCrate/Generic/LabProcess.js +222 -0
- package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +257 -0
- package/dist/ts/ts/ROCrate/Generic/Organization.js +63 -0
- package/dist/ts/ts/ROCrate/Generic/Person.js +377 -0
- package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +143 -0
- package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +512 -0
- package/dist/ts/ts/ROCrate/Generic/Sample.js +131 -0
- package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +173 -0
- package/dist/ts/ts/ROCrate/Helper.js +7 -0
- package/dist/ts/ts/ROCrate/LDContext.js +288 -0
- package/dist/ts/ts/ROCrate/LDObject.js +855 -0
- package/dist/ts/ts/ROCrate/ROCrateContext.js +39 -0
- package/dist/ts/ts/ROCrateIO.d.ts +1 -1
- package/dist/ts/ts/ROCrateIO.js +58 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +149 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +63 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +108 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +410 -0
- package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcAssay.js +169 -0
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +316 -0
- package/dist/ts/ts/Spreadsheet/ArcRun.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcRun.js +136 -0
- package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcStudy.js +92 -0
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +125 -0
- package/dist/ts/ts/Spreadsheet/CollectionAux.js +34 -0
- package/dist/ts/ts/Spreadsheet/DataMap.d.ts +1 -1
- package/dist/ts/ts/Spreadsheet/DataMap.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMap.js +33 -0
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +41 -0
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +418 -0
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts +3 -3
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +85 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +90 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +58 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +85 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +133 -0
- package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +15 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +74 -0
- package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +58 -0
- package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +62 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +94 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +81 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +91 -0
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts +3 -3
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +193 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Study.js +238 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +105 -0
- package/dist/ts/ts/Template.Web.js +22 -0
- package/dist/ts/ts/ValidationPackages/ValidationPackage.js +53 -0
- package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +78 -0
- package/dist/ts/ts/WebRequest/WebRequest.Node.js +13 -0
- package/dist/ts/ts/WebRequest/WebRequest.js +19 -0
- package/dist/ts/ts/Xlsx.d.ts +1 -1
- package/dist/ts/ts/Xlsx.d.ts.map +1 -1
- package/dist/ts/ts/Xlsx.js +91 -0
- package/dist/ts/ts/Yaml/Encode.js +8 -0
- package/dist/ts/ts/Yaml/ValidationPackage.js +26 -0
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +40 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +344 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +103 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +19 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +17 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +7 -0
- package/dist/ts/ts/fable_modules/Fable.Exceljs.1.6.0/ExcelJs.fs.js +5 -0
- package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +18 -0
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +44 -0
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +5 -0
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +142 -0
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +76 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +359 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +344 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +154 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +116 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +126 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +135 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +422 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +5 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +25 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +28 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +69 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +42 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +29 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +348 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +86 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +68 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +12 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +54 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +33 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +63 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +66 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +544 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +31 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +38 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +79 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Encode.fs.js +57 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +235 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +16 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +45 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +89 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +480 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Regex.fs.js +11 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +212 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +164 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +136 -0
- package/package.json +10 -7
- package/dist/ts/__vite-browser-external-2447137e.js +0 -4
- package/dist/ts/__vite-browser-external-b3701507.cjs +0 -1
- package/dist/ts/arctrl.cjs.js +0 -5691
- package/dist/ts/arctrl.es.js +0 -35562
- package/dist/ts/arctrl.umd.js +0 -5691
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { FsRangeAddress } from './Ranges/FsRangeAddress.fs.js';
|
|
2
|
+
import { FsAddress } from './FsAddress.fs.js';
|
|
3
|
+
import { FsCellsCollection } from './Cells/FsCellsCollection.fs.js';
|
|
4
|
+
import { map, exists, length, minBy, maxBy } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
5
|
+
import { FsCell } from './Cells/FsCell.fs.js';
|
|
6
|
+
import { getEnumerator, toIterator, comparePrimitives } from '../../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
7
|
+
import { FsRangeBase } from './Ranges/FsRangeBase.fs.js';
|
|
8
|
+
|
|
9
|
+
class FsRow extends FsRangeBase {
|
|
10
|
+
constructor(rangeAddress, cells) {
|
|
11
|
+
super(rangeAddress);
|
|
12
|
+
this["cells@21"] = cells;
|
|
13
|
+
}
|
|
14
|
+
static empty() {
|
|
15
|
+
return new FsRow(new FsRangeAddress(new FsAddress(0, 0), new FsAddress(0, 0)), new FsCellsCollection());
|
|
16
|
+
}
|
|
17
|
+
static createAt(index, cells) {
|
|
18
|
+
const getIndexBy = (f) => {
|
|
19
|
+
if (length(cells.GetCellsInRow(index)) === 0) {
|
|
20
|
+
return 1;
|
|
21
|
+
} else {
|
|
22
|
+
return f((c) => c.Address.ColumnNumber)(cells.GetCellsInRow(index)).Address.ColumnNumber | 0;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const minColIndex = getIndexBy((projection) => (source_1) => minBy(projection, source_1, {
|
|
26
|
+
Compare: comparePrimitives
|
|
27
|
+
})) | 0;
|
|
28
|
+
const maxColIndex = getIndexBy((projection_1) => (source_2) => maxBy(projection_1, source_2, {
|
|
29
|
+
Compare: comparePrimitives
|
|
30
|
+
})) | 0;
|
|
31
|
+
return new FsRow(new FsRangeAddress(new FsAddress(index, minColIndex), new FsAddress(index, maxColIndex)), cells);
|
|
32
|
+
}
|
|
33
|
+
get Cells() {
|
|
34
|
+
const this$ = this;
|
|
35
|
+
return super.Cells(this$["cells@21"]);
|
|
36
|
+
}
|
|
37
|
+
get Index() {
|
|
38
|
+
const this$ = this;
|
|
39
|
+
return this$.RangeAddress.FirstAddress.RowNumber | 0;
|
|
40
|
+
}
|
|
41
|
+
set Index(i) {
|
|
42
|
+
const this$ = this;
|
|
43
|
+
this$.RangeAddress.FirstAddress.RowNumber = i | 0;
|
|
44
|
+
this$.RangeAddress.LastAddress.RowNumber = i | 0;
|
|
45
|
+
}
|
|
46
|
+
get MinColIndex() {
|
|
47
|
+
const this$ = this;
|
|
48
|
+
return this$.RangeAddress.FirstAddress.ColumnNumber | 0;
|
|
49
|
+
}
|
|
50
|
+
get MaxColIndex() {
|
|
51
|
+
const this$ = this;
|
|
52
|
+
return this$.RangeAddress.LastAddress.ColumnNumber | 0;
|
|
53
|
+
}
|
|
54
|
+
Copy() {
|
|
55
|
+
const this$ = this;
|
|
56
|
+
const ra = this$.RangeAddress.Copy();
|
|
57
|
+
const cells = map((c) => c.Copy(), this$.Cells);
|
|
58
|
+
const fcc = new FsCellsCollection();
|
|
59
|
+
fcc.AddMany(cells);
|
|
60
|
+
return new FsRow(ra, fcc);
|
|
61
|
+
}
|
|
62
|
+
static copy(row) {
|
|
63
|
+
return row.Copy();
|
|
64
|
+
}
|
|
65
|
+
static getIndex(row) {
|
|
66
|
+
return row.Index;
|
|
67
|
+
}
|
|
68
|
+
HasCellAt(colIndex) {
|
|
69
|
+
const this$ = this;
|
|
70
|
+
return exists((c) => c.ColumnNumber === colIndex, this$.Cells);
|
|
71
|
+
}
|
|
72
|
+
static hasCellAt(colIndex, row) {
|
|
73
|
+
return row.HasCellAt(colIndex);
|
|
74
|
+
}
|
|
75
|
+
Item(columnIndex) {
|
|
76
|
+
const this$ = this;
|
|
77
|
+
return super.Cell(new FsAddress(1, columnIndex), this$["cells@21"]);
|
|
78
|
+
}
|
|
79
|
+
static item(colIndex, row) {
|
|
80
|
+
return row.Item(colIndex);
|
|
81
|
+
}
|
|
82
|
+
TryItem(colIndex) {
|
|
83
|
+
const this$ = this;
|
|
84
|
+
return this$.HasCellAt(colIndex) ? this$.Item(colIndex) : void 0;
|
|
85
|
+
}
|
|
86
|
+
static tryItem(colIndex, row) {
|
|
87
|
+
return row.TryItem(colIndex);
|
|
88
|
+
}
|
|
89
|
+
InsertValueAt(colIndex, value) {
|
|
90
|
+
const this$ = this;
|
|
91
|
+
const cell = new FsCell(value);
|
|
92
|
+
this$["cells@21"].Add(cell, this$.Index, colIndex);
|
|
93
|
+
}
|
|
94
|
+
static insertValueAt(colIndex, value, row) {
|
|
95
|
+
row.InsertValueAt(colIndex, value);
|
|
96
|
+
return row;
|
|
97
|
+
}
|
|
98
|
+
ToDenseRow() {
|
|
99
|
+
const this$ = this;
|
|
100
|
+
for (let i = this$.MinColIndex; i <= this$.MaxColIndex; i++) {
|
|
101
|
+
this$.Item(i);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
static toDenseRow(row) {
|
|
105
|
+
row.ToDenseRow();
|
|
106
|
+
return row;
|
|
107
|
+
}
|
|
108
|
+
static createDenseRowOf(row) {
|
|
109
|
+
const newRow = row.Copy();
|
|
110
|
+
newRow.ToDenseRow();
|
|
111
|
+
return newRow;
|
|
112
|
+
}
|
|
113
|
+
GetEnumerator() {
|
|
114
|
+
const this$ = this;
|
|
115
|
+
return getEnumerator(this$.Cells);
|
|
116
|
+
}
|
|
117
|
+
[Symbol.iterator]() {
|
|
118
|
+
return toIterator(getEnumerator(this));
|
|
119
|
+
}
|
|
120
|
+
"System.Collections.IEnumerable.GetEnumerator"() {
|
|
121
|
+
const this$ = this;
|
|
122
|
+
return getEnumerator(this$);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { FsRow };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { map, removeInPlace, tryFind as tryFind$1, collect } from '../../../node_modules/@fable-org/fable-library-js/Array.js';
|
|
2
|
+
import { FsWorksheet } from './FsWorksheet.fs.js';
|
|
3
|
+
import { exists, iterate, tryItem, tryFind } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
4
|
+
import { toFail, printf } from '../../../node_modules/@fable-org/fable-library-js/String.js';
|
|
5
|
+
import { value, defaultArg } from '../../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
6
|
+
import { safeHash, equals, defaultOf } from '../../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
7
|
+
|
|
8
|
+
class FsWorkbook {
|
|
9
|
+
constructor() {
|
|
10
|
+
this._worksheets = [];
|
|
11
|
+
}
|
|
12
|
+
Copy() {
|
|
13
|
+
const self = this;
|
|
14
|
+
const shts = map((s) => s.Copy(), self.GetWorksheets().slice());
|
|
15
|
+
const wb = new FsWorkbook();
|
|
16
|
+
wb.AddWorksheets(shts);
|
|
17
|
+
return wb;
|
|
18
|
+
}
|
|
19
|
+
static copy(workbook) {
|
|
20
|
+
return workbook.Copy();
|
|
21
|
+
}
|
|
22
|
+
InitWorksheet(name) {
|
|
23
|
+
const self = this;
|
|
24
|
+
const sheet = new FsWorksheet(name);
|
|
25
|
+
void self._worksheets.push(sheet);
|
|
26
|
+
return sheet;
|
|
27
|
+
}
|
|
28
|
+
static initWorksheet(name, workbook) {
|
|
29
|
+
return workbook.InitWorksheet(name);
|
|
30
|
+
}
|
|
31
|
+
AddWorksheet(sheet) {
|
|
32
|
+
const self = this;
|
|
33
|
+
if (exists((ws) => ws.Name === sheet.Name, self._worksheets)) {
|
|
34
|
+
const arg = sheet.Name;
|
|
35
|
+
toFail(printf('Could not add worksheet with name "%s" to workbook as it already contains a worksheet with the same name'))(arg);
|
|
36
|
+
} else {
|
|
37
|
+
void self._worksheets.push(sheet);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
static addWorksheet(sheet, workbook) {
|
|
41
|
+
workbook.AddWorksheet(sheet);
|
|
42
|
+
return workbook;
|
|
43
|
+
}
|
|
44
|
+
AddWorksheets(sheets) {
|
|
45
|
+
const self = this;
|
|
46
|
+
iterate((sheet) => {
|
|
47
|
+
self.AddWorksheet(sheet);
|
|
48
|
+
}, sheets);
|
|
49
|
+
}
|
|
50
|
+
static addWorksheets(sheets, workbook) {
|
|
51
|
+
workbook.AddWorksheets(sheets);
|
|
52
|
+
return workbook;
|
|
53
|
+
}
|
|
54
|
+
GetWorksheets() {
|
|
55
|
+
const self = this;
|
|
56
|
+
return self._worksheets;
|
|
57
|
+
}
|
|
58
|
+
static getWorksheets(workbook) {
|
|
59
|
+
return workbook.GetWorksheets();
|
|
60
|
+
}
|
|
61
|
+
TryGetWorksheetAt(index) {
|
|
62
|
+
const self = this;
|
|
63
|
+
return tryItem(index - 1, self._worksheets);
|
|
64
|
+
}
|
|
65
|
+
static tryGetWorksheetAt(index, workbook) {
|
|
66
|
+
return workbook.TryGetWorksheetAt(index);
|
|
67
|
+
}
|
|
68
|
+
GetWorksheetAt(index) {
|
|
69
|
+
const self = this;
|
|
70
|
+
const matchValue = self.TryGetWorksheetAt(index);
|
|
71
|
+
if (matchValue == null) {
|
|
72
|
+
throw new Error(`FsWorksheet at position ${index} is not present in the FsWorkbook.`);
|
|
73
|
+
} else {
|
|
74
|
+
return value(matchValue);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
static getWorksheetAt(index, workbook) {
|
|
78
|
+
return workbook.GetWorksheetAt(index);
|
|
79
|
+
}
|
|
80
|
+
TryGetWorksheetByName(sheetName) {
|
|
81
|
+
const self = this;
|
|
82
|
+
return tryFind((w) => w.Name === sheetName, self._worksheets);
|
|
83
|
+
}
|
|
84
|
+
static tryGetWorksheetByName(sheetName, workbook) {
|
|
85
|
+
return workbook.TryGetWorksheetByName(sheetName);
|
|
86
|
+
}
|
|
87
|
+
GetWorksheetByName(sheetName) {
|
|
88
|
+
const self = this;
|
|
89
|
+
try {
|
|
90
|
+
return value(self.TryGetWorksheetByName(sheetName));
|
|
91
|
+
} catch (matchValue) {
|
|
92
|
+
throw new Error(`FsWorksheet with name ${sheetName} is not present in the FsWorkbook.`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
static getWorksheetByName(sheetName, workbook) {
|
|
96
|
+
return workbook.GetWorksheetByName(sheetName);
|
|
97
|
+
}
|
|
98
|
+
RemoveWorksheet(name) {
|
|
99
|
+
const self = this;
|
|
100
|
+
removeInPlace((() => {
|
|
101
|
+
try {
|
|
102
|
+
return defaultArg(tryFind$1((ws) => ws.Name === name, self._worksheets), defaultOf());
|
|
103
|
+
} catch (matchValue) {
|
|
104
|
+
throw new Error(`FsWorksheet with name ${name} was not found in FsWorkbook.`);
|
|
105
|
+
}
|
|
106
|
+
})(), self._worksheets, {
|
|
107
|
+
Equals: equals,
|
|
108
|
+
GetHashCode: safeHash
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
static removeWorksheet(name, workbook) {
|
|
112
|
+
workbook.RemoveWorksheet(name);
|
|
113
|
+
return workbook;
|
|
114
|
+
}
|
|
115
|
+
GetTables() {
|
|
116
|
+
const self = this;
|
|
117
|
+
return collect((s) => Array.from(s.Tables), self.GetWorksheets().slice());
|
|
118
|
+
}
|
|
119
|
+
static getTables(workbook) {
|
|
120
|
+
return workbook.GetTables();
|
|
121
|
+
}
|
|
122
|
+
static validateForWrite(workbook) {
|
|
123
|
+
try {
|
|
124
|
+
iterate((ws) => {
|
|
125
|
+
FsWorksheet.validateForWrite(ws);
|
|
126
|
+
}, workbook.GetWorksheets());
|
|
127
|
+
} catch (ex) {
|
|
128
|
+
throw new Error(`FsWorkbook could not be validated for write: ${ex.message}`);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
Dispose() {
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export { FsWorkbook };
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { FsCellsCollection } from './Cells/FsCellsCollection.fs.js';
|
|
2
|
+
import { FsTable } from './Tables/FsTable.fs.js';
|
|
3
|
+
import { FsRow } from './FsRow.fs.js';
|
|
4
|
+
import { map, sortBy, head, last, iterate, tryFind, find, exists, filter, maxBy, empty } from '../../../node_modules/@fable-org/fable-library-js/Seq.js';
|
|
5
|
+
import { FsColumn } from './FsColumn.fs.js';
|
|
6
|
+
import { FsCell } from './Cells/FsCell.fs.js';
|
|
7
|
+
import { getEnumerator, disposeSafe, safeHash, equals, clear, numberHash, comparePrimitives } from '../../../node_modules/@fable-org/fable-library-js/Util.js';
|
|
8
|
+
import { FsAddress } from './FsAddress.fs.js';
|
|
9
|
+
import { FsRangeAddress } from './Ranges/FsRangeAddress.fs.js';
|
|
10
|
+
import { groupBy } from '../../../node_modules/@fable-org/fable-library-js/Seq2.js';
|
|
11
|
+
import { defaultArg, value } from '../../../node_modules/@fable-org/fable-library-js/Option.js';
|
|
12
|
+
import { toFail, toConsole, printf } from '../../../node_modules/@fable-org/fable-library-js/String.js';
|
|
13
|
+
import { removeInPlace, addRangeInPlace } from '../../../node_modules/@fable-org/fable-library-js/Array.js';
|
|
14
|
+
import { ofSeq, tryFind as tryFind$1 } from '../../../node_modules/@fable-org/fable-library-js/Map.js';
|
|
15
|
+
import { iterate as iterate$1 } from '../../../node_modules/@fable-org/fable-library-js/List.js';
|
|
16
|
+
|
|
17
|
+
class FsWorksheet {
|
|
18
|
+
constructor(name, fsRows, fsTables, fsCellsCollection) {
|
|
19
|
+
this.name = name;
|
|
20
|
+
this._name = this.name;
|
|
21
|
+
this._rows = defaultArg(fsRows, []);
|
|
22
|
+
this._tables = defaultArg(fsTables, []);
|
|
23
|
+
this._cells = defaultArg(fsCellsCollection, new FsCellsCollection());
|
|
24
|
+
}
|
|
25
|
+
static init(name) {
|
|
26
|
+
return new FsWorksheet(name, [], [], new FsCellsCollection());
|
|
27
|
+
}
|
|
28
|
+
get Name() {
|
|
29
|
+
const self = this;
|
|
30
|
+
return self._name;
|
|
31
|
+
}
|
|
32
|
+
set Name(name) {
|
|
33
|
+
const self = this;
|
|
34
|
+
self._name = name;
|
|
35
|
+
}
|
|
36
|
+
get CellCollection() {
|
|
37
|
+
const self = this;
|
|
38
|
+
return self._cells;
|
|
39
|
+
}
|
|
40
|
+
get Tables() {
|
|
41
|
+
const self = this;
|
|
42
|
+
return self._tables;
|
|
43
|
+
}
|
|
44
|
+
get Rows() {
|
|
45
|
+
const self = this;
|
|
46
|
+
return self._rows;
|
|
47
|
+
}
|
|
48
|
+
get Columns() {
|
|
49
|
+
const self = this;
|
|
50
|
+
return map((tupledArg) => {
|
|
51
|
+
let tupledArg_1, cells_1, c_2, c_3;
|
|
52
|
+
const columnIndex = tupledArg[0] | 0;
|
|
53
|
+
return new FsColumn((tupledArg_1 = (cells_1 = sortBy((c_1) => c_1.RowNumber, tupledArg[1], {
|
|
54
|
+
Compare: comparePrimitives
|
|
55
|
+
}), [new FsAddress((c_2 = head(cells_1), c_2.RowNumber), columnIndex), new FsAddress((c_3 = last(cells_1), c_3.RowNumber), columnIndex)]), new FsRangeAddress(tupledArg_1[0], tupledArg_1[1])), self.CellCollection);
|
|
56
|
+
}, groupBy((c) => c.ColumnNumber, self._cells.GetCells(), {
|
|
57
|
+
Equals: (x, y) => x === y,
|
|
58
|
+
GetHashCode: numberHash
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
get MaxRowIndex() {
|
|
62
|
+
const this$ = this;
|
|
63
|
+
return this$.CellCollection.MaxRowNumber | 0;
|
|
64
|
+
}
|
|
65
|
+
get MaxColumnIndex() {
|
|
66
|
+
const this$ = this;
|
|
67
|
+
return this$.CellCollection.MaxColumnNumber | 0;
|
|
68
|
+
}
|
|
69
|
+
Copy() {
|
|
70
|
+
let n, n_1;
|
|
71
|
+
const self = this;
|
|
72
|
+
const fcc = self.CellCollection.Copy();
|
|
73
|
+
return new FsWorksheet(self.Name, (n = [], iterate((r) => {
|
|
74
|
+
const item = r.Copy();
|
|
75
|
+
void n.push(item);
|
|
76
|
+
}, self.Rows), n), (n_1 = [], iterate((t) => {
|
|
77
|
+
const item_1 = t.Copy();
|
|
78
|
+
void n_1.push(item_1);
|
|
79
|
+
}, self.Tables), n_1), fcc);
|
|
80
|
+
}
|
|
81
|
+
static copy(sheet) {
|
|
82
|
+
return sheet.Copy();
|
|
83
|
+
}
|
|
84
|
+
Row(rowIndex, SkipSearch) {
|
|
85
|
+
const self = this;
|
|
86
|
+
if (defaultArg(SkipSearch, false)) {
|
|
87
|
+
const row = FsRow.createAt(rowIndex, self.CellCollection);
|
|
88
|
+
void self._rows.push(row);
|
|
89
|
+
return row;
|
|
90
|
+
} else {
|
|
91
|
+
const matchValue = tryFind((row_1) => row_1.Index === rowIndex, self._rows);
|
|
92
|
+
if (matchValue == null) {
|
|
93
|
+
const row_3 = FsRow.createAt(rowIndex, self.CellCollection);
|
|
94
|
+
void self._rows.push(row_3);
|
|
95
|
+
return row_3;
|
|
96
|
+
} else {
|
|
97
|
+
return value(matchValue);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
RowWithRange(rangeAddress, SkipSearch) {
|
|
102
|
+
const self = this;
|
|
103
|
+
const skipSearch = defaultArg(SkipSearch, false);
|
|
104
|
+
if (rangeAddress.FirstAddress.RowNumber !== rangeAddress.LastAddress.RowNumber) {
|
|
105
|
+
toFail(printf("Row may not have a range address spanning over different row indices"));
|
|
106
|
+
}
|
|
107
|
+
if (skipSearch) {
|
|
108
|
+
const row = new FsRow(rangeAddress, self.CellCollection);
|
|
109
|
+
row.RangeAddress = rangeAddress;
|
|
110
|
+
void self._rows.push(row);
|
|
111
|
+
return row;
|
|
112
|
+
} else {
|
|
113
|
+
const row_1 = self.Row(rangeAddress.FirstAddress.RowNumber);
|
|
114
|
+
row_1.RangeAddress = rangeAddress;
|
|
115
|
+
return row_1;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
static appendRow(row, sheet) {
|
|
119
|
+
sheet.Row(row.Index);
|
|
120
|
+
return sheet;
|
|
121
|
+
}
|
|
122
|
+
static getRows(sheet) {
|
|
123
|
+
return sheet.Rows;
|
|
124
|
+
}
|
|
125
|
+
static getRowAt(rowIndex, sheet) {
|
|
126
|
+
return find((arg) => rowIndex === FsRow.getIndex(arg), FsWorksheet.getRows(sheet));
|
|
127
|
+
}
|
|
128
|
+
static tryGetRowAt(rowIndex, sheet) {
|
|
129
|
+
return tryFind((arg) => rowIndex === FsRow.getIndex(arg), sheet.Rows);
|
|
130
|
+
}
|
|
131
|
+
static tryGetRowAfter(rowIndex, sheet) {
|
|
132
|
+
return tryFind((r) => r.Index >= rowIndex, sheet.Rows);
|
|
133
|
+
}
|
|
134
|
+
InsertBefore(row, refRow) {
|
|
135
|
+
const self = this;
|
|
136
|
+
let enumerator = getEnumerator(self._rows);
|
|
137
|
+
try {
|
|
138
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
139
|
+
const row_1 = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
140
|
+
if (row_1.Index >= refRow.Index) {
|
|
141
|
+
row_1.Index = row_1.Index + 1 | 0;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
} finally {
|
|
145
|
+
disposeSafe(enumerator);
|
|
146
|
+
}
|
|
147
|
+
self.Row(row.Index);
|
|
148
|
+
return self;
|
|
149
|
+
}
|
|
150
|
+
static insertBefore(row, refRow, sheet) {
|
|
151
|
+
return sheet.InsertBefore(row, refRow);
|
|
152
|
+
}
|
|
153
|
+
ContainsRowAt(rowIndex) {
|
|
154
|
+
const self = this;
|
|
155
|
+
return exists((t) => t.Index === rowIndex, self.Rows);
|
|
156
|
+
}
|
|
157
|
+
static containsRowAt(rowIndex, sheet) {
|
|
158
|
+
return sheet.ContainsRowAt(rowIndex);
|
|
159
|
+
}
|
|
160
|
+
static countRows(sheet) {
|
|
161
|
+
return sheet.Rows.length;
|
|
162
|
+
}
|
|
163
|
+
RemoveRowAt(rowIndex) {
|
|
164
|
+
const self = this;
|
|
165
|
+
const enumerator = getEnumerator(filter((r) => r.Index === rowIndex, self._rows));
|
|
166
|
+
try {
|
|
167
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
168
|
+
removeInPlace(enumerator["System.Collections.Generic.IEnumerator`1.get_Current"](), self._rows, {
|
|
169
|
+
Equals: equals,
|
|
170
|
+
GetHashCode: safeHash
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
} finally {
|
|
174
|
+
disposeSafe(enumerator);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
static removeRowAt(rowIndex, sheet) {
|
|
178
|
+
sheet.RemoveRowAt(rowIndex);
|
|
179
|
+
return sheet;
|
|
180
|
+
}
|
|
181
|
+
TryRemoveAt(rowIndex) {
|
|
182
|
+
const self = this;
|
|
183
|
+
if (self.ContainsRowAt(rowIndex)) {
|
|
184
|
+
self.RemoveRowAt(rowIndex);
|
|
185
|
+
}
|
|
186
|
+
return self;
|
|
187
|
+
}
|
|
188
|
+
static tryRemoveAt(rowIndex, sheet) {
|
|
189
|
+
if (FsWorksheet.containsRowAt(rowIndex, sheet)) {
|
|
190
|
+
sheet.RemoveRowAt(rowIndex);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
SortRows() {
|
|
194
|
+
const self = this;
|
|
195
|
+
const sorted = Array.from(sortBy((r) => r.Index, self._rows, {
|
|
196
|
+
Compare: comparePrimitives
|
|
197
|
+
}));
|
|
198
|
+
clear(self._rows);
|
|
199
|
+
addRangeInPlace(sorted, self._rows);
|
|
200
|
+
}
|
|
201
|
+
MapRowsInPlace(f) {
|
|
202
|
+
const self = this;
|
|
203
|
+
for (let i = 0; i <= self._rows.length - 1; i++) {
|
|
204
|
+
const r = self._rows[i];
|
|
205
|
+
self._rows[i] = f(r);
|
|
206
|
+
}
|
|
207
|
+
return self;
|
|
208
|
+
}
|
|
209
|
+
static mapRowsInPlace(f, sheet) {
|
|
210
|
+
return sheet.MapRowsInPlace(f);
|
|
211
|
+
}
|
|
212
|
+
GetMaxRowIndex() {
|
|
213
|
+
const self = this;
|
|
214
|
+
if (self.Rows.length === 0) {
|
|
215
|
+
throw new Error("The FsWorksheet has no FsRows.");
|
|
216
|
+
}
|
|
217
|
+
return maxBy((r) => r.Index, self.Rows, {
|
|
218
|
+
Compare: comparePrimitives
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
static getMaxRowIndex(sheet) {
|
|
222
|
+
return sheet.GetMaxRowIndex();
|
|
223
|
+
}
|
|
224
|
+
GetRowValuesAt(rowIndex) {
|
|
225
|
+
const self = this;
|
|
226
|
+
return self.ContainsRowAt(rowIndex) ? map((c) => c.Value, self.Row(rowIndex).Cells) : empty();
|
|
227
|
+
}
|
|
228
|
+
static getRowValuesAt(rowIndex, sheet) {
|
|
229
|
+
return sheet.GetRowValuesAt(rowIndex);
|
|
230
|
+
}
|
|
231
|
+
TryGetRowValuesAt(rowIndex) {
|
|
232
|
+
const self = this;
|
|
233
|
+
return self.ContainsRowAt(rowIndex) ? self.GetRowValuesAt(rowIndex) : void 0;
|
|
234
|
+
}
|
|
235
|
+
static tryGetRowValuesAt(rowIndex, sheet) {
|
|
236
|
+
return sheet.TryGetRowValuesAt(rowIndex);
|
|
237
|
+
}
|
|
238
|
+
RescanRows() {
|
|
239
|
+
const self = this;
|
|
240
|
+
const rows = ofSeq(map((r) => [r.Index, r], self._rows), {
|
|
241
|
+
Compare: comparePrimitives
|
|
242
|
+
});
|
|
243
|
+
iterate((tupledArg) => {
|
|
244
|
+
const rowIndex = tupledArg[0] | 0;
|
|
245
|
+
let min = 1;
|
|
246
|
+
let max = 1;
|
|
247
|
+
iterate((c_1) => {
|
|
248
|
+
const cn = c_1.ColumnNumber | 0;
|
|
249
|
+
if (cn < min) {
|
|
250
|
+
min = cn | 0;
|
|
251
|
+
}
|
|
252
|
+
if (cn > max) {
|
|
253
|
+
max = cn | 0;
|
|
254
|
+
}
|
|
255
|
+
}, tupledArg[1]);
|
|
256
|
+
const newRange = new FsRangeAddress(new FsAddress(rowIndex, min), new FsAddress(rowIndex, max));
|
|
257
|
+
const matchValue = tryFind$1(rowIndex, rows);
|
|
258
|
+
if (matchValue == null) {
|
|
259
|
+
self.RowWithRange(newRange, true);
|
|
260
|
+
} else {
|
|
261
|
+
const row = value(matchValue);
|
|
262
|
+
row.RangeAddress = newRange;
|
|
263
|
+
}
|
|
264
|
+
}, groupBy((c) => c.RowNumber, self._cells.GetCells(), {
|
|
265
|
+
Equals: (x_1, y_1) => x_1 === y_1,
|
|
266
|
+
GetHashCode: numberHash
|
|
267
|
+
}));
|
|
268
|
+
}
|
|
269
|
+
Column(columnIndex) {
|
|
270
|
+
const self = this;
|
|
271
|
+
return FsColumn.createAt(columnIndex, self.CellCollection);
|
|
272
|
+
}
|
|
273
|
+
ColumnWithRange(rangeAddress) {
|
|
274
|
+
const self = this;
|
|
275
|
+
if (rangeAddress.FirstAddress.ColumnNumber !== rangeAddress.LastAddress.ColumnNumber) {
|
|
276
|
+
toFail(printf("Column may not have a range address spanning over different column indices"));
|
|
277
|
+
}
|
|
278
|
+
self.Column(rangeAddress.FirstAddress.ColumnNumber).RangeAddress = rangeAddress;
|
|
279
|
+
}
|
|
280
|
+
static getColumns(sheet) {
|
|
281
|
+
return sheet.Columns;
|
|
282
|
+
}
|
|
283
|
+
static getColumnAt(columnIndex, sheet) {
|
|
284
|
+
return find((arg) => columnIndex === FsColumn.getIndex(arg), FsWorksheet.getColumns(sheet));
|
|
285
|
+
}
|
|
286
|
+
static tryGetColumnAt(columnIndex, sheet) {
|
|
287
|
+
return tryFind((arg) => columnIndex === FsColumn.getIndex(arg), sheet.Columns);
|
|
288
|
+
}
|
|
289
|
+
Table(tableName, rangeAddress, showHeaderRow) {
|
|
290
|
+
const self = this;
|
|
291
|
+
const showHeaderRow_1 = defaultArg(showHeaderRow, true);
|
|
292
|
+
const matchValue = tryFind((table) => table.Name === self.name, self._tables);
|
|
293
|
+
if (matchValue == null) {
|
|
294
|
+
const table_2 = new FsTable(tableName, rangeAddress, showHeaderRow_1);
|
|
295
|
+
void self._tables.push(table_2);
|
|
296
|
+
return table_2;
|
|
297
|
+
} else {
|
|
298
|
+
return value(matchValue);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
static tryGetTableByName(tableName, sheet) {
|
|
302
|
+
return tryFind((t) => t.Name === tableName, sheet.Tables);
|
|
303
|
+
}
|
|
304
|
+
static getTableByName(tableName, sheet) {
|
|
305
|
+
try {
|
|
306
|
+
return value(tryFind((t) => t.Name === tableName, sheet.Tables));
|
|
307
|
+
} catch (matchValue) {
|
|
308
|
+
throw new Error(`FsTable with name ${tableName} is not presen in the FsWorksheet ${sheet.Name}.`);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
AddTable(table) {
|
|
312
|
+
const self = this;
|
|
313
|
+
if (exists((t) => t.Name === table.Name, self.Tables)) {
|
|
314
|
+
toConsole(`FsTable ${table.Name} could not be appended as an FsTable with this name is already present in the FsWorksheet ${self.Name}.`);
|
|
315
|
+
} else {
|
|
316
|
+
void self._tables.push(table);
|
|
317
|
+
}
|
|
318
|
+
return self;
|
|
319
|
+
}
|
|
320
|
+
static addTable(table, sheet) {
|
|
321
|
+
return sheet.AddTable(table);
|
|
322
|
+
}
|
|
323
|
+
AddTables(tables) {
|
|
324
|
+
const self = this;
|
|
325
|
+
iterate$1((arg) => {
|
|
326
|
+
self.AddTable(arg);
|
|
327
|
+
}, tables);
|
|
328
|
+
return self;
|
|
329
|
+
}
|
|
330
|
+
static addTables(tables, sheet) {
|
|
331
|
+
return sheet.AddTables(tables);
|
|
332
|
+
}
|
|
333
|
+
TryGetCellAt(rowIndex, colIndex) {
|
|
334
|
+
const self = this;
|
|
335
|
+
return self.CellCollection.TryGetCell(rowIndex, colIndex);
|
|
336
|
+
}
|
|
337
|
+
static tryGetCellAt(rowIndex, colIndex, sheet) {
|
|
338
|
+
return sheet.TryGetCellAt(rowIndex, colIndex);
|
|
339
|
+
}
|
|
340
|
+
GetCellAt(rowIndex, colIndex) {
|
|
341
|
+
const self = this;
|
|
342
|
+
return value(self.TryGetCellAt(rowIndex, colIndex));
|
|
343
|
+
}
|
|
344
|
+
static getCellAt(rowIndex, colIndex, sheet) {
|
|
345
|
+
return sheet.GetCellAt(rowIndex, colIndex);
|
|
346
|
+
}
|
|
347
|
+
AddCell(cell) {
|
|
348
|
+
const self = this;
|
|
349
|
+
self.CellCollection.Add(cell);
|
|
350
|
+
return self;
|
|
351
|
+
}
|
|
352
|
+
AddCells(cells) {
|
|
353
|
+
const self = this;
|
|
354
|
+
self.CellCollection.AddMany(cells);
|
|
355
|
+
return self;
|
|
356
|
+
}
|
|
357
|
+
InsertValueAt(value, rowIndex, colIndex) {
|
|
358
|
+
const self = this;
|
|
359
|
+
const cell = new FsCell(value);
|
|
360
|
+
self.CellCollection.Add(cell, rowIndex, colIndex);
|
|
361
|
+
}
|
|
362
|
+
static insertValueAt(value, rowIndex, colIndex, sheet) {
|
|
363
|
+
sheet.InsertValueAt(value, rowIndex, colIndex);
|
|
364
|
+
}
|
|
365
|
+
SetValueAt(value$1, rowIndex, colIndex) {
|
|
366
|
+
const self = this;
|
|
367
|
+
const matchValue = self.CellCollection.TryGetCell(rowIndex, colIndex);
|
|
368
|
+
if (matchValue == null) {
|
|
369
|
+
self.CellCollection.Add(value$1, rowIndex, colIndex);
|
|
370
|
+
return self;
|
|
371
|
+
} else {
|
|
372
|
+
const c = value(matchValue);
|
|
373
|
+
c.SetValueAs(value$1);
|
|
374
|
+
return self;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
static setValueAt(value, rowIndex, colIndex, sheet) {
|
|
378
|
+
return sheet.SetValueAt(value, rowIndex, colIndex);
|
|
379
|
+
}
|
|
380
|
+
RemoveCellAt(rowIndex, colIndex) {
|
|
381
|
+
const self = this;
|
|
382
|
+
self.CellCollection.RemoveCellAt(rowIndex, colIndex);
|
|
383
|
+
return self;
|
|
384
|
+
}
|
|
385
|
+
static removeCellAt(rowIndex, colIndex, sheet) {
|
|
386
|
+
return sheet.RemoveCellAt(rowIndex, colIndex);
|
|
387
|
+
}
|
|
388
|
+
TryRemoveValueAt(rowIndex, colIndex) {
|
|
389
|
+
const self = this;
|
|
390
|
+
self.CellCollection.TryRemoveValueAt(rowIndex, colIndex);
|
|
391
|
+
}
|
|
392
|
+
static tryRemoveValueAt(rowIndex, colIndex, sheet) {
|
|
393
|
+
sheet.TryRemoveValueAt(rowIndex, colIndex);
|
|
394
|
+
}
|
|
395
|
+
RemoveValueAt(rowIndex, colIndex) {
|
|
396
|
+
const self = this;
|
|
397
|
+
self.CellCollection.RemoveValueAt(rowIndex, colIndex);
|
|
398
|
+
}
|
|
399
|
+
static removeValueAt(rowIndex, colIndex, sheet) {
|
|
400
|
+
sheet.RemoveValueAt(rowIndex, colIndex);
|
|
401
|
+
}
|
|
402
|
+
static addCell(cell, sheet) {
|
|
403
|
+
return sheet.AddCell(cell);
|
|
404
|
+
}
|
|
405
|
+
static addCells(cell, sheet) {
|
|
406
|
+
return sheet.AddCells(cell);
|
|
407
|
+
}
|
|
408
|
+
static validateForWrite(ws) {
|
|
409
|
+
try {
|
|
410
|
+
iterate((t) => {
|
|
411
|
+
const cellsCollection = ws.CellCollection;
|
|
412
|
+
FsTable.validateForWrite(t, cellsCollection);
|
|
413
|
+
}, ws.Tables);
|
|
414
|
+
} catch (ex) {
|
|
415
|
+
const arg = ws.Name;
|
|
416
|
+
const arg_1 = ex.message;
|
|
417
|
+
toFail(printf("FsWorksheet %s could not be validated for writing to xlsx file. %s"))(arg)(arg_1);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export { FsWorksheet };
|