@nfdi4plants/arctrl 1.1.0 → 2.0.0-alpha.1

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.
Files changed (377) hide show
  1. package/ARC.js +53 -35
  2. package/{Contracts/Contracts.ARCtrl.js → Contract/ARC.js} +4 -2
  3. package/Contract/ArcAssay.js +102 -0
  4. package/Contract/ArcInvestigation.js +78 -0
  5. package/Contract/ArcStudy.js +102 -0
  6. package/Contract/Contract.js +3 -3
  7. package/{Contracts/Contracts.Git.js → Contract/Git.js} +5 -5
  8. package/{ISA/ISA/ArcTypes → Core}/ArcTypes.js +307 -295
  9. package/Core/Comment.js +97 -0
  10. package/{ISA/ISA/JsonTypes → Core}/CommentList.js +12 -18
  11. package/Core/Conversion.js +1056 -0
  12. package/Core/Helper/Collections.js +318 -0
  13. package/Core/Helper/HashCodes.js +39 -0
  14. package/{ISA/ISA → Core/Helper}/Identifier.js +67 -2
  15. package/{ISA/ISA → Core/Helper}/Regex.js +3 -3
  16. package/{SemVer.js → Core/Helper/SemVer.js} +8 -8
  17. package/{ISA/ISA/ArcTypes → Core}/IdentifierSetters.js +1 -1
  18. package/Core/OntologyAnnotation.js +186 -0
  19. package/Core/OntologySourceReference.js +92 -0
  20. package/Core/Person.js +194 -0
  21. package/Core/Process/ColumnIndex.js +248 -0
  22. package/Core/Process/Component.js +188 -0
  23. package/{ISA/ISA/JsonTypes → Core/Process}/Data.js +8 -8
  24. package/{ISA/ISA/JsonTypes → Core/Process}/DataFile.js +3 -3
  25. package/Core/Process/Factor.js +109 -0
  26. package/{ISA/ISA/JsonTypes → Core/Process}/FactorValue.js +32 -13
  27. package/{ISA/ISA/JsonTypes → Core/Process}/Material.js +9 -9
  28. package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttribute.js +17 -17
  29. package/{ISA/ISA/JsonTypes → Core/Process}/MaterialAttributeValue.js +35 -16
  30. package/{ISA/ISA/JsonTypes → Core/Process}/MaterialType.js +3 -3
  31. package/{ISA/ISA/JsonTypes → Core/Process}/Process.js +46 -79
  32. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessInput.js +42 -42
  33. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessOutput.js +36 -36
  34. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessParameterValue.js +26 -7
  35. package/{ISA/ISA/JsonTypes → Core/Process}/ProcessSequence.js +21 -25
  36. package/{ISA/ISA/JsonTypes → Core/Process}/Protocol.js +26 -57
  37. package/{ISA/ISA/JsonTypes → Core/Process}/ProtocolParameter.js +10 -10
  38. package/{ISA/ISA/JsonTypes → Core/Process}/Sample.js +12 -12
  39. package/{ISA/ISA/JsonTypes → Core/Process}/Source.js +9 -9
  40. package/{ISA/ISA/JsonTypes → Core/Process}/Value.js +24 -31
  41. package/Core/Publication.js +116 -0
  42. package/{ISA/ISA/ArcTypes → Core/Table}/ArcTable.js +49 -155
  43. package/Core/Table/ArcTableAux.js +532 -0
  44. package/{ISA/ISA/ArcTypes → Core/Table}/ArcTables.js +20 -32
  45. package/{ISA/ISA/ArcTypes → Core/Table}/CompositeCell.js +19 -76
  46. package/{ISA/ISA/ArcTypes → Core/Table}/CompositeColumn.js +9 -8
  47. package/{ISA/ISA/ArcTypes → Core/Table}/CompositeHeader.js +14 -34
  48. package/{Templates → Core}/Template.js +16 -17
  49. package/Core/Templates.js +84 -0
  50. package/FileSystem/Commit.js +2 -2
  51. package/FileSystem/FileSystem.js +4 -4
  52. package/FileSystem/FileSystemTree.js +46 -8
  53. package/FileSystem/Path.js +10 -2
  54. package/Json/ARC.js +25 -0
  55. package/Json/Assay.js +202 -0
  56. package/Json/Comment.js +130 -0
  57. package/Json/ConverterOptions.js +18 -0
  58. package/Json/Decode.js +128 -0
  59. package/Json/Encode.js +45 -0
  60. package/Json/Investigation.js +220 -0
  61. package/Json/OntologyAnnotation.js +169 -0
  62. package/Json/OntologySourceReference.js +122 -0
  63. package/Json/Person.js +250 -0
  64. package/Json/Process/AssayMaterials.js +22 -0
  65. package/Json/Process/Component.js +79 -0
  66. package/Json/Process/Data.js +102 -0
  67. package/Json/Process/DataFile.js +81 -0
  68. package/Json/Process/Factor.js +48 -0
  69. package/Json/Process/FactorValue.js +53 -0
  70. package/Json/Process/Material.js +107 -0
  71. package/Json/Process/MaterialAttribute.js +45 -0
  72. package/Json/Process/MaterialAttributeValue.js +70 -0
  73. package/Json/Process/MaterialType.js +60 -0
  74. package/Json/Process/Process.js +107 -0
  75. package/Json/Process/ProcessInput.js +59 -0
  76. package/Json/Process/ProcessOutput.js +71 -0
  77. package/Json/Process/ProcessParameterValue.js +69 -0
  78. package/Json/Process/ProcessSequence.js +53 -0
  79. package/Json/Process/PropertyValue.js +82 -0
  80. package/Json/Process/Protocol.js +147 -0
  81. package/Json/Process/ProtocolParameter.js +45 -0
  82. package/Json/Process/Sample.js +134 -0
  83. package/Json/Process/Source.js +101 -0
  84. package/Json/Process/StudyMaterials.js +24 -0
  85. package/Json/Process/Value.js +42 -0
  86. package/Json/Publication.js +142 -0
  87. package/Json/StringTable.js +44 -0
  88. package/Json/Study.js +306 -0
  89. package/Json/Table/ArcTable.js +223 -0
  90. package/Json/Table/CellTable.js +40 -0
  91. package/Json/Table/CompositeCell.js +65 -0
  92. package/Json/Table/CompositeHeader.js +57 -0
  93. package/Json/Table/Compression.js +38 -0
  94. package/Json/Table/IOType.js +37 -0
  95. package/Json/Table/OATable.js +40 -0
  96. package/Json/Table/Templates.js +107 -0
  97. package/Json/context/rocrate/isa_assay_context.js +32 -0
  98. package/Json/context/rocrate/isa_comment_context.js +23 -0
  99. package/Json/context/rocrate/isa_component_context.js +24 -0
  100. package/Json/context/rocrate/isa_data_context.js +25 -0
  101. package/Json/context/rocrate/isa_factor_context.js +25 -0
  102. package/Json/context/rocrate/isa_factor_value_context.js +23 -0
  103. package/Json/context/rocrate/isa_investigation_context.js +33 -0
  104. package/Json/context/rocrate/isa_material_attribute_context.js +23 -0
  105. package/Json/context/rocrate/isa_material_attribute_value_context.js +23 -0
  106. package/Json/context/rocrate/isa_material_context.js +26 -0
  107. package/Json/context/rocrate/isa_ontology_annotation_context.js +23 -0
  108. package/Json/context/rocrate/isa_ontology_source_reference_context.js +26 -0
  109. package/Json/context/rocrate/isa_organization_context.js +22 -0
  110. package/Json/context/rocrate/isa_person_context.js +33 -0
  111. package/Json/context/rocrate/isa_process_context.js +29 -0
  112. package/Json/context/rocrate/isa_process_parameter_value_context.js +23 -0
  113. package/Json/context/rocrate/isa_protocol_context.js +28 -0
  114. package/Json/context/rocrate/isa_protocol_parameter_context.js +23 -0
  115. package/Json/context/rocrate/isa_publication_context.js +25 -0
  116. package/Json/context/rocrate/isa_sample_context.js +24 -0
  117. package/Json/context/rocrate/isa_source_context.js +25 -0
  118. package/Json/context/rocrate/isa_study_context.js +40 -0
  119. package/Json/context/rocrate/property_value_context.js +4 -0
  120. package/Json/context/rocrate/rocrate_context.js +23 -0
  121. package/Json.js +193 -0
  122. package/README.md +50 -12
  123. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/ArcTable.js +12 -12
  124. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeCell.js +8 -7
  125. package/Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
  126. package/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeHeader.js +10 -10
  127. package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcAssay.js +11 -11
  128. package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcInvestigation.js +34 -37
  129. package/{ISA/ISA.Spreadsheet → Spreadsheet}/ArcStudy.js +12 -12
  130. package/{ISA/ISA.Spreadsheet → Spreadsheet}/CollectionAux.js +8 -8
  131. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Assays.js +32 -32
  132. package/Spreadsheet/Metadata/Comment.js +71 -0
  133. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Contacts.js +28 -30
  134. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Conversions.js +22 -16
  135. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/DesignDescriptors.js +1 -1
  136. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Factors.js +23 -22
  137. package/Spreadsheet/Metadata/OntologyAnnotation.js +64 -0
  138. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/OntologySourceReference.js +22 -24
  139. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Protocols.js +17 -17
  140. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Publication.js +29 -31
  141. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/SparseTable.js +34 -28
  142. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Study.js +38 -40
  143. package/{Templates/Template.Spreadsheet.js → Spreadsheet/Template.js} +31 -31
  144. package/Template.Web.js +27 -0
  145. package/WebRequest/WebRequest.Node.js +15 -0
  146. package/WebRequest/WebRequest.js +10 -29
  147. package/Xlsx.js +85 -0
  148. package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +7 -7
  149. package/fable_modules/Fable.Promise.2.2.2/Promise.fs.js +3 -3
  150. package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +8 -8
  151. package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +2 -2
  152. package/fable_modules/FsSpreadsheet.5.1.3/Cells/FsCell.fs.js +14 -14
  153. package/fable_modules/FsSpreadsheet.5.1.3/Cells/FsCellsCollection.fs.js +6 -6
  154. package/fable_modules/FsSpreadsheet.5.1.3/DSL/CellBuilder.fs.js +4 -4
  155. package/fable_modules/FsSpreadsheet.5.1.3/DSL/ColumnBuilder.fs.js +3 -3
  156. package/fable_modules/FsSpreadsheet.5.1.3/DSL/DSL.fs.js +2 -2
  157. package/fable_modules/FsSpreadsheet.5.1.3/DSL/Expression.fs.js +1 -1
  158. package/fable_modules/FsSpreadsheet.5.1.3/DSL/RowBuilder.fs.js +3 -3
  159. package/fable_modules/FsSpreadsheet.5.1.3/DSL/SheetBuilder.fs.js +3 -3
  160. package/fable_modules/FsSpreadsheet.5.1.3/DSL/TableBuilder.fs.js +3 -3
  161. package/fable_modules/FsSpreadsheet.5.1.3/DSL/Transform.fs.js +6 -6
  162. package/fable_modules/FsSpreadsheet.5.1.3/DSL/Types.fs.js +4 -4
  163. package/fable_modules/FsSpreadsheet.5.1.3/DSL/WorkbookBuilder.fs.js +3 -3
  164. package/fable_modules/FsSpreadsheet.5.1.3/FsAddress.fs.js +8 -8
  165. package/fable_modules/FsSpreadsheet.5.1.3/FsColumn.fs.js +3 -3
  166. package/fable_modules/FsSpreadsheet.5.1.3/FsRow.fs.js +3 -3
  167. package/fable_modules/FsSpreadsheet.5.1.3/FsWorkbook.fs.js +6 -6
  168. package/fable_modules/FsSpreadsheet.5.1.3/FsWorksheet.fs.js +9 -9
  169. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRange.fs.js +3 -3
  170. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeAddress.fs.js +4 -3
  171. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeBase.fs.js +3 -3
  172. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeColumn.fs.js +3 -3
  173. package/fable_modules/FsSpreadsheet.5.1.3/Ranges/FsRangeRow.fs.js +1 -1
  174. package/fable_modules/FsSpreadsheet.5.1.3/SheetBuilder.fs.js +8 -8
  175. package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTable.fs.js +7 -7
  176. package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableField.fs.js +4 -4
  177. package/fable_modules/FsSpreadsheet.5.1.3/Tables/FsTableRow.fs.js +1 -1
  178. package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs +1390 -0
  179. package/fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js +1230 -0
  180. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs +233 -0
  181. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +113 -0
  182. package/fable_modules/Thoth.Json.Core.0.2.1/Thoth.Json.Core.fableproj +28 -0
  183. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs +76 -0
  184. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +33 -0
  185. package/fable_modules/Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  186. package/fable_modules/{Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs → Thoth.Json.Core.0.2.1/obj/Debug/netstandard2.0/Thoth.Json.Core.AssemblyInfo.fs} +8 -7
  187. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs +79 -0
  188. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +85 -0
  189. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs +32 -0
  190. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +45 -0
  191. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Thoth.Json.JavaScript.fableproj +21 -0
  192. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  193. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Debug/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +18 -0
  194. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  195. package/fable_modules/Thoth.Json.JavaScript.0.1.0/obj/Release/netstandard2.0/Thoth.Json.JavaScript.AssemblyInfo.fs +19 -0
  196. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Array.d.ts +4 -1
  197. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Array.js +124 -86
  198. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Boolean.js +2 -2
  199. package/fable_modules/fable-library-js.4.16.0/CHANGELOG.md +47 -0
  200. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Choice.d.ts +0 -17
  201. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Choice.js +0 -43
  202. package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.d.ts +9 -0
  203. package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.js +21 -0
  204. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Date.js +340 -42
  205. package/fable_modules/fable-library-js.4.16.0/FSharp.Core.CompilerServices.d.ts +12 -0
  206. package/fable_modules/fable-library-js.4.16.0/FSharp.Core.CompilerServices.js +27 -0
  207. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/List.js +3 -3
  208. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Map.js +3 -3
  209. package/fable_modules/fable-library-js.4.16.0/MapUtil.d.ts +12 -0
  210. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MapUtil.js +15 -0
  211. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MutableMap.js +2 -1
  212. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MutableSet.js +2 -1
  213. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Random.js +7 -7
  214. package/fable_modules/fable-library-js.4.16.0/Result.d.ts +37 -0
  215. package/fable_modules/fable-library-js.4.16.0/Result.js +165 -0
  216. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Set.js +2 -2
  217. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/String.d.ts +1 -0
  218. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/String.js +8 -5
  219. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/System.Collections.Generic.d.ts +15 -7
  220. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/System.Collections.Generic.js +46 -36
  221. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/System.Text.d.ts +9 -1
  222. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/System.Text.js +60 -8
  223. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Util.d.ts +6 -3
  224. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Util.js +2 -13
  225. package/fable_modules/fable-library-js.4.16.0/big.d.ts +338 -0
  226. package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/package.json +4 -3
  227. package/fable_modules/project_cracked.json +1 -1
  228. package/index.js +14 -12
  229. package/package.json +1 -1
  230. package/Contracts/Contracts.ArcTypes.js +0 -268
  231. package/FileSystemTree.js +0 -51
  232. package/ISA/ISA/ArcTypes/ArcTableAux.js +0 -1155
  233. package/ISA/ISA/ArcTypes/CompositeRow.js +0 -111
  234. package/ISA/ISA/Builder/Types.js +0 -243
  235. package/ISA/ISA/Fable.js +0 -123
  236. package/ISA/ISA/Helper.js +0 -503
  237. package/ISA/ISA/JsonTypes/Assay.js +0 -620
  238. package/ISA/ISA/JsonTypes/AssayMaterials.js +0 -39
  239. package/ISA/ISA/JsonTypes/ColumnIndex.js +0 -246
  240. package/ISA/ISA/JsonTypes/Comment.js +0 -58
  241. package/ISA/ISA/JsonTypes/Component.js +0 -165
  242. package/ISA/ISA/JsonTypes/Factor.js +0 -128
  243. package/ISA/ISA/JsonTypes/Investigation.js +0 -204
  244. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +0 -196
  245. package/ISA/ISA/JsonTypes/OntologySourceReference.js +0 -85
  246. package/ISA/ISA/JsonTypes/Person.js +0 -137
  247. package/ISA/ISA/JsonTypes/Publication.js +0 -105
  248. package/ISA/ISA/JsonTypes/Study.js +0 -942
  249. package/ISA/ISA/JsonTypes/StudyMaterials.js +0 -45
  250. package/ISA/ISA/UIHelper.js +0 -19
  251. package/ISA/ISA.Json/ArcTypes/ArcAssay.js +0 -282
  252. package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +0 -93
  253. package/ISA/ISA.Json/ArcTypes/ArcStudy.js +0 -170
  254. package/ISA/ISA.Json/ArcTypes/ArcTable.js +0 -178
  255. package/ISA/ISA.Json/ArcTypes/CellTable.js +0 -46
  256. package/ISA/ISA.Json/ArcTypes/CompositeCell.js +0 -77
  257. package/ISA/ISA.Json/ArcTypes/CompositeHeader.js +0 -82
  258. package/ISA/ISA.Json/ArcTypes/IOType.js +0 -35
  259. package/ISA/ISA.Json/ArcTypes/OATable.js +0 -48
  260. package/ISA/ISA.Json/Assay.js +0 -105
  261. package/ISA/ISA.Json/Comment.js +0 -84
  262. package/ISA/ISA.Json/ConverterOptions.js +0 -33
  263. package/ISA/ISA.Json/Data.js +0 -271
  264. package/ISA/ISA.Json/Decode.js +0 -46
  265. package/ISA/ISA.Json/Factor.js +0 -194
  266. package/ISA/ISA.Json/GEncode.js +0 -15
  267. package/ISA/ISA.Json/Investigation.js +0 -114
  268. package/ISA/ISA.Json/Material.js +0 -233
  269. package/ISA/ISA.Json/Ontology.js +0 -223
  270. package/ISA/ISA.Json/Person.js +0 -204
  271. package/ISA/ISA.Json/Process.js +0 -291
  272. package/ISA/ISA.Json/Protocol.js +0 -242
  273. package/ISA/ISA.Json/Publication.js +0 -92
  274. package/ISA/ISA.Json/StringTable.js +0 -43
  275. package/ISA/ISA.Json/Study.js +0 -212
  276. package/ISA/ISA.Json/Validation/Fable.js +0 -69
  277. package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +0 -88
  278. package/ISA/ISA.Json/Validation/ValidationResult.js +0 -45
  279. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +0 -59
  280. package/ISA/ISA.Spreadsheet/Metadata/Comment.js +0 -60
  281. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +0 -65
  282. package/Path.js +0 -10
  283. package/Templates/Template.Json.js +0 -83
  284. package/Templates/Template.Web.js +0 -27
  285. package/Templates/Templates.js +0 -82
  286. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +0 -1366
  287. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +0 -1798
  288. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +0 -621
  289. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +0 -472
  290. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +0 -31
  291. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +0 -8
  292. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +0 -30
  293. package/fable_modules/Thoth.Json.10.1.0/Types.fs +0 -59
  294. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +0 -98
  295. package/fable_modules/Thoth.Json.10.1.0/package.json +0 -5
  296. package/fable_modules/fable-library.4.5.0/CHANGELOG.md +0 -11
  297. package/fable_modules/fable-library.4.5.0/MapUtil.d.ts +0 -10
  298. /package/{ISA/ISA/JsonTypes → Core}/URI.js +0 -0
  299. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Async.d.ts +0 -0
  300. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Async.js +0 -0
  301. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/AsyncBuilder.d.ts +0 -0
  302. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/AsyncBuilder.js +0 -0
  303. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/BigInt.d.ts +0 -0
  304. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/BigInt.js +0 -0
  305. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/BitConverter.d.ts +0 -0
  306. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/BitConverter.js +0 -0
  307. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Boolean.d.ts +0 -0
  308. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Char.d.ts +0 -0
  309. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Char.js +0 -0
  310. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Date.d.ts +0 -0
  311. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/DateOffset.d.ts +0 -0
  312. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/DateOffset.js +0 -0
  313. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/DateOnly.d.ts +0 -0
  314. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/DateOnly.js +0 -0
  315. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Decimal.d.ts +0 -0
  316. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Decimal.js +0 -0
  317. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Double.d.ts +0 -0
  318. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Double.js +0 -0
  319. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Encoding.d.ts +0 -0
  320. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Encoding.js +0 -0
  321. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Event.d.ts +0 -0
  322. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Event.js +0 -0
  323. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/FSharp.Collections.d.ts +0 -0
  324. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/FSharp.Collections.js +0 -0
  325. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/FSharp.Core.d.ts +0 -0
  326. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/FSharp.Core.js +0 -0
  327. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Global.d.ts +0 -0
  328. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Global.js +0 -0
  329. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Guid.d.ts +0 -0
  330. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Guid.js +0 -0
  331. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Int32.d.ts +0 -0
  332. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Int32.js +0 -0
  333. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/List.d.ts +0 -0
  334. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Long.d.ts +0 -0
  335. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Long.js +0 -0
  336. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MailboxProcessor.d.ts +0 -0
  337. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MailboxProcessor.js +0 -0
  338. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Map.d.ts +0 -0
  339. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MutableMap.d.ts +0 -0
  340. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/MutableSet.d.ts +0 -0
  341. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Native.d.ts +0 -0
  342. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Native.js +0 -0
  343. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Numeric.d.ts +0 -0
  344. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Numeric.js +0 -0
  345. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Observable.d.ts +0 -0
  346. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Observable.js +0 -0
  347. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Option.d.ts +0 -0
  348. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Option.js +0 -0
  349. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/README.md +0 -0
  350. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Random.d.ts +0 -0
  351. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Range.d.ts +0 -0
  352. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Range.js +0 -0
  353. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Reflection.d.ts +0 -0
  354. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Reflection.js +0 -0
  355. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/RegExp.d.ts +0 -0
  356. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/RegExp.js +0 -0
  357. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Seq.d.ts +0 -0
  358. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Seq.js +0 -0
  359. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Seq2.d.ts +0 -0
  360. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Seq2.js +0 -0
  361. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Set.d.ts +0 -0
  362. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/SystemException.d.ts +0 -0
  363. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/SystemException.js +0 -0
  364. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/TimeOnly.d.ts +0 -0
  365. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/TimeOnly.js +0 -0
  366. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/TimeSpan.d.ts +0 -0
  367. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/TimeSpan.js +0 -0
  368. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Timer.d.ts +0 -0
  369. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Timer.js +0 -0
  370. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Types.d.ts +0 -0
  371. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Types.js +0 -0
  372. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Unicode.13.0.0.d.ts +0 -0
  373. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Unicode.13.0.0.js +0 -0
  374. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Uri.d.ts +0 -0
  375. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/Uri.js +0 -0
  376. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/lib/big.d.ts +0 -0
  377. /package/fable_modules/{fable-library.4.5.0 → fable-library-js.4.16.0}/lib/big.js +0 -0
@@ -0,0 +1,47 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## Unreleased
9
+
10
+ ## 1.4.0 - 2024-03-18
11
+
12
+ ### Added
13
+
14
+ * [JS/TS] Add `ConditionalWeakTable` (by @chkn)
15
+
16
+ ## 1.3.0 - 2024-03-18
17
+
18
+ * [JS/TS] `Boolean.tryParse` should not crash on `null` string (@goswinr)
19
+
20
+ ## 1.2.0 - 2024-03-01
21
+
22
+ ### Fixed
23
+
24
+ * [GH-3772](https://github.com/fable-compiler/Fable/pull/3772) [JS/TS] Re-implement `DateTime.ToString` custom format handling (by @MangelMaxime)
25
+
26
+ It now supports all custom format specifiers, and behave as if `CultureInfo.InvariantCulture` was used (Fable does not support Globalization).
27
+
28
+ ## 1.1.0 - 2024-02-20
29
+
30
+ ### Added
31
+
32
+ #### JavaScript
33
+
34
+ * [GH-3759](https://github.com/fable-compiler/Fable/issues/3759) Add `StringBuilder.Chars` (by @MangelMaxime)
35
+ * Add `StringBuilder.AppendFormat` (by @ncave)
36
+ * [GH-3748](https://github.com/fable-compiler/Fable/pull/3748) Add `Array.getItem` and `Array.setItem` (by @MangelMaxime)
37
+
38
+ ## 1.0.0 - 2024-02-13
39
+
40
+ * Release stable version
41
+
42
+ ## 1.0.0-beta-001 - 2024-02-12
43
+
44
+ ### Changed
45
+
46
+ * Separate `Result` from `Choice`
47
+ * Released as part of Fable 4.12.0
@@ -1,23 +1,6 @@
1
1
  import { Union } from "./Types.js";
2
2
  import { TypeInfo } from "./Reflection.js";
3
3
  import { Option } from "./Option.js";
4
- export type FSharpResult$2_$union<T, TError> = FSharpResult$2<T, TError, 0> | FSharpResult$2<T, TError, 1>;
5
- export type FSharpResult$2_$cases<T, TError> = {
6
- 0: ["Ok", [T]];
7
- 1: ["Error", [TError]];
8
- };
9
- export declare function FSharpResult$2_Ok<T, TError>(ResultValue: T): FSharpResult$2<T, TError, 0>;
10
- export declare function FSharpResult$2_Error<T, TError>(ErrorValue: TError): FSharpResult$2<T, TError, 1>;
11
- export declare class FSharpResult$2<T, TError, Tag extends keyof FSharpResult$2_$cases<T, TError>> extends Union<Tag, FSharpResult$2_$cases<T, TError>[Tag][0]> {
12
- readonly tag: Tag;
13
- readonly fields: FSharpResult$2_$cases<T, TError>[Tag][1];
14
- constructor(tag: Tag, fields: FSharpResult$2_$cases<T, TError>[Tag][1]);
15
- cases(): string[];
16
- }
17
- export declare function FSharpResult$2_$reflection(gen0: TypeInfo, gen1: TypeInfo): TypeInfo;
18
- export declare function Result_Map<a, b, c>(mapping: ((arg0: a) => b), result: FSharpResult$2_$union<a, c>): FSharpResult$2_$union<b, c>;
19
- export declare function Result_MapError<a, b, c>(mapping: ((arg0: a) => b), result: FSharpResult$2_$union<c, a>): FSharpResult$2_$union<c, b>;
20
- export declare function Result_Bind<a, b, c>(binder: ((arg0: a) => FSharpResult$2_$union<b, c>), result: FSharpResult$2_$union<a, c>): FSharpResult$2_$union<b, c>;
21
4
  export type FSharpChoice$2_$union<T1, T2> = FSharpChoice$2<T1, T2, 0> | FSharpChoice$2<T1, T2, 1>;
22
5
  export type FSharpChoice$2_$cases<T1, T2> = {
23
6
  0: ["Choice1Of2", [T1]];
@@ -1,49 +1,6 @@
1
1
  import { Union } from "./Types.js";
2
2
  import { union_type } from "./Reflection.js";
3
3
  import { some } from "./Option.js";
4
- export function FSharpResult$2_Ok(ResultValue) {
5
- return new FSharpResult$2(0, [ResultValue]);
6
- }
7
- export function FSharpResult$2_Error(ErrorValue) {
8
- return new FSharpResult$2(1, [ErrorValue]);
9
- }
10
- export class FSharpResult$2 extends Union {
11
- constructor(tag, fields) {
12
- super();
13
- this.tag = tag;
14
- this.fields = fields;
15
- }
16
- cases() {
17
- return ["Ok", "Error"];
18
- }
19
- }
20
- export function FSharpResult$2_$reflection(gen0, gen1) {
21
- return union_type("FSharp.Core.FSharpResult`2", [gen0, gen1], FSharpResult$2, () => [[["ResultValue", gen0]], [["ErrorValue", gen1]]]);
22
- }
23
- export function Result_Map(mapping, result) {
24
- if (result.tag === /* Ok */ 0) {
25
- return FSharpResult$2_Ok(mapping(result.fields[0]));
26
- }
27
- else {
28
- return FSharpResult$2_Error(result.fields[0]);
29
- }
30
- }
31
- export function Result_MapError(mapping, result) {
32
- if (result.tag === /* Ok */ 0) {
33
- return FSharpResult$2_Ok(result.fields[0]);
34
- }
35
- else {
36
- return FSharpResult$2_Error(mapping(result.fields[0]));
37
- }
38
- }
39
- export function Result_Bind(binder, result) {
40
- if (result.tag === /* Ok */ 0) {
41
- return binder(result.fields[0]);
42
- }
43
- else {
44
- return FSharpResult$2_Error(result.fields[0]);
45
- }
46
- }
47
4
  export function FSharpChoice$2_Choice1Of2(Item) {
48
5
  return new FSharpChoice$2(0, [Item]);
49
6
  }
@@ -0,0 +1,9 @@
1
+ export declare class ConditionalWeakTable<TKey extends object, TValue> {
2
+ private weakMap;
3
+ delete(key: TKey): boolean;
4
+ get(key: TKey): TValue | undefined;
5
+ has(key: TKey): boolean;
6
+ set(key: TKey, value: TValue): WeakMap<TKey, TValue>;
7
+ clear(): void;
8
+ }
9
+ export default ConditionalWeakTable;
@@ -0,0 +1,21 @@
1
+ export class ConditionalWeakTable {
2
+ constructor() {
3
+ this.weakMap = new WeakMap();
4
+ }
5
+ delete(key) {
6
+ return this.weakMap.delete(key);
7
+ }
8
+ get(key) {
9
+ return this.weakMap.get(key);
10
+ }
11
+ has(key) {
12
+ return this.weakMap.has(key);
13
+ }
14
+ set(key, value) {
15
+ return this.weakMap.set(key, value);
16
+ }
17
+ clear() {
18
+ this.weakMap = new WeakMap();
19
+ }
20
+ }
21
+ export default ConditionalWeakTable;
@@ -9,6 +9,342 @@
9
9
  */
10
10
  import { toInt64, toFloat64 } from "./BigInt.js";
11
11
  import { compareDates, dateOffset, padWithZeros } from "./Util.js";
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 += localizedDate.getDate();
86
+ break;
87
+ case 2:
88
+ result += padWithZeros(localizedDate.getDate(), 2);
89
+ break;
90
+ case 3:
91
+ result += shortDays[dayOfWeek(localizedDate)];
92
+ break;
93
+ case 4:
94
+ result += longDays[dayOfWeek(localizedDate)];
95
+ break;
96
+ default:
97
+ break;
98
+ }
99
+ break;
100
+ case "f":
101
+ tokenLength = parseRepeatToken(format, cursorPos, "f");
102
+ cursorPos += tokenLength;
103
+ if (tokenLength <= 3) {
104
+ const precision = 10 ** (3 - tokenLength);
105
+ result += padWithZeros(Math.floor(millisecond(localizedDate) / precision), tokenLength);
106
+ }
107
+ else if (tokenLength <= 7) {
108
+ // JavaScript Date only support precision to the millisecond
109
+ // so we fill the rest of the precision with 0 as if the date didn't have
110
+ // milliseconds provided to it.
111
+ // This is to have the same behavior as .NET when doing:
112
+ // DateTime(1, 2, 3, 4, 5, 6, DateTimeKind.Utc).ToString("fffff") => 00000
113
+ result += ("" + millisecond(localizedDate)).padEnd(tokenLength, "0");
114
+ }
115
+ break;
116
+ case "F":
117
+ tokenLength = parseRepeatToken(format, cursorPos, "F");
118
+ cursorPos += tokenLength;
119
+ if (tokenLength <= 3) {
120
+ const precision = 10 ** (3 - tokenLength);
121
+ const value = Math.floor(millisecond(localizedDate) / precision);
122
+ if (value != 0) {
123
+ result += padWithZeros(value, tokenLength);
124
+ }
125
+ }
126
+ else if (tokenLength <= 7) {
127
+ // JavaScript Date only support precision to the millisecond
128
+ // so we can't go beyond that.
129
+ // We also need to pad start with 0 if the value is not 0
130
+ const value = millisecond(localizedDate);
131
+ if (value != 0) {
132
+ result += padWithZeros(value, 3);
133
+ }
134
+ }
135
+ break;
136
+ case "g":
137
+ tokenLength = parseRepeatToken(format, cursorPos, "g");
138
+ cursorPos += tokenLength;
139
+ if (tokenLength <= 2) {
140
+ result += "A.D.";
141
+ }
142
+ break;
143
+ case "h":
144
+ tokenLength = parseRepeatToken(format, cursorPos, "h");
145
+ cursorPos += tokenLength;
146
+ switch (tokenLength) {
147
+ case 1:
148
+ result += hour(localizedDate) % 12;
149
+ break;
150
+ case 2:
151
+ result += padWithZeros(hour(localizedDate) % 12, 2);
152
+ break;
153
+ default:
154
+ break;
155
+ }
156
+ break;
157
+ case "H":
158
+ tokenLength = parseRepeatToken(format, cursorPos, "H");
159
+ cursorPos += tokenLength;
160
+ switch (tokenLength) {
161
+ case 1:
162
+ result += hour(localizedDate);
163
+ break;
164
+ case 2:
165
+ result += padWithZeros(hour(localizedDate), 2);
166
+ break;
167
+ default:
168
+ break;
169
+ }
170
+ break;
171
+ case "K":
172
+ tokenLength = parseRepeatToken(format, cursorPos, "K");
173
+ cursorPos += tokenLength;
174
+ switch (tokenLength) {
175
+ case 1:
176
+ switch (kind(localizedDate)) {
177
+ case 1 /* DateKind.UTC */:
178
+ result += "Z";
179
+ break;
180
+ case 2 /* DateKind.Local */:
181
+ result += dateOffsetToString(localizedDate.getTimezoneOffset() * -60000);
182
+ break;
183
+ case 0 /* DateKind.Unspecified */:
184
+ break;
185
+ }
186
+ break;
187
+ default:
188
+ break;
189
+ }
190
+ break;
191
+ case "m":
192
+ tokenLength = parseRepeatToken(format, cursorPos, "m");
193
+ cursorPos += tokenLength;
194
+ switch (tokenLength) {
195
+ case 1:
196
+ result += minute(localizedDate);
197
+ break;
198
+ case 2:
199
+ result += padWithZeros(minute(localizedDate), 2);
200
+ break;
201
+ default:
202
+ break;
203
+ }
204
+ break;
205
+ case "M":
206
+ tokenLength = parseRepeatToken(format, cursorPos, "M");
207
+ cursorPos += tokenLength;
208
+ switch (tokenLength) {
209
+ case 1:
210
+ result += month(localizedDate);
211
+ break;
212
+ case 2:
213
+ result += padWithZeros(month(localizedDate), 2);
214
+ break;
215
+ case 3:
216
+ result += shortMonths[month(localizedDate) - 1];
217
+ break;
218
+ case 4:
219
+ result += longMonths[month(localizedDate) - 1];
220
+ break;
221
+ default:
222
+ break;
223
+ }
224
+ break;
225
+ case "s":
226
+ tokenLength = parseRepeatToken(format, cursorPos, "s");
227
+ cursorPos += tokenLength;
228
+ switch (tokenLength) {
229
+ case 1:
230
+ result += second(localizedDate);
231
+ break;
232
+ case 2:
233
+ result += padWithZeros(second(localizedDate), 2);
234
+ break;
235
+ default:
236
+ break;
237
+ }
238
+ break;
239
+ case "t":
240
+ tokenLength = parseRepeatToken(format, cursorPos, "t");
241
+ cursorPos += tokenLength;
242
+ switch (tokenLength) {
243
+ case 1:
244
+ result += localizedDate.getHours() < 12 ? "A" : "P";
245
+ break;
246
+ case 2:
247
+ result += localizedDate.getHours() < 12 ? "AM" : "PM";
248
+ break;
249
+ default:
250
+ break;
251
+ }
252
+ break;
253
+ case "y":
254
+ tokenLength = parseRepeatToken(format, cursorPos, "y");
255
+ cursorPos += tokenLength;
256
+ switch (tokenLength) {
257
+ case 1:
258
+ result += localizedDate.getFullYear() % 100;
259
+ break;
260
+ case 2:
261
+ result += padWithZeros(localizedDate.getFullYear() % 100, 2);
262
+ break;
263
+ case 3:
264
+ result += padWithZeros(localizedDate.getFullYear(), 3);
265
+ break;
266
+ case 4:
267
+ result += padWithZeros(localizedDate.getFullYear(), 4);
268
+ break;
269
+ case 5:
270
+ result += padWithZeros(localizedDate.getFullYear(), 5);
271
+ break;
272
+ default:
273
+ break;
274
+ }
275
+ break;
276
+ case "z":
277
+ tokenLength = parseRepeatToken(format, cursorPos, "z");
278
+ cursorPos += tokenLength;
279
+ let utcOffsetText = "";
280
+ switch (kind(localizedDate)) {
281
+ case 1 /* DateKind.UTC */:
282
+ utcOffsetText = "+00:00";
283
+ break;
284
+ case 2 /* DateKind.Local */:
285
+ utcOffsetText = dateOffsetToString(localizedDate.getTimezoneOffset() * -60000);
286
+ break;
287
+ case 0 /* DateKind.Unspecified */:
288
+ utcOffsetText = dateOffsetToString(toLocalTime(localizedDate).getTimezoneOffset() * -60000);
289
+ break;
290
+ }
291
+ const sign = utcOffsetText[0] === "-" ? "-" : "+";
292
+ const hours = parseInt(utcOffsetText.substring(1, 3), 10);
293
+ const minutes = parseInt(utcOffsetText.substring(4, 6), 10);
294
+ switch (tokenLength) {
295
+ case 1:
296
+ result += `${sign}${hours}`;
297
+ break;
298
+ case 2:
299
+ result += `${sign}${padWithZeros(hours, 2)}`;
300
+ break;
301
+ default:
302
+ result += `${sign}${padWithZeros(hours, 2)}:${padWithZeros(minutes, 2)}`;
303
+ break;
304
+ }
305
+ break;
306
+ case ":":
307
+ result += ":";
308
+ cursorPos++;
309
+ break;
310
+ case "/":
311
+ result += "/";
312
+ cursorPos++;
313
+ break;
314
+ case "'":
315
+ case '"':
316
+ const [quotedString, quotedStringLenght] = parseQuotedString(format, cursorPos);
317
+ result += quotedString;
318
+ cursorPos += quotedStringLenght;
319
+ break;
320
+ case "%":
321
+ const nextChar = parseNextChar(format, cursorPos);
322
+ if (nextChar >= 0 && nextChar !== "%".charCodeAt(0)) {
323
+ cursorPos += 2;
324
+ result += dateToStringWithCustomFormat(localizedDate, String.fromCharCode(nextChar), utc);
325
+ }
326
+ else {
327
+ throw new Error("Invalid format string");
328
+ }
329
+ break;
330
+ case "\\":
331
+ const nextChar2 = parseNextChar(format, cursorPos);
332
+ if (nextChar2 >= 0) {
333
+ cursorPos += 2;
334
+ result += String.fromCharCode(nextChar2);
335
+ }
336
+ else {
337
+ throw new Error("Invalid format string");
338
+ }
339
+ break;
340
+ default:
341
+ cursorPos++;
342
+ result += token;
343
+ break;
344
+ }
345
+ }
346
+ return result;
347
+ }
12
348
  export function kind(value) {
13
349
  return value.kind || 0;
14
350
  }
@@ -54,45 +390,6 @@ function dateToISOStringWithOffset(dateWithOffset, offset) {
54
390
  const str = dateWithOffset.toISOString();
55
391
  return str.substring(0, str.length - 1) + dateOffsetToString(offset);
56
392
  }
57
- function dateToStringWithCustomFormat(date, format, utc) {
58
- return format.replace(/(\w)\1*/g, (match) => {
59
- let rep = Number.NaN;
60
- switch (match.substring(0, 1)) {
61
- case "y":
62
- const y = utc ? date.getUTCFullYear() : date.getFullYear();
63
- rep = match.length < 4 ? y % 100 : y;
64
- break;
65
- case "M":
66
- rep = (utc ? date.getUTCMonth() : date.getMonth()) + 1;
67
- break;
68
- case "d":
69
- rep = utc ? date.getUTCDate() : date.getDate();
70
- break;
71
- case "H":
72
- rep = utc ? date.getUTCHours() : date.getHours();
73
- break;
74
- case "h":
75
- const h = utc ? date.getUTCHours() : date.getHours();
76
- rep = h > 12 ? h % 12 : h;
77
- break;
78
- case "m":
79
- rep = utc ? date.getUTCMinutes() : date.getMinutes();
80
- break;
81
- case "s":
82
- rep = utc ? date.getUTCSeconds() : date.getSeconds();
83
- break;
84
- case "f":
85
- rep = utc ? date.getUTCMilliseconds() : date.getMilliseconds();
86
- break;
87
- }
88
- if (Number.isNaN(rep)) {
89
- return match;
90
- }
91
- else {
92
- return padWithZeros(rep, match.length);
93
- }
94
- });
95
- }
96
393
  function dateToStringWithOffset(date, format) {
97
394
  const d = new Date(date.getTime() + (date.offset ?? 0));
98
395
  if (typeof format !== "string") {
@@ -200,11 +497,12 @@ export function parseRaw(input) {
200
497
  let timeInSeconds = 0;
201
498
  if (m[2] != null) {
202
499
  const timeParts = m[2].split(":");
500
+ const hourPart = parseInt(timeParts[0], 10);
203
501
  timeInSeconds =
204
- parseInt(timeParts[0], 10) * 3600 +
502
+ hourPart * 3600 +
205
503
  parseInt(timeParts[1] || "0", 10) * 60 +
206
504
  parseFloat(timeParts[2] || "0");
207
- if (m[3] != null && m[3].toUpperCase() === "PM") {
505
+ if (m[3] != null && m[3].toUpperCase() === "PM" && hourPart < 12) {
208
506
  timeInSeconds += 720;
209
507
  }
210
508
  }
@@ -357,7 +655,7 @@ export function dayOfYear(d) {
357
655
  }
358
656
  export function add(d, ts) {
359
657
  const newDate = DateTime(d.getTime() + ts, d.kind);
360
- if (d.kind === 2 /* DateKind.Local */) {
658
+ if (d.kind !== 1 /* DateKind.UTC */) {
361
659
  const oldTzOffset = d.getTimezoneOffset();
362
660
  const newTzOffset = newDate.getTimezoneOffset();
363
661
  return oldTzOffset !== newTzOffset
@@ -0,0 +1,12 @@
1
+ import { TypeInfo } from "./Reflection.js";
2
+ import { FSharpList } from "./List.js";
3
+ export declare class ListCollector$1<T> {
4
+ readonly collector: T[];
5
+ constructor();
6
+ }
7
+ export declare function ListCollector$1_$reflection(gen0: TypeInfo): TypeInfo;
8
+ export declare function ListCollector$1_$ctor<T>(): ListCollector$1<T>;
9
+ export declare function ListCollector$1__Add_2B595<T>(this$: ListCollector$1<T>, value: T): void;
10
+ export declare function ListCollector$1__AddMany_BB573A<T>(this$: ListCollector$1<T>, values: Iterable<T>): void;
11
+ export declare function ListCollector$1__AddManyAndClose_BB573A<T>(this$: ListCollector$1<T>, values: Iterable<T>): FSharpList<T>;
12
+ export declare function ListCollector$1__Close<T>(this$: ListCollector$1<T>): FSharpList<T>;
@@ -0,0 +1,27 @@
1
+ import { class_type } from "./Reflection.js";
2
+ import { addRangeInPlace } from "./Array.js";
3
+ import { toList } from "./Seq.js";
4
+ export class ListCollector$1 {
5
+ constructor() {
6
+ this.collector = [];
7
+ }
8
+ }
9
+ export function ListCollector$1_$reflection(gen0) {
10
+ return class_type("Microsoft.FSharp.Core.CompilerServices.ListCollector`1", [gen0], ListCollector$1);
11
+ }
12
+ export function ListCollector$1_$ctor() {
13
+ return new ListCollector$1();
14
+ }
15
+ export function ListCollector$1__Add_2B595(this$, value) {
16
+ void (this$.collector.push(value));
17
+ }
18
+ export function ListCollector$1__AddMany_BB573A(this$, values) {
19
+ addRangeInPlace(values, this$.collector);
20
+ }
21
+ export function ListCollector$1__AddManyAndClose_BB573A(this$, values) {
22
+ addRangeInPlace(values, this$.collector);
23
+ return toList(this$.collector);
24
+ }
25
+ export function ListCollector$1__Close(this$) {
26
+ return toList(this$.collector);
27
+ }
@@ -4,7 +4,7 @@ import { disposeSafe, isArrayLike, defaultOf, toIterator, getEnumerator, compare
4
4
  import { Record } from "./Types.js";
5
5
  import { class_type, record_type, option_type } from "./Reflection.js";
6
6
  import { SR_inputSequenceTooLong, SR_inputSequenceEmpty, SR_inputMustBeNonNegative, SR_notEnoughElements, SR_differentLengths, SR_keyNotFoundAlt, SR_indexOutOfBounds, SR_inputWasEmpty } from "./Global.js";
7
- import { transpose as transpose_1, splitInto as splitInto_1, windowed as windowed_1, pairwise as pairwise_1, chunkBySize as chunkBySize_1, map as map_1, permute as permute_1, tryFindIndexBack as tryFindIndexBack_1, tryFindBack as tryFindBack_1, scanBack as scanBack_1, foldBack2 as foldBack2_1, foldBack as foldBack_1, fill } from "./Array.js";
7
+ import { transpose as transpose_1, splitInto as splitInto_1, windowed as windowed_1, pairwise as pairwise_1, chunkBySize as chunkBySize_1, map as map_1, permute as permute_1, tryFindIndexBack as tryFindIndexBack_1, tryFindBack as tryFindBack_1, scanBack as scanBack_1, item as item_1, foldBack2 as foldBack2_1, foldBack as foldBack_1, setItem, fill } from "./Array.js";
8
8
  export class FSharpList extends Record {
9
9
  constructor(head, tail) {
10
10
  super();
@@ -345,7 +345,7 @@ export function toArray(xs) {
345
345
  loop: while (true) {
346
346
  const i = i_mut, xs_1 = xs_1_mut;
347
347
  if (!FSharpList__get_IsEmpty(xs_1)) {
348
- res[i] = FSharpList__get_Head(xs_1);
348
+ setItem(res, i, FSharpList__get_Head(xs_1));
349
349
  i_mut = (i + 1);
350
350
  xs_1_mut = FSharpList__get_Tail(xs_1);
351
351
  continue loop;
@@ -454,7 +454,7 @@ export function toSeq(xs) {
454
454
  export function ofArrayWithTail(xs, tail_1) {
455
455
  let res = tail_1;
456
456
  for (let i = xs.length - 1; i >= 0; i--) {
457
- res = FSharpList_Cons_305B8EAC(xs[i], res);
457
+ res = FSharpList_Cons_305B8EAC(item_1(i, xs), res);
458
458
  }
459
459
  return res;
460
460
  }
@@ -2,7 +2,7 @@ import { record_type, bool_type, list_type, option_type, class_type } from "./Re
2
2
  import { some, value as value_1 } from "./Option.js";
3
3
  import { structuralHash, compare, toIterator, equals, disposeSafe, getEnumerator, isArrayLike } from "./Util.js";
4
4
  import { singleton, ofArrayWithTail, head, tail, isEmpty as isEmpty_1, fold as fold_1, empty as empty_1, FSharpList, cons } from "./List.js";
5
- import { map as map_2, fill } from "./Array.js";
5
+ import { map as map_2, item, fill, setItem } from "./Array.js";
6
6
  import { Record } from "./Types.js";
7
7
  import { tryPick as tryPick_1, pick as pick_1, iterate as iterate_1, compareWith, map as map_1, unfold } from "./Seq.js";
8
8
  import { format, join } from "./String.js";
@@ -750,7 +750,7 @@ export function MapTreeModule_toList(m) {
750
750
  export function MapTreeModule_copyToArray(m, arr, i) {
751
751
  let j = i;
752
752
  MapTreeModule_iter((x, y) => {
753
- arr[j] = [x, y];
753
+ setItem(arr, j, [x, y]);
754
754
  j = ((j + 1) | 0);
755
755
  }, m);
756
756
  }
@@ -782,7 +782,7 @@ export function MapTreeModule_mkFromEnumerator(comparer_mut, acc_mut, e_mut) {
782
782
  export function MapTreeModule_ofArray(comparer, arr) {
783
783
  let res = MapTreeModule_empty();
784
784
  for (let idx = 0; idx <= (arr.length - 1); idx++) {
785
- const forLoopVar = arr[idx];
785
+ const forLoopVar = item(idx, arr);
786
786
  res = MapTreeModule_add(comparer, forLoopVar[0], forLoopVar[1], res);
787
787
  }
788
788
  return res;
@@ -0,0 +1,12 @@
1
+ import { IMap, IMapOrWeakMap, ISet } from "./Util.js";
2
+ import { FSharpRef } from "./Types.js";
3
+ export declare function keyValueList(fields: Iterable<any>, caseRule?: number): {
4
+ [k: string]: any;
5
+ };
6
+ export declare function containsValue<K, V>(v: V, map: IMap<K, V>): boolean;
7
+ export declare function tryGetValue<K, V>(map: IMapOrWeakMap<K, V>, key: K, defaultValue: FSharpRef<V>): boolean;
8
+ export declare function addToSet<T>(v: T, set: ISet<T>): boolean;
9
+ export declare function tryAddToDict<K, V>(dict: IMapOrWeakMap<K, V>, k: K, v: V): boolean;
10
+ export declare function addToDict<K, V>(dict: IMapOrWeakMap<K, V>, k: K, v: V): void;
11
+ export declare function getItemFromDict<K, V>(map: IMap<K, V>, key: K): V;
12
+ export declare function getItemFromDictOrCreate<K, V>(map: IMapOrWeakMap<K, V>, key: K, createValue: (key: K) => V): V;