@nfdi4plants/arctrl 3.0.0-beta.3 → 3.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/ts/index.js +63 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +354 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +28 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/AsyncBuilder.js +186 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +8 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Boolean.js +24 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +73 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +31 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +574 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +59 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +65 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +30 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +5 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +5 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +48 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +120 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +680 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +40 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +655 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +105 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +320 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +204 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Native.js +10 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Numeric.js +73 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +65 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +23 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +111 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +114 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +36 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +846 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +65 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +1160 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +364 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +40 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +193 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Unicode.13.0.0.js +6 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Uri.js +160 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +367 -0
- package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +825 -0
- package/dist/ts/ts/ARC.js +914 -0
- package/dist/ts/ts/Contract/ARC.js +52 -0
- package/dist/ts/ts/Contract/ArcAssay.js +80 -0
- package/dist/ts/ts/Contract/ArcInvestigation.js +57 -0
- package/dist/ts/ts/Contract/ArcRun.js +76 -0
- package/dist/ts/ts/Contract/ArcStudy.js +76 -0
- package/dist/ts/ts/Contract/ArcWorkflow.js +77 -0
- package/dist/ts/ts/Contract/Contract.js +45 -0
- package/dist/ts/ts/Contract/Datamap.js +221 -0
- package/dist/ts/ts/Contract/Git.js +57 -0
- package/dist/ts/ts/Contract/ValidationPackagesConfig.js +57 -0
- package/dist/ts/ts/ContractIO/ContractIO.js +202 -0
- package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts +1 -1
- package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts.map +1 -1
- package/dist/ts/ts/ContractIO/FileSystemHelper.js +273 -0
- package/dist/ts/ts/Conversion.js +1247 -0
- package/dist/ts/ts/Core/ArcTypes.js +3393 -0
- package/dist/ts/ts/Core/Comment.js +91 -0
- package/dist/ts/ts/Core/CommentList.js +27 -0
- package/dist/ts/ts/Core/Conversion.js +923 -0
- package/dist/ts/ts/Core/Data.js +179 -0
- package/dist/ts/ts/Core/DataContext.js +108 -0
- package/dist/ts/ts/Core/DataFile.js +50 -0
- package/dist/ts/ts/Core/DataMap.js +53 -0
- package/dist/ts/ts/Core/Helper/Collections.js +323 -0
- package/dist/ts/ts/Core/Helper/HashCodes.js +35 -0
- package/dist/ts/ts/Core/Helper/Identifier.js +96 -0
- package/dist/ts/ts/Core/Helper/ORCID.js +34 -0
- package/dist/ts/ts/Core/Helper/Regex.js +296 -0
- package/dist/ts/ts/Core/Helper/SemVer.js +31 -0
- package/dist/ts/ts/Core/Helper/Url.js +32 -0
- package/dist/ts/ts/Core/IdentifierSetters.js +9 -0
- package/dist/ts/ts/Core/OntologyAnnotation.js +207 -0
- package/dist/ts/ts/Core/OntologySourceReference.js +84 -0
- package/dist/ts/ts/Core/Person.js +183 -0
- package/dist/ts/ts/Core/Process/ColumnIndex.js +73 -0
- package/dist/ts/ts/Core/Process/Component.js +121 -0
- package/dist/ts/ts/Core/Process/Factor.js +104 -0
- package/dist/ts/ts/Core/Process/FactorValue.js +68 -0
- package/dist/ts/ts/Core/Process/Material.js +49 -0
- package/dist/ts/ts/Core/Process/MaterialAttribute.js +30 -0
- package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +68 -0
- package/dist/ts/ts/Core/Process/MaterialType.js +28 -0
- package/dist/ts/ts/Core/Process/Process.js +136 -0
- package/dist/ts/ts/Core/Process/ProcessInput.js +207 -0
- package/dist/ts/ts/Core/Process/ProcessOutput.js +178 -0
- package/dist/ts/ts/Core/Process/ProcessParameterValue.js +135 -0
- package/dist/ts/ts/Core/Process/ProcessSequence.js +56 -0
- package/dist/ts/ts/Core/Process/Protocol.js +54 -0
- package/dist/ts/ts/Core/Process/ProtocolParameter.js +69 -0
- package/dist/ts/ts/Core/Process/Sample.js +44 -0
- package/dist/ts/ts/Core/Process/Source.js +38 -0
- package/dist/ts/ts/Core/Publication.js +108 -0
- package/dist/ts/ts/Core/Table/ArcTable.js +889 -0
- package/dist/ts/ts/Core/Table/ArcTableAux.js +993 -0
- package/dist/ts/ts/Core/Table/ArcTables.js +415 -0
- package/dist/ts/ts/Core/Table/CompositeCell.js +334 -0
- package/dist/ts/ts/Core/Table/CompositeColumn.js +52 -0
- package/dist/ts/ts/Core/Table/CompositeHeader.js +792 -0
- package/dist/ts/ts/Core/Template.js +180 -0
- package/dist/ts/ts/Core/Templates.js +75 -0
- package/dist/ts/ts/Core/URI.js +8 -0
- package/dist/ts/ts/Core/Value.js +194 -0
- package/dist/ts/ts/CrossAsync.js +20 -0
- package/dist/ts/ts/FileSystem/DefaultGitattributes.js +3 -0
- package/dist/ts/ts/FileSystem/DefaultGitignore.js +3 -0
- package/dist/ts/ts/FileSystem/FileSystem.js +48 -0
- package/dist/ts/ts/FileSystem/FileSystemTree.js +339 -0
- package/dist/ts/ts/FileSystem/Path.js +36 -0
- package/dist/ts/ts/Json/Assay.d.ts +1 -1
- package/dist/ts/ts/Json/Assay.js +221 -0
- package/dist/ts/ts/Json/Comment.d.ts +1 -1
- package/dist/ts/ts/Json/Comment.js +112 -0
- package/dist/ts/ts/Json/Data.d.ts +1 -1
- package/dist/ts/ts/Json/Data.js +138 -0
- package/dist/ts/ts/Json/DataFile.d.ts +1 -1
- package/dist/ts/ts/Json/DataFile.js +55 -0
- package/dist/ts/ts/Json/DataMap/DataContext.d.ts +1 -1
- package/dist/ts/ts/Json/DataMap/DataContext.js +39 -0
- package/dist/ts/ts/Json/DataMap/DataMap.d.ts +1 -1
- package/dist/ts/ts/Json/DataMap/DataMap.js +27 -0
- package/dist/ts/ts/Json/Decode.d.ts +2 -2
- package/dist/ts/ts/Json/Decode.js +209 -0
- package/dist/ts/ts/Json/Encode.d.ts +1 -1
- package/dist/ts/ts/Json/Encode.js +65 -0
- package/dist/ts/ts/Json/IDTable.d.ts +1 -1
- package/dist/ts/ts/Json/IDTable.js +28 -0
- package/dist/ts/ts/Json/Investigation.d.ts +1 -1
- package/dist/ts/ts/Json/Investigation.js +229 -0
- package/dist/ts/ts/Json/OntologyAnnotation.d.ts +1 -1
- package/dist/ts/ts/Json/OntologyAnnotation.js +194 -0
- package/dist/ts/ts/Json/OntologySourceReference.d.ts +1 -1
- package/dist/ts/ts/Json/OntologySourceReference.js +119 -0
- package/dist/ts/ts/Json/Person.d.ts +1 -1
- package/dist/ts/ts/Json/Person.js +316 -0
- package/dist/ts/ts/Json/Process/AssayMaterials.d.ts +1 -1
- package/dist/ts/ts/Json/Process/AssayMaterials.js +21 -0
- package/dist/ts/ts/Json/Process/Component.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Component.js +41 -0
- package/dist/ts/ts/Json/Process/Factor.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Factor.js +53 -0
- package/dist/ts/ts/Json/Process/FactorValue.d.ts +1 -1
- package/dist/ts/ts/Json/Process/FactorValue.js +44 -0
- package/dist/ts/ts/Json/Process/Material.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Material.js +112 -0
- package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttribute.js +43 -0
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts +1 -1
- package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +44 -0
- package/dist/ts/ts/Json/Process/MaterialType.d.ts +1 -1
- package/dist/ts/ts/Json/Process/MaterialType.js +45 -0
- package/dist/ts/ts/Json/Process/Process.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Process.js +103 -0
- package/dist/ts/ts/Json/Process/ProcessInput.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProcessInput.js +42 -0
- package/dist/ts/ts/Json/Process/ProcessOutput.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProcessOutput.js +35 -0
- package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProcessParameterValue.js +28 -0
- package/dist/ts/ts/Json/Process/Protocol.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Protocol.js +166 -0
- package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts +1 -1
- package/dist/ts/ts/Json/Process/ProtocolParameter.js +43 -0
- package/dist/ts/ts/Json/Process/Sample.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Sample.js +165 -0
- package/dist/ts/ts/Json/Process/Source.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Source.js +133 -0
- package/dist/ts/ts/Json/Process/StudyMaterials.d.ts +1 -1
- package/dist/ts/ts/Json/Process/StudyMaterials.js +23 -0
- package/dist/ts/ts/Json/Process/Value.d.ts +1 -1
- package/dist/ts/ts/Json/Process/Value.js +41 -0
- package/dist/ts/ts/Json/PropertyValue.d.ts +1 -1
- package/dist/ts/ts/Json/PropertyValue.js +280 -0
- package/dist/ts/ts/Json/Publication.d.ts +1 -1
- package/dist/ts/ts/Json/Publication.js +123 -0
- package/dist/ts/ts/Json/ROCrate/LDContext.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDContext.js +115 -0
- package/dist/ts/ts/Json/ROCrate/LDGraph.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDGraph.js +83 -0
- package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDNode.js +190 -0
- package/dist/ts/ts/Json/ROCrate/LDRef.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDRef.js +24 -0
- package/dist/ts/ts/Json/ROCrate/LDValue.d.ts +1 -1
- package/dist/ts/ts/Json/ROCrate/LDValue.js +63 -0
- package/dist/ts/ts/Json/StringTable.d.ts +1 -1
- package/dist/ts/ts/Json/StringTable.js +66 -0
- package/dist/ts/ts/Json/Study.d.ts +1 -1
- package/dist/ts/ts/Json/Study.js +326 -0
- package/dist/ts/ts/Json/Table/ArcTable.d.ts +1 -1
- package/dist/ts/ts/Json/Table/ArcTable.js +210 -0
- package/dist/ts/ts/Json/Table/CellTable.d.ts +1 -1
- package/dist/ts/ts/Json/Table/CellTable.js +53 -0
- package/dist/ts/ts/Json/Table/CompositeCell.d.ts +1 -1
- package/dist/ts/ts/Json/Table/CompositeCell.js +106 -0
- package/dist/ts/ts/Json/Table/CompositeHeader.d.ts +1 -1
- package/dist/ts/ts/Json/Table/CompositeHeader.js +121 -0
- package/dist/ts/ts/Json/Table/IOType.d.ts +1 -1
- package/dist/ts/ts/Json/Table/IOType.js +15 -0
- package/dist/ts/ts/Json/Table/OATable.d.ts +1 -1
- package/dist/ts/ts/Json/Table/OATable.js +50 -0
- package/dist/ts/ts/Json/Table/Templates.d.ts +1 -1
- package/dist/ts/ts/Json/Table/Templates.js +15 -0
- package/dist/ts/ts/Json/context/rocrate/isa_assay_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +61 -0
- package/dist/ts/ts/Json/context/rocrate/isa_comment_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +29 -0
- package/dist/ts/ts/Json/context/rocrate/isa_data_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +41 -0
- package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +69 -0
- package/dist/ts/ts/Json/context/rocrate/isa_material_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +37 -0
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +37 -0
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +41 -0
- package/dist/ts/ts/Json/context/rocrate/isa_organization_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +25 -0
- package/dist/ts/ts/Json/context/rocrate/isa_person_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +86 -0
- package/dist/ts/ts/Json/context/rocrate/isa_process_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +57 -0
- package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +61 -0
- package/dist/ts/ts/Json/context/rocrate/isa_publication_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +45 -0
- package/dist/ts/ts/Json/context/rocrate/isa_sample_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +33 -0
- package/dist/ts/ts/Json/context/rocrate/isa_source_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +33 -0
- package/dist/ts/ts/Json/context/rocrate/isa_study_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +77 -0
- package/dist/ts/ts/Json/context/rocrate/property_value_context.d.ts +1 -1
- package/dist/ts/ts/Json/context/rocrate/property_value_context.js +61 -0
- package/dist/ts/ts/Json/context/rocrate/rocrate_context.d.ts +1 -1
- package/dist/ts/ts/Json.js +171 -0
- package/dist/ts/ts/JsonIO/Assay.js +77 -0
- package/dist/ts/ts/JsonIO/Investigation.js +77 -0
- package/dist/ts/ts/JsonIO/LDObject.js +77 -0
- package/dist/ts/ts/JsonIO/OntologyAnnotation.js +56 -0
- package/dist/ts/ts/JsonIO/Study.js +77 -0
- package/dist/ts/ts/JsonIO/Table/Compression.d.ts +1 -1
- package/dist/ts/ts/JsonIO/Table/Compression.js +39 -0
- package/dist/ts/ts/JsonIO/Table/Templates.d.ts +1 -1
- package/dist/ts/ts/JsonIO/Table/Templates.js +25 -0
- package/dist/ts/ts/ROCrate/Generic/Comment.js +103 -0
- package/dist/ts/ts/ROCrate/Generic/Dataset.js +624 -0
- package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +103 -0
- package/dist/ts/ts/ROCrate/Generic/File.js +184 -0
- package/dist/ts/ts/ROCrate/Generic/LabProcess.js +222 -0
- package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +257 -0
- package/dist/ts/ts/ROCrate/Generic/Organization.js +63 -0
- package/dist/ts/ts/ROCrate/Generic/Person.js +377 -0
- package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +143 -0
- package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +512 -0
- package/dist/ts/ts/ROCrate/Generic/Sample.js +131 -0
- package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +173 -0
- package/dist/ts/ts/ROCrate/Helper.js +7 -0
- package/dist/ts/ts/ROCrate/LDContext.js +288 -0
- package/dist/ts/ts/ROCrate/LDObject.js +855 -0
- package/dist/ts/ts/ROCrate/ROCrateContext.js +39 -0
- package/dist/ts/ts/ROCrateIO.d.ts +1 -1
- package/dist/ts/ts/ROCrateIO.js +58 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +149 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +63 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +108 -0
- package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +410 -0
- package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcAssay.js +169 -0
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +316 -0
- package/dist/ts/ts/Spreadsheet/ArcRun.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcRun.js +136 -0
- package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcStudy.js +92 -0
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +125 -0
- package/dist/ts/ts/Spreadsheet/CollectionAux.js +34 -0
- package/dist/ts/ts/Spreadsheet/DataMap.d.ts +1 -1
- package/dist/ts/ts/Spreadsheet/DataMap.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMap.js +33 -0
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts +2 -2
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +41 -0
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +418 -0
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts +3 -3
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +85 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +90 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +58 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +85 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +133 -0
- package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +15 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +74 -0
- package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +58 -0
- package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +62 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +94 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +81 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Run.js +91 -0
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts +3 -3
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
- package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +193 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Study.js +238 -0
- package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +105 -0
- package/dist/ts/ts/Template.Web.js +22 -0
- package/dist/ts/ts/ValidationPackages/ValidationPackage.js +53 -0
- package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +78 -0
- package/dist/ts/ts/WebRequest/WebRequest.Node.js +13 -0
- package/dist/ts/ts/WebRequest/WebRequest.js +19 -0
- package/dist/ts/ts/Xlsx.d.ts +1 -1
- package/dist/ts/ts/Xlsx.d.ts.map +1 -1
- package/dist/ts/ts/Xlsx.js +91 -0
- package/dist/ts/ts/Yaml/Encode.js +8 -0
- package/dist/ts/ts/Yaml/ValidationPackage.js +26 -0
- package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +40 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +344 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +103 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +19 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +17 -0
- package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +7 -0
- package/dist/ts/ts/fable_modules/Fable.Exceljs.1.6.0/ExcelJs.fs.js +5 -0
- package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +18 -0
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +44 -0
- package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +5 -0
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +142 -0
- package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +76 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +359 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +344 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +154 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +116 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +126 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +135 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +422 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +5 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +25 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +28 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +69 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +42 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +29 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +348 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +86 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +68 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +12 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +54 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +33 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +63 -0
- package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +66 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +544 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +31 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +38 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +79 -0
- package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Encode.fs.js +57 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +235 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +16 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +45 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +89 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +480 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Regex.fs.js +11 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +212 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +164 -0
- package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +136 -0
- package/package.json +10 -7
- package/dist/ts/__vite-browser-external-2447137e.js +0 -4
- package/dist/ts/__vite-browser-external-b3701507.cjs +0 -1
- package/dist/ts/arctrl.cjs.js +0 -5691
- package/dist/ts/arctrl.es.js +0 -35562
- package/dist/ts/arctrl.umd.js +0 -5691
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { rangeDeltas, categories } from './Unicode.13.0.0.js';
|
|
2
|
+
|
|
3
|
+
function getCategoryFunc() {
|
|
4
|
+
// unpack Unicode codepoint ranges (delta encoded) and general categories
|
|
5
|
+
const offset = 35; // offsets unprintable characters
|
|
6
|
+
const a1 = [...rangeDeltas].map((ch) => (ch.codePointAt(0) ?? 0) - offset);
|
|
7
|
+
const a2 = [...categories].map((ch) => (ch.codePointAt(0) ?? 0) - offset);
|
|
8
|
+
const codepoints = new Uint32Array(a1);
|
|
9
|
+
const categories$1 = new Uint8Array(a2);
|
|
10
|
+
for (let i = 1; i < codepoints.length; ++i) {
|
|
11
|
+
codepoints[i] += codepoints[i - 1];
|
|
12
|
+
}
|
|
13
|
+
// binary search in unicode ranges
|
|
14
|
+
return (cp) => {
|
|
15
|
+
let hi = codepoints.length;
|
|
16
|
+
let lo = 0;
|
|
17
|
+
while (hi - lo > 1) {
|
|
18
|
+
const mid = Math.floor((hi + lo) / 2);
|
|
19
|
+
const test = codepoints[mid];
|
|
20
|
+
if (cp < test) {
|
|
21
|
+
hi = mid;
|
|
22
|
+
}
|
|
23
|
+
else if (cp === test) {
|
|
24
|
+
hi = lo = mid;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
else if (test < cp) {
|
|
28
|
+
lo = mid;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return categories$1[lo];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const isDigitMask = 1 << 8 /* UnicodeCategory.DecimalDigitNumber */;
|
|
35
|
+
const isLetterMask = 0
|
|
36
|
+
| 1 << 0 /* UnicodeCategory.UppercaseLetter */
|
|
37
|
+
| 1 << 1 /* UnicodeCategory.LowercaseLetter */
|
|
38
|
+
| 1 << 2 /* UnicodeCategory.TitlecaseLetter */
|
|
39
|
+
| 1 << 3 /* UnicodeCategory.ModifierLetter */
|
|
40
|
+
| 1 << 4 /* UnicodeCategory.OtherLetter */;
|
|
41
|
+
const unicodeCategoryFunc = getCategoryFunc();
|
|
42
|
+
function charCodeAt(s, index) {
|
|
43
|
+
if (index < s.length) {
|
|
44
|
+
return s.charCodeAt(index);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
throw new Error("Index out of range.");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const isDigit = (s) => isDigit2(s, 0);
|
|
51
|
+
const isLetter = (s) => isLetter2(s, 0);
|
|
52
|
+
function getUnicodeCategory2(s, index) {
|
|
53
|
+
const cp = charCodeAt(s, index);
|
|
54
|
+
return unicodeCategoryFunc(cp);
|
|
55
|
+
}
|
|
56
|
+
function isDigit2(s, index) {
|
|
57
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
58
|
+
return (test & isDigitMask) !== 0;
|
|
59
|
+
}
|
|
60
|
+
function isLetter2(s, index) {
|
|
61
|
+
const test = 1 << getUnicodeCategory2(s, index);
|
|
62
|
+
return (test & isLetterMask) !== 0;
|
|
63
|
+
}
|
|
64
|
+
function parse(input) {
|
|
65
|
+
if (input.length === 1) {
|
|
66
|
+
return input[0];
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
throw new Error("String must be exactly one character long.");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { getUnicodeCategory2, isDigit, isDigit2, isLetter, isLetter2, parse };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { isArrayLike } from './Util.js';
|
|
2
|
+
|
|
3
|
+
function count(col) {
|
|
4
|
+
if (typeof col["System.Collections.Generic.ICollection`1.get_Count"] === "function") {
|
|
5
|
+
return col["System.Collections.Generic.ICollection`1.get_Count"](); // collection
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
if (typeof col["System.Collections.Generic.IReadOnlyCollection`1.get_Count"] === "function") {
|
|
9
|
+
return col["System.Collections.Generic.IReadOnlyCollection`1.get_Count"](); // collection
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
if (isArrayLike(col)) {
|
|
13
|
+
return col.length; // array, resize array
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
if (typeof col.size === "number") {
|
|
17
|
+
return col.size; // map, set
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
let count = 0;
|
|
21
|
+
for (const _ of col) {
|
|
22
|
+
count++;
|
|
23
|
+
}
|
|
24
|
+
return count; // other collections
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { count };
|
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
import { padWithZeros } from './Util.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* DateTimeOffset functions.
|
|
5
|
+
*
|
|
6
|
+
* Note: Date instances are always DateObjects in local
|
|
7
|
+
* timezone (because JS dates are all kinds of messed up).
|
|
8
|
+
* A local date returns UTC epoch when `.getTime()` is called.
|
|
9
|
+
*
|
|
10
|
+
* Basically; invariant: date.getTime() always return UTC time.
|
|
11
|
+
*/
|
|
12
|
+
const shortDays = [
|
|
13
|
+
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
|
|
14
|
+
];
|
|
15
|
+
const longDays = [
|
|
16
|
+
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
|
|
17
|
+
];
|
|
18
|
+
const shortMonths = [
|
|
19
|
+
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
|
20
|
+
];
|
|
21
|
+
const longMonths = [
|
|
22
|
+
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
|
|
23
|
+
];
|
|
24
|
+
function parseRepeatToken(format, pos, patternChar) {
|
|
25
|
+
let tokenLength = 0;
|
|
26
|
+
let internalPos = pos;
|
|
27
|
+
while (internalPos < format.length && format[internalPos] === patternChar) {
|
|
28
|
+
internalPos++;
|
|
29
|
+
tokenLength++;
|
|
30
|
+
}
|
|
31
|
+
return tokenLength;
|
|
32
|
+
}
|
|
33
|
+
function parseNextChar(format, pos) {
|
|
34
|
+
if (pos >= format.length - 1) {
|
|
35
|
+
return -1;
|
|
36
|
+
}
|
|
37
|
+
return format.charCodeAt(pos + 1);
|
|
38
|
+
}
|
|
39
|
+
function parseQuotedString(format, pos) {
|
|
40
|
+
let beginPos = pos;
|
|
41
|
+
// Get the character used to quote the string
|
|
42
|
+
const quoteChar = format[pos];
|
|
43
|
+
let result = "";
|
|
44
|
+
let foundQuote = false;
|
|
45
|
+
while (pos < format.length) {
|
|
46
|
+
pos++;
|
|
47
|
+
const currentChar = format[pos];
|
|
48
|
+
if (currentChar === quoteChar) {
|
|
49
|
+
foundQuote = true;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
else if (currentChar === "\\") {
|
|
53
|
+
if (pos < format.length) {
|
|
54
|
+
pos++;
|
|
55
|
+
result += format[pos];
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
// This means that '\' is the last character in the string.
|
|
59
|
+
throw new Error("Invalid string format");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
result += currentChar;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (!foundQuote) {
|
|
67
|
+
// We could not find the matching quote
|
|
68
|
+
throw new Error(`Invalid string format could not find matching quote for ${quoteChar}`);
|
|
69
|
+
}
|
|
70
|
+
return [result, pos - beginPos + 1];
|
|
71
|
+
}
|
|
72
|
+
function dateToStringWithCustomFormat(date, format, utc) {
|
|
73
|
+
let cursorPos = 0;
|
|
74
|
+
let tokenLength = 0;
|
|
75
|
+
let result = "";
|
|
76
|
+
const localizedDate = utc ? DateTime(date.getTime(), 1 /* DateKind.UTC */) : date;
|
|
77
|
+
while (cursorPos < format.length) {
|
|
78
|
+
const token = format[cursorPos];
|
|
79
|
+
switch (token) {
|
|
80
|
+
case "d":
|
|
81
|
+
tokenLength = parseRepeatToken(format, cursorPos, "d");
|
|
82
|
+
cursorPos += tokenLength;
|
|
83
|
+
switch (tokenLength) {
|
|
84
|
+
case 1:
|
|
85
|
+
result += day(localizedDate);
|
|
86
|
+
break;
|
|
87
|
+
case 2:
|
|
88
|
+
result += padWithZeros(day(localizedDate), 2);
|
|
89
|
+
break;
|
|
90
|
+
case 3:
|
|
91
|
+
result += shortDays[dayOfWeek(localizedDate)];
|
|
92
|
+
break;
|
|
93
|
+
case 4:
|
|
94
|
+
result += longDays[dayOfWeek(localizedDate)];
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
break;
|
|
98
|
+
case "f":
|
|
99
|
+
tokenLength = parseRepeatToken(format, cursorPos, "f");
|
|
100
|
+
cursorPos += tokenLength;
|
|
101
|
+
if (tokenLength <= 3) {
|
|
102
|
+
const precision = 10 ** (3 - tokenLength);
|
|
103
|
+
result += padWithZeros(Math.floor(millisecond(localizedDate) / precision), tokenLength);
|
|
104
|
+
}
|
|
105
|
+
else if (tokenLength <= 7) {
|
|
106
|
+
// JavaScript Date only support precision to the millisecond
|
|
107
|
+
// so we fill the rest of the precision with 0 as if the date didn't have
|
|
108
|
+
// milliseconds provided to it.
|
|
109
|
+
// This is to have the same behavior as .NET when doing:
|
|
110
|
+
// DateTime(1, 2, 3, 4, 5, 6, DateTimeKind.Utc).ToString("fffff") => 00000
|
|
111
|
+
result += ("" + millisecond(localizedDate)).padEnd(tokenLength, "0");
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case "F":
|
|
115
|
+
tokenLength = parseRepeatToken(format, cursorPos, "F");
|
|
116
|
+
cursorPos += tokenLength;
|
|
117
|
+
if (tokenLength <= 3) {
|
|
118
|
+
const precision = 10 ** (3 - tokenLength);
|
|
119
|
+
const value = Math.floor(millisecond(localizedDate) / precision);
|
|
120
|
+
if (value != 0) {
|
|
121
|
+
result += padWithZeros(value, tokenLength);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else if (tokenLength <= 7) {
|
|
125
|
+
// JavaScript Date only support precision to the millisecond
|
|
126
|
+
// so we can't go beyond that.
|
|
127
|
+
// We also need to pad start with 0 if the value is not 0
|
|
128
|
+
const value = millisecond(localizedDate);
|
|
129
|
+
if (value != 0) {
|
|
130
|
+
result += padWithZeros(value, 3);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
break;
|
|
134
|
+
case "g":
|
|
135
|
+
tokenLength = parseRepeatToken(format, cursorPos, "g");
|
|
136
|
+
cursorPos += tokenLength;
|
|
137
|
+
if (tokenLength <= 2) {
|
|
138
|
+
result += "A.D.";
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
case "h":
|
|
142
|
+
tokenLength = parseRepeatToken(format, cursorPos, "h");
|
|
143
|
+
cursorPos += tokenLength;
|
|
144
|
+
switch (tokenLength) {
|
|
145
|
+
case 1:
|
|
146
|
+
result += hour(localizedDate) % 12;
|
|
147
|
+
break;
|
|
148
|
+
case 2:
|
|
149
|
+
result += padWithZeros(hour(localizedDate) % 12, 2);
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
break;
|
|
153
|
+
case "H":
|
|
154
|
+
tokenLength = parseRepeatToken(format, cursorPos, "H");
|
|
155
|
+
cursorPos += tokenLength;
|
|
156
|
+
switch (tokenLength) {
|
|
157
|
+
case 1:
|
|
158
|
+
result += hour(localizedDate);
|
|
159
|
+
break;
|
|
160
|
+
case 2:
|
|
161
|
+
result += padWithZeros(hour(localizedDate), 2);
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
break;
|
|
165
|
+
case "K":
|
|
166
|
+
tokenLength = parseRepeatToken(format, cursorPos, "K");
|
|
167
|
+
cursorPos += tokenLength;
|
|
168
|
+
switch (tokenLength) {
|
|
169
|
+
case 1:
|
|
170
|
+
switch (kind(localizedDate)) {
|
|
171
|
+
case 1 /* DateKind.UTC */:
|
|
172
|
+
result += "Z";
|
|
173
|
+
break;
|
|
174
|
+
case 2 /* DateKind.Local */:
|
|
175
|
+
result += dateOffsetToString(localizedDate.getTimezoneOffset() * -6e4);
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
break;
|
|
181
|
+
case "m":
|
|
182
|
+
tokenLength = parseRepeatToken(format, cursorPos, "m");
|
|
183
|
+
cursorPos += tokenLength;
|
|
184
|
+
switch (tokenLength) {
|
|
185
|
+
case 1:
|
|
186
|
+
result += minute(localizedDate);
|
|
187
|
+
break;
|
|
188
|
+
case 2:
|
|
189
|
+
result += padWithZeros(minute(localizedDate), 2);
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
break;
|
|
193
|
+
case "M":
|
|
194
|
+
tokenLength = parseRepeatToken(format, cursorPos, "M");
|
|
195
|
+
cursorPos += tokenLength;
|
|
196
|
+
switch (tokenLength) {
|
|
197
|
+
case 1:
|
|
198
|
+
result += month(localizedDate);
|
|
199
|
+
break;
|
|
200
|
+
case 2:
|
|
201
|
+
result += padWithZeros(month(localizedDate), 2);
|
|
202
|
+
break;
|
|
203
|
+
case 3:
|
|
204
|
+
result += shortMonths[month(localizedDate) - 1];
|
|
205
|
+
break;
|
|
206
|
+
case 4:
|
|
207
|
+
result += longMonths[month(localizedDate) - 1];
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
case "s":
|
|
212
|
+
tokenLength = parseRepeatToken(format, cursorPos, "s");
|
|
213
|
+
cursorPos += tokenLength;
|
|
214
|
+
switch (tokenLength) {
|
|
215
|
+
case 1:
|
|
216
|
+
result += second(localizedDate);
|
|
217
|
+
break;
|
|
218
|
+
case 2:
|
|
219
|
+
result += padWithZeros(second(localizedDate), 2);
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
break;
|
|
223
|
+
case "t":
|
|
224
|
+
tokenLength = parseRepeatToken(format, cursorPos, "t");
|
|
225
|
+
cursorPos += tokenLength;
|
|
226
|
+
switch (tokenLength) {
|
|
227
|
+
case 1:
|
|
228
|
+
result += localizedDate.getHours() < 12 ? "A" : "P";
|
|
229
|
+
break;
|
|
230
|
+
case 2:
|
|
231
|
+
result += localizedDate.getHours() < 12 ? "AM" : "PM";
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
break;
|
|
235
|
+
case "y":
|
|
236
|
+
tokenLength = parseRepeatToken(format, cursorPos, "y");
|
|
237
|
+
cursorPos += tokenLength;
|
|
238
|
+
switch (tokenLength) {
|
|
239
|
+
case 1:
|
|
240
|
+
result += localizedDate.getFullYear() % 100;
|
|
241
|
+
break;
|
|
242
|
+
case 2:
|
|
243
|
+
result += padWithZeros(localizedDate.getFullYear() % 100, 2);
|
|
244
|
+
break;
|
|
245
|
+
case 3:
|
|
246
|
+
result += padWithZeros(localizedDate.getFullYear(), 3);
|
|
247
|
+
break;
|
|
248
|
+
case 4:
|
|
249
|
+
result += padWithZeros(localizedDate.getFullYear(), 4);
|
|
250
|
+
break;
|
|
251
|
+
case 5:
|
|
252
|
+
result += padWithZeros(localizedDate.getFullYear(), 5);
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
break;
|
|
256
|
+
case "z":
|
|
257
|
+
tokenLength = parseRepeatToken(format, cursorPos, "z");
|
|
258
|
+
cursorPos += tokenLength;
|
|
259
|
+
let utcOffsetText = "";
|
|
260
|
+
switch (kind(localizedDate)) {
|
|
261
|
+
case 1 /* DateKind.UTC */:
|
|
262
|
+
utcOffsetText = "+00:00";
|
|
263
|
+
break;
|
|
264
|
+
case 2 /* DateKind.Local */:
|
|
265
|
+
utcOffsetText = dateOffsetToString(localizedDate.getTimezoneOffset() * -6e4);
|
|
266
|
+
break;
|
|
267
|
+
case 0 /* DateKind.Unspecified */:
|
|
268
|
+
utcOffsetText = dateOffsetToString(toLocalTime(localizedDate).getTimezoneOffset() * -6e4);
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
const sign = utcOffsetText[0] === "-" ? "-" : "+";
|
|
272
|
+
const hours = parseInt(utcOffsetText.substring(1, 3), 10);
|
|
273
|
+
const minutes = parseInt(utcOffsetText.substring(4, 6), 10);
|
|
274
|
+
switch (tokenLength) {
|
|
275
|
+
case 1:
|
|
276
|
+
result += `${sign}${hours}`;
|
|
277
|
+
break;
|
|
278
|
+
case 2:
|
|
279
|
+
result += `${sign}${padWithZeros(hours, 2)}`;
|
|
280
|
+
break;
|
|
281
|
+
default:
|
|
282
|
+
result += `${sign}${padWithZeros(hours, 2)}:${padWithZeros(minutes, 2)}`;
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
break;
|
|
286
|
+
case ":":
|
|
287
|
+
result += ":";
|
|
288
|
+
cursorPos++;
|
|
289
|
+
break;
|
|
290
|
+
case "/":
|
|
291
|
+
result += "/";
|
|
292
|
+
cursorPos++;
|
|
293
|
+
break;
|
|
294
|
+
case "'":
|
|
295
|
+
case '"':
|
|
296
|
+
const [quotedString, quotedStringLenght] = parseQuotedString(format, cursorPos);
|
|
297
|
+
result += quotedString;
|
|
298
|
+
cursorPos += quotedStringLenght;
|
|
299
|
+
break;
|
|
300
|
+
case "%":
|
|
301
|
+
const nextChar = parseNextChar(format, cursorPos);
|
|
302
|
+
if (nextChar >= 0 && nextChar !== "%".charCodeAt(0)) {
|
|
303
|
+
cursorPos += 2;
|
|
304
|
+
result += dateToStringWithCustomFormat(localizedDate, String.fromCharCode(nextChar), utc);
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
throw new Error("Invalid format string");
|
|
308
|
+
}
|
|
309
|
+
break;
|
|
310
|
+
case "\\":
|
|
311
|
+
const nextChar2 = parseNextChar(format, cursorPos);
|
|
312
|
+
if (nextChar2 >= 0) {
|
|
313
|
+
cursorPos += 2;
|
|
314
|
+
result += String.fromCharCode(nextChar2);
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
throw new Error("Invalid format string");
|
|
318
|
+
}
|
|
319
|
+
break;
|
|
320
|
+
default:
|
|
321
|
+
cursorPos++;
|
|
322
|
+
result += token;
|
|
323
|
+
break;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
return result;
|
|
327
|
+
}
|
|
328
|
+
function kind(value) {
|
|
329
|
+
return value.kind || 0;
|
|
330
|
+
}
|
|
331
|
+
function dateOffsetToString(offset) {
|
|
332
|
+
const isMinus = offset < 0;
|
|
333
|
+
offset = Math.abs(offset);
|
|
334
|
+
const hours = ~~(offset / 3600000);
|
|
335
|
+
const minutes = (offset % 3600000) / 60000;
|
|
336
|
+
return (isMinus ? "-" : "+") +
|
|
337
|
+
padWithZeros(hours, 2) + ":" +
|
|
338
|
+
padWithZeros(minutes, 2);
|
|
339
|
+
}
|
|
340
|
+
function dateToHalfUTCString(date, half) {
|
|
341
|
+
const str = date.toISOString();
|
|
342
|
+
return half === "first"
|
|
343
|
+
? str.substring(0, str.indexOf("T"))
|
|
344
|
+
: str.substring(str.indexOf("T") + 1, str.length - 1);
|
|
345
|
+
}
|
|
346
|
+
function dateToISOString(d, utc) {
|
|
347
|
+
if (utc) {
|
|
348
|
+
return d.toISOString();
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
// JS Date is always local
|
|
352
|
+
const printOffset = d.kind == null ? true : d.kind === 2 /* DateKind.Local */;
|
|
353
|
+
return padWithZeros(d.getFullYear(), 4) + "-" +
|
|
354
|
+
padWithZeros(d.getMonth() + 1, 2) + "-" +
|
|
355
|
+
padWithZeros(d.getDate(), 2) + "T" +
|
|
356
|
+
padWithZeros(d.getHours(), 2) + ":" +
|
|
357
|
+
padWithZeros(d.getMinutes(), 2) + ":" +
|
|
358
|
+
padWithZeros(d.getSeconds(), 2) + "." +
|
|
359
|
+
padWithZeros(d.getMilliseconds(), 3) +
|
|
360
|
+
(printOffset ? dateOffsetToString(d.getTimezoneOffset() * -6e4) : "");
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
function dateToISOStringWithOffset(dateWithOffset, offset) {
|
|
364
|
+
const str = dateWithOffset.toISOString();
|
|
365
|
+
return str.substring(0, str.length - 1) + dateOffsetToString(offset);
|
|
366
|
+
}
|
|
367
|
+
function dateToStringWithOffset(date, format) {
|
|
368
|
+
const d = new Date(date.getTime() + (date.offset ?? 0));
|
|
369
|
+
if (typeof format !== "string") {
|
|
370
|
+
return d.toISOString().replace(/\.\d+/, "").replace(/[A-Z]|\.\d+/g, " ") + dateOffsetToString((date.offset ?? 0));
|
|
371
|
+
}
|
|
372
|
+
else if (format.length === 1) {
|
|
373
|
+
switch (format) {
|
|
374
|
+
case "D":
|
|
375
|
+
case "d": return dateToHalfUTCString(d, "first");
|
|
376
|
+
case "T":
|
|
377
|
+
case "t": return dateToHalfUTCString(d, "second");
|
|
378
|
+
case "O":
|
|
379
|
+
case "o": return dateToISOStringWithOffset(d, (date.offset ?? 0));
|
|
380
|
+
default: throw new Error("Unrecognized Date print format");
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
return dateToStringWithCustomFormat(d, format, true);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function dateToStringWithKind(date, format) {
|
|
388
|
+
const utc = date.kind === 1 /* DateKind.UTC */;
|
|
389
|
+
if (typeof format !== "string") {
|
|
390
|
+
return utc ? date.toUTCString() : date.toLocaleString();
|
|
391
|
+
}
|
|
392
|
+
else if (format.length === 1) {
|
|
393
|
+
switch (format) {
|
|
394
|
+
case "D":
|
|
395
|
+
case "d":
|
|
396
|
+
return utc ? dateToHalfUTCString(date, "first") : date.toLocaleDateString();
|
|
397
|
+
case "T":
|
|
398
|
+
case "t":
|
|
399
|
+
return utc ? dateToHalfUTCString(date, "second") : date.toLocaleTimeString();
|
|
400
|
+
case "O":
|
|
401
|
+
case "o":
|
|
402
|
+
return dateToISOString(date, utc);
|
|
403
|
+
default:
|
|
404
|
+
throw new Error("Unrecognized Date print format");
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
else {
|
|
408
|
+
return dateToStringWithCustomFormat(date, format, utc);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function toString(date, format, _provider) {
|
|
412
|
+
return date.offset != null
|
|
413
|
+
? dateToStringWithOffset(date, format)
|
|
414
|
+
: dateToStringWithKind(date, format);
|
|
415
|
+
}
|
|
416
|
+
function DateTime(value, kind) {
|
|
417
|
+
const d = new Date(value);
|
|
418
|
+
d.kind = (kind == null ? 0 /* DateKind.Unspecified */ : kind) | 0;
|
|
419
|
+
return d;
|
|
420
|
+
}
|
|
421
|
+
function minValue() {
|
|
422
|
+
// This is "0001-01-01T00:00:00.000Z", actual JS min value is -8640000000000000
|
|
423
|
+
return DateTime(-621355968e5, 1 /* DateKind.UTC */);
|
|
424
|
+
}
|
|
425
|
+
function parseRaw(input) {
|
|
426
|
+
function fail() {
|
|
427
|
+
throw new Error(`The string is not a valid Date: ${input}`);
|
|
428
|
+
}
|
|
429
|
+
if (input == null || input.trim() === "") {
|
|
430
|
+
fail();
|
|
431
|
+
}
|
|
432
|
+
// ISO dates without TZ are parsed as UTC. Adding time without TZ keeps them local.
|
|
433
|
+
if (input.length === 10 && input[4] === "-" && input[7] === "-") {
|
|
434
|
+
input += "T00:00:00";
|
|
435
|
+
}
|
|
436
|
+
let date = new Date(input);
|
|
437
|
+
let offset = null;
|
|
438
|
+
if (isNaN(date.getTime())) {
|
|
439
|
+
// Try to check strings JS Date cannot parse (see #1045, #1422)
|
|
440
|
+
const m = /^\s*(\d+[^\w\s:]\d+[^\w\s:]\d+)?\s*(\d+:\d+(?::\d+(?:\.\d+)?)?)?\s*([AaPp][Mm])?\s*(Z|[+-]([01]?\d):?([0-5]?\d)?)?\s*$/.exec(input);
|
|
441
|
+
if (m != null) {
|
|
442
|
+
let baseDate;
|
|
443
|
+
let timeInSeconds = 0;
|
|
444
|
+
if (m[2] != null) {
|
|
445
|
+
const timeParts = m[2].split(":");
|
|
446
|
+
const hourPart = parseInt(timeParts[0], 10);
|
|
447
|
+
timeInSeconds =
|
|
448
|
+
hourPart * 3600 +
|
|
449
|
+
parseInt(timeParts[1] || "0", 10) * 60 +
|
|
450
|
+
parseFloat(timeParts[2] || "0");
|
|
451
|
+
if (m[3] != null && m[3].toUpperCase() === "PM" && hourPart < 12) {
|
|
452
|
+
timeInSeconds += 720;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
if (m[4] != null) { // There's an offset, parse as UTC
|
|
456
|
+
if (m[1] != null) {
|
|
457
|
+
baseDate = new Date(m[1] + " UTC");
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
const d = new Date();
|
|
461
|
+
baseDate = new Date(d.getUTCFullYear() + "/" + (d.getUTCMonth() + 1) + "/" + d.getUTCDate());
|
|
462
|
+
}
|
|
463
|
+
if (m[4] === "Z") {
|
|
464
|
+
offset = "Z";
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
let offsetInMinutes = parseInt(m[5], 10) * 60 + parseInt(m[6] || "0", 10);
|
|
468
|
+
if (m[4][0] === "-") {
|
|
469
|
+
offsetInMinutes *= -1;
|
|
470
|
+
}
|
|
471
|
+
offset = offsetInMinutes;
|
|
472
|
+
timeInSeconds -= offsetInMinutes * 60;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
else {
|
|
476
|
+
if (m[1] != null) {
|
|
477
|
+
baseDate = new Date(m[1]);
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
const d = new Date();
|
|
481
|
+
baseDate = new Date(d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate());
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
date = new Date(baseDate.getTime() + timeInSeconds * 1000);
|
|
485
|
+
// correct for daylight savings time
|
|
486
|
+
date = new Date(date.getTime() + (date.getTimezoneOffset() - baseDate.getTimezoneOffset()) * 60000);
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
fail();
|
|
490
|
+
}
|
|
491
|
+
// Check again the date is valid after transformations, see #2229
|
|
492
|
+
if (isNaN(date.getTime())) {
|
|
493
|
+
fail();
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return [date, offset];
|
|
497
|
+
}
|
|
498
|
+
function parse(str, detectUTC = false) {
|
|
499
|
+
const [date, offset] = parseRaw(str);
|
|
500
|
+
// .NET always parses DateTime as Local if there's offset info (even "Z")
|
|
501
|
+
// Newtonsoft.Json uses UTC if the offset is "Z"
|
|
502
|
+
const kind = offset != null
|
|
503
|
+
? (detectUTC && offset === "Z" ? 1 /* DateKind.UTC */ : 2 /* DateKind.Local */)
|
|
504
|
+
: 0 /* DateKind.Unspecified */;
|
|
505
|
+
return DateTime(date.getTime(), kind);
|
|
506
|
+
}
|
|
507
|
+
function tryParse(v, defValue) {
|
|
508
|
+
try {
|
|
509
|
+
defValue.contents = parse(v);
|
|
510
|
+
return true;
|
|
511
|
+
}
|
|
512
|
+
catch (_err) {
|
|
513
|
+
return false;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
function create(year, month, day, h = 0, m = 0, s = 0, ms = 0, kind) {
|
|
517
|
+
const date = kind === 1 /* DateKind.UTC */
|
|
518
|
+
? new Date(Date.UTC(year, month - 1, day, h, m, s, ms))
|
|
519
|
+
: new Date(year, month - 1, day, h, m, s, ms);
|
|
520
|
+
if (year <= 99) {
|
|
521
|
+
if (kind === 1 /* DateKind.UTC */) {
|
|
522
|
+
date.setUTCFullYear(year, month - 1, day);
|
|
523
|
+
}
|
|
524
|
+
else {
|
|
525
|
+
date.setFullYear(year, month - 1, day);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
const dateValue = date.getTime();
|
|
529
|
+
if (isNaN(dateValue)) {
|
|
530
|
+
throw new Error("The parameters describe an unrepresentable Date.");
|
|
531
|
+
}
|
|
532
|
+
return DateTime(dateValue, kind);
|
|
533
|
+
}
|
|
534
|
+
function now() {
|
|
535
|
+
return DateTime(Date.now(), 2 /* DateKind.Local */);
|
|
536
|
+
}
|
|
537
|
+
function today() {
|
|
538
|
+
return date(now());
|
|
539
|
+
}
|
|
540
|
+
function toUniversalTime(date) {
|
|
541
|
+
return date.kind === 1 /* DateKind.UTC */ ? date : DateTime(date.getTime(), 1 /* DateKind.UTC */);
|
|
542
|
+
}
|
|
543
|
+
function toLocalTime(date) {
|
|
544
|
+
return date.kind === 2 /* DateKind.Local */ ? date : DateTime(date.getTime(), 2 /* DateKind.Local */);
|
|
545
|
+
}
|
|
546
|
+
function date(d) {
|
|
547
|
+
return create(year(d), month(d), day(d), 0, 0, 0, 0, d.kind);
|
|
548
|
+
}
|
|
549
|
+
function day(d) {
|
|
550
|
+
return d.kind === 1 /* DateKind.UTC */ ? d.getUTCDate() : d.getDate();
|
|
551
|
+
}
|
|
552
|
+
function hour(d) {
|
|
553
|
+
return d.kind === 1 /* DateKind.UTC */ ? d.getUTCHours() : d.getHours();
|
|
554
|
+
}
|
|
555
|
+
function millisecond(d) {
|
|
556
|
+
return d.kind === 1 /* DateKind.UTC */ ? d.getUTCMilliseconds() : d.getMilliseconds();
|
|
557
|
+
}
|
|
558
|
+
function minute(d) {
|
|
559
|
+
return d.kind === 1 /* DateKind.UTC */ ? d.getUTCMinutes() : d.getMinutes();
|
|
560
|
+
}
|
|
561
|
+
function month(d) {
|
|
562
|
+
return (d.kind === 1 /* DateKind.UTC */ ? d.getUTCMonth() : d.getMonth()) + 1;
|
|
563
|
+
}
|
|
564
|
+
function second(d) {
|
|
565
|
+
return d.kind === 1 /* DateKind.UTC */ ? d.getUTCSeconds() : d.getSeconds();
|
|
566
|
+
}
|
|
567
|
+
function year(d) {
|
|
568
|
+
return d.kind === 1 /* DateKind.UTC */ ? d.getUTCFullYear() : d.getFullYear();
|
|
569
|
+
}
|
|
570
|
+
function dayOfWeek(d) {
|
|
571
|
+
return d.kind === 1 /* DateKind.UTC */ ? d.getUTCDay() : d.getDay();
|
|
572
|
+
}
|
|
573
|
+
|
|
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 };
|