@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,229 @@
|
|
|
1
|
+
namespace FsSpreadsheet.DSL
|
|
2
|
+
|
|
3
|
+
open FsSpreadsheet
|
|
4
|
+
|
|
5
|
+
[<AutoOpen>]
|
|
6
|
+
module Transform =
|
|
7
|
+
|
|
8
|
+
let splitRowsAndColumns (els : SheetElement list) =
|
|
9
|
+
let rec loop inRows inColumns current (remaining : SheetElement list) agg =
|
|
10
|
+
match remaining with
|
|
11
|
+
|
|
12
|
+
| [] when inRows -> ("Rows",current|> List.rev) :: agg
|
|
13
|
+
| [] when inColumns -> ("Columns",current|> List.rev) :: agg
|
|
14
|
+
| [] -> agg
|
|
15
|
+
|
|
16
|
+
| UnindexedColumn c :: tail when inColumns -> loop false true (UnindexedColumn c :: current) tail agg
|
|
17
|
+
| IndexedColumn (i,c) :: tail when inColumns -> loop false true (IndexedColumn (i,c) :: current) tail agg
|
|
18
|
+
| UnindexedColumn c :: tail when inRows -> loop false true [UnindexedColumn c] tail (("Rows",current|> List.rev) :: agg)
|
|
19
|
+
| IndexedColumn (i,c) :: tail when inRows -> loop false true [IndexedColumn (i,c)] tail (("Rows",current|> List.rev) :: agg)
|
|
20
|
+
| UnindexedColumn c :: tail -> loop false true [UnindexedColumn c] tail agg
|
|
21
|
+
| IndexedColumn (i,c) :: tail -> loop false true [IndexedColumn (i,c)] tail agg
|
|
22
|
+
|
|
23
|
+
| UnindexedRow r :: tail when inRows -> loop true false (UnindexedRow r :: current) tail agg
|
|
24
|
+
| IndexedRow (i,r) :: tail when inRows -> loop true false (IndexedRow (i,r) :: current) tail agg
|
|
25
|
+
| UnindexedRow r :: tail when inColumns -> loop true false [UnindexedRow r] tail (("Columns",current|> List.rev) :: agg)
|
|
26
|
+
| IndexedRow (i,r) :: tail when inColumns -> loop true false [IndexedRow (i,r)] tail (("Columns",current|> List.rev) :: agg)
|
|
27
|
+
| UnindexedRow r :: tail -> loop true false [UnindexedRow r] tail agg
|
|
28
|
+
| IndexedRow (i,r) :: tail -> loop true false [IndexedRow (i,r)] tail agg
|
|
29
|
+
|
|
30
|
+
| Table (t,n) :: tail when inRows -> loop false false [] tail (("Table",[Table (t,n)]) :: ("Rows",current|> List.rev) :: agg)
|
|
31
|
+
| Table (t,n) :: tail when inColumns -> loop false false [] tail (("Table",[Table (t,n)]) :: ("Columns",current|> List.rev) :: agg)
|
|
32
|
+
| Table (t,n) :: tail -> loop false false [] tail (("Table",[Table (t,n)]) :: agg)
|
|
33
|
+
|
|
34
|
+
| _ -> failwith "Unknown element combination when grouping Sheet elements"
|
|
35
|
+
|
|
36
|
+
loop false false [] els []
|
|
37
|
+
|> List.rev
|
|
38
|
+
|
|
39
|
+
type Workbook with
|
|
40
|
+
|
|
41
|
+
static member internal parseTable (cellCollection : FsCellsCollection) (table : FsTable) (els : TableElement list) =
|
|
42
|
+
let cols =
|
|
43
|
+
if els.Head.IsColumn then
|
|
44
|
+
els
|
|
45
|
+
|> List.map (fun col ->
|
|
46
|
+
match col with
|
|
47
|
+
| TableElement.UnindexedColumn col ->
|
|
48
|
+
col
|
|
49
|
+
|> List.map (fun cell ->
|
|
50
|
+
match cell with
|
|
51
|
+
| ColumnElement.UnindexedCell cell -> cell
|
|
52
|
+
| _ -> failwith "Indexed cells not supported in column transformation"
|
|
53
|
+
)
|
|
54
|
+
| _ -> failwith "Indexed columns not supported in table transformation"
|
|
55
|
+
)
|
|
56
|
+
else
|
|
57
|
+
els
|
|
58
|
+
|> List.map (fun row ->
|
|
59
|
+
match row with
|
|
60
|
+
| TableElement.UnindexedRow row ->
|
|
61
|
+
row
|
|
62
|
+
|> List.map (fun cell ->
|
|
63
|
+
match cell with
|
|
64
|
+
| RowElement.UnindexedCell cell -> cell
|
|
65
|
+
| _ -> failwith "Indexed cells not supported in row transformation"
|
|
66
|
+
)
|
|
67
|
+
| _ -> failwith "Indexed rows not supported in table transformation"
|
|
68
|
+
)
|
|
69
|
+
|> List.transpose
|
|
70
|
+
cols
|
|
71
|
+
|> List.iter (fun col ->
|
|
72
|
+
match col with
|
|
73
|
+
| [] -> failwith "Empty column"
|
|
74
|
+
| header :: fields ->
|
|
75
|
+
let field = table.Field(snd header, cellCollection)
|
|
76
|
+
fields
|
|
77
|
+
|> List.iteri (fun i (dataType,value) ->
|
|
78
|
+
let cell = field.Column.Cell(i + 2,cellCollection)
|
|
79
|
+
cell.DataType <- dataType
|
|
80
|
+
cell.Value <- value
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
static member internal parseRow (cellCollection : FsCellsCollection) (row : FsRow) (els : RowElement list) =
|
|
88
|
+
let mutable cellIndexSet =
|
|
89
|
+
els
|
|
90
|
+
|> List.choose (fun el -> match el with | RowElement.IndexedCell(i,_) -> Option.Some i.Index | _ -> None)
|
|
91
|
+
|> set
|
|
92
|
+
let getNextIndex () =
|
|
93
|
+
let mutable i = 1
|
|
94
|
+
while cellIndexSet.Contains i do
|
|
95
|
+
i <- i + 1
|
|
96
|
+
cellIndexSet <- Set.add i cellIndexSet
|
|
97
|
+
i
|
|
98
|
+
els
|
|
99
|
+
|> List.iter (fun el ->
|
|
100
|
+
match el with
|
|
101
|
+
| RowElement.IndexedCell(i,(datatype,value)) ->
|
|
102
|
+
let cell = row.[i.Index]
|
|
103
|
+
cell.DataType <- datatype
|
|
104
|
+
cell.Value <- value
|
|
105
|
+
| RowElement.UnindexedCell(datatype,value) ->
|
|
106
|
+
let cell = row.[getNextIndex()]
|
|
107
|
+
cell.DataType <- datatype
|
|
108
|
+
cell.Value <- value
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
static member internal parseSheet (sheet : FsWorksheet) (els : SheetElement list) =
|
|
113
|
+
let mutable rowIndexSet =
|
|
114
|
+
els
|
|
115
|
+
|> List.choose (fun el -> match el with | IndexedRow(i,_) -> Option.Some i.Index | _ -> None)
|
|
116
|
+
|> set
|
|
117
|
+
|> Set.add 0
|
|
118
|
+
|
|
119
|
+
let getFillRowIndex () =
|
|
120
|
+
let mutable i = 1
|
|
121
|
+
while rowIndexSet.Contains i do
|
|
122
|
+
i <- i + 1
|
|
123
|
+
rowIndexSet <- Set.add i rowIndexSet
|
|
124
|
+
i
|
|
125
|
+
|
|
126
|
+
let getNextRowIndex () =
|
|
127
|
+
rowIndexSet
|
|
128
|
+
|> Seq.max
|
|
129
|
+
|> (+) 1
|
|
130
|
+
|
|
131
|
+
let parseColumns (columns : SheetElement list) =
|
|
132
|
+
|
|
133
|
+
let baseRowIndex = getNextRowIndex()
|
|
134
|
+
|
|
135
|
+
let mutable columnIndexSet =
|
|
136
|
+
columns
|
|
137
|
+
|> List.choose (fun col -> match col with | IndexedColumn(i,_) -> Option.Some i.Index | _ -> None)
|
|
138
|
+
|> set
|
|
139
|
+
|
|
140
|
+
let getNextColumnIndex () =
|
|
141
|
+
let mutable i = 1
|
|
142
|
+
while columnIndexSet.Contains i do
|
|
143
|
+
i <- i + 1
|
|
144
|
+
columnIndexSet <- Set.add i columnIndexSet
|
|
145
|
+
i
|
|
146
|
+
|
|
147
|
+
columns
|
|
148
|
+
|> List.iter (fun col ->
|
|
149
|
+
let colI,elements =
|
|
150
|
+
match col with
|
|
151
|
+
| IndexedColumn(i,colElements) ->
|
|
152
|
+
i.Index,colElements
|
|
153
|
+
| UnindexedColumn(colElements) ->
|
|
154
|
+
getNextColumnIndex(),colElements
|
|
155
|
+
| _ -> failwith "Expected column elements"
|
|
156
|
+
let mutable cellIndexSet =
|
|
157
|
+
elements
|
|
158
|
+
|> List.choose (fun el -> match el with | ColumnElement.IndexedCell(i,_) -> Option.Some i.Index | _ -> None)
|
|
159
|
+
|> set
|
|
160
|
+
let getNextIndex () =
|
|
161
|
+
let mutable i = 1
|
|
162
|
+
while cellIndexSet.Contains i do
|
|
163
|
+
i <- i + 1
|
|
164
|
+
cellIndexSet <- Set.add i cellIndexSet
|
|
165
|
+
i
|
|
166
|
+
|
|
167
|
+
elements
|
|
168
|
+
|> List.iter (fun el ->
|
|
169
|
+
|
|
170
|
+
match el with
|
|
171
|
+
| ColumnElement.IndexedCell(i,(datatype,value)) ->
|
|
172
|
+
let row = sheet.Row(i.Index + baseRowIndex - 1)
|
|
173
|
+
rowIndexSet <- Set.add (i.Index) rowIndexSet
|
|
174
|
+
let cell = row.[colI]
|
|
175
|
+
cell.DataType <- datatype
|
|
176
|
+
cell.Value <- value
|
|
177
|
+
| ColumnElement.UnindexedCell(datatype,value) ->
|
|
178
|
+
let row = sheet.Row(getNextIndex () + baseRowIndex - 1)
|
|
179
|
+
rowIndexSet <- Set.add row.Index rowIndexSet
|
|
180
|
+
let cell = row.[colI]
|
|
181
|
+
cell.DataType <- datatype
|
|
182
|
+
cell.Value <- value
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
els
|
|
189
|
+
|> splitRowsAndColumns
|
|
190
|
+
|> List.iter (function
|
|
191
|
+
| "Columns", l -> parseColumns l
|
|
192
|
+
| "Table", [SheetElement.Table (name,tableElements)] ->
|
|
193
|
+
let maxRow = sheet.CellCollection.MaxRowNumber + 1
|
|
194
|
+
let range = FsRangeAddress(FsAddress(maxRow,1),FsAddress(maxRow,1))
|
|
195
|
+
let table = sheet.Table(name,range)
|
|
196
|
+
Workbook.parseTable sheet.CellCollection table tableElements
|
|
197
|
+
| "Rows", l ->
|
|
198
|
+
l
|
|
199
|
+
|> List.iter (function
|
|
200
|
+
| IndexedRow(i,rowElements) ->
|
|
201
|
+
let row = sheet.Row(i.Index)
|
|
202
|
+
Workbook.parseRow sheet.CellCollection row rowElements
|
|
203
|
+
|
|
204
|
+
| UnindexedRow(rowElements) ->
|
|
205
|
+
let row = sheet.Row(getFillRowIndex())
|
|
206
|
+
Workbook.parseRow sheet.CellCollection row rowElements
|
|
207
|
+
| _ -> failwith "Expected row elements"
|
|
208
|
+
)
|
|
209
|
+
| s, _ -> failwithf "Invalid sheet element %s" s
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
member self.Parse() =
|
|
213
|
+
match self with
|
|
214
|
+
| Workbook wbEls ->
|
|
215
|
+
let workbook = new FsWorkbook()
|
|
216
|
+
wbEls
|
|
217
|
+
|> List.iteri (fun i wbEl ->
|
|
218
|
+
match wbEl with
|
|
219
|
+
| UnnamedSheet sheetEls ->
|
|
220
|
+
let worksheet = FsWorksheet(sprintf "Sheet%i" (i+1))
|
|
221
|
+
Workbook.parseSheet worksheet sheetEls
|
|
222
|
+
workbook.AddWorksheet(worksheet) |> ignore
|
|
223
|
+
|
|
224
|
+
| NamedSheet (name,sheetEls) ->
|
|
225
|
+
let worksheet = FsWorksheet(name)
|
|
226
|
+
Workbook.parseSheet worksheet sheetEls
|
|
227
|
+
workbook.AddWorksheet(worksheet) |> ignore
|
|
228
|
+
)
|
|
229
|
+
workbook
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { choose, transpose, map, iterateIndexed, iterate, ofArrayWithTail, empty, reverse, singleton, tail as tail_25, cons, head, isEmpty } from "../../fable-library.4.1.4/List.js";
|
|
2
|
+
import { RowIndex__get_Index, ColumnIndex__get_Index, TableElement__get_IsColumn, SheetElement } from "./Types.fs.js";
|
|
3
|
+
import { FsRangeColumn__Cell_Z4232C216 } from "../Ranges/FsRangeColumn.fs.js";
|
|
4
|
+
import { FsTableField__get_Column } from "../Tables/FsTableField.fs.js";
|
|
5
|
+
import { add, FSharpSet__Contains, ofSeq } from "../../fable-library.4.1.4/Set.js";
|
|
6
|
+
import { comparePrimitives } from "../../fable-library.4.1.4/Util.js";
|
|
7
|
+
import { max } from "../../fable-library.4.1.4/Seq.js";
|
|
8
|
+
import { FsCellsCollection__get_MaxRowNumber } from "../Cells/FsCellsCollection.fs.js";
|
|
9
|
+
import { FsRangeAddress_$ctor_7E77A4A0 } from "../Ranges/FsRangeAddress.fs.js";
|
|
10
|
+
import { FsAddress_$ctor_Z37302880 } from "../FsAddress.fs.js";
|
|
11
|
+
import { toText, printf, toFail } from "../../fable-library.4.1.4/String.js";
|
|
12
|
+
import { FsWorkbook } from "../FsWorkbook.fs.js";
|
|
13
|
+
import { FsWorksheet } from "../FsWorksheet.fs.js";
|
|
14
|
+
|
|
15
|
+
export function splitRowsAndColumns(els) {
|
|
16
|
+
const loop = (inRows_mut, inColumns_mut, current_mut, remaining_mut, agg_mut) => {
|
|
17
|
+
loop:
|
|
18
|
+
while (true) {
|
|
19
|
+
const inRows = inRows_mut, inColumns = inColumns_mut, current = current_mut, remaining = remaining_mut, agg = agg_mut;
|
|
20
|
+
if (!isEmpty(remaining)) {
|
|
21
|
+
switch (head(remaining).tag) {
|
|
22
|
+
case 4:
|
|
23
|
+
if (inColumns) {
|
|
24
|
+
inRows_mut = false;
|
|
25
|
+
inColumns_mut = true;
|
|
26
|
+
current_mut = cons(new SheetElement(4, [head(remaining).fields[0]]), current);
|
|
27
|
+
remaining_mut = tail_25(remaining);
|
|
28
|
+
agg_mut = agg;
|
|
29
|
+
continue loop;
|
|
30
|
+
}
|
|
31
|
+
else if (inRows) {
|
|
32
|
+
inRows_mut = false;
|
|
33
|
+
inColumns_mut = true;
|
|
34
|
+
current_mut = singleton(new SheetElement(4, [head(remaining).fields[0]]));
|
|
35
|
+
remaining_mut = tail_25(remaining);
|
|
36
|
+
agg_mut = cons(["Rows", reverse(current)], agg);
|
|
37
|
+
continue loop;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
inRows_mut = false;
|
|
41
|
+
inColumns_mut = true;
|
|
42
|
+
current_mut = singleton(new SheetElement(4, [head(remaining).fields[0]]));
|
|
43
|
+
remaining_mut = tail_25(remaining);
|
|
44
|
+
agg_mut = agg;
|
|
45
|
+
continue loop;
|
|
46
|
+
}
|
|
47
|
+
case 3:
|
|
48
|
+
if (inColumns) {
|
|
49
|
+
inRows_mut = false;
|
|
50
|
+
inColumns_mut = true;
|
|
51
|
+
current_mut = cons(new SheetElement(3, [head(remaining).fields[0], head(remaining).fields[1]]), current);
|
|
52
|
+
remaining_mut = tail_25(remaining);
|
|
53
|
+
agg_mut = agg;
|
|
54
|
+
continue loop;
|
|
55
|
+
}
|
|
56
|
+
else if (inRows) {
|
|
57
|
+
inRows_mut = false;
|
|
58
|
+
inColumns_mut = true;
|
|
59
|
+
current_mut = singleton(new SheetElement(3, [head(remaining).fields[0], head(remaining).fields[1]]));
|
|
60
|
+
remaining_mut = tail_25(remaining);
|
|
61
|
+
agg_mut = cons(["Rows", reverse(current)], agg);
|
|
62
|
+
continue loop;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
inRows_mut = false;
|
|
66
|
+
inColumns_mut = true;
|
|
67
|
+
current_mut = singleton(new SheetElement(3, [head(remaining).fields[0], head(remaining).fields[1]]));
|
|
68
|
+
remaining_mut = tail_25(remaining);
|
|
69
|
+
agg_mut = agg;
|
|
70
|
+
continue loop;
|
|
71
|
+
}
|
|
72
|
+
case 2:
|
|
73
|
+
if (inRows) {
|
|
74
|
+
inRows_mut = true;
|
|
75
|
+
inColumns_mut = false;
|
|
76
|
+
current_mut = cons(new SheetElement(2, [head(remaining).fields[0]]), current);
|
|
77
|
+
remaining_mut = tail_25(remaining);
|
|
78
|
+
agg_mut = agg;
|
|
79
|
+
continue loop;
|
|
80
|
+
}
|
|
81
|
+
else if (inColumns) {
|
|
82
|
+
inRows_mut = true;
|
|
83
|
+
inColumns_mut = false;
|
|
84
|
+
current_mut = singleton(new SheetElement(2, [head(remaining).fields[0]]));
|
|
85
|
+
remaining_mut = tail_25(remaining);
|
|
86
|
+
agg_mut = cons(["Columns", reverse(current)], agg);
|
|
87
|
+
continue loop;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
inRows_mut = true;
|
|
91
|
+
inColumns_mut = false;
|
|
92
|
+
current_mut = singleton(new SheetElement(2, [head(remaining).fields[0]]));
|
|
93
|
+
remaining_mut = tail_25(remaining);
|
|
94
|
+
agg_mut = agg;
|
|
95
|
+
continue loop;
|
|
96
|
+
}
|
|
97
|
+
case 1:
|
|
98
|
+
if (inRows) {
|
|
99
|
+
inRows_mut = true;
|
|
100
|
+
inColumns_mut = false;
|
|
101
|
+
current_mut = cons(new SheetElement(1, [head(remaining).fields[0], head(remaining).fields[1]]), current);
|
|
102
|
+
remaining_mut = tail_25(remaining);
|
|
103
|
+
agg_mut = agg;
|
|
104
|
+
continue loop;
|
|
105
|
+
}
|
|
106
|
+
else if (inColumns) {
|
|
107
|
+
inRows_mut = true;
|
|
108
|
+
inColumns_mut = false;
|
|
109
|
+
current_mut = singleton(new SheetElement(1, [head(remaining).fields[0], head(remaining).fields[1]]));
|
|
110
|
+
remaining_mut = tail_25(remaining);
|
|
111
|
+
agg_mut = cons(["Columns", reverse(current)], agg);
|
|
112
|
+
continue loop;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
inRows_mut = true;
|
|
116
|
+
inColumns_mut = false;
|
|
117
|
+
current_mut = singleton(new SheetElement(1, [head(remaining).fields[0], head(remaining).fields[1]]));
|
|
118
|
+
remaining_mut = tail_25(remaining);
|
|
119
|
+
agg_mut = agg;
|
|
120
|
+
continue loop;
|
|
121
|
+
}
|
|
122
|
+
case 0:
|
|
123
|
+
if (inRows) {
|
|
124
|
+
inRows_mut = false;
|
|
125
|
+
inColumns_mut = false;
|
|
126
|
+
current_mut = empty();
|
|
127
|
+
remaining_mut = tail_25(remaining);
|
|
128
|
+
agg_mut = ofArrayWithTail([["Table", singleton(new SheetElement(0, [head(remaining).fields[0], head(remaining).fields[1]]))], ["Rows", reverse(current)]], agg);
|
|
129
|
+
continue loop;
|
|
130
|
+
}
|
|
131
|
+
else if (inColumns) {
|
|
132
|
+
inRows_mut = false;
|
|
133
|
+
inColumns_mut = false;
|
|
134
|
+
current_mut = empty();
|
|
135
|
+
remaining_mut = tail_25(remaining);
|
|
136
|
+
agg_mut = ofArrayWithTail([["Table", singleton(new SheetElement(0, [head(remaining).fields[0], head(remaining).fields[1]]))], ["Columns", reverse(current)]], agg);
|
|
137
|
+
continue loop;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
inRows_mut = false;
|
|
141
|
+
inColumns_mut = false;
|
|
142
|
+
current_mut = empty();
|
|
143
|
+
remaining_mut = tail_25(remaining);
|
|
144
|
+
agg_mut = cons(["Table", singleton(new SheetElement(0, [head(remaining).fields[0], head(remaining).fields[1]]))], agg);
|
|
145
|
+
continue loop;
|
|
146
|
+
}
|
|
147
|
+
default:
|
|
148
|
+
throw new Error("Unknown element combination when grouping Sheet elements");
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
else if (inRows) {
|
|
152
|
+
return cons(["Rows", reverse(current)], agg);
|
|
153
|
+
}
|
|
154
|
+
else if (inColumns) {
|
|
155
|
+
return cons(["Columns", reverse(current)], agg);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
return agg;
|
|
159
|
+
}
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
return reverse(loop(false, false, empty(), els, empty()));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export function FsSpreadsheet_DSL_Workbook__Workbook_parseTable_Static(cellCollection, table, els) {
|
|
167
|
+
iterate((col_2) => {
|
|
168
|
+
if (!isEmpty(col_2)) {
|
|
169
|
+
const field = table.Field(head(col_2)[1], cellCollection);
|
|
170
|
+
iterateIndexed((i, tupledArg) => {
|
|
171
|
+
const cell_4 = FsRangeColumn__Cell_Z4232C216(FsTableField__get_Column(field), i + 2, cellCollection);
|
|
172
|
+
cell_4.DataType = tupledArg[0];
|
|
173
|
+
cell_4.Value = tupledArg[1];
|
|
174
|
+
}, tail_25(col_2));
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
throw new Error("Empty column");
|
|
178
|
+
}
|
|
179
|
+
}, TableElement__get_IsColumn(head(els)) ? map((col) => {
|
|
180
|
+
if (col.tag === 1) {
|
|
181
|
+
return map((cell) => {
|
|
182
|
+
if (cell.tag === 1) {
|
|
183
|
+
return cell.fields[0];
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
throw new Error("Indexed cells not supported in column transformation");
|
|
187
|
+
}
|
|
188
|
+
}, col.fields[0]);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
throw new Error("Indexed columns not supported in table transformation");
|
|
192
|
+
}
|
|
193
|
+
}, els) : transpose(map((row) => {
|
|
194
|
+
if (row.tag === 0) {
|
|
195
|
+
return map((cell_2) => {
|
|
196
|
+
if (cell_2.tag === 1) {
|
|
197
|
+
return cell_2.fields[0];
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
throw new Error("Indexed cells not supported in row transformation");
|
|
201
|
+
}
|
|
202
|
+
}, row.fields[0]);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
throw new Error("Indexed rows not supported in table transformation");
|
|
206
|
+
}
|
|
207
|
+
}, els)));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function FsSpreadsheet_DSL_Workbook__Workbook_parseRow_Static(cellCollection, row, els) {
|
|
211
|
+
let cellIndexSet = ofSeq(choose((el) => {
|
|
212
|
+
if (el.tag === 0) {
|
|
213
|
+
return ColumnIndex__get_Index(el.fields[0]);
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
return void 0;
|
|
217
|
+
}
|
|
218
|
+
}, els), {
|
|
219
|
+
Compare: comparePrimitives,
|
|
220
|
+
});
|
|
221
|
+
iterate((el_1) => {
|
|
222
|
+
let i_1;
|
|
223
|
+
if (el_1.tag === 1) {
|
|
224
|
+
const cell_1 = row.Item((i_1 = 1, ((() => {
|
|
225
|
+
while (FSharpSet__Contains(cellIndexSet, i_1)) {
|
|
226
|
+
i_1 = ((i_1 + 1) | 0);
|
|
227
|
+
}
|
|
228
|
+
})(), (cellIndexSet = add(i_1, cellIndexSet), i_1))));
|
|
229
|
+
cell_1.DataType = el_1.fields[0][0];
|
|
230
|
+
cell_1.Value = el_1.fields[0][1];
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
const cell = row.Item(ColumnIndex__get_Index(el_1.fields[0]));
|
|
234
|
+
cell.DataType = el_1.fields[1][0];
|
|
235
|
+
cell.Value = el_1.fields[1][1];
|
|
236
|
+
}
|
|
237
|
+
}, els);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export function FsSpreadsheet_DSL_Workbook__Workbook_parseSheet_Static(sheet, els) {
|
|
241
|
+
let rowIndexSet = add(0, ofSeq(choose((el) => {
|
|
242
|
+
if (el.tag === 1) {
|
|
243
|
+
return RowIndex__get_Index(el.fields[0]);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
return void 0;
|
|
247
|
+
}
|
|
248
|
+
}, els), {
|
|
249
|
+
Compare: comparePrimitives,
|
|
250
|
+
}));
|
|
251
|
+
iterate((_arg) => {
|
|
252
|
+
let matchResult, l, name, tableElements, l_1, s;
|
|
253
|
+
switch (_arg[0]) {
|
|
254
|
+
case "Columns": {
|
|
255
|
+
matchResult = 0;
|
|
256
|
+
l = _arg[1];
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
case "Table": {
|
|
260
|
+
if (!isEmpty(_arg[1])) {
|
|
261
|
+
if (head(_arg[1]).tag === 0) {
|
|
262
|
+
if (isEmpty(tail_25(_arg[1]))) {
|
|
263
|
+
matchResult = 1;
|
|
264
|
+
name = head(_arg[1]).fields[0];
|
|
265
|
+
tableElements = head(_arg[1]).fields[1];
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
matchResult = 3;
|
|
269
|
+
s = _arg[0];
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
matchResult = 3;
|
|
274
|
+
s = _arg[0];
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
matchResult = 3;
|
|
279
|
+
s = _arg[0];
|
|
280
|
+
}
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
case "Rows": {
|
|
284
|
+
matchResult = 2;
|
|
285
|
+
l_1 = _arg[1];
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
default: {
|
|
289
|
+
matchResult = 3;
|
|
290
|
+
s = _arg[0];
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
switch (matchResult) {
|
|
294
|
+
case 0: {
|
|
295
|
+
const columns = l;
|
|
296
|
+
const baseRowIndex = (1 + max(rowIndexSet, {
|
|
297
|
+
Compare: comparePrimitives,
|
|
298
|
+
})) | 0;
|
|
299
|
+
let columnIndexSet = ofSeq(choose((col) => {
|
|
300
|
+
if (col.tag === 3) {
|
|
301
|
+
return ColumnIndex__get_Index(col.fields[0]);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
return void 0;
|
|
305
|
+
}
|
|
306
|
+
}, columns), {
|
|
307
|
+
Compare: comparePrimitives,
|
|
308
|
+
});
|
|
309
|
+
iterate((col_1) => {
|
|
310
|
+
let i_3;
|
|
311
|
+
let patternInput;
|
|
312
|
+
switch (col_1.tag) {
|
|
313
|
+
case 3: {
|
|
314
|
+
patternInput = [ColumnIndex__get_Index(col_1.fields[0]), col_1.fields[1]];
|
|
315
|
+
break;
|
|
316
|
+
}
|
|
317
|
+
case 4: {
|
|
318
|
+
patternInput = [(i_3 = 1, ((() => {
|
|
319
|
+
while (FSharpSet__Contains(columnIndexSet, i_3)) {
|
|
320
|
+
i_3 = ((i_3 + 1) | 0);
|
|
321
|
+
}
|
|
322
|
+
})(), (columnIndexSet = add(i_3, columnIndexSet), i_3))), col_1.fields[0]];
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
default:
|
|
326
|
+
throw new Error("Expected column elements");
|
|
327
|
+
}
|
|
328
|
+
const elements_2 = patternInput[1];
|
|
329
|
+
const colI = patternInput[0] | 0;
|
|
330
|
+
let cellIndexSet = ofSeq(choose((el_1) => {
|
|
331
|
+
if (el_1.tag === 0) {
|
|
332
|
+
return RowIndex__get_Index(el_1.fields[0]);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
return void 0;
|
|
336
|
+
}
|
|
337
|
+
}, elements_2), {
|
|
338
|
+
Compare: comparePrimitives,
|
|
339
|
+
});
|
|
340
|
+
iterate((el_2) => {
|
|
341
|
+
let i_6;
|
|
342
|
+
if (el_2.tag === 1) {
|
|
343
|
+
const row_1 = sheet.Row((((i_6 = 1, ((() => {
|
|
344
|
+
while (FSharpSet__Contains(cellIndexSet, i_6)) {
|
|
345
|
+
i_6 = ((i_6 + 1) | 0);
|
|
346
|
+
}
|
|
347
|
+
})(), (cellIndexSet = add(i_6, cellIndexSet), i_6)))) + baseRowIndex) - 1);
|
|
348
|
+
rowIndexSet = add(row_1.Index, rowIndexSet);
|
|
349
|
+
const cell_1 = row_1.Item(colI);
|
|
350
|
+
cell_1.DataType = el_2.fields[0][0];
|
|
351
|
+
cell_1.Value = el_2.fields[0][1];
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
const i_7 = el_2.fields[0];
|
|
355
|
+
const row = sheet.Row((RowIndex__get_Index(i_7) + baseRowIndex) - 1);
|
|
356
|
+
rowIndexSet = add(RowIndex__get_Index(i_7), rowIndexSet);
|
|
357
|
+
const cell = row.Item(colI);
|
|
358
|
+
cell.DataType = el_2.fields[1][0];
|
|
359
|
+
cell.Value = el_2.fields[1][1];
|
|
360
|
+
}
|
|
361
|
+
}, elements_2);
|
|
362
|
+
}, columns);
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
case 1: {
|
|
366
|
+
const maxRow = (FsCellsCollection__get_MaxRowNumber(sheet.CellCollection) + 1) | 0;
|
|
367
|
+
const range = FsRangeAddress_$ctor_7E77A4A0(FsAddress_$ctor_Z37302880(maxRow, 1), FsAddress_$ctor_Z37302880(maxRow, 1));
|
|
368
|
+
const table = sheet.Table(name, range);
|
|
369
|
+
FsSpreadsheet_DSL_Workbook__Workbook_parseTable_Static(sheet.CellCollection, table, tableElements);
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
case 2: {
|
|
373
|
+
iterate((_arg_1) => {
|
|
374
|
+
let i_1;
|
|
375
|
+
switch (_arg_1.tag) {
|
|
376
|
+
case 1: {
|
|
377
|
+
const row_2 = sheet.Row(RowIndex__get_Index(_arg_1.fields[0]));
|
|
378
|
+
FsSpreadsheet_DSL_Workbook__Workbook_parseRow_Static(sheet.CellCollection, row_2, _arg_1.fields[1]);
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
case 2: {
|
|
382
|
+
const row_3 = sheet.Row((i_1 = 1, ((() => {
|
|
383
|
+
while (FSharpSet__Contains(rowIndexSet, i_1)) {
|
|
384
|
+
i_1 = ((i_1 + 1) | 0);
|
|
385
|
+
}
|
|
386
|
+
})(), (rowIndexSet = add(i_1, rowIndexSet), i_1))));
|
|
387
|
+
FsSpreadsheet_DSL_Workbook__Workbook_parseRow_Static(sheet.CellCollection, row_3, _arg_1.fields[0]);
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
default:
|
|
391
|
+
throw new Error("Expected row elements");
|
|
392
|
+
}
|
|
393
|
+
}, l_1);
|
|
394
|
+
break;
|
|
395
|
+
}
|
|
396
|
+
case 3: {
|
|
397
|
+
toFail(printf("Invalid sheet element %s"))(s);
|
|
398
|
+
break;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}, splitRowsAndColumns(els));
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
export function FsSpreadsheet_DSL_Workbook__Workbook_Parse(self) {
|
|
405
|
+
const workbook = new FsWorkbook();
|
|
406
|
+
iterateIndexed((i, wbEl) => {
|
|
407
|
+
let arg;
|
|
408
|
+
if (wbEl.tag === 1) {
|
|
409
|
+
const worksheet_1 = new FsWorksheet(wbEl.fields[0]);
|
|
410
|
+
FsSpreadsheet_DSL_Workbook__Workbook_parseSheet_Static(worksheet_1, wbEl.fields[1]);
|
|
411
|
+
const value_1 = workbook.AddWorksheet(worksheet_1);
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
const worksheet = new FsWorksheet((arg = ((i + 1) | 0), toText(printf("Sheet%i"))(arg)));
|
|
415
|
+
FsSpreadsheet_DSL_Workbook__Workbook_parseSheet_Static(worksheet, wbEl.fields[0]);
|
|
416
|
+
const value = workbook.AddWorksheet(worksheet);
|
|
417
|
+
}
|
|
418
|
+
}, self.fields[0]);
|
|
419
|
+
return workbook;
|
|
420
|
+
}
|
|
421
|
+
|