@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.
Files changed (380) hide show
  1. package/README.md +2 -0
  2. package/dist/ts/index.js +63 -0
  3. package/dist/ts/node_modules/@fable-org/fable-library-js/Array.js +354 -0
  4. package/dist/ts/node_modules/@fable-org/fable-library-js/Async.js +28 -0
  5. package/dist/ts/node_modules/@fable-org/fable-library-js/AsyncBuilder.js +186 -0
  6. package/dist/ts/node_modules/@fable-org/fable-library-js/BigInt.js +8 -0
  7. package/dist/ts/node_modules/@fable-org/fable-library-js/Boolean.js +24 -0
  8. package/dist/ts/node_modules/@fable-org/fable-library-js/Char.js +73 -0
  9. package/dist/ts/node_modules/@fable-org/fable-library-js/CollectionUtil.js +31 -0
  10. package/dist/ts/node_modules/@fable-org/fable-library-js/Date.js +574 -0
  11. package/dist/ts/node_modules/@fable-org/fable-library-js/DateOffset.js +59 -0
  12. package/dist/ts/node_modules/@fable-org/fable-library-js/Decimal.js +65 -0
  13. package/dist/ts/node_modules/@fable-org/fable-library-js/Double.js +30 -0
  14. package/dist/ts/node_modules/@fable-org/fable-library-js/FSharp.Core.js +5 -0
  15. package/dist/ts/node_modules/@fable-org/fable-library-js/Global.js +5 -0
  16. package/dist/ts/node_modules/@fable-org/fable-library-js/Guid.js +48 -0
  17. package/dist/ts/node_modules/@fable-org/fable-library-js/Int32.js +120 -0
  18. package/dist/ts/node_modules/@fable-org/fable-library-js/List.js +680 -0
  19. package/dist/ts/node_modules/@fable-org/fable-library-js/Long.js +40 -0
  20. package/dist/ts/node_modules/@fable-org/fable-library-js/Map.js +655 -0
  21. package/dist/ts/node_modules/@fable-org/fable-library-js/MapUtil.js +105 -0
  22. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableMap.js +320 -0
  23. package/dist/ts/node_modules/@fable-org/fable-library-js/MutableSet.js +204 -0
  24. package/dist/ts/node_modules/@fable-org/fable-library-js/Native.js +10 -0
  25. package/dist/ts/node_modules/@fable-org/fable-library-js/Numeric.js +73 -0
  26. package/dist/ts/node_modules/@fable-org/fable-library-js/Option.js +65 -0
  27. package/dist/ts/node_modules/@fable-org/fable-library-js/Range.js +23 -0
  28. package/dist/ts/node_modules/@fable-org/fable-library-js/Reflection.js +111 -0
  29. package/dist/ts/node_modules/@fable-org/fable-library-js/RegExp.js +114 -0
  30. package/dist/ts/node_modules/@fable-org/fable-library-js/Result.js +36 -0
  31. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq.js +846 -0
  32. package/dist/ts/node_modules/@fable-org/fable-library-js/Seq2.js +65 -0
  33. package/dist/ts/node_modules/@fable-org/fable-library-js/Set.js +1160 -0
  34. package/dist/ts/node_modules/@fable-org/fable-library-js/String.js +364 -0
  35. package/dist/ts/node_modules/@fable-org/fable-library-js/System.Text.js +40 -0
  36. package/dist/ts/node_modules/@fable-org/fable-library-js/Types.js +193 -0
  37. package/dist/ts/node_modules/@fable-org/fable-library-js/Unicode.13.0.0.js +6 -0
  38. package/dist/ts/node_modules/@fable-org/fable-library-js/Uri.js +160 -0
  39. package/dist/ts/node_modules/@fable-org/fable-library-js/Util.js +367 -0
  40. package/dist/ts/node_modules/@fable-org/fable-library-js/lib/big.js +825 -0
  41. package/dist/ts/ts/ARC.js +914 -0
  42. package/dist/ts/ts/Contract/ARC.js +52 -0
  43. package/dist/ts/ts/Contract/ArcAssay.js +80 -0
  44. package/dist/ts/ts/Contract/ArcInvestigation.js +57 -0
  45. package/dist/ts/ts/Contract/ArcRun.js +76 -0
  46. package/dist/ts/ts/Contract/ArcStudy.js +76 -0
  47. package/dist/ts/ts/Contract/ArcWorkflow.js +77 -0
  48. package/dist/ts/ts/Contract/Contract.js +45 -0
  49. package/dist/ts/ts/Contract/Datamap.js +221 -0
  50. package/dist/ts/ts/Contract/Git.js +57 -0
  51. package/dist/ts/ts/Contract/ValidationPackagesConfig.js +57 -0
  52. package/dist/ts/ts/ContractIO/ContractIO.js +202 -0
  53. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts +1 -1
  54. package/dist/ts/ts/ContractIO/FileSystemHelper.d.ts.map +1 -1
  55. package/dist/ts/ts/ContractIO/FileSystemHelper.js +273 -0
  56. package/dist/ts/ts/Conversion.js +1247 -0
  57. package/dist/ts/ts/Core/ArcTypes.js +3393 -0
  58. package/dist/ts/ts/Core/Comment.js +91 -0
  59. package/dist/ts/ts/Core/CommentList.js +27 -0
  60. package/dist/ts/ts/Core/Conversion.js +923 -0
  61. package/dist/ts/ts/Core/Data.js +179 -0
  62. package/dist/ts/ts/Core/DataContext.js +108 -0
  63. package/dist/ts/ts/Core/DataFile.js +50 -0
  64. package/dist/ts/ts/Core/DataMap.js +53 -0
  65. package/dist/ts/ts/Core/Helper/Collections.js +323 -0
  66. package/dist/ts/ts/Core/Helper/HashCodes.js +35 -0
  67. package/dist/ts/ts/Core/Helper/Identifier.js +96 -0
  68. package/dist/ts/ts/Core/Helper/ORCID.js +34 -0
  69. package/dist/ts/ts/Core/Helper/Regex.js +296 -0
  70. package/dist/ts/ts/Core/Helper/SemVer.js +31 -0
  71. package/dist/ts/ts/Core/Helper/Url.js +32 -0
  72. package/dist/ts/ts/Core/IdentifierSetters.js +9 -0
  73. package/dist/ts/ts/Core/OntologyAnnotation.js +207 -0
  74. package/dist/ts/ts/Core/OntologySourceReference.js +84 -0
  75. package/dist/ts/ts/Core/Person.js +183 -0
  76. package/dist/ts/ts/Core/Process/ColumnIndex.js +73 -0
  77. package/dist/ts/ts/Core/Process/Component.js +121 -0
  78. package/dist/ts/ts/Core/Process/Factor.js +104 -0
  79. package/dist/ts/ts/Core/Process/FactorValue.js +68 -0
  80. package/dist/ts/ts/Core/Process/Material.js +49 -0
  81. package/dist/ts/ts/Core/Process/MaterialAttribute.js +30 -0
  82. package/dist/ts/ts/Core/Process/MaterialAttributeValue.js +68 -0
  83. package/dist/ts/ts/Core/Process/MaterialType.js +28 -0
  84. package/dist/ts/ts/Core/Process/Process.js +136 -0
  85. package/dist/ts/ts/Core/Process/ProcessInput.js +207 -0
  86. package/dist/ts/ts/Core/Process/ProcessOutput.js +178 -0
  87. package/dist/ts/ts/Core/Process/ProcessParameterValue.js +135 -0
  88. package/dist/ts/ts/Core/Process/ProcessSequence.js +56 -0
  89. package/dist/ts/ts/Core/Process/Protocol.js +54 -0
  90. package/dist/ts/ts/Core/Process/ProtocolParameter.js +69 -0
  91. package/dist/ts/ts/Core/Process/Sample.js +44 -0
  92. package/dist/ts/ts/Core/Process/Source.js +38 -0
  93. package/dist/ts/ts/Core/Publication.js +108 -0
  94. package/dist/ts/ts/Core/Table/ArcTable.js +889 -0
  95. package/dist/ts/ts/Core/Table/ArcTableAux.js +993 -0
  96. package/dist/ts/ts/Core/Table/ArcTables.js +415 -0
  97. package/dist/ts/ts/Core/Table/CompositeCell.js +334 -0
  98. package/dist/ts/ts/Core/Table/CompositeColumn.js +52 -0
  99. package/dist/ts/ts/Core/Table/CompositeHeader.js +792 -0
  100. package/dist/ts/ts/Core/Template.js +180 -0
  101. package/dist/ts/ts/Core/Templates.js +75 -0
  102. package/dist/ts/ts/Core/URI.js +8 -0
  103. package/dist/ts/ts/Core/Value.js +194 -0
  104. package/dist/ts/ts/CrossAsync.js +20 -0
  105. package/dist/ts/ts/FileSystem/DefaultGitattributes.js +3 -0
  106. package/dist/ts/ts/FileSystem/DefaultGitignore.js +3 -0
  107. package/dist/ts/ts/FileSystem/FileSystem.js +48 -0
  108. package/dist/ts/ts/FileSystem/FileSystemTree.js +339 -0
  109. package/dist/ts/ts/FileSystem/Path.js +36 -0
  110. package/dist/ts/ts/Json/Assay.d.ts +1 -1
  111. package/dist/ts/ts/Json/Assay.js +221 -0
  112. package/dist/ts/ts/Json/Comment.d.ts +1 -1
  113. package/dist/ts/ts/Json/Comment.js +112 -0
  114. package/dist/ts/ts/Json/Data.d.ts +1 -1
  115. package/dist/ts/ts/Json/Data.js +138 -0
  116. package/dist/ts/ts/Json/DataFile.d.ts +1 -1
  117. package/dist/ts/ts/Json/DataFile.js +55 -0
  118. package/dist/ts/ts/Json/DataMap/DataContext.d.ts +1 -1
  119. package/dist/ts/ts/Json/DataMap/DataContext.js +39 -0
  120. package/dist/ts/ts/Json/DataMap/DataMap.d.ts +1 -1
  121. package/dist/ts/ts/Json/DataMap/DataMap.js +27 -0
  122. package/dist/ts/ts/Json/Decode.d.ts +2 -2
  123. package/dist/ts/ts/Json/Decode.js +209 -0
  124. package/dist/ts/ts/Json/Encode.d.ts +1 -1
  125. package/dist/ts/ts/Json/Encode.js +65 -0
  126. package/dist/ts/ts/Json/IDTable.d.ts +1 -1
  127. package/dist/ts/ts/Json/IDTable.js +28 -0
  128. package/dist/ts/ts/Json/Investigation.d.ts +1 -1
  129. package/dist/ts/ts/Json/Investigation.js +229 -0
  130. package/dist/ts/ts/Json/OntologyAnnotation.d.ts +1 -1
  131. package/dist/ts/ts/Json/OntologyAnnotation.js +194 -0
  132. package/dist/ts/ts/Json/OntologySourceReference.d.ts +1 -1
  133. package/dist/ts/ts/Json/OntologySourceReference.js +119 -0
  134. package/dist/ts/ts/Json/Person.d.ts +1 -1
  135. package/dist/ts/ts/Json/Person.js +316 -0
  136. package/dist/ts/ts/Json/Process/AssayMaterials.d.ts +1 -1
  137. package/dist/ts/ts/Json/Process/AssayMaterials.js +21 -0
  138. package/dist/ts/ts/Json/Process/Component.d.ts +1 -1
  139. package/dist/ts/ts/Json/Process/Component.js +41 -0
  140. package/dist/ts/ts/Json/Process/Factor.d.ts +1 -1
  141. package/dist/ts/ts/Json/Process/Factor.js +53 -0
  142. package/dist/ts/ts/Json/Process/FactorValue.d.ts +1 -1
  143. package/dist/ts/ts/Json/Process/FactorValue.js +44 -0
  144. package/dist/ts/ts/Json/Process/Material.d.ts +1 -1
  145. package/dist/ts/ts/Json/Process/Material.js +112 -0
  146. package/dist/ts/ts/Json/Process/MaterialAttribute.d.ts +1 -1
  147. package/dist/ts/ts/Json/Process/MaterialAttribute.js +43 -0
  148. package/dist/ts/ts/Json/Process/MaterialAttributeValue.d.ts +1 -1
  149. package/dist/ts/ts/Json/Process/MaterialAttributeValue.js +44 -0
  150. package/dist/ts/ts/Json/Process/MaterialType.d.ts +1 -1
  151. package/dist/ts/ts/Json/Process/MaterialType.js +45 -0
  152. package/dist/ts/ts/Json/Process/Process.d.ts +1 -1
  153. package/dist/ts/ts/Json/Process/Process.js +103 -0
  154. package/dist/ts/ts/Json/Process/ProcessInput.d.ts +1 -1
  155. package/dist/ts/ts/Json/Process/ProcessInput.js +42 -0
  156. package/dist/ts/ts/Json/Process/ProcessOutput.d.ts +1 -1
  157. package/dist/ts/ts/Json/Process/ProcessOutput.js +35 -0
  158. package/dist/ts/ts/Json/Process/ProcessParameterValue.d.ts +1 -1
  159. package/dist/ts/ts/Json/Process/ProcessParameterValue.js +28 -0
  160. package/dist/ts/ts/Json/Process/Protocol.d.ts +1 -1
  161. package/dist/ts/ts/Json/Process/Protocol.js +166 -0
  162. package/dist/ts/ts/Json/Process/ProtocolParameter.d.ts +1 -1
  163. package/dist/ts/ts/Json/Process/ProtocolParameter.js +43 -0
  164. package/dist/ts/ts/Json/Process/Sample.d.ts +1 -1
  165. package/dist/ts/ts/Json/Process/Sample.js +165 -0
  166. package/dist/ts/ts/Json/Process/Source.d.ts +1 -1
  167. package/dist/ts/ts/Json/Process/Source.js +133 -0
  168. package/dist/ts/ts/Json/Process/StudyMaterials.d.ts +1 -1
  169. package/dist/ts/ts/Json/Process/StudyMaterials.js +23 -0
  170. package/dist/ts/ts/Json/Process/Value.d.ts +1 -1
  171. package/dist/ts/ts/Json/Process/Value.js +41 -0
  172. package/dist/ts/ts/Json/PropertyValue.d.ts +1 -1
  173. package/dist/ts/ts/Json/PropertyValue.js +280 -0
  174. package/dist/ts/ts/Json/Publication.d.ts +1 -1
  175. package/dist/ts/ts/Json/Publication.js +123 -0
  176. package/dist/ts/ts/Json/ROCrate/LDContext.d.ts +1 -1
  177. package/dist/ts/ts/Json/ROCrate/LDContext.js +115 -0
  178. package/dist/ts/ts/Json/ROCrate/LDGraph.d.ts +1 -1
  179. package/dist/ts/ts/Json/ROCrate/LDGraph.js +83 -0
  180. package/dist/ts/ts/Json/ROCrate/LDNode.d.ts +1 -1
  181. package/dist/ts/ts/Json/ROCrate/LDNode.js +190 -0
  182. package/dist/ts/ts/Json/ROCrate/LDRef.d.ts +1 -1
  183. package/dist/ts/ts/Json/ROCrate/LDRef.js +24 -0
  184. package/dist/ts/ts/Json/ROCrate/LDValue.d.ts +1 -1
  185. package/dist/ts/ts/Json/ROCrate/LDValue.js +63 -0
  186. package/dist/ts/ts/Json/StringTable.d.ts +1 -1
  187. package/dist/ts/ts/Json/StringTable.js +66 -0
  188. package/dist/ts/ts/Json/Study.d.ts +1 -1
  189. package/dist/ts/ts/Json/Study.js +326 -0
  190. package/dist/ts/ts/Json/Table/ArcTable.d.ts +1 -1
  191. package/dist/ts/ts/Json/Table/ArcTable.js +210 -0
  192. package/dist/ts/ts/Json/Table/CellTable.d.ts +1 -1
  193. package/dist/ts/ts/Json/Table/CellTable.js +53 -0
  194. package/dist/ts/ts/Json/Table/CompositeCell.d.ts +1 -1
  195. package/dist/ts/ts/Json/Table/CompositeCell.js +106 -0
  196. package/dist/ts/ts/Json/Table/CompositeHeader.d.ts +1 -1
  197. package/dist/ts/ts/Json/Table/CompositeHeader.js +121 -0
  198. package/dist/ts/ts/Json/Table/IOType.d.ts +1 -1
  199. package/dist/ts/ts/Json/Table/IOType.js +15 -0
  200. package/dist/ts/ts/Json/Table/OATable.d.ts +1 -1
  201. package/dist/ts/ts/Json/Table/OATable.js +50 -0
  202. package/dist/ts/ts/Json/Table/Templates.d.ts +1 -1
  203. package/dist/ts/ts/Json/Table/Templates.js +15 -0
  204. package/dist/ts/ts/Json/context/rocrate/isa_assay_context.d.ts +1 -1
  205. package/dist/ts/ts/Json/context/rocrate/isa_assay_context.js +61 -0
  206. package/dist/ts/ts/Json/context/rocrate/isa_comment_context.d.ts +1 -1
  207. package/dist/ts/ts/Json/context/rocrate/isa_comment_context.js +29 -0
  208. package/dist/ts/ts/Json/context/rocrate/isa_data_context.d.ts +1 -1
  209. package/dist/ts/ts/Json/context/rocrate/isa_data_context.js +41 -0
  210. package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.d.ts +1 -1
  211. package/dist/ts/ts/Json/context/rocrate/isa_investigation_context.js +69 -0
  212. package/dist/ts/ts/Json/context/rocrate/isa_material_context.d.ts +1 -1
  213. package/dist/ts/ts/Json/context/rocrate/isa_material_context.js +37 -0
  214. package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.d.ts +1 -1
  215. package/dist/ts/ts/Json/context/rocrate/isa_ontology_annotation_context.js +37 -0
  216. package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.d.ts +1 -1
  217. package/dist/ts/ts/Json/context/rocrate/isa_ontology_source_reference_context.js +41 -0
  218. package/dist/ts/ts/Json/context/rocrate/isa_organization_context.d.ts +1 -1
  219. package/dist/ts/ts/Json/context/rocrate/isa_organization_context.js +25 -0
  220. package/dist/ts/ts/Json/context/rocrate/isa_person_context.d.ts +1 -1
  221. package/dist/ts/ts/Json/context/rocrate/isa_person_context.js +86 -0
  222. package/dist/ts/ts/Json/context/rocrate/isa_process_context.d.ts +1 -1
  223. package/dist/ts/ts/Json/context/rocrate/isa_process_context.js +57 -0
  224. package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.d.ts +1 -1
  225. package/dist/ts/ts/Json/context/rocrate/isa_protocol_context.js +61 -0
  226. package/dist/ts/ts/Json/context/rocrate/isa_publication_context.d.ts +1 -1
  227. package/dist/ts/ts/Json/context/rocrate/isa_publication_context.js +45 -0
  228. package/dist/ts/ts/Json/context/rocrate/isa_sample_context.d.ts +1 -1
  229. package/dist/ts/ts/Json/context/rocrate/isa_sample_context.js +33 -0
  230. package/dist/ts/ts/Json/context/rocrate/isa_source_context.d.ts +1 -1
  231. package/dist/ts/ts/Json/context/rocrate/isa_source_context.js +33 -0
  232. package/dist/ts/ts/Json/context/rocrate/isa_study_context.d.ts +1 -1
  233. package/dist/ts/ts/Json/context/rocrate/isa_study_context.js +77 -0
  234. package/dist/ts/ts/Json/context/rocrate/property_value_context.d.ts +1 -1
  235. package/dist/ts/ts/Json/context/rocrate/property_value_context.js +61 -0
  236. package/dist/ts/ts/Json/context/rocrate/rocrate_context.d.ts +1 -1
  237. package/dist/ts/ts/Json.js +171 -0
  238. package/dist/ts/ts/JsonIO/Assay.js +77 -0
  239. package/dist/ts/ts/JsonIO/Investigation.js +77 -0
  240. package/dist/ts/ts/JsonIO/LDObject.js +77 -0
  241. package/dist/ts/ts/JsonIO/OntologyAnnotation.js +56 -0
  242. package/dist/ts/ts/JsonIO/Study.js +77 -0
  243. package/dist/ts/ts/JsonIO/Table/Compression.d.ts +1 -1
  244. package/dist/ts/ts/JsonIO/Table/Compression.js +39 -0
  245. package/dist/ts/ts/JsonIO/Table/Templates.d.ts +1 -1
  246. package/dist/ts/ts/JsonIO/Table/Templates.js +25 -0
  247. package/dist/ts/ts/ROCrate/Generic/Comment.js +103 -0
  248. package/dist/ts/ts/ROCrate/Generic/Dataset.js +624 -0
  249. package/dist/ts/ts/ROCrate/Generic/DefinedTerm.js +103 -0
  250. package/dist/ts/ts/ROCrate/Generic/File.js +184 -0
  251. package/dist/ts/ts/ROCrate/Generic/LabProcess.js +222 -0
  252. package/dist/ts/ts/ROCrate/Generic/LabProtocol.js +257 -0
  253. package/dist/ts/ts/ROCrate/Generic/Organization.js +63 -0
  254. package/dist/ts/ts/ROCrate/Generic/Person.js +377 -0
  255. package/dist/ts/ts/ROCrate/Generic/PostalAddress.js +143 -0
  256. package/dist/ts/ts/ROCrate/Generic/PropertyValue.js +512 -0
  257. package/dist/ts/ts/ROCrate/Generic/Sample.js +131 -0
  258. package/dist/ts/ts/ROCrate/Generic/ScholarlyArticle.js +173 -0
  259. package/dist/ts/ts/ROCrate/Helper.js +7 -0
  260. package/dist/ts/ts/ROCrate/LDContext.js +288 -0
  261. package/dist/ts/ts/ROCrate/LDObject.js +855 -0
  262. package/dist/ts/ts/ROCrate/ROCrateContext.js +39 -0
  263. package/dist/ts/ts/ROCrateIO.d.ts +1 -1
  264. package/dist/ts/ts/ROCrateIO.js +58 -0
  265. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +2 -2
  266. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
  267. package/dist/ts/ts/Spreadsheet/AnnotationTable/ArcTable.js +149 -0
  268. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeCell.js +63 -0
  269. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +2 -2
  270. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
  271. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +108 -0
  272. package/dist/ts/ts/Spreadsheet/AnnotationTable/CompositeHeader.js +410 -0
  273. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts +2 -2
  274. package/dist/ts/ts/Spreadsheet/ArcAssay.d.ts.map +1 -1
  275. package/dist/ts/ts/Spreadsheet/ArcAssay.js +169 -0
  276. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts +2 -2
  277. package/dist/ts/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
  278. package/dist/ts/ts/Spreadsheet/ArcInvestigation.js +316 -0
  279. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts +2 -2
  280. package/dist/ts/ts/Spreadsheet/ArcRun.d.ts.map +1 -1
  281. package/dist/ts/ts/Spreadsheet/ArcRun.js +136 -0
  282. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts +2 -2
  283. package/dist/ts/ts/Spreadsheet/ArcStudy.d.ts.map +1 -1
  284. package/dist/ts/ts/Spreadsheet/ArcStudy.js +92 -0
  285. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts +2 -2
  286. package/dist/ts/ts/Spreadsheet/ArcWorkflow.d.ts.map +1 -1
  287. package/dist/ts/ts/Spreadsheet/ArcWorkflow.js +125 -0
  288. package/dist/ts/ts/Spreadsheet/CollectionAux.js +34 -0
  289. package/dist/ts/ts/Spreadsheet/DataMap.d.ts +1 -1
  290. package/dist/ts/ts/Spreadsheet/DataMap.d.ts.map +1 -1
  291. package/dist/ts/ts/Spreadsheet/DataMap.js +33 -0
  292. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts +2 -2
  293. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.d.ts.map +1 -1
  294. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapColumn.js +41 -0
  295. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts +1 -1
  296. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.d.ts.map +1 -1
  297. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapHeader.js +418 -0
  298. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts +3 -3
  299. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.d.ts.map +1 -1
  300. package/dist/ts/ts/Spreadsheet/DataMapTable/DataMapTable.js +85 -0
  301. package/dist/ts/ts/Spreadsheet/Metadata/Assays.js +90 -0
  302. package/dist/ts/ts/Spreadsheet/Metadata/Comment.js +58 -0
  303. package/dist/ts/ts/Spreadsheet/Metadata/Contacts.js +85 -0
  304. package/dist/ts/ts/Spreadsheet/Metadata/Conversions.js +133 -0
  305. package/dist/ts/ts/Spreadsheet/Metadata/DesignDescriptors.js +15 -0
  306. package/dist/ts/ts/Spreadsheet/Metadata/Factors.js +74 -0
  307. package/dist/ts/ts/Spreadsheet/Metadata/OntologyAnnotation.js +58 -0
  308. package/dist/ts/ts/Spreadsheet/Metadata/OntologySourceReference.js +62 -0
  309. package/dist/ts/ts/Spreadsheet/Metadata/Protocols.js +94 -0
  310. package/dist/ts/ts/Spreadsheet/Metadata/Publication.js +81 -0
  311. package/dist/ts/ts/Spreadsheet/Metadata/Run.js +91 -0
  312. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts +3 -3
  313. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
  314. package/dist/ts/ts/Spreadsheet/Metadata/SparseTable.js +193 -0
  315. package/dist/ts/ts/Spreadsheet/Metadata/Study.js +238 -0
  316. package/dist/ts/ts/Spreadsheet/Metadata/Workflow.js +105 -0
  317. package/dist/ts/ts/Template.Web.js +22 -0
  318. package/dist/ts/ts/ValidationPackages/ValidationPackage.js +53 -0
  319. package/dist/ts/ts/ValidationPackages/ValidationPackagesConfig.js +78 -0
  320. package/dist/ts/ts/WebRequest/WebRequest.Node.js +13 -0
  321. package/dist/ts/ts/WebRequest/WebRequest.js +19 -0
  322. package/dist/ts/ts/Xlsx.d.ts +1 -1
  323. package/dist/ts/ts/Xlsx.d.ts.map +1 -1
  324. package/dist/ts/ts/Xlsx.js +91 -0
  325. package/dist/ts/ts/Yaml/Encode.js +8 -0
  326. package/dist/ts/ts/Yaml/ValidationPackage.js +26 -0
  327. package/dist/ts/ts/Yaml/ValidationPackagesConfig.js +40 -0
  328. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/DynamicObj.fs.js +344 -0
  329. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/FableJS.fs.js +103 -0
  330. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/HashCodes.fs.js +19 -0
  331. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/PropertyHelper.fs.js +17 -0
  332. package/dist/ts/ts/fable_modules/DynamicObj.7.0.1/ReflectionUtils.fs.js +7 -0
  333. package/dist/ts/ts/fable_modules/Fable.Exceljs.1.6.0/ExcelJs.fs.js +5 -0
  334. package/dist/ts/ts/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +18 -0
  335. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +44 -0
  336. package/dist/ts/ts/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +5 -0
  337. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +142 -0
  338. package/dist/ts/ts/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +76 -0
  339. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCell.fs.js +359 -0
  340. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Cells/FsCellsCollection.fs.js +344 -0
  341. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsAddress.fs.js +154 -0
  342. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsColumn.fs.js +116 -0
  343. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsRow.fs.js +126 -0
  344. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorkbook.fs.js +135 -0
  345. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/FsWorksheet.fs.js +422 -0
  346. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/HashCodes.fs.js +5 -0
  347. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Json/Value.fs.js +25 -0
  348. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRange.fs.js +28 -0
  349. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeAddress.fs.js +82 -0
  350. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeBase.fs.js +69 -0
  351. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeColumn.fs.js +42 -0
  352. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Ranges/FsRangeRow.fs.js +29 -0
  353. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTable.fs.js +348 -0
  354. package/dist/ts/ts/fable_modules/FsSpreadsheet.7.0.0-alpha.1/Tables/FsTableField.fs.js +86 -0
  355. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Cell.fs.js +68 -0
  356. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/FsExtensions.fs.js +12 -0
  357. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Table.fs.js +54 -0
  358. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Workbook.fs.js +33 -0
  359. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Worksheet.fs.js +63 -0
  360. package/dist/ts/ts/fable_modules/FsSpreadsheet.Js.7.0.0-alpha.1/Xlsx.fs.js +66 -0
  361. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Decode.fs.js +544 -0
  362. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Encode.fs.js +31 -0
  363. package/dist/ts/ts/fable_modules/Thoth.Json.Core.0.7.0/Types.fs.js +38 -0
  364. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Decode.fs.js +79 -0
  365. package/dist/ts/ts/fable_modules/Thoth.Json.JavaScript.0.4.1/Encode.fs.js +57 -0
  366. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Decode.fs.js +235 -0
  367. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Encode.fs.js +16 -0
  368. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Persil.fs.js +45 -0
  369. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Preprocessing.fs.js +89 -0
  370. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Reader.fs.js +480 -0
  371. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Regex.fs.js +11 -0
  372. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/RegexActivePatterns.fs.js +212 -0
  373. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/Writer.fs.js +164 -0
  374. package/dist/ts/ts/fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js +136 -0
  375. package/package.json +10 -7
  376. package/dist/ts/__vite-browser-external-2447137e.js +0 -4
  377. package/dist/ts/__vite-browser-external-b3701507.cjs +0 -1
  378. package/dist/ts/arctrl.cjs.js +0 -5691
  379. package/dist/ts/arctrl.es.js +0 -35562
  380. package/dist/ts/arctrl.umd.js +0 -5691
@@ -0,0 +1,25 @@
1
+ import { minValue, tryParse } from '../../../../node_modules/@fable-org/fable-library-js/Date.js';
2
+ import { FSharpRef } from '../../../../node_modules/@fable-org/fable-library-js/Types.js';
3
+ import { FSharpResult$2_Ok, FSharpResult$2_Error } from '../../../../node_modules/@fable-org/fable-library-js/Result.js';
4
+ import { ErrorReason$1_BadPrimitive } from '../../Thoth.Json.Core.0.7.0/Types.fs.js';
5
+ import { oneOf, map, bool, int, float, string } from '../../Thoth.Json.Core.0.7.0/Decode.fs.js';
6
+ import { DataType_Boolean, DataType_Number, DataType_Date, DataType_String } from '../Cells/FsCell.fs.js';
7
+ import { ofArray } from '../../../../node_modules/@fable-org/fable-library-js/List.js';
8
+
9
+ const Decode_datetime = {
10
+ Decode(helpers, value) {
11
+ if (helpers.isString(value)) {
12
+ let matchValue;
13
+ let outArg = minValue();
14
+ matchValue = [tryParse(helpers.asString(value), new FSharpRef(() => outArg, (v) => {
15
+ outArg = v;
16
+ })), outArg];
17
+ return matchValue[0] ? FSharpResult$2_Ok(matchValue[1]) : FSharpResult$2_Error(["", ErrorReason$1_BadPrimitive("a datetime", value)]);
18
+ } else {
19
+ return FSharpResult$2_Error(["", ErrorReason$1_BadPrimitive("a datetime", value)]);
20
+ }
21
+ }
22
+ };
23
+ oneOf(ofArray([map((b) => [b, DataType_Boolean()], bool), map((i) => [i, DataType_Number()], int), map((f) => [f, DataType_Number()], float), map((d_3) => [d_3, DataType_Date()], Decode_datetime), map((s) => [s, DataType_String()], string)]));
24
+
25
+ export { Decode_datetime };
@@ -0,0 +1,28 @@
1
+ import { defaultOf, int32ToString } from '../../../../node_modules/@fable-org/fable-library-js/Util.js';
2
+ import { some } from '../../../../node_modules/@fable-org/fable-library-js/Option.js';
3
+ import { FsRangeBase } from './FsRangeBase.fs.js';
4
+ import { toText, printf } from '../../../../node_modules/@fable-org/fable-library-js/String.js';
5
+ import { FsRangeRow } from './FsRangeRow.fs.js';
6
+ import { FsRangeAddress } from './FsRangeAddress.fs.js';
7
+ import { FsAddress } from '../FsAddress.fs.js';
8
+
9
+ class FsRange extends FsRangeBase {
10
+ constructor(rangeAddress, styleValue) {
11
+ super(rangeAddress);
12
+ }
13
+ static fromRangeBase(rangeBase) {
14
+ return new FsRange(rangeBase.RangeAddress, some(defaultOf()));
15
+ }
16
+ Row(row) {
17
+ if (row <= 0 ? true : row + super.RangeAddress.FirstAddress.RowNumber - 1 > 1048576) {
18
+ throw new Error(int32ToString(row), toText(printf("Row number must be between 1 and %i"))(1048576));
19
+ }
20
+ return new FsRangeRow(new FsRangeAddress(new FsAddress(super.RangeAddress.FirstAddress.RowNumber + row - 1, super.RangeAddress.FirstAddress.ColumnNumber), new FsAddress(super.RangeAddress.FirstAddress.RowNumber + row - 1, super.RangeAddress.LastAddress.ColumnNumber)));
21
+ }
22
+ FirstRow() {
23
+ const self = this;
24
+ return self.Row(1);
25
+ }
26
+ }
27
+
28
+ export { FsRange };
@@ -0,0 +1,82 @@
1
+ import { FsAddress } from '../FsAddress.fs.js';
2
+ import { toText, printf } from '../../../../node_modules/@fable-org/fable-library-js/String.js';
3
+ import { item } from '../../../../node_modules/@fable-org/fable-library-js/Array.js';
4
+
5
+ class FsRangeAddress {
6
+ constructor(firstAddress, lastAddress) {
7
+ this.firstAddress = firstAddress;
8
+ this.lastAddress = lastAddress;
9
+ this._firstAddress = this.firstAddress;
10
+ this._lastAddress = this.lastAddress;
11
+ }
12
+ static fromString(rangeAddress) {
13
+ const patternInput = Range_toBoundaries(rangeAddress);
14
+ return new FsRangeAddress(FsAddress.fromString(patternInput[0]), FsAddress.fromString(patternInput[1]));
15
+ }
16
+ Copy() {
17
+ const self = this;
18
+ return FsRangeAddress.fromString(self.Range);
19
+ }
20
+ static copy(rangeAddress) {
21
+ return rangeAddress.Copy();
22
+ }
23
+ Extend(address) {
24
+ const self = this;
25
+ if (address.RowNumber < self._firstAddress.RowNumber) {
26
+ self._firstAddress.RowNumber = address.RowNumber | 0;
27
+ }
28
+ if (address.RowNumber > self._lastAddress.RowNumber) {
29
+ self._lastAddress.RowNumber = address.RowNumber | 0;
30
+ }
31
+ if (address.ColumnNumber < self._firstAddress.ColumnNumber) {
32
+ self._firstAddress.ColumnNumber = address.ColumnNumber | 0;
33
+ }
34
+ if (address.ColumnNumber > self._lastAddress.ColumnNumber) {
35
+ self._lastAddress.ColumnNumber = address.ColumnNumber | 0;
36
+ }
37
+ }
38
+ Normalize() {
39
+ const self = this;
40
+ const patternInput = self.firstAddress.RowNumber < self.lastAddress.RowNumber ? [self.firstAddress.RowNumber, self.lastAddress.RowNumber] : [self.lastAddress.RowNumber, self.firstAddress.RowNumber];
41
+ const patternInput_1 = self.firstAddress.RowNumber < self.lastAddress.RowNumber ? [self.firstAddress.RowNumber, self.lastAddress.RowNumber] : [self.lastAddress.RowNumber, self.firstAddress.RowNumber];
42
+ self._firstAddress = new FsAddress(patternInput[0], patternInput_1[0]);
43
+ self._lastAddress = new FsAddress(patternInput[1], patternInput_1[1]);
44
+ }
45
+ get Range() {
46
+ const self = this;
47
+ return Range_ofBoundaries(self._firstAddress.Address, self._lastAddress.Address);
48
+ }
49
+ set Range(address) {
50
+ const self = this;
51
+ const patternInput = Range_toBoundaries(address);
52
+ self._firstAddress = FsAddress.fromString(patternInput[0]);
53
+ self._lastAddress = FsAddress.fromString(patternInput[1]);
54
+ }
55
+ toString() {
56
+ const self = this;
57
+ return self.Range;
58
+ }
59
+ get FirstAddress() {
60
+ const self = this;
61
+ return self._firstAddress;
62
+ }
63
+ get LastAddress() {
64
+ const self = this;
65
+ return self._lastAddress;
66
+ }
67
+ Union(rangeAddress) {
68
+ const self = this;
69
+ self.Extend(rangeAddress.FirstAddress);
70
+ self.Extend(rangeAddress.LastAddress);
71
+ return self;
72
+ }
73
+ }
74
+ function Range_ofBoundaries(fromCellReference, toCellReference) {
75
+ return toText(printf("%s:%s"))(fromCellReference)(toCellReference);
76
+ }
77
+ function Range_toBoundaries(area) {
78
+ const a = area.split(":");
79
+ return [item(0, a), item(1, a)];
80
+ }
81
+
82
+ export { FsRangeAddress, Range_ofBoundaries, Range_toBoundaries };
@@ -0,0 +1,69 @@
1
+ import { FsAddress } from '../FsAddress.fs.js';
2
+ import { defaultOf, equals } from '../../../../node_modules/@fable-org/fable-library-js/Util.js';
3
+ import { toFail, printf } from '../../../../node_modules/@fable-org/fable-library-js/String.js';
4
+ import { value } from '../../../../node_modules/@fable-org/fable-library-js/Option.js';
5
+ import { FsCell } from '../Cells/FsCell.fs.js';
6
+
7
+ class FsRangeBase {
8
+ constructor(rangeAddress) {
9
+ this._sortRows = defaultOf();
10
+ this._sortColumns = defaultOf();
11
+ this._rangeAddress = rangeAddress;
12
+ FsRangeBase.IdCounter = FsRangeBase.IdCounter + 1 | 0;
13
+ }
14
+ Extend(address) {
15
+ const this$ = this;
16
+ this$._rangeAddress.Extend(address);
17
+ }
18
+ get RangeAddress() {
19
+ const this$ = this;
20
+ return this$._rangeAddress;
21
+ }
22
+ set RangeAddress(rangeAdress) {
23
+ const this$ = this;
24
+ if (!equals(rangeAdress, this$._rangeAddress)) {
25
+ this$._rangeAddress;
26
+ this$._rangeAddress = rangeAdress;
27
+ }
28
+ }
29
+ Cell(cellAddressInRange, cells) {
30
+ const this$ = this;
31
+ const absRow = cellAddressInRange.RowNumber + this$.RangeAddress.FirstAddress.RowNumber - 1 | 0;
32
+ const absColumn = cellAddressInRange.ColumnNumber + this$.RangeAddress.FirstAddress.ColumnNumber - 1 | 0;
33
+ if (absRow <= 0 ? true : absRow > 1048576) {
34
+ const arg = cells.MaxRowNumber | 0;
35
+ toFail(printf("Row number must be between 1 and %i"))(arg);
36
+ }
37
+ if (absColumn <= 0 ? true : absColumn > 16384) {
38
+ const arg_1 = cells.MaxColumnNumber | 0;
39
+ toFail(printf("Column number must be between 1 and %i"))(arg_1);
40
+ }
41
+ const cell = cells.TryGetCell(absRow, absColumn);
42
+ if (cell == null) {
43
+ const absoluteAddress = new FsAddress(absRow, absColumn, cellAddressInRange.FixedRow, cellAddressInRange.FixedColumn);
44
+ const newCell = FsCell.createEmptyWithAdress(absoluteAddress);
45
+ this$.Extend(absoluteAddress);
46
+ cells.Add(newCell, absRow, absColumn);
47
+ return newCell;
48
+ } else {
49
+ return value(cell);
50
+ }
51
+ }
52
+ Cells(cells) {
53
+ const this$ = this;
54
+ return cells.GetCellsInStringRange(this$.RangeAddress.FirstAddress, this$.RangeAddress.LastAddress);
55
+ }
56
+ ColumnCount() {
57
+ const this$ = this;
58
+ return this$._rangeAddress.LastAddress.ColumnNumber - this$._rangeAddress.FirstAddress.ColumnNumber + 1 | 0;
59
+ }
60
+ RowCount() {
61
+ const this$ = this;
62
+ return this$._rangeAddress.LastAddress.RowNumber - this$._rangeAddress.FirstAddress.RowNumber + 1 | 0;
63
+ }
64
+ }
65
+ (() => {
66
+ FsRangeBase.IdCounter = 0;
67
+ })();
68
+
69
+ export { FsRangeBase };
@@ -0,0 +1,42 @@
1
+ import { FsRangeAddress } from './FsRangeAddress.fs.js';
2
+ import { FsAddress } from '../FsAddress.fs.js';
3
+ import { FsRangeBase } from './FsRangeBase.fs.js';
4
+
5
+ class FsRangeColumn extends FsRangeBase {
6
+ constructor(rangeAddress) {
7
+ super(rangeAddress);
8
+ }
9
+ static fromIndex(index) {
10
+ return new FsRangeColumn(new FsRangeAddress(new FsAddress(0, index), new FsAddress(0, index)));
11
+ }
12
+ get Index() {
13
+ const self = this;
14
+ return self.RangeAddress.FirstAddress.ColumnNumber | 0;
15
+ }
16
+ set Index(i) {
17
+ const self = this;
18
+ self.RangeAddress.FirstAddress.ColumnNumber = i | 0;
19
+ self.RangeAddress.LastAddress.ColumnNumber = i | 0;
20
+ }
21
+ Cell(rowIndex, cellsCollection) {
22
+ return super.Cell(new FsAddress(rowIndex - super.RangeAddress.FirstAddress.RowNumber + 1, 1), cellsCollection);
23
+ }
24
+ FirstCell(cells) {
25
+ return super.Cell(new FsAddress(1, 1), cells);
26
+ }
27
+ Cells(cellsCollection) {
28
+ return super.Cells(cellsCollection);
29
+ }
30
+ static fromRangeAddress(rangeAddress) {
31
+ return new FsRangeColumn(rangeAddress);
32
+ }
33
+ Copy() {
34
+ const self = this;
35
+ return new FsRangeColumn(self.RangeAddress.Copy());
36
+ }
37
+ static copy(rangeColumn) {
38
+ return rangeColumn.Copy();
39
+ }
40
+ }
41
+
42
+ export { FsRangeColumn };
@@ -0,0 +1,29 @@
1
+ import { FsRangeAddress } from './FsRangeAddress.fs.js';
2
+ import { FsAddress } from '../FsAddress.fs.js';
3
+ import { FsRangeBase } from './FsRangeBase.fs.js';
4
+
5
+ class FsRangeRow extends FsRangeBase {
6
+ constructor(rangeAddress) {
7
+ super(rangeAddress);
8
+ }
9
+ static fromIndex(index) {
10
+ return new FsRangeRow(new FsRangeAddress(new FsAddress(index, 0), new FsAddress(index, 0)));
11
+ }
12
+ get Index() {
13
+ const self = this;
14
+ return self.RangeAddress.FirstAddress.RowNumber | 0;
15
+ }
16
+ set Index(i) {
17
+ const self = this;
18
+ self.RangeAddress.FirstAddress.RowNumber = i | 0;
19
+ self.RangeAddress.LastAddress.RowNumber = i | 0;
20
+ }
21
+ Cell(columnIndex, cells) {
22
+ return super.Cell(new FsAddress(1, columnIndex - super.RangeAddress.FirstAddress.ColumnNumber + 1), cells);
23
+ }
24
+ Cells(cells) {
25
+ return super.Cells(cells);
26
+ }
27
+ }
28
+
29
+ export { FsRangeRow };
@@ -0,0 +1,348 @@
1
+ import { equals, defaultOf, int32ToString, comparePrimitives, getEnumerator, disposeSafe } from '../../../../node_modules/@fable-org/fable-library-js/Util.js';
2
+ import { Dictionary_tryGet } from '../Cells/FsCellsCollection.fs.js';
3
+ import { FsTableField } from './FsTableField.fs.js';
4
+ import { length, iterateIndexed, initialize, delay, reduce, map, iterate, max, find, tryFind, tryPick, choose, toList, exists, collect, singleton } from '../../../../node_modules/@fable-org/fable-library-js/Seq.js';
5
+ import { FsRange } from '../Ranges/FsRange.fs.js';
6
+ import { FsRow } from '../FsRow.fs.js';
7
+ import { FsRangeAddress } from '../Ranges/FsRangeAddress.fs.js';
8
+ import { FsAddress } from '../FsAddress.fs.js';
9
+ import { defaultArg, value, some } from '../../../../node_modules/@fable-org/fable-library-js/Option.js';
10
+ import { FsColumn } from '../FsColumn.fs.js';
11
+ import { rangeDouble } from '../../../../node_modules/@fable-org/fable-library-js/Range.js';
12
+ import { replace, toText, printf } from '../../../../node_modules/@fable-org/fable-library-js/String.js';
13
+ import { addToSet, addToDict, getItemFromDict } from '../../../../node_modules/@fable-org/fable-library-js/MapUtil.js';
14
+ import { FsRangeColumn } from '../Ranges/FsRangeColumn.fs.js';
15
+ import { DataType_String } from '../Cells/FsCell.fs.js';
16
+ import { FsRangeBase } from '../Ranges/FsRangeBase.fs.js';
17
+
18
+ class FsTable extends FsRangeBase {
19
+ constructor(name, rangeAddress, showTotalsRow, showHeaderRow, fieldNames) {
20
+ super(rangeAddress);
21
+ let fns, dict;
22
+ this._name = replace(name.trim(), " ", "_");
23
+ this._lastRangeAddress = rangeAddress;
24
+ this._showTotalsRow = defaultArg(showTotalsRow, false);
25
+ this._showHeaderRow = defaultArg(showHeaderRow, true);
26
+ this._fieldNames = fieldNames == null ? /* @__PURE__ */ new Map([]) : (fns = value(fieldNames), length(fns) !== super.ColumnCount() ? (() => {
27
+ let arg, arg_1;
28
+ throw new Error((arg = length(fns) | 0, arg_1 = super.ColumnCount() | 0, toText(printf("The number of field names (%i) must match the number of columns (%i) in the range."))(arg)(arg_1)), "fieldNames");
29
+ })() : void 0, dict = /* @__PURE__ */ new Map([]), iterateIndexed((i, fn) => {
30
+ const colI = rangeAddress.FirstAddress.ColumnNumber + i | 0;
31
+ addToDict(dict, fn, new FsTableField(fn, i, new FsRangeColumn(new FsRangeAddress(new FsAddress(rangeAddress.FirstAddress.RowNumber, colI), new FsAddress(rangeAddress.LastAddress.RowNumber, colI)))));
32
+ }, fns), dict);
33
+ this._uniqueNames = /* @__PURE__ */ new Set([]);
34
+ }
35
+ get Name() {
36
+ const this$ = this;
37
+ return this$._name;
38
+ }
39
+ GetFieldNames(cellsCollection) {
40
+ const this$ = this;
41
+ if (!equals(this$._fieldNames, defaultOf()) && !equals(this$._lastRangeAddress, defaultOf()) && equals(this$._lastRangeAddress, this$.RangeAddress)) {
42
+ return this$._fieldNames;
43
+ } else {
44
+ this$._lastRangeAddress = this$.RangeAddress;
45
+ return this$._fieldNames;
46
+ }
47
+ }
48
+ GetFields(cellsCollection) {
49
+ const this$ = this;
50
+ return initialize(super.ColumnCount(), (i) => this$.GetFieldAt(i, cellsCollection));
51
+ }
52
+ get ShowHeaderRow() {
53
+ const this$ = this;
54
+ return this$._showHeaderRow;
55
+ }
56
+ set ShowHeaderRow(showHeaderRow) {
57
+ const this$ = this;
58
+ this$._showHeaderRow = showHeaderRow;
59
+ }
60
+ HeadersRow() {
61
+ const this$ = this;
62
+ return !this$.ShowHeaderRow ? defaultOf() : new FsRange(super.RangeAddress).FirstRow();
63
+ }
64
+ TryGetHeaderRow(cellsCollection) {
65
+ const this$ = this;
66
+ const matchValue = this$.ShowHeaderRow;
67
+ if (matchValue) {
68
+ const rowIndex = this$.RangeAddress.FirstAddress.RowNumber | 0;
69
+ return new FsRow(new FsRangeAddress(new FsAddress(rowIndex, this$.RangeAddress.FirstAddress.ColumnNumber), new FsAddress(rowIndex, this$.RangeAddress.LastAddress.ColumnNumber)), cellsCollection);
70
+ } else {
71
+ return void 0;
72
+ }
73
+ }
74
+ GetHeaderRow(cellsCollection) {
75
+ const this$ = this;
76
+ const matchValue = this$.TryGetHeaderRow(cellsCollection);
77
+ if (matchValue == null) {
78
+ throw new Error(`Error. Unable to get header row for table "${this$.Name}" as \`ShowHeaderRow\` is set to \`false\`.`);
79
+ } else {
80
+ return value(matchValue);
81
+ }
82
+ }
83
+ GetColumns(cellsCollection) {
84
+ const this$ = this;
85
+ return delay(() => collect((i) => singleton(new FsColumn(new FsRangeAddress(new FsAddress(this$.RangeAddress.FirstAddress.RowNumber, i), new FsAddress(this$.RangeAddress.LastAddress.RowNumber, i)), cellsCollection)), rangeDouble(this$.RangeAddress.FirstAddress.ColumnNumber, 1, this$.RangeAddress.LastAddress.ColumnNumber)));
86
+ }
87
+ GetRows(cellsCollection) {
88
+ const this$ = this;
89
+ return delay(() => collect((i) => singleton(new FsRow(new FsRangeAddress(new FsAddress(i, this$.RangeAddress.FirstAddress.ColumnNumber), new FsAddress(i, this$.RangeAddress.LastAddress.ColumnNumber)), cellsCollection)), rangeDouble(this$.RangeAddress.FirstAddress.RowNumber, 1, this$.RangeAddress.LastAddress.RowNumber)));
90
+ }
91
+ GetBodyRows(cellsCollection) {
92
+ const this$ = this;
93
+ const firstRowIndex = (this$.ShowHeaderRow ? this$.RangeAddress.FirstAddress.RowNumber + 1 : this$.RangeAddress.FirstAddress.RowNumber) | 0;
94
+ return delay(() => collect((i) => singleton(new FsRow(new FsRangeAddress(new FsAddress(i, this$.RangeAddress.FirstAddress.ColumnNumber), new FsAddress(i, this$.RangeAddress.LastAddress.ColumnNumber)), cellsCollection)), rangeDouble(firstRowIndex, 1, this$.RangeAddress.LastAddress.RowNumber)));
95
+ }
96
+ GetRowAt(index, cellsCollection) {
97
+ let arg;
98
+ const this$ = this;
99
+ if (index <= 0 ? true : index > super.RowCount()) {
100
+ throw new Error(int32ToString(index), (arg = super.RowCount() | 0, toText(printf("Row index must be between 1 and %i"))(arg)));
101
+ }
102
+ const rowI = this$.RangeAddress.FirstAddress.RowNumber + index - 1 | 0;
103
+ return new FsRow(new FsRangeAddress(new FsAddress(rowI, this$.RangeAddress.FirstAddress.ColumnNumber), new FsAddress(rowI, this$.RangeAddress.LastAddress.ColumnNumber)), cellsCollection);
104
+ }
105
+ GetBodyRowAt(index, cellsCollection) {
106
+ const this$ = this;
107
+ return this$.ShowHeaderRow ? this$.GetRowAt(index + 1, cellsCollection) : this$.GetRowAt(index, cellsCollection);
108
+ }
109
+ RescanRange() {
110
+ const this$ = this;
111
+ const rangeAddress = reduce((r1, r2) => r1.Union(r2), map((v) => v.Column.RangeAddress, this$._fieldNames.values()));
112
+ this$.RangeAddress = rangeAddress;
113
+ }
114
+ static rescanRange(table) {
115
+ table.RescanRange();
116
+ return table;
117
+ }
118
+ GetUniqueName(originalName, initialOffset, enforceOffset) {
119
+ const this$ = this;
120
+ let name = originalName + (enforceOffset ? int32ToString(initialOffset) : "");
121
+ if (this$._uniqueNames.has(name)) {
122
+ let i = initialOffset;
123
+ name = originalName + int32ToString(i);
124
+ while (this$._uniqueNames.has(name)) {
125
+ i = i + 1 | 0;
126
+ name = originalName + int32ToString(i);
127
+ }
128
+ }
129
+ addToSet(name, this$._uniqueNames);
130
+ return name;
131
+ }
132
+ static getUniqueNames(originalName, initialOffset, enforceOffset, table) {
133
+ return table.GetUniqueName(originalName, initialOffset, enforceOffset);
134
+ }
135
+ InitFields(fieldNames) {
136
+ const this$ = this;
137
+ iterateIndexed((i, fn) => {
138
+ const tableField = new FsTableField(fn, i, FsRangeColumn.fromIndex(i));
139
+ addToDict(this$._fieldNames, fn, tableField);
140
+ }, fieldNames);
141
+ }
142
+ static initFields(fieldNames, table) {
143
+ table.InitFields(fieldNames);
144
+ return table;
145
+ }
146
+ AddFields(tableFields) {
147
+ const this$ = this;
148
+ iterate((tf) => {
149
+ addToDict(this$._fieldNames, tf.Name, tf);
150
+ }, tableFields);
151
+ }
152
+ static addFields(tableFields, table) {
153
+ table.AddFields(tableFields);
154
+ return table;
155
+ }
156
+ Field(name, cellsCollection) {
157
+ let s, offset;
158
+ const this$ = this;
159
+ const matchValue = Dictionary_tryGet(name, this$._fieldNames);
160
+ if (matchValue == null) {
161
+ const newField = new FsTableField(name, (s = map((v) => v.Index, this$._fieldNames.values()), length(s) === 0 ? 0 : max(s, {
162
+ Compare: comparePrimitives
163
+ })) + 1, new FsRangeColumn((offset = this$._fieldNames.size | 0, new FsRangeAddress(new FsAddress(this$.RangeAddress.FirstAddress.RowNumber, this$.RangeAddress.FirstAddress.ColumnNumber + offset), new FsAddress(this$.RangeAddress.LastAddress.RowNumber, this$.RangeAddress.FirstAddress.ColumnNumber + offset)))), some(defaultOf()), some(defaultOf()));
164
+ if (this$.ShowHeaderRow) {
165
+ newField.HeaderCell(cellsCollection, true).SetValueAs(name);
166
+ }
167
+ addToDict(this$._fieldNames, name, newField);
168
+ this$.RescanRange();
169
+ return newField;
170
+ } else {
171
+ return value(matchValue);
172
+ }
173
+ }
174
+ GetField(name, cellsCollection) {
175
+ const this$ = this;
176
+ const name_1 = replace(name, "\r\n", "\n");
177
+ try {
178
+ return getItemFromDict(this$.GetFieldNames(cellsCollection), name_1);
179
+ } catch (matchValue) {
180
+ throw new Error("The header row doesn't contain field name '" + name_1 + "'.");
181
+ }
182
+ }
183
+ static getField(name, cellsCollection, table) {
184
+ return table.GetField(name, cellsCollection);
185
+ }
186
+ GetFieldAt(index, cellsCollection) {
187
+ const this$ = this;
188
+ try {
189
+ return find((ftf) => ftf.Index === index, this$.GetFieldNames(cellsCollection).values());
190
+ } catch (matchValue) {
191
+ throw new Error(`FsTableField with index ${index} does not exist in the FsTable.`);
192
+ }
193
+ }
194
+ GetFieldIndex(name, cellsCollection) {
195
+ const this$ = this;
196
+ return this$.GetField(name, cellsCollection).Index | 0;
197
+ }
198
+ RenameField(oldName, newName) {
199
+ const this$ = this;
200
+ const matchValue = Dictionary_tryGet(oldName, this$._fieldNames);
201
+ if (matchValue == null) {
202
+ throw new Error("The FsTabelField does not exist in this FsTable", "oldName");
203
+ } else {
204
+ const field = value(matchValue);
205
+ this$._fieldNames.delete(oldName);
206
+ addToDict(this$._fieldNames, newName, field);
207
+ }
208
+ }
209
+ static renameField(oldName, newName, table) {
210
+ table.RenameField(oldName, newName);
211
+ return table;
212
+ }
213
+ TryGetHeaderCellOfColumnAt(cellsCollection, colIndex) {
214
+ const this$ = this;
215
+ const fstRowIndex = this$.RangeAddress.FirstAddress.RowNumber | 0;
216
+ return tryFind((c) => c.RowNumber === fstRowIndex, cellsCollection.GetCellsInColumn(colIndex));
217
+ }
218
+ static tryGetHeaderCellOfColumnIndexAt(cellsCollection, colIndex, table) {
219
+ return table.TryGetHeaderCellOfColumnAt(cellsCollection, colIndex);
220
+ }
221
+ TryGetHeaderCellOfColumn(cellsCollection, column) {
222
+ const this$ = this;
223
+ return this$.TryGetHeaderCellOfColumnAt(cellsCollection, column.Index);
224
+ }
225
+ static tryGetHeaderCellOfColumn(cellsCollection, column, table) {
226
+ return table.TryGetHeaderCellOfColumn(cellsCollection, column);
227
+ }
228
+ GetHeaderCellOfColumnAt(cellsCollection, colIndex) {
229
+ const this$ = this;
230
+ return value(this$.TryGetHeaderCellOfColumnAt(cellsCollection, colIndex));
231
+ }
232
+ static getHeaderCellOfColumnIndexAt(cellsCollection, colIndex, table) {
233
+ return table.GetHeaderCellOfColumnAt(cellsCollection, colIndex);
234
+ }
235
+ GetHeaderCellOfColumn(cellsCollection, column) {
236
+ const this$ = this;
237
+ return value(this$.TryGetHeaderCellOfColumn(cellsCollection, column));
238
+ }
239
+ static getHeaderCellOfColumn(cellsCollection, column, table) {
240
+ return table.GetHeaderCellOfColumn(cellsCollection, column);
241
+ }
242
+ GetHeaderCellOfTableField(cellsCollection, tableField) {
243
+ const this$ = this;
244
+ return tableField.HeaderCell(cellsCollection, this$.ShowHeaderRow);
245
+ }
246
+ static getHeaderCellOfTableField(cellsCollection, tableField, table) {
247
+ return table.GetHeaderCellOfTableField(cellsCollection, tableField);
248
+ }
249
+ TryGetHeaderCellOfTableFieldAt(cellsCollection, tableFieldIndex) {
250
+ const this$ = this;
251
+ return tryPick((tf) => {
252
+ if (tf.Index === tableFieldIndex) {
253
+ return tf.HeaderCell(cellsCollection, this$.ShowHeaderRow);
254
+ } else {
255
+ return void 0;
256
+ }
257
+ }, this$._fieldNames.values());
258
+ }
259
+ static tryGetHeaderCellOfTableFieldIndexAt(cellsCollection, tableFieldIndex, table) {
260
+ return table.TryGetHeaderCellOfTableFieldAt(cellsCollection, tableFieldIndex);
261
+ }
262
+ GetHeaderCellOfTableFieldAt(cellsCollection, tableFieldIndex) {
263
+ const this$ = this;
264
+ return value(this$.TryGetHeaderCellOfTableFieldAt(cellsCollection, tableFieldIndex));
265
+ }
266
+ static getHeaderCellOfTableFieldIndexAt(cellsCollection, tableFieldIndex, table) {
267
+ return table.GetHeaderCellOfTableFieldAt(cellsCollection, tableFieldIndex);
268
+ }
269
+ TryGetHeaderCellByFieldName(cellsCollection, fieldName) {
270
+ const this$ = this;
271
+ const matchValue = Dictionary_tryGet(fieldName, this$._fieldNames);
272
+ if (matchValue == null) {
273
+ return void 0;
274
+ } else {
275
+ const tf = value(matchValue);
276
+ return tf.HeaderCell(cellsCollection, this$.ShowHeaderRow);
277
+ }
278
+ }
279
+ static tryGetHeaderCellByFieldName(cellsCollection, fieldName, table) {
280
+ return table.TryGetHeaderCellByFieldName(cellsCollection, fieldName);
281
+ }
282
+ GetDataCellsOfColumnAt(cellsCollection, colIndex) {
283
+ const this$ = this;
284
+ return choose((ri) => cellsCollection.TryGetCell(ri, colIndex), toList(rangeDouble(this$.RangeAddress.FirstAddress.RowNumber + 1, 1, this$.RangeAddress.LastAddress.RowNumber)));
285
+ }
286
+ static getDataCellsOfColumnIndexAt(cellsCollection, colIndex, table) {
287
+ return table.GetDataCellsOfColumnAt(cellsCollection, colIndex);
288
+ }
289
+ Copy() {
290
+ const this$ = this;
291
+ const ra = this$.RangeAddress.Copy();
292
+ return new FsTable(this$.Name, ra, false, this$.ShowHeaderRow);
293
+ }
294
+ static copy(table) {
295
+ return table.Copy();
296
+ }
297
+ static validateForWrite(table, cellsCollection) {
298
+ let arg;
299
+ if (length(table.GetBodyRows(cellsCollection)) === 0) {
300
+ throw new Error((arg = table.Name, toText(printf("The table '%s' must contain at least one body row."))(arg)), "table");
301
+ }
302
+ }
303
+ RescanFieldNames(cellsCollection) {
304
+ const this$ = this;
305
+ if (this$.ShowHeaderRow) {
306
+ const oldFieldNames = this$._fieldNames;
307
+ this$._fieldNames = /* @__PURE__ */ new Map([]);
308
+ let cellPos = 0;
309
+ const enumerator = getEnumerator(this$.GetHeaderRow(cellsCollection));
310
+ try {
311
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
312
+ const cell = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
313
+ let name = cell.ValueAsString();
314
+ const matchValue = Dictionary_tryGet(name, oldFieldNames);
315
+ if (matchValue == null) {
316
+ if (name === defaultOf() !== (name === "")) {
317
+ name = this$.GetUniqueName("Column", cellPos + 1, true);
318
+ const value = cell.SetValueAs(name);
319
+ cell.DataType = DataType_String();
320
+ }
321
+ if (this$._fieldNames.has(name)) {
322
+ throw new Error("The header row contains more than one field name '" + name + "'.");
323
+ }
324
+ addToDict(this$._fieldNames, name, new FsTableField(name, cellPos));
325
+ cellPos = cellPos + 1 | 0;
326
+ } else {
327
+ const tableField = value(matchValue);
328
+ tableField.Index = cellPos | 0;
329
+ addToDict(this$._fieldNames, name, tableField);
330
+ cellPos = cellPos + 1 | 0;
331
+ }
332
+ }
333
+ } finally {
334
+ disposeSafe(enumerator);
335
+ }
336
+ } else {
337
+ const colCount = super.ColumnCount() | 0;
338
+ for (let i = 1; i <= colCount; i++) {
339
+ if (!exists((v) => v.Index === i - 1, this$._fieldNames.values())) {
340
+ const name_1 = "Column" + int32ToString(i);
341
+ addToDict(this$._fieldNames, name_1, new FsTableField(name_1, i - 1));
342
+ }
343
+ }
344
+ }
345
+ }
346
+ }
347
+
348
+ export { FsTable };