@nfdi4plants/arctrl 1.0.0-alpha10
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 +262 -0
- package/Contract/Contract.js +95 -0
- package/Contracts/Contracts.ARCtrl.js +35 -0
- package/Contracts/Contracts.ArcAssay.js +65 -0
- package/Contracts/Contracts.ArcInvestigation.js +58 -0
- package/Contracts/Contracts.ArcStudy.js +65 -0
- package/Contracts/Contracts.Git.js +91 -0
- package/FileSystem/Commit.js +18 -0
- package/FileSystem/DefaultGitignore.js +3 -0
- package/FileSystem/FileSystem.js +53 -0
- package/FileSystem/FileSystemTree.js +223 -0
- package/FileSystem/Path.js +38 -0
- package/FileSystemTree.js +51 -0
- package/ISA/ISA/ArcTypes/ArcTable.js +848 -0
- package/ISA/ISA/ArcTypes/ArcTableAux.js +1105 -0
- package/ISA/ISA/ArcTypes/ArcTables.js +479 -0
- package/ISA/ISA/ArcTypes/ArcTypes.js +2281 -0
- package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
- package/ISA/ISA/ArcTypes/CompositeColumn.js +48 -0
- package/ISA/ISA/ArcTypes/CompositeHeader.js +668 -0
- package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
- package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
- package/ISA/ISA/Builder/Types.js +243 -0
- package/ISA/ISA/Fable.js +50 -0
- package/ISA/ISA/Helper.js +338 -0
- package/ISA/ISA/Identifier.js +76 -0
- package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
- package/ISA/ISA/JsonTypes/Assay.js +620 -0
- package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
- package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
- package/ISA/ISA/JsonTypes/Comment.js +58 -0
- package/ISA/ISA/JsonTypes/CommentList.js +139 -0
- package/ISA/ISA/JsonTypes/Component.js +158 -0
- package/ISA/ISA/JsonTypes/Data.js +55 -0
- package/ISA/ISA/JsonTypes/DataFile.js +68 -0
- package/ISA/ISA/JsonTypes/Factor.js +128 -0
- package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
- package/ISA/ISA/JsonTypes/Investigation.js +204 -0
- package/ISA/ISA/JsonTypes/Material.js +66 -0
- package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
- package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
- package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
- package/ISA/ISA/JsonTypes/Person.js +137 -0
- package/ISA/ISA/JsonTypes/Process.js +401 -0
- package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
- package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
- package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
- package/ISA/ISA/JsonTypes/Protocol.js +277 -0
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
- package/ISA/ISA/JsonTypes/Publication.js +105 -0
- package/ISA/ISA/JsonTypes/Sample.js +71 -0
- package/ISA/ISA/JsonTypes/Source.js +54 -0
- package/ISA/ISA/JsonTypes/Study.js +942 -0
- package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
- package/ISA/ISA/JsonTypes/URI.js +19 -0
- package/ISA/ISA/JsonTypes/Value.js +210 -0
- package/ISA/ISA/Regex.js +588 -0
- package/ISA/ISA.Json/Assay.js +123 -0
- package/ISA/ISA.Json/Comment.js +84 -0
- package/ISA/ISA.Json/ConverterOptions.js +33 -0
- package/ISA/ISA.Json/Data.js +271 -0
- package/ISA/ISA.Json/Decode.js +46 -0
- package/ISA/ISA.Json/Factor.js +194 -0
- package/ISA/ISA.Json/GEncode.js +15 -0
- package/ISA/ISA.Json/Investigation.js +132 -0
- package/ISA/ISA.Json/Material.js +233 -0
- package/ISA/ISA.Json/Ontology.js +204 -0
- package/ISA/ISA.Json/Person.js +204 -0
- package/ISA/ISA.Json/Process.js +291 -0
- package/ISA/ISA.Json/Protocol.js +242 -0
- package/ISA/ISA.Json/Publication.js +92 -0
- package/ISA/ISA.Json/Study.js +230 -0
- package/ISA/ISA.Json/Validation/Fable.js +69 -0
- package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
- package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
- package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
- package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
- package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
- package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
- package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
- package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
- package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
- package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
- package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
- package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
- package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
- package/README.md +277 -0
- package/SemVer.js +60 -0
- package/Templates/Template.Json.js +85 -0
- package/Templates/Template.Spreadsheet.js +315 -0
- package/Templates/Template.Web.js +27 -0
- package/Templates/Template.js +179 -0
- package/Templates/Templates.js +82 -0
- package/WebRequest/WebRequest.js +38 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fable.Fetch.fableproj +21 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs +469 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +111 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +104 -0
- package/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +217 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +19 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Fable.SimpleHttp.fableproj +23 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs +357 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +429 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs +52 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +112 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
- package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
- package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
- package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
- package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
- package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Async.js +158 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
- package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
- package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
- package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
- package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
- package/fable_modules/fable-library.4.1.4/Char.js +169 -0
- package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
- package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
- package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
- package/fable_modules/fable-library.4.1.4/Date.js +451 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
- package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
- package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
- package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
- package/fable_modules/fable-library.4.1.4/Double.js +46 -0
- package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
- package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
- package/fable_modules/fable-library.4.1.4/Event.js +93 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
- package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
- package/fable_modules/fable-library.4.1.4/Global.js +8 -0
- package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
- package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
- package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
- package/fable_modules/fable-library.4.1.4/List.js +1273 -0
- package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Long.js +46 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
- package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
- package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
- package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Native.js +8 -0
- package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
- package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
- package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Option.js +96 -0
- package/fable_modules/fable-library.4.1.4/README.md +3 -0
- package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
- package/fable_modules/fable-library.4.1.4/Random.js +170 -0
- package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Range.js +45 -0
- package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
- package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
- package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
- package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
- package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
- package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
- package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
- package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
- package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
- package/fable_modules/fable-library.4.1.4/String.js +540 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
- package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
- package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
- package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
- package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
- package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
- package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
- package/fable_modules/fable-library.4.1.4/Types.js +208 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
- package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
- package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
- package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
- package/fable_modules/fable-library.4.1.4/Util.js +662 -0
- package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
- package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
- package/fable_modules/fable-library.4.1.4/package.json +23 -0
- package/fable_modules/project_cracked.json +1 -0
- package/index.js +13 -0
- package/package.json +24 -0
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
namespace FsSpreadsheet
|
|
2
|
+
|
|
3
|
+
open Fable.Core
|
|
4
|
+
|
|
5
|
+
// Type based on the type XLWorksheet used in ClosedXml
|
|
6
|
+
/// <summary>
|
|
7
|
+
/// Creates an FsWorksheet with the given name, FsRows, FsTables, and FsCellsCollection.
|
|
8
|
+
/// </summary>
|
|
9
|
+
[<AttachMembers>]
|
|
10
|
+
type FsWorksheet (name, ?fsRows, ?fsTables, ?fsCellsCollection) =
|
|
11
|
+
|
|
12
|
+
let mutable _name = name
|
|
13
|
+
|
|
14
|
+
let _rows : ResizeArray<FsRow> = defaultArg fsRows <| ResizeArray()
|
|
15
|
+
|
|
16
|
+
let _tables : ResizeArray<FsTable> = defaultArg fsTables <| ResizeArray()
|
|
17
|
+
|
|
18
|
+
let mutable _cells : FsCellsCollection = fsCellsCollection |> Option.defaultValue (FsCellsCollection())
|
|
19
|
+
|
|
20
|
+
/// <summary>
|
|
21
|
+
/// Creates an empty FsWorksheet with the given name.
|
|
22
|
+
/// </summary>
|
|
23
|
+
static member init (name) =
|
|
24
|
+
FsWorksheet(name, ResizeArray(), ResizeArray(), FsCellsCollection())
|
|
25
|
+
|
|
26
|
+
// TO DO: finish
|
|
27
|
+
//new (name, (fsCells : seq<FsCell>)) =
|
|
28
|
+
// let cellsCollection = FsCellsCollection()
|
|
29
|
+
// fsCells
|
|
30
|
+
// |> Seq.iter (
|
|
31
|
+
// fun c -> cellsCollection.Add(c.Address.RowNumber, c.Address.ColumnNumber, c)
|
|
32
|
+
// )
|
|
33
|
+
// let rows =
|
|
34
|
+
// FsWorksheet(name)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
// ----------
|
|
38
|
+
// PROPERTIES
|
|
39
|
+
// ----------
|
|
40
|
+
|
|
41
|
+
/// <summary>
|
|
42
|
+
/// The name of the FsWorksheet.
|
|
43
|
+
/// </summary>
|
|
44
|
+
member self.Name
|
|
45
|
+
with get() = _name
|
|
46
|
+
and set(name) = _name <- name
|
|
47
|
+
|
|
48
|
+
/// <summary>
|
|
49
|
+
/// The FsCellCollection of the FsWorksheet.
|
|
50
|
+
/// </summary>
|
|
51
|
+
member self.CellCollection
|
|
52
|
+
with get () = _cells
|
|
53
|
+
|
|
54
|
+
/// <summary>
|
|
55
|
+
/// The FsTables of the FsWorksheet.
|
|
56
|
+
/// </summary>
|
|
57
|
+
member self.Tables
|
|
58
|
+
with get() = _tables
|
|
59
|
+
|
|
60
|
+
/// <summary>
|
|
61
|
+
/// The FsRows of the FsWorksheet.
|
|
62
|
+
/// </summary>
|
|
63
|
+
member self.Rows
|
|
64
|
+
with get () = _rows
|
|
65
|
+
|
|
66
|
+
/// <summary>
|
|
67
|
+
/// The FsColumns of the FsWorksheet.
|
|
68
|
+
/// </summary>
|
|
69
|
+
member self.Columns
|
|
70
|
+
with get () =
|
|
71
|
+
_cells.GetCells()
|
|
72
|
+
|> Seq.groupBy (fun c -> c.ColumnNumber)
|
|
73
|
+
|> Seq.map (fun (columnIndex,cells) ->
|
|
74
|
+
let newRange =
|
|
75
|
+
cells
|
|
76
|
+
|> Seq.sortBy (fun c -> c.RowNumber)
|
|
77
|
+
|> fun cells ->
|
|
78
|
+
FsAddress((Seq.head cells |> fun c -> c.RowNumber), columnIndex),
|
|
79
|
+
FsAddress((Seq.last cells |> fun c -> c.RowNumber), columnIndex)
|
|
80
|
+
|> FsRangeAddress
|
|
81
|
+
FsColumn(newRange,self.CellCollection)
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
// -------
|
|
85
|
+
// METHODS
|
|
86
|
+
// -------
|
|
87
|
+
|
|
88
|
+
/// <summary>
|
|
89
|
+
/// Returns a copy of the FsWorksheet.
|
|
90
|
+
/// </summary>
|
|
91
|
+
member self.Copy() =
|
|
92
|
+
let fcc = self.CellCollection.Copy()
|
|
93
|
+
let nam = self.Name
|
|
94
|
+
let rws =
|
|
95
|
+
let n = ResizeArray()
|
|
96
|
+
self.Rows |> Seq.iter (fun r ->
|
|
97
|
+
n.Add <| r.Copy()
|
|
98
|
+
)
|
|
99
|
+
n
|
|
100
|
+
let tbs =
|
|
101
|
+
let n = ResizeArray()
|
|
102
|
+
self.Tables |> Seq.iter (fun t ->
|
|
103
|
+
n.Add <| t.Copy()
|
|
104
|
+
)
|
|
105
|
+
n
|
|
106
|
+
FsWorksheet(nam, rws, tbs, fcc)
|
|
107
|
+
//let newSheet = FsWorksheet(self.Name)
|
|
108
|
+
//self.Tables
|
|
109
|
+
//|> List.iter (
|
|
110
|
+
// fun t ->
|
|
111
|
+
// newSheet.Table(t.Name, t.RangeAddress, t.ShowHeaderRow)
|
|
112
|
+
// |> ignore
|
|
113
|
+
//)
|
|
114
|
+
//for row in (self.Rows) do
|
|
115
|
+
// let (newRow : FsRow) = newSheet.Row(row.Index)
|
|
116
|
+
// for cell in row.Cells do
|
|
117
|
+
// let newCell = newRow.Cell(cell.Address,newSheet.CellCollection)
|
|
118
|
+
// newCell.SetValueAs(cell.Value)
|
|
119
|
+
// |> ignore
|
|
120
|
+
//newSheet
|
|
121
|
+
|
|
122
|
+
/// <summary>
|
|
123
|
+
/// Returns a copy of a given FsWorksheet.
|
|
124
|
+
/// </summary>
|
|
125
|
+
static member copy (sheet : FsWorksheet) =
|
|
126
|
+
sheet.Copy()
|
|
127
|
+
|
|
128
|
+
// ------
|
|
129
|
+
// Row(s)
|
|
130
|
+
// ------
|
|
131
|
+
|
|
132
|
+
/// <summary>
|
|
133
|
+
/// Returns the FsRow at the given index. If it does not exist, it is created and appended first.
|
|
134
|
+
/// </summary>
|
|
135
|
+
member self.Row(rowIndex) =
|
|
136
|
+
match _rows |> Seq.tryFind (fun row -> row.Index = rowIndex) with
|
|
137
|
+
| Some row ->
|
|
138
|
+
row
|
|
139
|
+
| None ->
|
|
140
|
+
let row = FsRow.createAt(rowIndex,self.CellCollection)
|
|
141
|
+
_rows.Add row
|
|
142
|
+
row
|
|
143
|
+
|
|
144
|
+
/// <summary>
|
|
145
|
+
/// Returns the FsRow at the given FsRangeAddress. If it does not exist, it is created and appended first.
|
|
146
|
+
/// </summary>
|
|
147
|
+
member self.RowWithRange(rangeAddress : FsRangeAddress) =
|
|
148
|
+
if rangeAddress.FirstAddress.RowNumber <> rangeAddress.LastAddress.RowNumber then
|
|
149
|
+
failwithf "Row may not have a range address spanning over different row indices"
|
|
150
|
+
self.Row(rangeAddress.FirstAddress.RowNumber).RangeAddress <- rangeAddress
|
|
151
|
+
|
|
152
|
+
/// <summary>
|
|
153
|
+
/// Appends an FsRow to an FsWorksheet if the rowIndex is not already taken.
|
|
154
|
+
/// </summary>
|
|
155
|
+
static member appendRow (row : FsRow) (sheet : FsWorksheet) =
|
|
156
|
+
sheet.Row(row.Index) |> ignore
|
|
157
|
+
sheet
|
|
158
|
+
|
|
159
|
+
/// <summary>
|
|
160
|
+
/// Returns the FsRows of a given FsWorksheet.
|
|
161
|
+
/// </summary>
|
|
162
|
+
static member getRows (sheet : FsWorksheet) =
|
|
163
|
+
sheet.Rows
|
|
164
|
+
|
|
165
|
+
/// <summary>
|
|
166
|
+
/// Returns the FsRow at the given rowIndex of an FsWorksheet.
|
|
167
|
+
/// </summary>
|
|
168
|
+
static member getRowAt rowIndex sheet =
|
|
169
|
+
FsWorksheet.getRows sheet
|
|
170
|
+
// to do: getIndex
|
|
171
|
+
|> Seq.find (FsRow.getIndex >> (=) rowIndex)
|
|
172
|
+
|
|
173
|
+
/// <summary>
|
|
174
|
+
/// Returns the FsRow at the given rowIndex of an FsWorksheet if it exists, else returns None.
|
|
175
|
+
/// </summary>
|
|
176
|
+
static member tryGetRowAt rowIndex (sheet : FsWorksheet) =
|
|
177
|
+
sheet.Rows
|
|
178
|
+
|> Seq.tryFind (FsRow.getIndex >> (=) rowIndex)
|
|
179
|
+
|
|
180
|
+
/// <summary>
|
|
181
|
+
/// Returns the FsRow matching or exceeding the given rowIndex if it exists, else returns None.
|
|
182
|
+
/// </summary>
|
|
183
|
+
static member tryGetRowAfter rowIndex (sheet : FsWorksheet) =
|
|
184
|
+
sheet.Rows
|
|
185
|
+
|> Seq.tryFind (fun r -> r.Index >= rowIndex)
|
|
186
|
+
|
|
187
|
+
/// <summary>
|
|
188
|
+
/// Inserts an FsRow into the FsWorksheet before a reference FsRow.
|
|
189
|
+
/// </summary>
|
|
190
|
+
member self.InsertBefore(row : FsRow, refRow : FsRow) =
|
|
191
|
+
for row in _rows do
|
|
192
|
+
if row.Index >= refRow.Index then
|
|
193
|
+
row.Index <- row.Index + 1
|
|
194
|
+
self.Row(row.Index) |> ignore
|
|
195
|
+
self
|
|
196
|
+
|
|
197
|
+
/// <summary>
|
|
198
|
+
/// Inserts an FsRow into the FsWorksheet before a reference FsRow.
|
|
199
|
+
/// </summary>
|
|
200
|
+
static member insertBefore row (refRow : FsRow) (sheet : FsWorksheet) =
|
|
201
|
+
sheet.InsertBefore(row, refRow)
|
|
202
|
+
|
|
203
|
+
/// <summary>
|
|
204
|
+
/// Returns true if the FsWorksheet contains an FsRow with the given rowIndex.
|
|
205
|
+
/// </summary>
|
|
206
|
+
member self.ContainsRowAt(rowIndex) =
|
|
207
|
+
self.Rows
|
|
208
|
+
|> Seq.exists (fun t -> t.Index = rowIndex)
|
|
209
|
+
|
|
210
|
+
/// <summary>
|
|
211
|
+
/// Returns true if the FsWorksheet contains an FsRow with the given rowIndex.
|
|
212
|
+
/// </summary>
|
|
213
|
+
static member containsRowAt rowIndex (sheet : FsWorksheet) =
|
|
214
|
+
sheet.ContainsRowAt rowIndex
|
|
215
|
+
|
|
216
|
+
/// <summary>
|
|
217
|
+
/// Returns the number of FsRows contained in the FsWorksheet.
|
|
218
|
+
/// </summary>
|
|
219
|
+
static member countRows (sheet : FsWorksheet) =
|
|
220
|
+
sheet.Rows.Count
|
|
221
|
+
|
|
222
|
+
/// <summary>
|
|
223
|
+
/// Removes the FsRow at the given rowIndex.
|
|
224
|
+
/// </summary>
|
|
225
|
+
member self.RemoveRowAt(rowIndex) =
|
|
226
|
+
let toRemove =
|
|
227
|
+
_rows |> Seq.filter (fun r -> r.Index = rowIndex)
|
|
228
|
+
for fsrowItem in toRemove do
|
|
229
|
+
_rows.Remove (fsrowItem) |> ignore
|
|
230
|
+
|
|
231
|
+
/// <summary>
|
|
232
|
+
/// Removes the FsRow at a given rowIndex of an FsWorksheet.
|
|
233
|
+
/// </summary>
|
|
234
|
+
static member removeRowAt rowIndex (sheet : FsWorksheet) =
|
|
235
|
+
sheet.RemoveRowAt(rowIndex)
|
|
236
|
+
sheet
|
|
237
|
+
|
|
238
|
+
/// <summary>
|
|
239
|
+
/// Removes the FsRow at a given rowIndex of the FsWorksheet if the FsRow exists.
|
|
240
|
+
/// </summary>
|
|
241
|
+
member self.TryRemoveAt(rowIndex) =
|
|
242
|
+
if self.ContainsRowAt rowIndex then
|
|
243
|
+
self.RemoveRowAt rowIndex
|
|
244
|
+
self
|
|
245
|
+
|
|
246
|
+
/// <summary>
|
|
247
|
+
/// Removes the FsRow at a given rowIndex of an FsWorksheet if the FsRow exists.
|
|
248
|
+
/// </summary>
|
|
249
|
+
static member tryRemoveAt rowIndex sheet =
|
|
250
|
+
if FsWorksheet.containsRowAt rowIndex sheet then
|
|
251
|
+
sheet.RemoveRowAt rowIndex
|
|
252
|
+
|
|
253
|
+
/// <summary>
|
|
254
|
+
/// Sorts the FsRows by their rowIndex.
|
|
255
|
+
/// </summary>
|
|
256
|
+
member self.SortRows() =
|
|
257
|
+
let sorted = _rows |> Seq.sortBy (fun r -> r.Index) |> Array.ofSeq
|
|
258
|
+
_rows.Clear()
|
|
259
|
+
_rows.AddRange(sorted)
|
|
260
|
+
|
|
261
|
+
/// <summary>
|
|
262
|
+
/// Applies function f to all FsRows and returns the modified FsWorksheet.
|
|
263
|
+
/// </summary>
|
|
264
|
+
member self.MapRowsInPlace(f : FsRow -> FsRow) =
|
|
265
|
+
for i in 0 .. (_rows.Count-1) do
|
|
266
|
+
let r = _rows.[i]
|
|
267
|
+
_rows.[i] <- f r
|
|
268
|
+
self
|
|
269
|
+
|
|
270
|
+
/// <summary>
|
|
271
|
+
/// Applies function f in a given FsWorksheet to all FsRows and returns the modified FsWorksheet.
|
|
272
|
+
/// </summary>
|
|
273
|
+
static member mapRowsInPlace (f : FsRow -> FsRow) (sheet : FsWorksheet) =
|
|
274
|
+
sheet.MapRowsInPlace f
|
|
275
|
+
|
|
276
|
+
// QUESTION: Does that make any sense at all? After all, CellValues are changed inPlace anyway
|
|
277
|
+
///// Builds a new FsWorksheet whose FsRows are the result of of applying the given function f to each FsRow of the given FsWorksheet.
|
|
278
|
+
//static member mapRows (f : FsRow -> FsRow) (sheet : FsWorksheet) =
|
|
279
|
+
// let newRows = List.map f sheet.Rows
|
|
280
|
+
// let newWs = FsWorksheet(sheet.Name)
|
|
281
|
+
// sheet.Tables
|
|
282
|
+
// |> List.iter (
|
|
283
|
+
// fun t ->
|
|
284
|
+
// newWs.Table(t.Name, t.RangeAddress, t.ShowHeaderRow)
|
|
285
|
+
// |> ignore
|
|
286
|
+
// )
|
|
287
|
+
// newWs.Tables <- sheet.Tables
|
|
288
|
+
|
|
289
|
+
/// <summary>
|
|
290
|
+
/// Returns the highest index of any FsRow.
|
|
291
|
+
/// </summary>
|
|
292
|
+
member self.GetMaxRowIndex() =
|
|
293
|
+
if self.Rows.Count = 0 then failwith "The FsWorksheet has no FsRows."
|
|
294
|
+
self.Rows
|
|
295
|
+
|> Seq.maxBy (fun r -> r.Index)
|
|
296
|
+
|
|
297
|
+
/// <summary>
|
|
298
|
+
/// Returns the highest index of any FsRow in a given FsWorksheet.
|
|
299
|
+
/// </summary>
|
|
300
|
+
static member getMaxRowIndex (sheet : FsWorksheet) =
|
|
301
|
+
sheet.GetMaxRowIndex()
|
|
302
|
+
|
|
303
|
+
/// <summary>
|
|
304
|
+
/// Gets the string values of the FsRow at the given 1-based rowIndex.
|
|
305
|
+
/// </summary>
|
|
306
|
+
member self.GetRowValuesAt(rowIndex) =
|
|
307
|
+
if self.ContainsRowAt rowIndex then
|
|
308
|
+
self.Row(rowIndex).Cells
|
|
309
|
+
|> Seq.map (fun c -> c.Value)
|
|
310
|
+
else Seq.empty
|
|
311
|
+
|
|
312
|
+
/// <summary>
|
|
313
|
+
/// Gets the string values of the FsRow at the given 1-based rowIndex of a given FsWorksheet.
|
|
314
|
+
/// </summary>
|
|
315
|
+
static member getRowValuesAt rowIndex (sheet : FsWorksheet) =
|
|
316
|
+
sheet.GetRowValuesAt rowIndex
|
|
317
|
+
|
|
318
|
+
/// <summary>
|
|
319
|
+
/// Gets the string values at the given 1-based rowIndex of the FsRow if it exists, else returns None.
|
|
320
|
+
/// </summary>
|
|
321
|
+
member self.TryGetRowValuesAt(rowIndex) =
|
|
322
|
+
if self.ContainsRowAt rowIndex then
|
|
323
|
+
Some (self.GetRowValuesAt rowIndex)
|
|
324
|
+
else None
|
|
325
|
+
|
|
326
|
+
/// <summary>
|
|
327
|
+
/// Takes an FsWorksheet and gets the string values at the given 1-based rowIndex of the FsRow if it exists, else returns None.
|
|
328
|
+
/// </summary>
|
|
329
|
+
static member tryGetRowValuesAt rowIndex (sheet : FsWorksheet) =
|
|
330
|
+
sheet.TryGetRowValuesAt rowIndex
|
|
331
|
+
|
|
332
|
+
// TO DO (later)
|
|
333
|
+
///// If an FsRow with index rowIndex exists in the FsWorksheet, moves it downwards by amount. Negative amounts will move the FsRow upwards.
|
|
334
|
+
//static member moveRowVertical amount rowIndex (sheet : FsWorksheet) =
|
|
335
|
+
// match FsWorksheet.containsRowAt
|
|
336
|
+
|
|
337
|
+
// TO DO (later)
|
|
338
|
+
//static member moveRowBlockDownward rowIndex sheet =
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
// TO DO (later)
|
|
343
|
+
//static member tryGetIndexedRowValuesAt rowIndex sheet =
|
|
344
|
+
|
|
345
|
+
/// <summary>
|
|
346
|
+
/// Checks the cell collection and recreate the whole set of rows, so that all cells are placed in a row
|
|
347
|
+
/// </summary>
|
|
348
|
+
member self.RescanRows() =
|
|
349
|
+
let rows = _rows |> Seq.map (fun r -> r.Index,r) |> Map.ofSeq
|
|
350
|
+
_cells.GetCells()
|
|
351
|
+
|> Seq.groupBy (fun c -> c.RowNumber)
|
|
352
|
+
|> Seq.iter (fun (rowIndex,cells) ->
|
|
353
|
+
let newRange =
|
|
354
|
+
cells
|
|
355
|
+
|> Seq.sortBy (fun c -> c.ColumnNumber)
|
|
356
|
+
|> fun cells ->
|
|
357
|
+
FsAddress(rowIndex,Seq.head cells |> fun c -> c.ColumnNumber),
|
|
358
|
+
FsAddress(rowIndex,Seq.last cells |> fun c -> c.ColumnNumber)
|
|
359
|
+
|> FsRangeAddress
|
|
360
|
+
match Map.tryFind rowIndex rows with
|
|
361
|
+
| Some row ->
|
|
362
|
+
row.RangeAddress <- newRange
|
|
363
|
+
| None ->
|
|
364
|
+
self.RowWithRange(newRange)
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
// ------
|
|
370
|
+
// Column(s)
|
|
371
|
+
// ------
|
|
372
|
+
|
|
373
|
+
/// <summary>
|
|
374
|
+
/// Returns the FsColumn at the given index. If it does not exist, it is created and appended first.
|
|
375
|
+
/// </summary>
|
|
376
|
+
member self.Column(columnIndex : int32) = FsColumn.createAt(columnIndex,self.CellCollection)
|
|
377
|
+
|
|
378
|
+
/// <summary>
|
|
379
|
+
/// Returns the FsColumn at the given FsRangeAddress. If it does not exist, it is created and appended first.
|
|
380
|
+
/// </summary>
|
|
381
|
+
member self.ColumnWithRange(rangeAddress : FsRangeAddress) =
|
|
382
|
+
if rangeAddress.FirstAddress.ColumnNumber <> rangeAddress.LastAddress.ColumnNumber then
|
|
383
|
+
failwithf "Column may not have a range address spanning over different column indices"
|
|
384
|
+
self.Column(rangeAddress.FirstAddress.ColumnNumber).RangeAddress <- rangeAddress
|
|
385
|
+
|
|
386
|
+
/// <summary>
|
|
387
|
+
/// Returns the FsColumns of a given FsWorksheet.
|
|
388
|
+
/// </summary>
|
|
389
|
+
static member getColumns (sheet : FsWorksheet) =
|
|
390
|
+
sheet.Columns
|
|
391
|
+
|
|
392
|
+
/// <summary>
|
|
393
|
+
/// Returns the FsColumn at the given columnIndex of an FsWorksheet.
|
|
394
|
+
/// </summary>
|
|
395
|
+
static member getColumnAt columnIndex sheet =
|
|
396
|
+
FsWorksheet.getColumns sheet
|
|
397
|
+
// to do: getIndex
|
|
398
|
+
|> Seq.find (FsColumn.getIndex >> (=) columnIndex)
|
|
399
|
+
|
|
400
|
+
/// <summary>
|
|
401
|
+
/// Returns the FsColumn at the given columnIndex of an FsWorksheet if it exists, else returns None.
|
|
402
|
+
/// </summary>
|
|
403
|
+
static member tryGetColumnAt columnIndex (sheet : FsWorksheet) =
|
|
404
|
+
sheet.Columns
|
|
405
|
+
|> Seq.tryFind (FsColumn.getIndex >> (=) columnIndex)
|
|
406
|
+
|
|
407
|
+
// --------
|
|
408
|
+
// Table(s)
|
|
409
|
+
// --------
|
|
410
|
+
|
|
411
|
+
/// <summary>
|
|
412
|
+
/// Returns the FsTable with the given tableName, rangeAddress, and showHeaderRow parameters. If it does not exist yet, it gets created and appended first.
|
|
413
|
+
/// </summary>
|
|
414
|
+
// TO DO: Ask HLW: Is this really a good name for the method?
|
|
415
|
+
member self.Table(tableName,rangeAddress,?showHeaderRow : bool) =
|
|
416
|
+
let showHeaderRow = defaultArg showHeaderRow true
|
|
417
|
+
match _tables |> Seq.tryFind (fun table -> table.Name = name) with
|
|
418
|
+
| Some table ->
|
|
419
|
+
table
|
|
420
|
+
| None ->
|
|
421
|
+
let table = FsTable(tableName,rangeAddress,showHeaderRow)
|
|
422
|
+
_tables.Add table
|
|
423
|
+
table
|
|
424
|
+
|
|
425
|
+
/// <summary>
|
|
426
|
+
/// Returns the FsTable of the given name from an FsWorksheet if it exists. Else returns None.
|
|
427
|
+
/// </summary>
|
|
428
|
+
static member tryGetTableByName tableName (sheet : FsWorksheet) =
|
|
429
|
+
sheet.Tables |> Seq.tryFind (fun t -> t.Name = tableName)
|
|
430
|
+
|
|
431
|
+
/// <summary>
|
|
432
|
+
/// Returns the FsTable of the given name from an FsWorksheet.
|
|
433
|
+
/// </summary>
|
|
434
|
+
static member getTableByName tableName (sheet : FsWorksheet) =
|
|
435
|
+
try (sheet.Tables |> Seq.tryFind (fun t -> t.Name = tableName)).Value
|
|
436
|
+
with _ -> failwith $"FsTable with name {tableName} is not presen in the FsWorksheet {sheet.Name}."
|
|
437
|
+
|
|
438
|
+
// TO DO: tryGetTableByRangeAddress
|
|
439
|
+
|
|
440
|
+
// TO DO: getTableByRangeAddress
|
|
441
|
+
|
|
442
|
+
/// <summary>
|
|
443
|
+
/// Adds an FsTable to the FsWorksheet if an FsTable with the same name is not already attached.
|
|
444
|
+
/// </summary>
|
|
445
|
+
// TO DO: Ask HLW: rather printfn or failwith?
|
|
446
|
+
member self.AddTable(table : FsTable) =
|
|
447
|
+
if self.Tables |> Seq.exists (fun t -> t.Name = table.Name) then
|
|
448
|
+
printfn $"FsTable {table.Name} could not be appended as an FsTable with this name is already present in the FsWorksheet {self.Name}."
|
|
449
|
+
else _tables.Add(table)
|
|
450
|
+
self
|
|
451
|
+
|
|
452
|
+
/// <summary>
|
|
453
|
+
/// Adds an FsTable to the FsWorksheet if an FsTable with the same name is not already attached.
|
|
454
|
+
/// </summary>
|
|
455
|
+
static member addTable table (sheet : FsWorksheet) =
|
|
456
|
+
sheet.AddTable table
|
|
457
|
+
|
|
458
|
+
/// <summary>
|
|
459
|
+
/// Adds a list of FsTables to the FsWorksheet. All FsTables with a name already present in the FsWorksheet are not attached.
|
|
460
|
+
/// </summary>
|
|
461
|
+
// TO DO: Ask HLW: rather printfn or failwith?
|
|
462
|
+
member self.AddTables(tables) =
|
|
463
|
+
tables |> List.iter (self.AddTable >> ignore)
|
|
464
|
+
self
|
|
465
|
+
|
|
466
|
+
/// <summary>
|
|
467
|
+
/// Adds a list of FsTables to an FsWorksheet. All FsTables with a name already present in the FsWorksheet are not attached.
|
|
468
|
+
/// </summary>
|
|
469
|
+
static member addTables tables (sheet : FsWorksheet) =
|
|
470
|
+
sheet.AddTables tables
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
// -------
|
|
474
|
+
// Cell(s)
|
|
475
|
+
// -------
|
|
476
|
+
|
|
477
|
+
/// <summary>
|
|
478
|
+
/// Returns the FsCell at the given row- and columnIndex if the FsCell exists, else returns None.
|
|
479
|
+
/// </summary>
|
|
480
|
+
member self.TryGetCellAt(rowIndex, colIndex) =
|
|
481
|
+
self.CellCollection.TryGetCell(rowIndex, colIndex)
|
|
482
|
+
|
|
483
|
+
/// <summary>
|
|
484
|
+
/// Returns the FsCell at the given row- and columnIndex of a given FsWorksheet if the FsCell exists, else returns None.
|
|
485
|
+
/// </summary>
|
|
486
|
+
static member tryGetCellAt rowIndex colIndex (sheet : FsWorksheet) =
|
|
487
|
+
sheet.TryGetCellAt(rowIndex, colIndex)
|
|
488
|
+
|
|
489
|
+
/// <summary>
|
|
490
|
+
/// Returns the FsCell at the given row- and column index. Index is 1 based!
|
|
491
|
+
/// </summary>
|
|
492
|
+
member self.GetCellAt(rowIndex, colIndex) =
|
|
493
|
+
self.TryGetCellAt(rowIndex, colIndex).Value
|
|
494
|
+
|
|
495
|
+
/// <summary>
|
|
496
|
+
/// Returns the FsCell at the given row- and columnIndex of a given FsWorksheet.
|
|
497
|
+
/// </summary>
|
|
498
|
+
static member getCellAt rowIndex colIndex (sheet : FsWorksheet) =
|
|
499
|
+
sheet.GetCellAt(rowIndex, colIndex)
|
|
500
|
+
|
|
501
|
+
/// <summary>
|
|
502
|
+
/// Adds a FsCell to the FsWorksheet. !Exception if cell address already exists!
|
|
503
|
+
/// </summary>
|
|
504
|
+
member self.AddCell (cell:FsCell) =
|
|
505
|
+
self.CellCollection.Add cell |> ignore
|
|
506
|
+
self
|
|
507
|
+
|
|
508
|
+
/// <summary>
|
|
509
|
+
/// Adds a sequence of FsCells to the FsWorksheet. !Exception if cell address already exists!
|
|
510
|
+
/// </summary>
|
|
511
|
+
member self.AddCells (cells:seq<FsCell>) =
|
|
512
|
+
self.CellCollection.Add cells |> ignore
|
|
513
|
+
self
|
|
514
|
+
|
|
515
|
+
/// <summary>
|
|
516
|
+
/// Adds a value at the given row- and columnIndex to the FsWorksheet.
|
|
517
|
+
///
|
|
518
|
+
/// If a cell exists at the given postion, it is shoved to the right.
|
|
519
|
+
/// </summary>
|
|
520
|
+
member self.InsertValueAt(value : 'a, rowIndex, colIndex)=
|
|
521
|
+
let cell = FsCell(value)
|
|
522
|
+
self.CellCollection.Add(int32 rowIndex, int32 colIndex, cell)
|
|
523
|
+
|
|
524
|
+
/// <summary>
|
|
525
|
+
/// Adds a value at the given row- and columnIndex to a given FsWorksheet.
|
|
526
|
+
///
|
|
527
|
+
/// If an FsCell exists at the given position, it is shoved to the right.
|
|
528
|
+
/// </summary>
|
|
529
|
+
static member insertValueAt (value : 'a) rowIndex colIndex (sheet : FsWorksheet)=
|
|
530
|
+
sheet.InsertValueAt(value, rowIndex, colIndex)
|
|
531
|
+
|
|
532
|
+
/// <summary>
|
|
533
|
+
/// Adds a value at the given row- and columnIndex.
|
|
534
|
+
///
|
|
535
|
+
/// If an FsCell exists at the given position, overwrites it.
|
|
536
|
+
/// </summary>
|
|
537
|
+
member self.SetValueAt(value : 'a, rowIndex, colIndex) =
|
|
538
|
+
match self.CellCollection.TryGetCell(rowIndex, colIndex) with
|
|
539
|
+
| Some c ->
|
|
540
|
+
c.SetValueAs value |> ignore
|
|
541
|
+
self
|
|
542
|
+
| None ->
|
|
543
|
+
self.CellCollection.Add(rowIndex, colIndex, value) |> ignore
|
|
544
|
+
self
|
|
545
|
+
|
|
546
|
+
/// <summary>
|
|
547
|
+
/// Adds a value at the given row- and columnIndex of a given FsWorksheet.
|
|
548
|
+
///
|
|
549
|
+
/// If an FsCell exists at the given position, it is overwritten.
|
|
550
|
+
/// </summary>
|
|
551
|
+
static member setValueAt (value : 'a) rowIndex colIndex (sheet : FsWorksheet) =
|
|
552
|
+
sheet.SetValueAt(value, rowIndex, colIndex)
|
|
553
|
+
|
|
554
|
+
/// <summary>
|
|
555
|
+
/// Removes the value at the given row- and columnIndex from the FsWorksheet.
|
|
556
|
+
/// </summary>
|
|
557
|
+
member self.RemoveCellAt(rowIndex, colIndex) =
|
|
558
|
+
self.CellCollection.RemoveCellAt(int32 rowIndex, int32 colIndex)
|
|
559
|
+
self
|
|
560
|
+
|
|
561
|
+
/// <summary>
|
|
562
|
+
/// Removes the value at the given row- and columnIndex from an FsWorksheet.
|
|
563
|
+
/// </summary>
|
|
564
|
+
static member removeCellAt rowIndex colIndex (sheet : FsWorksheet) =
|
|
565
|
+
sheet.RemoveCellAt(rowIndex, colIndex)
|
|
566
|
+
|
|
567
|
+
/// <summary>
|
|
568
|
+
/// Removes the value of an FsCell at given row- and columnIndex if it exists from the FsCollection.
|
|
569
|
+
/// </summary>
|
|
570
|
+
/// <remarks>Does nothing if the row or column of given index does not exist.</remarks>
|
|
571
|
+
/// <exception cref="System.ArgumentNullException">if columnIndex is null.</exception>
|
|
572
|
+
member self.TryRemoveValueAt(rowIndex, colIndex) =
|
|
573
|
+
self.CellCollection.TryRemoveValueAt(rowIndex, colIndex)
|
|
574
|
+
|
|
575
|
+
/// <summary>
|
|
576
|
+
/// Removes the value of an FsCell at given row- and columnIndex if it exists from the FsCollection of a given FsWorksheet.
|
|
577
|
+
/// </summary>
|
|
578
|
+
/// <remarks>Does nothing if the row or column of given index does not exist.</remarks>
|
|
579
|
+
/// <exception cref="System.ArgumentNullException">if columnIndex is null.</exception>
|
|
580
|
+
static member tryRemoveValueAt rowIndex colIndex (sheet : FsWorksheet) =
|
|
581
|
+
sheet.TryRemoveValueAt(rowIndex, colIndex)
|
|
582
|
+
|
|
583
|
+
/// <summary>
|
|
584
|
+
/// Removes the value of an FsCell at given row- and columnIndex from the FsCollection.
|
|
585
|
+
/// </summary>
|
|
586
|
+
/// <exception cref="System.ArgumentNullException">if rowIndex or columnIndex is null.</exception>
|
|
587
|
+
/// <exception cref="System.Generic.KeyNotFoundException">if row or column at the given index does not exist.</exception>
|
|
588
|
+
member self.RemoveValueAt(rowIndex, colIndex) =
|
|
589
|
+
self.CellCollection.RemoveValueAt(rowIndex, colIndex)
|
|
590
|
+
|
|
591
|
+
/// <summary>
|
|
592
|
+
/// Removes the value of an FsCell at given row- and columnIndex from the FsCollection of a given FsWorksheet.
|
|
593
|
+
/// </summary>
|
|
594
|
+
/// <exception cref="System.ArgumentNullException">if rowIndex or columnIndex is null.</exception>
|
|
595
|
+
/// <exception cref="System.Generic.KeyNotFoundException">if row or column at the given index does not exist.</exception>
|
|
596
|
+
static member removeValueAt rowIndex colIndex (sheet : FsWorksheet) =
|
|
597
|
+
sheet.RemoveValueAt(rowIndex, colIndex)
|
|
598
|
+
|
|
599
|
+
/// <summary>
|
|
600
|
+
/// Adds a FsCell to the FsWorksheet. !Exception if cell address already exists!
|
|
601
|
+
/// </summary>
|
|
602
|
+
static member addCell (cell:FsCell) (sheet :FsWorksheet) =
|
|
603
|
+
sheet.AddCell cell
|
|
604
|
+
|
|
605
|
+
/// <summary>
|
|
606
|
+
/// Adds a sequence of FsCells to the FsWorksheet. !Exception if cell address already exists!
|
|
607
|
+
/// </summary>
|
|
608
|
+
static member addCells (cell:seq<FsCell>) (sheet :FsWorksheet) =
|
|
609
|
+
sheet.AddCells cell
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
// TO DO (later)
|
|
614
|
+
//static member tryRemoveValueAt
|
|
615
|
+
|
|
616
|
+
// TO DO (later)
|
|
617
|
+
//static member tryGetCellValueAt rowIndex colIndex sheet =
|
|
618
|
+
|
|
619
|
+
// TO DO (later)
|
|
620
|
+
//static member getCellValueAt rowIndex colIndex sheet =
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
// ------------
|
|
624
|
+
// Worksheet(s)
|
|
625
|
+
// ------------
|
|
626
|
+
|
|
627
|
+
// TO DO (later)
|
|
628
|
+
//static member toSparseValueMatrix sheet =
|