@nfdi4plants/arctrl 3.0.0-beta.5 → 3.0.0-beta.6
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/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +894 -4
- package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +121 -3
- package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +279 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +101 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/Choice.js +187 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +156 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +183 -7
- package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +217 -5
- package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +154 -5
- package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +20 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Collections.js +30 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +68 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +6 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +98 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +18 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +601 -5
- package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +10 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +760 -16
- package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +26 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +18 -8
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +36 -4
- package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +35 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +26 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +355 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +21 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +133 -1
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +543 -8
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +53 -4
- package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +673 -41
- package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +197 -4
- package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +128 -3
- package/dist/ts/node_modules/@fable-org/fable-library-js/SystemException.js +8 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/TimeSpan.js +180 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +20 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +406 -2
- package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +2 -2
- package/dist/ts/ts/ARC.d.ts +12 -5
- package/dist/ts/ts/ARC.d.ts.map +1 -1
- package/dist/ts/ts/ARC.js +172 -93
- package/dist/ts/ts/Contract/ARC.d.ts.map +1 -1
- package/dist/ts/ts/Contract/ARC.js +8 -1
- package/dist/ts/ts/Contract/ArcAssay.js +14 -5
- package/dist/ts/ts/Contract/ArcInvestigation.js +10 -1
- package/dist/ts/ts/Contract/ArcRun.js +19 -6
- package/dist/ts/ts/Contract/ArcStudy.js +19 -6
- package/dist/ts/ts/Contract/ArcWorkflow.js +19 -6
- package/dist/ts/ts/Contract/Contract.js +42 -1
- package/dist/ts/ts/Contract/Datamap.js +61 -17
- package/dist/ts/ts/Contract/Git.d.ts.map +1 -1
- package/dist/ts/ts/Contract/Git.js +22 -6
- package/dist/ts/ts/Contract/License.d.ts +5 -0
- package/dist/ts/ts/Contract/License.d.ts.map +1 -0
- package/dist/ts/ts/Contract/License.js +34 -0
- package/dist/ts/ts/Contract/ValidationPackagesConfig.js +31 -6
- package/dist/ts/ts/ContractIO/ContractIO.js +5 -5
- package/dist/ts/ts/ContractIO/FileSystemHelper.js +16 -4
- package/dist/ts/ts/Conversion.js +321 -48
- package/dist/ts/ts/Core/ArcTypes.js +216 -15
- package/dist/ts/ts/Core/Comment.js +11 -1
- package/dist/ts/ts/Core/CommentList.js +77 -2
- package/dist/ts/ts/Core/Conversion.js +123 -43
- package/dist/ts/ts/Core/Data.js +9 -2
- package/dist/ts/ts/Core/DataContext.js +19 -4
- package/dist/ts/ts/Core/DataFile.js +38 -1
- package/dist/ts/ts/Core/DataMap.js +111 -5
- package/dist/ts/ts/Core/Helper/Collections.js +106 -5
- package/dist/ts/ts/Core/Helper/HashCodes.js +4 -4
- package/dist/ts/ts/Core/Helper/Identifier.js +100 -2
- package/dist/ts/ts/Core/Helper/Regex.js +134 -2
- package/dist/ts/ts/Core/Helper/SemVer.js +23 -2
- package/dist/ts/ts/Core/IdentifierSetters.js +27 -3
- package/dist/ts/ts/Core/OntologyAnnotation.js +4 -1
- package/dist/ts/ts/Core/OntologySourceReference.js +8 -1
- package/dist/ts/ts/Core/Person.js +8 -1
- package/dist/ts/ts/Core/Process/ColumnIndex.js +121 -4
- package/dist/ts/ts/Core/Process/Component.js +37 -4
- package/dist/ts/ts/Core/Process/Factor.js +9 -4
- package/dist/ts/ts/Core/Process/FactorValue.js +61 -4
- package/dist/ts/ts/Core/Process/Material.js +14 -4
- package/dist/ts/ts/Core/Process/MaterialAttribute.js +41 -3
- package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +67 -4
- package/dist/ts/ts/Core/Process/MaterialType.js +15 -1
- package/dist/ts/ts/Core/Process/Process.js +150 -7
- package/dist/ts/ts/Core/Process/ProcessInput.js +48 -8
- package/dist/ts/ts/Core/Process/ProcessOutput.js +44 -7
- package/dist/ts/ts/Core/Process/ProcessParameterValue.js +10 -5
- package/dist/ts/ts/Core/Process/ProcessSequence.js +127 -6
- package/dist/ts/ts/Core/Process/Protocol.js +78 -4
- package/dist/ts/ts/Core/Process/ProtocolParameter.js +6 -2
- package/dist/ts/ts/Core/Process/Sample.js +21 -3
- package/dist/ts/ts/Core/Process/Source.js +13 -3
- package/dist/ts/ts/Core/Publication.js +8 -1
- package/dist/ts/ts/Core/Table/ArcTable.js +34 -25
- package/dist/ts/ts/Core/Table/ArcTableAux.js +150 -23
- package/dist/ts/ts/Core/Table/ArcTables.js +24 -15
- package/dist/ts/ts/Core/Table/CompositeCell.js +7 -3
- package/dist/ts/ts/Core/Table/CompositeColumn.js +8 -4
- package/dist/ts/ts/Core/Table/CompositeHeader.js +18 -15
- package/dist/ts/ts/Core/Template.js +12 -2
- package/dist/ts/ts/Core/Templates.js +8 -4
- package/dist/ts/ts/Core/Value.js +7 -3
- package/dist/ts/ts/CrossAsync.js +11 -1
- package/dist/ts/ts/FileSystem/Commit.js +18 -0
- package/dist/ts/ts/FileSystem/FileSystem.js +8 -3
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts +1 -0
- package/dist/ts/ts/FileSystem/FileSystemTree.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/FileSystemTree.js +20 -13
- package/dist/ts/ts/FileSystem/Path.d.ts +2 -0
- package/dist/ts/ts/FileSystem/Path.d.ts.map +1 -1
- package/dist/ts/ts/FileSystem/Path.js +17 -3
- package/dist/ts/ts/Json/Assay.js +26 -26
- package/dist/ts/ts/Json/Comment.js +10 -10
- package/dist/ts/ts/Json/Data.js +6 -6
- package/dist/ts/ts/Json/DataMap/DataContext.js +4 -4
- package/dist/ts/ts/Json/DataMap/DataMap.js +2 -2
- package/dist/ts/ts/Json/Decode.js +14 -9
- package/dist/ts/ts/Json/Encode.js +43 -11
- package/dist/ts/ts/Json/Investigation.js +40 -22
- package/dist/ts/ts/Json/OntologyAnnotation.js +5 -5
- package/dist/ts/ts/Json/OntologySourceReference.js +2 -2
- package/dist/ts/ts/Json/Person.js +26 -26
- package/dist/ts/ts/Json/Process/Component.js +9 -6
- package/dist/ts/ts/Json/Process/Factor.js +3 -3
- package/dist/ts/ts/Json/Process/FactorValue.js +8 -8
- package/dist/ts/ts/Json/Process/Material.js +9 -9
- package/dist/ts/ts/Json/Process/MaterialAttribute.js +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +8 -8
- package/dist/ts/ts/Json/Process/Process.js +12 -12
- package/dist/ts/ts/Json/Process/ProcessInput.js +4 -4
- package/dist/ts/ts/Json/Process/ProcessOutput.js +3 -3
- package/dist/ts/ts/Json/Process/ProcessParameterValue.js +10 -7
- package/dist/ts/ts/Json/Process/Protocol.js +12 -12
- package/dist/ts/ts/Json/Process/ProtocolParameter.js +3 -3
- package/dist/ts/ts/Json/Process/Sample.js +14 -14
- package/dist/ts/ts/Json/Process/Source.js +9 -9
- package/dist/ts/ts/Json/Process/Value.js +1 -1
- package/dist/ts/ts/Json/PropertyValue.js +1 -1
- package/dist/ts/ts/Json/Publication.js +6 -6
- package/dist/ts/ts/Json/ROCrate/LDContext.js +1 -0
- package/dist/ts/ts/Json/ROCrate/LDGraph.js +3 -3
- package/dist/ts/ts/Json/ROCrate/LDNode.js +19 -19
- package/dist/ts/ts/Json/Run.js +7 -7
- package/dist/ts/ts/Json/StringTable.js +1 -1
- package/dist/ts/ts/Json/Study.js +32 -32
- package/dist/ts/ts/Json/Table/ArcTable.js +29 -29
- package/dist/ts/ts/Json/Table/CellTable.js +6 -6
- package/dist/ts/ts/Json/Table/CompositeCell.js +4 -4
- package/dist/ts/ts/Json/Table/CompositeHeader.js +2 -2
- package/dist/ts/ts/Json/Table/IOType.js +1 -1
- package/dist/ts/ts/Json/Table/OATable.js +7 -7
- package/dist/ts/ts/Json/Table/Templates.js +92 -6
- package/dist/ts/ts/Json/Workflow.js +11 -11
- package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +27 -1
- package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +17 -1
- package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +19 -1
- package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +27 -1
- package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +20 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +18 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +20 -1
- package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +16 -1
- package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +25 -1
- package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +24 -1
- package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +23 -1
- package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +20 -1
- package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +19 -1
- package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +19 -1
- package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +35 -1
- package/dist/ts/ts/Json/context/rocrate/rocrate_context.js +61 -0
- package/dist/ts/ts/Json.d.ts +13 -1
- package/dist/ts/ts/Json.d.ts.map +1 -1
- package/dist/ts/ts/Json.js +89 -2
- package/dist/ts/ts/JsonIO/Assay.js +15 -3
- package/dist/ts/ts/JsonIO/Investigation.js +15 -3
- package/dist/ts/ts/JsonIO/LDObject.js +17 -3
- package/dist/ts/ts/JsonIO/OntologyAnnotation.js +12 -2
- package/dist/ts/ts/JsonIO/Person.d.ts +16 -0
- package/dist/ts/ts/JsonIO/Person.d.ts.map +1 -0
- package/dist/ts/ts/JsonIO/Person.js +67 -0
- package/dist/ts/ts/JsonIO/Run.js +9 -3
- package/dist/ts/ts/JsonIO/Study.js +15 -3
- package/dist/ts/ts/JsonIO/Table/Compression.js +3 -3
- package/dist/ts/ts/JsonIO/Table/Templates.js +60 -5
- package/dist/ts/ts/JsonIO/Workflow.js +9 -3
- package/dist/ts/ts/License.d.ts +39 -0
- package/dist/ts/ts/License.d.ts.map +1 -0
- package/dist/ts/ts/License.js +123 -0
- package/dist/ts/ts/ROCrate/Generic/Comment.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/CreativeWork.d.ts +69 -0
- package/dist/ts/ts/ROCrate/Generic/CreativeWork.d.ts.map +1 -0
- package/dist/ts/ts/ROCrate/Generic/CreativeWork.js +450 -0
- package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts +1 -0
- package/dist/ts/ts/ROCrate/Generic/Dataset.d.ts.map +1 -1
- package/dist/ts/ts/ROCrate/Generic/Dataset.js +27 -1
- package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/File.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/LabProcess.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/Organization.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/Person.js +7 -2
- package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +19 -15
- package/dist/ts/ts/ROCrate/Generic/Sample.js +5 -1
- package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +5 -1
- package/dist/ts/ts/ROCrate/LDContext.js +15 -6
- package/dist/ts/ts/ROCrate/LDObject.js +53 -17
- package/dist/ts/ts/ROCrateIO.d.ts +9 -3
- package/dist/ts/ts/ROCrateIO.d.ts.map +1 -1
- package/dist/ts/ts/ROCrateIO.js +67 -14
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +18 -15
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +5 -4
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +40 -17
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +4 -4
- package/dist/ts/ts/Spreadsheet/ArcAssay.js +30 -15
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +32 -18
- package/dist/ts/ts/Spreadsheet/ArcRun.js +23 -8
- package/dist/ts/ts/Spreadsheet/ArcStudy.js +22 -7
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +23 -8
- package/dist/ts/ts/Spreadsheet/CollectionAux.js +75 -5
- package/dist/ts/ts/Spreadsheet/DataMap.js +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +4 -4
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +8 -8
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +4 -4
- package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +6 -6
- package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +2 -2
- package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +6 -3
- package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +9 -3
- package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +6 -4
- package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +7 -5
- package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +10 -8
- package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +5 -5
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +6 -6
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +246 -10
- package/dist/ts/ts/Spreadsheet/Metadata/Study.js +19 -13
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +5 -5
- package/dist/ts/ts/Template.Web.js +5 -1
- package/dist/ts/ts/ValidationPackages/ValidationPackage.js +8 -1
- package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +10 -3
- package/dist/ts/ts/WebRequest/WebRequest.Node.js +1 -0
- package/dist/ts/ts/Xlsx.js +41 -1
- package/dist/ts/ts/Yaml/ValidationPackage.js +18 -2
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +5 -2
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +27 -4
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +14 -3
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +30 -4
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +5 -1
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +65 -2
- package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +257 -1
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +71 -1
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +11 -1
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +188 -11
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +80 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +63 -4
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +17 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/CellBuilder.fs.js +198 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/Expression.fs.js +46 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/RowBuilder.fs.js +131 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/DSL/Types.fs.js +307 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +38 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +11 -4
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +12 -5
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +9 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +14 -7
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +31 -1
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Cell.fs.js +65 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Column.fs.js +38 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Row.fs.js +38 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Table.fs.js +34 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +49 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Workbook.fs.js +44 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Worksheet.fs.js +129 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +9 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +12 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +17 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +9 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +12 -5
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +12 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +2 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +42 -3
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Json.fs.js +53 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +9 -9
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +1 -1
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +2 -2
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +5 -1
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +730 -23
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +192 -7
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +45 -1
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +15 -2
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +1383 -15
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +45 -4
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Interop/JsInterop.fs.js +10 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +5 -5
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +16 -6
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +26 -23
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +1 -1
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +8 -8
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +18 -2
- package/package.json +1 -1
- package/dist/ts/ts/FileSystem/DefaultGitattributes.d.ts +0 -2
- package/dist/ts/ts/FileSystem/DefaultGitattributes.d.ts.map +0 -1
- package/dist/ts/ts/FileSystem/DefaultGitattributes.js +0 -3
- package/dist/ts/ts/FileSystem/DefaultGitignore.d.ts +0 -2
- package/dist/ts/ts/FileSystem/DefaultGitignore.d.ts.map +0 -1
- package/dist/ts/ts/FileSystem/DefaultGitignore.js +0 -3
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Union } from './Types.js';
|
|
2
|
+
import { union_type } from './Reflection.js';
|
|
3
|
+
import { some } from './Option.js';
|
|
4
|
+
|
|
5
|
+
function FSharpChoice$2_Choice1Of2(Item) {
|
|
6
|
+
return new FSharpChoice$2(0, [Item]);
|
|
7
|
+
}
|
|
8
|
+
function FSharpChoice$2_Choice2Of2(Item) {
|
|
9
|
+
return new FSharpChoice$2(1, [Item]);
|
|
10
|
+
}
|
|
11
|
+
class FSharpChoice$2 extends Union {
|
|
12
|
+
constructor(tag, fields) {
|
|
13
|
+
super();
|
|
14
|
+
this.tag = tag;
|
|
15
|
+
this.fields = fields;
|
|
16
|
+
}
|
|
17
|
+
cases() {
|
|
18
|
+
return ["Choice1Of2", "Choice2Of2"];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function FSharpChoice$2_$reflection(gen0, gen1) {
|
|
22
|
+
return union_type("FSharp.Core.FSharpChoice`2", [gen0, gen1], FSharpChoice$2, () => [[["Item", gen0]], [["Item", gen1]]]);
|
|
23
|
+
}
|
|
24
|
+
function FSharpChoice$3_Choice1Of3(Item) {
|
|
25
|
+
return new FSharpChoice$3(0, [Item]);
|
|
26
|
+
}
|
|
27
|
+
function FSharpChoice$3_Choice2Of3(Item) {
|
|
28
|
+
return new FSharpChoice$3(1, [Item]);
|
|
29
|
+
}
|
|
30
|
+
function FSharpChoice$3_Choice3Of3(Item) {
|
|
31
|
+
return new FSharpChoice$3(2, [Item]);
|
|
32
|
+
}
|
|
33
|
+
class FSharpChoice$3 extends Union {
|
|
34
|
+
constructor(tag, fields) {
|
|
35
|
+
super();
|
|
36
|
+
this.tag = tag;
|
|
37
|
+
this.fields = fields;
|
|
38
|
+
}
|
|
39
|
+
cases() {
|
|
40
|
+
return ["Choice1Of3", "Choice2Of3", "Choice3Of3"];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function FSharpChoice$3_$reflection(gen0, gen1, gen2) {
|
|
44
|
+
return union_type("FSharp.Core.FSharpChoice`3", [gen0, gen1, gen2], FSharpChoice$3, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]]]);
|
|
45
|
+
}
|
|
46
|
+
function FSharpChoice$4_Choice1Of4(Item) {
|
|
47
|
+
return new FSharpChoice$4(0, [Item]);
|
|
48
|
+
}
|
|
49
|
+
function FSharpChoice$4_Choice2Of4(Item) {
|
|
50
|
+
return new FSharpChoice$4(1, [Item]);
|
|
51
|
+
}
|
|
52
|
+
function FSharpChoice$4_Choice3Of4(Item) {
|
|
53
|
+
return new FSharpChoice$4(2, [Item]);
|
|
54
|
+
}
|
|
55
|
+
function FSharpChoice$4_Choice4Of4(Item) {
|
|
56
|
+
return new FSharpChoice$4(3, [Item]);
|
|
57
|
+
}
|
|
58
|
+
class FSharpChoice$4 extends Union {
|
|
59
|
+
constructor(tag, fields) {
|
|
60
|
+
super();
|
|
61
|
+
this.tag = tag;
|
|
62
|
+
this.fields = fields;
|
|
63
|
+
}
|
|
64
|
+
cases() {
|
|
65
|
+
return ["Choice1Of4", "Choice2Of4", "Choice3Of4", "Choice4Of4"];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function FSharpChoice$4_$reflection(gen0, gen1, gen2, gen3) {
|
|
69
|
+
return union_type("FSharp.Core.FSharpChoice`4", [gen0, gen1, gen2, gen3], FSharpChoice$4, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]], [["Item", gen3]]]);
|
|
70
|
+
}
|
|
71
|
+
function FSharpChoice$5_Choice1Of5(Item) {
|
|
72
|
+
return new FSharpChoice$5(0, [Item]);
|
|
73
|
+
}
|
|
74
|
+
function FSharpChoice$5_Choice2Of5(Item) {
|
|
75
|
+
return new FSharpChoice$5(1, [Item]);
|
|
76
|
+
}
|
|
77
|
+
function FSharpChoice$5_Choice3Of5(Item) {
|
|
78
|
+
return new FSharpChoice$5(2, [Item]);
|
|
79
|
+
}
|
|
80
|
+
function FSharpChoice$5_Choice4Of5(Item) {
|
|
81
|
+
return new FSharpChoice$5(3, [Item]);
|
|
82
|
+
}
|
|
83
|
+
function FSharpChoice$5_Choice5Of5(Item) {
|
|
84
|
+
return new FSharpChoice$5(4, [Item]);
|
|
85
|
+
}
|
|
86
|
+
class FSharpChoice$5 extends Union {
|
|
87
|
+
constructor(tag, fields) {
|
|
88
|
+
super();
|
|
89
|
+
this.tag = tag;
|
|
90
|
+
this.fields = fields;
|
|
91
|
+
}
|
|
92
|
+
cases() {
|
|
93
|
+
return ["Choice1Of5", "Choice2Of5", "Choice3Of5", "Choice4Of5", "Choice5Of5"];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function FSharpChoice$5_$reflection(gen0, gen1, gen2, gen3, gen4) {
|
|
97
|
+
return union_type("FSharp.Core.FSharpChoice`5", [gen0, gen1, gen2, gen3, gen4], FSharpChoice$5, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]], [["Item", gen3]], [["Item", gen4]]]);
|
|
98
|
+
}
|
|
99
|
+
function FSharpChoice$6_Choice1Of6(Item) {
|
|
100
|
+
return new FSharpChoice$6(0, [Item]);
|
|
101
|
+
}
|
|
102
|
+
function FSharpChoice$6_Choice2Of6(Item) {
|
|
103
|
+
return new FSharpChoice$6(1, [Item]);
|
|
104
|
+
}
|
|
105
|
+
function FSharpChoice$6_Choice3Of6(Item) {
|
|
106
|
+
return new FSharpChoice$6(2, [Item]);
|
|
107
|
+
}
|
|
108
|
+
function FSharpChoice$6_Choice4Of6(Item) {
|
|
109
|
+
return new FSharpChoice$6(3, [Item]);
|
|
110
|
+
}
|
|
111
|
+
function FSharpChoice$6_Choice5Of6(Item) {
|
|
112
|
+
return new FSharpChoice$6(4, [Item]);
|
|
113
|
+
}
|
|
114
|
+
function FSharpChoice$6_Choice6Of6(Item) {
|
|
115
|
+
return new FSharpChoice$6(5, [Item]);
|
|
116
|
+
}
|
|
117
|
+
class FSharpChoice$6 extends Union {
|
|
118
|
+
constructor(tag, fields) {
|
|
119
|
+
super();
|
|
120
|
+
this.tag = tag;
|
|
121
|
+
this.fields = fields;
|
|
122
|
+
}
|
|
123
|
+
cases() {
|
|
124
|
+
return ["Choice1Of6", "Choice2Of6", "Choice3Of6", "Choice4Of6", "Choice5Of6", "Choice6Of6"];
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function FSharpChoice$6_$reflection(gen0, gen1, gen2, gen3, gen4, gen5) {
|
|
128
|
+
return union_type("FSharp.Core.FSharpChoice`6", [gen0, gen1, gen2, gen3, gen4, gen5], FSharpChoice$6, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]], [["Item", gen3]], [["Item", gen4]], [["Item", gen5]]]);
|
|
129
|
+
}
|
|
130
|
+
function FSharpChoice$7_Choice1Of7(Item) {
|
|
131
|
+
return new FSharpChoice$7(0, [Item]);
|
|
132
|
+
}
|
|
133
|
+
function FSharpChoice$7_Choice2Of7(Item) {
|
|
134
|
+
return new FSharpChoice$7(1, [Item]);
|
|
135
|
+
}
|
|
136
|
+
function FSharpChoice$7_Choice3Of7(Item) {
|
|
137
|
+
return new FSharpChoice$7(2, [Item]);
|
|
138
|
+
}
|
|
139
|
+
function FSharpChoice$7_Choice4Of7(Item) {
|
|
140
|
+
return new FSharpChoice$7(3, [Item]);
|
|
141
|
+
}
|
|
142
|
+
function FSharpChoice$7_Choice5Of7(Item) {
|
|
143
|
+
return new FSharpChoice$7(4, [Item]);
|
|
144
|
+
}
|
|
145
|
+
function FSharpChoice$7_Choice6Of7(Item) {
|
|
146
|
+
return new FSharpChoice$7(5, [Item]);
|
|
147
|
+
}
|
|
148
|
+
function FSharpChoice$7_Choice7Of7(Item) {
|
|
149
|
+
return new FSharpChoice$7(6, [Item]);
|
|
150
|
+
}
|
|
151
|
+
class FSharpChoice$7 extends Union {
|
|
152
|
+
constructor(tag, fields) {
|
|
153
|
+
super();
|
|
154
|
+
this.tag = tag;
|
|
155
|
+
this.fields = fields;
|
|
156
|
+
}
|
|
157
|
+
cases() {
|
|
158
|
+
return ["Choice1Of7", "Choice2Of7", "Choice3Of7", "Choice4Of7", "Choice5Of7", "Choice6Of7", "Choice7Of7"];
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function FSharpChoice$7_$reflection(gen0, gen1, gen2, gen3, gen4, gen5, gen6) {
|
|
162
|
+
return union_type("FSharp.Core.FSharpChoice`7", [gen0, gen1, gen2, gen3, gen4, gen5, gen6], FSharpChoice$7, () => [[["Item", gen0]], [["Item", gen1]], [["Item", gen2]], [["Item", gen3]], [["Item", gen4]], [["Item", gen5]], [["Item", gen6]]]);
|
|
163
|
+
}
|
|
164
|
+
function Choice_makeChoice1Of2(x) {
|
|
165
|
+
return FSharpChoice$2_Choice1Of2(x);
|
|
166
|
+
}
|
|
167
|
+
function Choice_makeChoice2Of2(x) {
|
|
168
|
+
return FSharpChoice$2_Choice2Of2(x);
|
|
169
|
+
}
|
|
170
|
+
function Choice_tryValueIfChoice1Of2(x) {
|
|
171
|
+
if (x.tag === /* Choice1Of2 */ 0) {
|
|
172
|
+
return some(x.fields[0]);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
return undefined;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function Choice_tryValueIfChoice2Of2(x) {
|
|
179
|
+
if (x.tag === /* Choice2Of2 */ 1) {
|
|
180
|
+
return some(x.fields[0]);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
return undefined;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export { Choice_makeChoice1Of2, Choice_makeChoice2Of2, Choice_tryValueIfChoice1Of2, Choice_tryValueIfChoice2Of2, FSharpChoice$2, FSharpChoice$2_$reflection, FSharpChoice$2_Choice1Of2, FSharpChoice$2_Choice2Of2, FSharpChoice$3, FSharpChoice$3_$reflection, FSharpChoice$3_Choice1Of3, FSharpChoice$3_Choice2Of3, FSharpChoice$3_Choice3Of3, FSharpChoice$4, FSharpChoice$4_$reflection, FSharpChoice$4_Choice1Of4, FSharpChoice$4_Choice2Of4, FSharpChoice$4_Choice3Of4, FSharpChoice$4_Choice4Of4, FSharpChoice$5, FSharpChoice$5_$reflection, FSharpChoice$5_Choice1Of5, FSharpChoice$5_Choice2Of5, FSharpChoice$5_Choice3Of5, FSharpChoice$5_Choice4Of5, FSharpChoice$5_Choice5Of5, FSharpChoice$6, FSharpChoice$6_$reflection, FSharpChoice$6_Choice1Of6, FSharpChoice$6_Choice2Of6, FSharpChoice$6_Choice3Of6, FSharpChoice$6_Choice4Of6, FSharpChoice$6_Choice5Of6, FSharpChoice$6_Choice6Of6, FSharpChoice$7, FSharpChoice$7_$reflection, FSharpChoice$7_Choice1Of7, FSharpChoice$7_Choice2Of7, FSharpChoice$7_Choice3Of7, FSharpChoice$7_Choice4Of7, FSharpChoice$7_Choice5Of7, FSharpChoice$7_Choice6Of7, FSharpChoice$7_Choice7Of7 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isArrayLike } from './Util.js';
|
|
1
|
+
import { isArrayLike, equals } from './Util.js';
|
|
2
2
|
|
|
3
3
|
function count(col) {
|
|
4
4
|
if (typeof col["System.Collections.Generic.ICollection`1.get_Count"] === "function") {
|
|
@@ -27,5 +27,159 @@ function count(col) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
+
function isReadOnly(col) {
|
|
31
|
+
if (typeof col["System.Collections.Generic.ICollection`1.get_IsReadOnly"] === "function") {
|
|
32
|
+
return col["System.Collections.Generic.ICollection`1.get_IsReadOnly"](); // collection
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
if (isArrayLike(col)) {
|
|
36
|
+
return ArrayBuffer.isView(col); // true for typed arrays, false for other arrays
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
if (typeof col.size === "number") {
|
|
40
|
+
return false; // map, set
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return true; // other collections
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function copyTo(col, array, arrayIndex) {
|
|
49
|
+
if (typeof col["System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"] === "function") {
|
|
50
|
+
col["System.Collections.Generic.ICollection`1.CopyToZ3B4C077E"](array, arrayIndex); // collection
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
let i = arrayIndex;
|
|
54
|
+
for (const v of col) {
|
|
55
|
+
array[i] = v;
|
|
56
|
+
i++;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function contains(col, item) {
|
|
61
|
+
if (typeof col["System.Collections.Generic.ICollection`1.Contains2B595"] === "function") {
|
|
62
|
+
return col["System.Collections.Generic.ICollection`1.Contains2B595"](item); // collection
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
if (isArrayLike(col)) {
|
|
66
|
+
let i = col.findIndex(x => equals(x, item)); // array, resize array
|
|
67
|
+
return i >= 0;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
if (typeof col.has === "function") {
|
|
71
|
+
if (typeof col.set === "function" && isArrayLike(item)) {
|
|
72
|
+
return col.has(item[0]) && equals(col.get(item[0]), item[1]); // map
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
return col.has(item); // set
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
return false; // other collections
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function add(col, item) {
|
|
85
|
+
if (typeof col["System.Collections.Generic.ICollection`1.Add2B595"] === "function") {
|
|
86
|
+
return col["System.Collections.Generic.ICollection`1.Add2B595"](item); // collection
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
if (isArrayLike(col)) {
|
|
90
|
+
if (ArrayBuffer.isView(col)) {
|
|
91
|
+
// TODO: throw for typed arrays?
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
col.push(item); // array, resize array
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
if (typeof col.add === "function") {
|
|
99
|
+
return col.add(item); // set
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
if (typeof col.has === "function"
|
|
103
|
+
&& typeof col.set === "function"
|
|
104
|
+
&& isArrayLike(item)) {
|
|
105
|
+
if (col.has(item[0]) === false) {
|
|
106
|
+
col.set(item[0], item[1]); // map
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
throw new Error("An item with the same key has already been added. Key: " + item[0]);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
// TODO: throw for other collections?
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function remove(col, item) {
|
|
120
|
+
if (typeof col["System.Collections.Generic.ICollection`1.Remove2B595"] === "function") {
|
|
121
|
+
return col["System.Collections.Generic.ICollection`1.Remove2B595"](item); // collection
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
if (isArrayLike(col)) {
|
|
125
|
+
if (ArrayBuffer.isView(col)) {
|
|
126
|
+
// TODO: throw for typed arrays
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
let i = col.findIndex(x => equals(x, item));
|
|
131
|
+
if (i >= 0) {
|
|
132
|
+
col.splice(i, 1); // array, resize array
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
if (typeof col.delete === "function") {
|
|
142
|
+
if (typeof col.set === "function" && isArrayLike(item)) {
|
|
143
|
+
if (col.has(item[0]) && equals(col.get(item[0]), item[1])) {
|
|
144
|
+
return col.delete(item[0]); // map
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
return col.delete(item); // set
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
// TODO: throw for other collections?
|
|
156
|
+
return false; // other collections
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function clear(col) {
|
|
162
|
+
if (typeof col["System.Collections.Generic.ICollection`1.Clear"] === "function") {
|
|
163
|
+
return col["System.Collections.Generic.ICollection`1.Clear"](); // collection
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
if (isArrayLike(col)) {
|
|
167
|
+
if (ArrayBuffer.isView(col)) {
|
|
168
|
+
// TODO: throw for typed arrays?
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
col.splice(0); // array, resize array
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
if (typeof col.clear === "function") {
|
|
176
|
+
col.clear(); // map, set
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
// TODO: throw for other collections?
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
30
184
|
|
|
31
|
-
export { count };
|
|
185
|
+
export { add, clear, contains, copyTo, count, isReadOnly, remove };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toInt64, toFloat64 } from './BigInt.js';
|
|
2
|
+
import { padWithZeros, dateOffset, compareDates } from './Util.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* DateTimeOffset functions.
|
|
@@ -93,6 +94,8 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
93
94
|
case 4:
|
|
94
95
|
result += longDays[dayOfWeek(localizedDate)];
|
|
95
96
|
break;
|
|
97
|
+
default:
|
|
98
|
+
break;
|
|
96
99
|
}
|
|
97
100
|
break;
|
|
98
101
|
case "f":
|
|
@@ -148,6 +151,8 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
148
151
|
case 2:
|
|
149
152
|
result += padWithZeros(hour(localizedDate) % 12, 2);
|
|
150
153
|
break;
|
|
154
|
+
default:
|
|
155
|
+
break;
|
|
151
156
|
}
|
|
152
157
|
break;
|
|
153
158
|
case "H":
|
|
@@ -160,6 +165,8 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
160
165
|
case 2:
|
|
161
166
|
result += padWithZeros(hour(localizedDate), 2);
|
|
162
167
|
break;
|
|
168
|
+
default:
|
|
169
|
+
break;
|
|
163
170
|
}
|
|
164
171
|
break;
|
|
165
172
|
case "K":
|
|
@@ -172,10 +179,14 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
172
179
|
result += "Z";
|
|
173
180
|
break;
|
|
174
181
|
case 2 /* DateKind.Local */:
|
|
175
|
-
result += dateOffsetToString(localizedDate.getTimezoneOffset() * -
|
|
182
|
+
result += dateOffsetToString(localizedDate.getTimezoneOffset() * -60000);
|
|
183
|
+
break;
|
|
184
|
+
case 0 /* DateKind.Unspecified */:
|
|
176
185
|
break;
|
|
177
186
|
}
|
|
178
187
|
break;
|
|
188
|
+
default:
|
|
189
|
+
break;
|
|
179
190
|
}
|
|
180
191
|
break;
|
|
181
192
|
case "m":
|
|
@@ -188,6 +199,8 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
188
199
|
case 2:
|
|
189
200
|
result += padWithZeros(minute(localizedDate), 2);
|
|
190
201
|
break;
|
|
202
|
+
default:
|
|
203
|
+
break;
|
|
191
204
|
}
|
|
192
205
|
break;
|
|
193
206
|
case "M":
|
|
@@ -206,6 +219,8 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
206
219
|
case 4:
|
|
207
220
|
result += longMonths[month(localizedDate) - 1];
|
|
208
221
|
break;
|
|
222
|
+
default:
|
|
223
|
+
break;
|
|
209
224
|
}
|
|
210
225
|
break;
|
|
211
226
|
case "s":
|
|
@@ -218,6 +233,8 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
218
233
|
case 2:
|
|
219
234
|
result += padWithZeros(second(localizedDate), 2);
|
|
220
235
|
break;
|
|
236
|
+
default:
|
|
237
|
+
break;
|
|
221
238
|
}
|
|
222
239
|
break;
|
|
223
240
|
case "t":
|
|
@@ -230,6 +247,8 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
230
247
|
case 2:
|
|
231
248
|
result += localizedDate.getHours() < 12 ? "AM" : "PM";
|
|
232
249
|
break;
|
|
250
|
+
default:
|
|
251
|
+
break;
|
|
233
252
|
}
|
|
234
253
|
break;
|
|
235
254
|
case "y":
|
|
@@ -251,6 +270,8 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
251
270
|
case 5:
|
|
252
271
|
result += padWithZeros(localizedDate.getFullYear(), 5);
|
|
253
272
|
break;
|
|
273
|
+
default:
|
|
274
|
+
break;
|
|
254
275
|
}
|
|
255
276
|
break;
|
|
256
277
|
case "z":
|
|
@@ -262,10 +283,10 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
262
283
|
utcOffsetText = "+00:00";
|
|
263
284
|
break;
|
|
264
285
|
case 2 /* DateKind.Local */:
|
|
265
|
-
utcOffsetText = dateOffsetToString(localizedDate.getTimezoneOffset() * -
|
|
286
|
+
utcOffsetText = dateOffsetToString(localizedDate.getTimezoneOffset() * -60000);
|
|
266
287
|
break;
|
|
267
288
|
case 0 /* DateKind.Unspecified */:
|
|
268
|
-
utcOffsetText = dateOffsetToString(toLocalTime(localizedDate).getTimezoneOffset() * -
|
|
289
|
+
utcOffsetText = dateOffsetToString(toLocalTime(localizedDate).getTimezoneOffset() * -60000);
|
|
269
290
|
break;
|
|
270
291
|
}
|
|
271
292
|
const sign = utcOffsetText[0] === "-" ? "-" : "+";
|
|
@@ -328,6 +349,12 @@ function dateToStringWithCustomFormat(date, format, utc) {
|
|
|
328
349
|
function kind(value) {
|
|
329
350
|
return value.kind || 0;
|
|
330
351
|
}
|
|
352
|
+
function unixEpochMillisecondsToTicks(ms, offset) {
|
|
353
|
+
return toInt64(((BigInt(ms) + 62135596800000n) + BigInt(offset)) * 10000n);
|
|
354
|
+
}
|
|
355
|
+
function ticksToUnixEpochMilliseconds(ticks) {
|
|
356
|
+
return Number(((BigInt(ticks) / 10000n) - 62135596800000n));
|
|
357
|
+
}
|
|
331
358
|
function dateOffsetToString(offset) {
|
|
332
359
|
const isMinus = offset < 0;
|
|
333
360
|
offset = Math.abs(offset);
|
|
@@ -357,7 +384,7 @@ function dateToISOString(d, utc) {
|
|
|
357
384
|
padWithZeros(d.getMinutes(), 2) + ":" +
|
|
358
385
|
padWithZeros(d.getSeconds(), 2) + "." +
|
|
359
386
|
padWithZeros(d.getMilliseconds(), 3) +
|
|
360
|
-
(printOffset ? dateOffsetToString(d.getTimezoneOffset() * -
|
|
387
|
+
(printOffset ? dateOffsetToString(d.getTimezoneOffset() * -60000) : "");
|
|
361
388
|
}
|
|
362
389
|
}
|
|
363
390
|
function dateToISOStringWithOffset(dateWithOffset, offset) {
|
|
@@ -418,9 +445,36 @@ function DateTime(value, kind) {
|
|
|
418
445
|
d.kind = (kind == null ? 0 /* DateKind.Unspecified */ : kind) | 0;
|
|
419
446
|
return d;
|
|
420
447
|
}
|
|
448
|
+
function fromTicks(ticks, kind) {
|
|
449
|
+
kind = kind != null ? kind : 2 /* DateKind.Local */; // better default than Unspecified
|
|
450
|
+
let date = DateTime(ticksToUnixEpochMilliseconds(ticks), kind);
|
|
451
|
+
// Ticks are local to offset (in this case, either UTC or Local/Unknown).
|
|
452
|
+
// If kind is anything but UTC, that means that the tick number was not
|
|
453
|
+
// in utc, thus getTime() cannot return UTC, and needs to be shifted.
|
|
454
|
+
if (kind !== 1 /* DateKind.UTC */) {
|
|
455
|
+
date = DateTime(date.getTime() - dateOffset(date), kind);
|
|
456
|
+
}
|
|
457
|
+
return date;
|
|
458
|
+
}
|
|
459
|
+
function fromDateTimeOffset(date, kind) {
|
|
460
|
+
switch (kind) {
|
|
461
|
+
case 1 /* DateKind.UTC */: return DateTime(date.getTime(), 1 /* DateKind.UTC */);
|
|
462
|
+
case 2 /* DateKind.Local */: return DateTime(date.getTime(), 2 /* DateKind.Local */);
|
|
463
|
+
default:
|
|
464
|
+
const d = DateTime(date.getTime() + (date.offset ?? 0), kind);
|
|
465
|
+
return DateTime(d.getTime() - dateOffset(d), kind);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
function getTicks(date) {
|
|
469
|
+
return unixEpochMillisecondsToTicks(date.getTime(), dateOffset(date));
|
|
470
|
+
}
|
|
421
471
|
function minValue() {
|
|
422
472
|
// This is "0001-01-01T00:00:00.000Z", actual JS min value is -8640000000000000
|
|
423
|
-
return DateTime(-
|
|
473
|
+
return DateTime(-62135596800000, 1 /* DateKind.UTC */);
|
|
474
|
+
}
|
|
475
|
+
function maxValue() {
|
|
476
|
+
// This is "9999-12-31T23:59:59.999Z", actual JS max value is 8640000000000000
|
|
477
|
+
return DateTime(253402300799999, 1 /* DateKind.UTC */);
|
|
424
478
|
}
|
|
425
479
|
function parseRaw(input) {
|
|
426
480
|
function fail() {
|
|
@@ -534,15 +588,35 @@ function create(year, month, day, h = 0, m = 0, s = 0, ms = 0, kind) {
|
|
|
534
588
|
function now() {
|
|
535
589
|
return DateTime(Date.now(), 2 /* DateKind.Local */);
|
|
536
590
|
}
|
|
591
|
+
function utcNow() {
|
|
592
|
+
return DateTime(Date.now(), 1 /* DateKind.UTC */);
|
|
593
|
+
}
|
|
537
594
|
function today() {
|
|
538
595
|
return date(now());
|
|
539
596
|
}
|
|
597
|
+
function isLeapYear(year) {
|
|
598
|
+
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
|
|
599
|
+
}
|
|
600
|
+
function daysInMonth(year, month) {
|
|
601
|
+
return month === 2
|
|
602
|
+
? (isLeapYear(year) ? 29 : 28)
|
|
603
|
+
: (month >= 8 ? (month % 2 === 0 ? 31 : 30) : (month % 2 === 0 ? 30 : 31));
|
|
604
|
+
}
|
|
540
605
|
function toUniversalTime(date) {
|
|
541
606
|
return date.kind === 1 /* DateKind.UTC */ ? date : DateTime(date.getTime(), 1 /* DateKind.UTC */);
|
|
542
607
|
}
|
|
543
608
|
function toLocalTime(date) {
|
|
544
609
|
return date.kind === 2 /* DateKind.Local */ ? date : DateTime(date.getTime(), 2 /* DateKind.Local */);
|
|
545
610
|
}
|
|
611
|
+
function specifyKind(d, kind) {
|
|
612
|
+
return create(year(d), month(d), day(d), hour(d), minute(d), second(d), millisecond(d), kind);
|
|
613
|
+
}
|
|
614
|
+
function timeOfDay(d) {
|
|
615
|
+
return hour(d) * 3600000
|
|
616
|
+
+ minute(d) * 60000
|
|
617
|
+
+ second(d) * 1000
|
|
618
|
+
+ millisecond(d);
|
|
619
|
+
}
|
|
546
620
|
function date(d) {
|
|
547
621
|
return create(year(d), month(d), day(d), 0, 0, 0, 0, d.kind);
|
|
548
622
|
}
|
|
@@ -570,5 +644,107 @@ function year(d) {
|
|
|
570
644
|
function dayOfWeek(d) {
|
|
571
645
|
return d.kind === 1 /* DateKind.UTC */ ? d.getUTCDay() : d.getDay();
|
|
572
646
|
}
|
|
647
|
+
function dayOfYear(d) {
|
|
648
|
+
const _year = year(d);
|
|
649
|
+
const _month = month(d);
|
|
650
|
+
let _day = day(d);
|
|
651
|
+
for (let i = 1; i < _month; i++) {
|
|
652
|
+
_day += daysInMonth(_year, i);
|
|
653
|
+
}
|
|
654
|
+
return _day;
|
|
655
|
+
}
|
|
656
|
+
function add(d, ts) {
|
|
657
|
+
const newDate = DateTime(d.getTime() + ts, d.kind);
|
|
658
|
+
if (d.kind !== 1 /* DateKind.UTC */) {
|
|
659
|
+
const oldTzOffset = d.getTimezoneOffset();
|
|
660
|
+
const newTzOffset = newDate.getTimezoneOffset();
|
|
661
|
+
return oldTzOffset !== newTzOffset
|
|
662
|
+
? DateTime(newDate.getTime() + (newTzOffset - oldTzOffset) * 60000, d.kind)
|
|
663
|
+
: newDate;
|
|
664
|
+
}
|
|
665
|
+
else {
|
|
666
|
+
return newDate;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
function addDays(d, v) {
|
|
670
|
+
return add(d, v * 86400000);
|
|
671
|
+
}
|
|
672
|
+
function addHours(d, v) {
|
|
673
|
+
return add(d, v * 3600000);
|
|
674
|
+
}
|
|
675
|
+
function addMinutes(d, v) {
|
|
676
|
+
return add(d, v * 60000);
|
|
677
|
+
}
|
|
678
|
+
function addSeconds(d, v) {
|
|
679
|
+
return add(d, v * 1000);
|
|
680
|
+
}
|
|
681
|
+
function addMilliseconds(d, v) {
|
|
682
|
+
return add(d, v);
|
|
683
|
+
}
|
|
684
|
+
function addTicks(d, v) {
|
|
685
|
+
return add(d, toFloat64(v / 10000n));
|
|
686
|
+
}
|
|
687
|
+
function addYears(d, v) {
|
|
688
|
+
const newMonth = month(d);
|
|
689
|
+
const newYear = year(d) + v;
|
|
690
|
+
const _daysInMonth = daysInMonth(newYear, newMonth);
|
|
691
|
+
const newDay = Math.min(_daysInMonth, day(d));
|
|
692
|
+
return create(newYear, newMonth, newDay, hour(d), minute(d), second(d), millisecond(d), d.kind);
|
|
693
|
+
}
|
|
694
|
+
function addMonths(d, v) {
|
|
695
|
+
let newMonth = month(d) + v;
|
|
696
|
+
let newMonth_ = 0;
|
|
697
|
+
let yearOffset = 0;
|
|
698
|
+
if (newMonth > 12) {
|
|
699
|
+
newMonth_ = newMonth % 12;
|
|
700
|
+
yearOffset = Math.floor(newMonth / 12);
|
|
701
|
+
newMonth = newMonth_;
|
|
702
|
+
}
|
|
703
|
+
else if (newMonth < 1) {
|
|
704
|
+
newMonth_ = 12 + newMonth % 12;
|
|
705
|
+
yearOffset = Math.floor(newMonth / 12) + (newMonth_ === 12 ? -1 : 0);
|
|
706
|
+
newMonth = newMonth_;
|
|
707
|
+
}
|
|
708
|
+
const newYear = year(d) + yearOffset;
|
|
709
|
+
const _daysInMonth = daysInMonth(newYear, newMonth);
|
|
710
|
+
const newDay = Math.min(_daysInMonth, day(d));
|
|
711
|
+
return create(newYear, newMonth, newDay, hour(d), minute(d), second(d), millisecond(d), d.kind);
|
|
712
|
+
}
|
|
713
|
+
function subtract(d, that) {
|
|
714
|
+
return typeof that === "number"
|
|
715
|
+
? add(d, -that)
|
|
716
|
+
: d.getTime() - that.getTime();
|
|
717
|
+
}
|
|
718
|
+
function toLongDateString(d) {
|
|
719
|
+
return d.toDateString();
|
|
720
|
+
}
|
|
721
|
+
function toShortDateString(d) {
|
|
722
|
+
return d.toLocaleDateString();
|
|
723
|
+
}
|
|
724
|
+
function toLongTimeString(d) {
|
|
725
|
+
return d.toLocaleTimeString();
|
|
726
|
+
}
|
|
727
|
+
function toShortTimeString(d) {
|
|
728
|
+
return d.toLocaleTimeString().replace(/:\d\d(?!:)/, "");
|
|
729
|
+
}
|
|
730
|
+
function equals(d1, d2) {
|
|
731
|
+
return d1.getTime() === d2.getTime();
|
|
732
|
+
}
|
|
733
|
+
const compare = compareDates;
|
|
734
|
+
const compareTo = compareDates;
|
|
735
|
+
function op_Addition(x, y) {
|
|
736
|
+
return add(x, y);
|
|
737
|
+
}
|
|
738
|
+
function op_Subtraction(x, y) {
|
|
739
|
+
return subtract(x, y);
|
|
740
|
+
}
|
|
741
|
+
function isDaylightSavingTime(x) {
|
|
742
|
+
const jan = new Date(x.getFullYear(), 0, 1);
|
|
743
|
+
const jul = new Date(x.getFullYear(), 6, 1);
|
|
744
|
+
return isDST(jan.getTimezoneOffset(), jul.getTimezoneOffset(), x.getTimezoneOffset());
|
|
745
|
+
}
|
|
746
|
+
function isDST(janOffset, julOffset, tOffset) {
|
|
747
|
+
return Math.min(janOffset, julOffset) === tOffset;
|
|
748
|
+
}
|
|
573
749
|
|
|
574
|
-
export { DateTime, create, date, dateOffsetToString, dateToHalfUTCString, day, dayOfWeek, DateTime as default, hour, kind, millisecond, minValue, minute, month, now, parse, parseRaw, second, toLocalTime, toString, toUniversalTime, today, tryParse, year };
|
|
750
|
+
export { DateTime, add, addDays, addHours, addMilliseconds, addMinutes, addMonths, addSeconds, addTicks, addYears, compare, compareTo, create, date, dateOffsetToString, dateToHalfUTCString, day, dayOfWeek, dayOfYear, daysInMonth, DateTime as default, equals, fromDateTimeOffset, fromTicks, getTicks, hour, isDaylightSavingTime, isLeapYear, kind, maxValue, millisecond, minValue, minute, month, now, op_Addition, op_Subtraction, parse, parseRaw, second, specifyKind, subtract, ticksToUnixEpochMilliseconds, timeOfDay, toLocalTime, toLongDateString, toLongTimeString, toShortDateString, toShortTimeString, toString, toUniversalTime, today, tryParse, unixEpochMillisecondsToTicks, utcNow, year };
|