@nfdi4plants/arctrl 1.2.0 → 2.0.0-alpha.2

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 (366) 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 +13 -13
  41. package/Core/Publication.js +116 -0
  42. package/{ISA/ISA/ArcTypes → Core/Table}/ArcTable.js +43 -149
  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 +6 -6
  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/{ISA/ISA.Json/ArcTypes → Json/Table}/ArcTable.js +53 -49
  90. package/Json/Table/CellTable.js +40 -0
  91. package/Json/Table/CompositeCell.js +65 -0
  92. package/{ISA/ISA.Json/ArcTypes → Json/Table}/CompositeHeader.js +22 -19
  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/{ISA/ISA.Json → Json}/context/rocrate/isa_investigation_context.js +5 -5
  104. package/{ISA/ISA.Json → Json}/context/rocrate/isa_material_attribute_context.js +4 -4
  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/{ISA/ISA.Json → Json}/context/rocrate/isa_protocol_parameter_context.js +4 -4
  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 +33 -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/{ISA/ISA.Spreadsheet → Spreadsheet}/AnnotationTable/CompositeColumn.js +10 -10
  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 +7 -7
  131. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Assays.js +32 -32
  132. package/{ISA/ISA.Spreadsheet → Spreadsheet}/Metadata/Comment.js +5 -5
  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 +23 -22
  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 +2 -2
  146. package/WebRequest/WebRequest.js +2 -2
  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 +3 -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.js +19 -19
  179. package/fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js +5 -5
  180. package/fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js +2 -2
  181. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js +1 -1
  182. package/fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js +2 -2
  183. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Boolean.js +2 -2
  184. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/CHANGELOG.md +18 -0
  185. package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.d.ts +9 -0
  186. package/fable_modules/fable-library-js.4.16.0/ConditionalWeakTable.js +21 -0
  187. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Date.js +337 -40
  188. package/fable_modules/fable-library-js.4.16.0/MapUtil.d.ts +12 -0
  189. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MapUtil.js +15 -0
  190. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Util.d.ts +6 -3
  191. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Util.js +2 -13
  192. package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/package.json +1 -1
  193. package/fable_modules/project_cracked.json +1 -1
  194. package/index.js +14 -12
  195. package/package.json +1 -1
  196. package/Contracts/Contracts.ArcTypes.js +0 -268
  197. package/FileSystemTree.js +0 -51
  198. package/ISA/ISA/ArcTypes/ArcTableAux.js +0 -1155
  199. package/ISA/ISA/ArcTypes/CompositeRow.js +0 -111
  200. package/ISA/ISA/Builder/Types.js +0 -243
  201. package/ISA/ISA/Fable.js +0 -123
  202. package/ISA/ISA/Helper.js +0 -505
  203. package/ISA/ISA/JsonTypes/Assay.js +0 -620
  204. package/ISA/ISA/JsonTypes/AssayMaterials.js +0 -39
  205. package/ISA/ISA/JsonTypes/ColumnIndex.js +0 -246
  206. package/ISA/ISA/JsonTypes/Comment.js +0 -58
  207. package/ISA/ISA/JsonTypes/Component.js +0 -165
  208. package/ISA/ISA/JsonTypes/Factor.js +0 -128
  209. package/ISA/ISA/JsonTypes/Investigation.js +0 -204
  210. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +0 -196
  211. package/ISA/ISA/JsonTypes/OntologySourceReference.js +0 -85
  212. package/ISA/ISA/JsonTypes/Person.js +0 -152
  213. package/ISA/ISA/JsonTypes/Publication.js +0 -105
  214. package/ISA/ISA/JsonTypes/Study.js +0 -942
  215. package/ISA/ISA/JsonTypes/StudyMaterials.js +0 -45
  216. package/ISA/ISA/UIHelper.js +0 -19
  217. package/ISA/ISA.Json/ArcTypes/ArcAssay.js +0 -303
  218. package/ISA/ISA.Json/ArcTypes/ArcInvestigation.js +0 -122
  219. package/ISA/ISA.Json/ArcTypes/ArcStudy.js +0 -203
  220. package/ISA/ISA.Json/ArcTypes/CellTable.js +0 -40
  221. package/ISA/ISA.Json/ArcTypes/CompositeCell.js +0 -62
  222. package/ISA/ISA.Json/ArcTypes/IOType.js +0 -33
  223. package/ISA/ISA.Json/ArcTypes/OATable.js +0 -42
  224. package/ISA/ISA.Json/Assay.js +0 -129
  225. package/ISA/ISA.Json/Comment.js +0 -80
  226. package/ISA/ISA.Json/ConverterOptions.js +0 -51
  227. package/ISA/ISA.Json/Data.js +0 -253
  228. package/ISA/ISA.Json/Decode.js +0 -61
  229. package/ISA/ISA.Json/Factor.js +0 -194
  230. package/ISA/ISA.Json/GEncode.js +0 -40
  231. package/ISA/ISA.Json/Investigation.js +0 -89
  232. package/ISA/ISA.Json/Material.js +0 -232
  233. package/ISA/ISA.Json/Ontology.js +0 -200
  234. package/ISA/ISA.Json/Person.js +0 -186
  235. package/ISA/ISA.Json/Process.js +0 -305
  236. package/ISA/ISA.Json/Protocol.js +0 -281
  237. package/ISA/ISA.Json/Publication.js +0 -86
  238. package/ISA/ISA.Json/StringTable.js +0 -44
  239. package/ISA/ISA.Json/Study.js +0 -186
  240. package/ISA/ISA.Json/context/rocrate/isa_assay_context.js +0 -34
  241. package/ISA/ISA.Json/context/rocrate/isa_comment_context.js +0 -23
  242. package/ISA/ISA.Json/context/rocrate/isa_component_context.js +0 -24
  243. package/ISA/ISA.Json/context/rocrate/isa_data_context.js +0 -25
  244. package/ISA/ISA.Json/context/rocrate/isa_factor_context.js +0 -25
  245. package/ISA/ISA.Json/context/rocrate/isa_factor_value_context.js +0 -25
  246. package/ISA/ISA.Json/context/rocrate/isa_material_attribute_value_context.js +0 -25
  247. package/ISA/ISA.Json/context/rocrate/isa_material_context.js +0 -26
  248. package/ISA/ISA.Json/context/rocrate/isa_ontology_annotation_context.js +0 -25
  249. package/ISA/ISA.Json/context/rocrate/isa_ontology_source_reference_context.js +0 -26
  250. package/ISA/ISA.Json/context/rocrate/isa_organization_context.js +0 -22
  251. package/ISA/ISA.Json/context/rocrate/isa_person_context.js +0 -31
  252. package/ISA/ISA.Json/context/rocrate/isa_process_context.js +0 -31
  253. package/ISA/ISA.Json/context/rocrate/isa_process_parameter_value_context.js +0 -25
  254. package/ISA/ISA.Json/context/rocrate/isa_protocol_context.js +0 -30
  255. package/ISA/ISA.Json/context/rocrate/isa_publication_context.js +0 -27
  256. package/ISA/ISA.Json/context/rocrate/isa_sample_context.js +0 -26
  257. package/ISA/ISA.Json/context/rocrate/isa_source_context.js +0 -25
  258. package/ISA/ISA.Json/context/rocrate/isa_study_context.js +0 -42
  259. package/ISA/ISA.Json/context/rocrate/rocrate_context.js +0 -25
  260. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +0 -65
  261. package/Path.js +0 -10
  262. package/Templates/Template.Json.js +0 -90
  263. package/Templates/Template.Web.js +0 -27
  264. package/Templates/Templates.js +0 -82
  265. package/fable_modules/fable-library-js.4.13.0/MapUtil.d.ts +0 -10
  266. /package/{ISA/ISA/JsonTypes → Core}/URI.js +0 -0
  267. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Array.d.ts +0 -0
  268. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Array.js +0 -0
  269. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Async.d.ts +0 -0
  270. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Async.js +0 -0
  271. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/AsyncBuilder.d.ts +0 -0
  272. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/AsyncBuilder.js +0 -0
  273. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BigInt.d.ts +0 -0
  274. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BigInt.js +0 -0
  275. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BitConverter.d.ts +0 -0
  276. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/BitConverter.js +0 -0
  277. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Boolean.d.ts +0 -0
  278. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Char.d.ts +0 -0
  279. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Char.js +0 -0
  280. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Choice.d.ts +0 -0
  281. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Choice.js +0 -0
  282. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Date.d.ts +0 -0
  283. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOffset.d.ts +0 -0
  284. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOffset.js +0 -0
  285. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOnly.d.ts +0 -0
  286. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/DateOnly.js +0 -0
  287. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Decimal.d.ts +0 -0
  288. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Decimal.js +0 -0
  289. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Double.d.ts +0 -0
  290. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Double.js +0 -0
  291. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Encoding.d.ts +0 -0
  292. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Encoding.js +0 -0
  293. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Event.d.ts +0 -0
  294. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Event.js +0 -0
  295. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Collections.d.ts +0 -0
  296. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Collections.js +0 -0
  297. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.CompilerServices.d.ts +0 -0
  298. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.CompilerServices.js +0 -0
  299. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.d.ts +0 -0
  300. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/FSharp.Core.js +0 -0
  301. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Global.d.ts +0 -0
  302. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Global.js +0 -0
  303. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Guid.d.ts +0 -0
  304. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Guid.js +0 -0
  305. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Int32.d.ts +0 -0
  306. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Int32.js +0 -0
  307. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/List.d.ts +0 -0
  308. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/List.js +0 -0
  309. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Long.d.ts +0 -0
  310. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Long.js +0 -0
  311. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MailboxProcessor.d.ts +0 -0
  312. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MailboxProcessor.js +0 -0
  313. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Map.d.ts +0 -0
  314. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Map.js +0 -0
  315. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableMap.d.ts +0 -0
  316. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableMap.js +0 -0
  317. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableSet.d.ts +0 -0
  318. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/MutableSet.js +0 -0
  319. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Native.d.ts +0 -0
  320. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Native.js +0 -0
  321. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Numeric.d.ts +0 -0
  322. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Numeric.js +0 -0
  323. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Observable.d.ts +0 -0
  324. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Observable.js +0 -0
  325. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Option.d.ts +0 -0
  326. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Option.js +0 -0
  327. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/README.md +0 -0
  328. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Random.d.ts +0 -0
  329. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Random.js +0 -0
  330. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Range.d.ts +0 -0
  331. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Range.js +0 -0
  332. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Reflection.d.ts +0 -0
  333. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Reflection.js +0 -0
  334. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/RegExp.d.ts +0 -0
  335. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/RegExp.js +0 -0
  336. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Result.d.ts +0 -0
  337. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Result.js +0 -0
  338. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq.d.ts +0 -0
  339. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq.js +0 -0
  340. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq2.d.ts +0 -0
  341. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Seq2.js +0 -0
  342. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Set.d.ts +0 -0
  343. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Set.js +0 -0
  344. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/String.d.ts +0 -0
  345. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/String.js +0 -0
  346. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Collections.Generic.d.ts +0 -0
  347. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Collections.Generic.js +0 -0
  348. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Text.d.ts +0 -0
  349. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/System.Text.js +0 -0
  350. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/SystemException.d.ts +0 -0
  351. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/SystemException.js +0 -0
  352. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeOnly.d.ts +0 -0
  353. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeOnly.js +0 -0
  354. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeSpan.d.ts +0 -0
  355. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/TimeSpan.js +0 -0
  356. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Timer.d.ts +0 -0
  357. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Timer.js +0 -0
  358. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Types.d.ts +0 -0
  359. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Types.js +0 -0
  360. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Unicode.13.0.0.d.ts +0 -0
  361. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Unicode.13.0.0.js +0 -0
  362. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Uri.d.ts +0 -0
  363. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/Uri.js +0 -0
  364. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/big.d.ts +0 -0
  365. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/lib/big.d.ts +0 -0
  366. /package/fable_modules/{fable-library-js.4.13.0 → fable-library-js.4.16.0}/lib/big.js +0 -0
@@ -0,0 +1,532 @@
1
+ import { head as head_1, toArray, filter, tryFindIndex, maxBy } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
2
+ import { arrayHash, equalArrays, numberHash, disposeSafe, getEnumerator, compare, equals, safeHash, comparePrimitives } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
3
+ import { addToDict, getItemFromDict } from "../../fable_modules/fable-library-js.4.16.0/MapUtil.js";
4
+ import { value as value_2 } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
5
+ import { mapIndexed, pick, exists, ofSeq, empty, head, tail as tail_1, isEmpty, cons } from "../../fable_modules/fable-library-js.4.16.0/List.js";
6
+ import { printf, toConsole } from "../../fable_modules/fable-library-js.4.16.0/String.js";
7
+ import { List_tryPickAndRemove, Dictionary_tryFind } from "../Helper/Collections.js";
8
+ import { CompositeCell } from "./CompositeCell.js";
9
+ import { max } from "../../fable_modules/fable-library-js.4.16.0/Double.js";
10
+ import { item, map, iterateIndexed } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
11
+ import { tryFind, ofArray } from "../../fable_modules/fable-library-js.4.16.0/Map.js";
12
+ import { Array_groupBy } from "../../fable_modules/fable-library-js.4.16.0/Seq2.js";
13
+ import { FSharpSet__Contains, ofArray as ofArray_1 } from "../../fable_modules/fable-library-js.4.16.0/Set.js";
14
+ import { toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
15
+ import { Dictionary } from "../../fable_modules/fable-library-js.4.16.0/MutableMap.js";
16
+
17
+ export function getColumnCount(headers) {
18
+ return headers.length;
19
+ }
20
+
21
+ export function getRowCount(values) {
22
+ if (values.size === 0) {
23
+ return 0;
24
+ }
25
+ else {
26
+ return (1 + maxBy((tuple) => tuple[1], values.keys(), {
27
+ Compare: comparePrimitives,
28
+ })[1]) | 0;
29
+ }
30
+ }
31
+
32
+ export function boxHashValues(colCount, values) {
33
+ let hash = 0;
34
+ const rowCount = getRowCount(values) | 0;
35
+ for (let col = 0; col <= (colCount - 1); col++) {
36
+ for (let row = 0; row <= (rowCount - 1); row++) {
37
+ hash = ((((-1640531527 + safeHash(getItemFromDict(values, [col, row]))) + (hash << 6)) + (hash >> 2)) | 0);
38
+ }
39
+ }
40
+ return hash;
41
+ }
42
+
43
+ export function $007CIsUniqueExistingHeader$007C_$007C(existingHeaders, input) {
44
+ switch (input.tag) {
45
+ case 3:
46
+ case 2:
47
+ case 1:
48
+ case 0:
49
+ case 13:
50
+ return void 0;
51
+ case 12:
52
+ return tryFindIndex((h) => (h.tag === 12), existingHeaders);
53
+ case 11:
54
+ return tryFindIndex((h_1) => (h_1.tag === 11), existingHeaders);
55
+ default:
56
+ return tryFindIndex((h_2) => equals(h_2, input), existingHeaders);
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Returns the column index of the duplicate unique column in `existingHeaders`.
62
+ */
63
+ export function tryFindDuplicateUnique(newHeader, existingHeaders) {
64
+ const activePatternResult = $007CIsUniqueExistingHeader$007C_$007C(existingHeaders, newHeader);
65
+ if (activePatternResult != null) {
66
+ const index = activePatternResult | 0;
67
+ return index;
68
+ }
69
+ else {
70
+ return void 0;
71
+ }
72
+ }
73
+
74
+ /**
75
+ * Returns the column index of the duplicate unique column in `existingHeaders`.
76
+ */
77
+ export function tryFindDuplicateUniqueInArray(existingHeaders) {
78
+ const loop = (i_mut, duplicateList_mut, headerList_mut) => {
79
+ loop:
80
+ while (true) {
81
+ const i = i_mut, duplicateList = duplicateList_mut, headerList = headerList_mut;
82
+ let matchResult, header, tail;
83
+ if (isEmpty(headerList)) {
84
+ matchResult = 0;
85
+ }
86
+ else if (isEmpty(tail_1(headerList))) {
87
+ matchResult = 0;
88
+ }
89
+ else {
90
+ matchResult = 1;
91
+ header = head(headerList);
92
+ tail = tail_1(headerList);
93
+ }
94
+ switch (matchResult) {
95
+ case 0:
96
+ return duplicateList;
97
+ default: {
98
+ const hasDuplicate = tryFindDuplicateUnique(header, tail);
99
+ i_mut = (i + 1);
100
+ duplicateList_mut = ((hasDuplicate != null) ? cons({
101
+ HeaderType: header,
102
+ Index1: i,
103
+ Index2: value_2(hasDuplicate),
104
+ }, duplicateList) : duplicateList);
105
+ headerList_mut = tail;
106
+ continue loop;
107
+ }
108
+ }
109
+ break;
110
+ }
111
+ };
112
+ return loop(0, empty(), ofSeq(filter((x) => !x.IsTermColumn, existingHeaders)));
113
+ }
114
+
115
+ /**
116
+ * Checks if given column index is valid for given number of columns.
117
+ *
118
+ * if `allowAppend` = true => `0 < index <= columnCount`
119
+ *
120
+ * if `allowAppend` = false => `0 < index < columnCount`
121
+ */
122
+ export function SanityChecks_validateColumnIndex(index, columnCount, allowAppend) {
123
+ let x, y;
124
+ if (index < 0) {
125
+ throw new Error("Cannot insert CompositeColumn at index < 0.");
126
+ }
127
+ if ((x = (index | 0), (y = (columnCount | 0), allowAppend ? (compare(x, y) > 0) : (compare(x, y) >= 0)))) {
128
+ throw new Error(`Specified index is out of table range! Table contains only ${columnCount} columns.`);
129
+ }
130
+ }
131
+
132
+ /**
133
+ * Checks if given index is valid for given number of rows.
134
+ *
135
+ * if `allowAppend` = true => `0 < index <= rowCount`
136
+ *
137
+ * if `allowAppend` = false => `0 < index < rowCount`
138
+ */
139
+ export function SanityChecks_validateRowIndex(index, rowCount, allowAppend) {
140
+ let x, y;
141
+ if (index < 0) {
142
+ throw new Error("Cannot insert CompositeColumn at index < 0.");
143
+ }
144
+ if ((x = (index | 0), (y = (rowCount | 0), allowAppend ? (compare(x, y) > 0) : (compare(x, y) >= 0)))) {
145
+ throw new Error(`Specified index is out of table range! Table contains only ${rowCount} rows.`);
146
+ }
147
+ }
148
+
149
+ export function SanityChecks_validateColumn(column) {
150
+ column.Validate(true);
151
+ }
152
+
153
+ export function SanityChecks_validate(headers, values, raiseException) {
154
+ let clo;
155
+ let isValid = true;
156
+ let en = getEnumerator(values);
157
+ while (isValid && en["System.Collections.IEnumerator.MoveNext"]()) {
158
+ let matchValue;
159
+ let copyOfStruct = en["System.Collections.Generic.IEnumerator`1.get_Current"]();
160
+ matchValue = copyOfStruct[0];
161
+ let cell;
162
+ let copyOfStruct_1 = en["System.Collections.Generic.IEnumerator`1.get_Current"]();
163
+ cell = copyOfStruct_1[1];
164
+ const header = headers[matchValue[0]];
165
+ if (!header.IsTermColumn && !cell.isFreeText) {
166
+ (raiseException ? ((message) => {
167
+ throw new Error(message);
168
+ }) : ((clo = toConsole(printf("%s")), (arg) => {
169
+ clo(arg);
170
+ })))(`Invalid combination of header \`${header}\` and cell \`${cell}\`.`);
171
+ isValid = false;
172
+ }
173
+ }
174
+ return isValid;
175
+ }
176
+
177
+ export function Unchecked_tryGetCellAt(column, row, cells) {
178
+ return Dictionary_tryFind([column, row], cells);
179
+ }
180
+
181
+ /**
182
+ * Add or update a cell in the dictionary.
183
+ */
184
+ export function Unchecked_setCellAt(columnIndex, rowIndex, c, cells) {
185
+ cells.set([columnIndex, rowIndex], c);
186
+ }
187
+
188
+ /**
189
+ * Add a cell to the dictionary. If a cell already exists at the given position, it fails.
190
+ */
191
+ export function Unchecked_addCellAt(columnIndex, rowIndex, c, cells) {
192
+ addToDict(cells, [columnIndex, rowIndex], c);
193
+ }
194
+
195
+ export function Unchecked_moveCellTo(fromCol, fromRow, toCol, toRow, cells) {
196
+ const matchValue = Dictionary_tryFind([fromCol, fromRow], cells);
197
+ if (matchValue == null) {
198
+ }
199
+ else {
200
+ const c = matchValue;
201
+ cells.delete([fromCol, fromRow]);
202
+ const value_1 = Unchecked_setCellAt(toCol, toRow, c, cells);
203
+ }
204
+ }
205
+
206
+ export function Unchecked_removeHeader(index, headers) {
207
+ headers.splice(index, 1);
208
+ }
209
+
210
+ /**
211
+ * Remove cells of one Column, change index of cells with higher index to index - 1
212
+ */
213
+ export function Unchecked_removeColumnCells(index, cells) {
214
+ let enumerator = getEnumerator(cells);
215
+ try {
216
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
217
+ const activePatternResult = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
218
+ const c = activePatternResult[0][0] | 0;
219
+ if (c === index) {
220
+ cells.delete([c, activePatternResult[0][1]]);
221
+ }
222
+ }
223
+ }
224
+ finally {
225
+ disposeSafe(enumerator);
226
+ }
227
+ }
228
+
229
+ /**
230
+ * Remove cells of one Column, change index of cells with higher index to index - 1
231
+ */
232
+ export function Unchecked_removeColumnCells_withIndexChange(index, columnCount, rowCount, cells) {
233
+ for (let col = index; col <= (columnCount - 1); col++) {
234
+ for (let row = 0; row <= (rowCount - 1); row++) {
235
+ if (col === index) {
236
+ cells.delete([col, row]);
237
+ }
238
+ else if (col > index) {
239
+ Unchecked_moveCellTo(col, row, col - 1, row, cells);
240
+ }
241
+ }
242
+ }
243
+ }
244
+
245
+ export function Unchecked_removeRowCells(rowIndex, cells) {
246
+ let enumerator = getEnumerator(cells);
247
+ try {
248
+ while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
249
+ const activePatternResult = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
250
+ const r = activePatternResult[0][1] | 0;
251
+ if (r === rowIndex) {
252
+ cells.delete([activePatternResult[0][0], r]);
253
+ }
254
+ }
255
+ }
256
+ finally {
257
+ disposeSafe(enumerator);
258
+ }
259
+ }
260
+
261
+ /**
262
+ * Remove cells of one Row, change index of cells with higher index to index - 1
263
+ */
264
+ export function Unchecked_removeRowCells_withIndexChange(rowIndex, columnCount, rowCount, cells) {
265
+ for (let row = rowIndex; row <= (rowCount - 1); row++) {
266
+ for (let col = 0; col <= (columnCount - 1); col++) {
267
+ if (row === rowIndex) {
268
+ cells.delete([col, row]);
269
+ }
270
+ else if (row > rowIndex) {
271
+ Unchecked_moveCellTo(col, row, col, row - 1, cells);
272
+ }
273
+ }
274
+ }
275
+ }
276
+
277
+ /**
278
+ * Get an empty cell fitting for related column header.
279
+ *
280
+ * `columCellOption` is used to decide between `CompositeCell.Term` or `CompositeCell.Unitized`. `columCellOption` can be any other cell in the same column, preferably the first one.
281
+ */
282
+ export function Unchecked_getEmptyCellForHeader(header, columCellOption) {
283
+ const matchValue = header.IsTermColumn;
284
+ if (matchValue) {
285
+ let matchResult;
286
+ if (columCellOption == null) {
287
+ matchResult = 0;
288
+ }
289
+ else {
290
+ switch (columCellOption.tag) {
291
+ case 0: {
292
+ matchResult = 0;
293
+ break;
294
+ }
295
+ case 2: {
296
+ matchResult = 1;
297
+ break;
298
+ }
299
+ default:
300
+ matchResult = 2;
301
+ }
302
+ }
303
+ switch (matchResult) {
304
+ case 0:
305
+ return CompositeCell.emptyTerm;
306
+ case 1:
307
+ return CompositeCell.emptyUnitized;
308
+ default:
309
+ throw new Error("[extendBodyCells] This should never happen, IsTermColumn header must be paired with either term or unitized cell.");
310
+ }
311
+ }
312
+ else {
313
+ return CompositeCell.emptyFreeText;
314
+ }
315
+ }
316
+
317
+ /**
318
+ *
319
+ */
320
+ export function Unchecked_addColumn(newHeader, newCells, index, forceReplace, onlyHeaders, headers, values) {
321
+ let numberOfNewColumns = 1;
322
+ let index_1 = index;
323
+ const hasDuplicateUnique = tryFindDuplicateUnique(newHeader, headers);
324
+ if (!forceReplace && (hasDuplicateUnique != null)) {
325
+ throw new Error(`Invalid new column \`${newHeader}\`. Table already contains header of the same type on index \`${value_2(hasDuplicateUnique)}\``);
326
+ }
327
+ if (hasDuplicateUnique != null) {
328
+ numberOfNewColumns = 0;
329
+ index_1 = (value_2(hasDuplicateUnique) | 0);
330
+ }
331
+ const matchValue = getColumnCount(headers) | 0;
332
+ const matchValue_1 = getRowCount(values) | 0;
333
+ const startColCount = matchValue | 0;
334
+ if (hasDuplicateUnique != null) {
335
+ Unchecked_removeHeader(index_1, headers);
336
+ }
337
+ headers.splice(index_1, 0, newHeader);
338
+ if ((index_1 < startColCount) && (hasDuplicateUnique == null)) {
339
+ const lastColumnIndex = max(startColCount - 1, 0) | 0;
340
+ for (let columnIndex = lastColumnIndex; columnIndex >= index_1; columnIndex--) {
341
+ for (let rowIndex = 0; rowIndex <= matchValue_1; rowIndex++) {
342
+ Unchecked_moveCellTo(columnIndex, rowIndex, columnIndex + numberOfNewColumns, rowIndex, values);
343
+ }
344
+ }
345
+ }
346
+ if (!onlyHeaders) {
347
+ if (hasDuplicateUnique != null) {
348
+ Unchecked_removeColumnCells(index_1, values);
349
+ }
350
+ const f = (index_1 >= startColCount) ? ((tupledArg) => ((values_1) => {
351
+ const value = addToDict(values_1, [tupledArg[0], tupledArg[1]], tupledArg[2]);
352
+ })) : ((tupledArg_1) => ((cells) => {
353
+ Unchecked_setCellAt(tupledArg_1[0], tupledArg_1[1], tupledArg_1[2], cells);
354
+ }));
355
+ iterateIndexed((rowIndex_3, cell_1) => {
356
+ f([index_1, rowIndex_3, cell_1])(values);
357
+ }, newCells);
358
+ }
359
+ }
360
+
361
+ export function Unchecked_fillMissingCells(headers, values) {
362
+ let col;
363
+ const rowCount = getRowCount(values) | 0;
364
+ const columnCount = getColumnCount(headers) | 0;
365
+ const columnKeyGroups = ofArray(Array_groupBy((tuple) => tuple[0], toArray(values.keys()), {
366
+ Equals: (x, y) => (x === y),
367
+ GetHashCode: numberHash,
368
+ }), {
369
+ Compare: comparePrimitives,
370
+ });
371
+ for (let columnIndex = 0; columnIndex <= (columnCount - 1); columnIndex++) {
372
+ const header = headers[columnIndex];
373
+ const matchValue = tryFind(columnIndex, columnKeyGroups);
374
+ if (matchValue == null) {
375
+ const defaultCell_1 = Unchecked_getEmptyCellForHeader(header, void 0);
376
+ for (let rowIndex_1 = 0; rowIndex_1 <= (rowCount - 1); rowIndex_1++) {
377
+ Unchecked_addCellAt(columnIndex, rowIndex_1, defaultCell_1, values);
378
+ }
379
+ }
380
+ else if ((col = matchValue, col.length === rowCount)) {
381
+ const col_1 = matchValue;
382
+ }
383
+ else {
384
+ const col_2 = matchValue;
385
+ const defaultCell = Unchecked_getEmptyCellForHeader(header, getItemFromDict(values, head_1(col_2)));
386
+ const rowKeys = ofArray_1(map((tuple_1) => tuple_1[1], col_2, Int32Array), {
387
+ Compare: comparePrimitives,
388
+ });
389
+ for (let rowIndex = 0; rowIndex <= (rowCount - 1); rowIndex++) {
390
+ if (!FSharpSet__Contains(rowKeys, rowIndex)) {
391
+ Unchecked_addCellAt(columnIndex, rowIndex, defaultCell, values);
392
+ }
393
+ }
394
+ }
395
+ }
396
+ }
397
+
398
+ /**
399
+ * Increases the table size to the given new row count and fills the new rows with the last value of the column
400
+ */
401
+ export function Unchecked_extendToRowCount(rowCount, headers, values) {
402
+ const columnCount = getColumnCount(headers) | 0;
403
+ const previousRowCount = getRowCount(values) | 0;
404
+ for (let columnIndex = 0; columnIndex <= (columnCount - 1); columnIndex++) {
405
+ const lastValue = getItemFromDict(values, [columnIndex, previousRowCount - 1]);
406
+ for (let rowIndex = previousRowCount - 1; rowIndex <= (rowCount - 1); rowIndex++) {
407
+ Unchecked_setCellAt(columnIndex, rowIndex, lastValue, values);
408
+ }
409
+ }
410
+ }
411
+
412
+ export function Unchecked_addRow(index, newCells, headers, values) {
413
+ const rowCount = getRowCount(values) | 0;
414
+ const columnCount = getColumnCount(headers) | 0;
415
+ let increaseRowIndices;
416
+ if (index < rowCount) {
417
+ const lastRowIndex = max(rowCount - 1, 0) | 0;
418
+ for (let rowIndex = lastRowIndex; rowIndex >= index; rowIndex--) {
419
+ for (let columnIndex = 0; columnIndex <= (columnCount - 1); columnIndex++) {
420
+ Unchecked_moveCellTo(columnIndex, rowIndex, columnIndex, rowIndex + 1, values);
421
+ }
422
+ }
423
+ }
424
+ else {
425
+ increaseRowIndices = void 0;
426
+ }
427
+ const setNewCells = iterateIndexed((columnIndex_1, cell) => {
428
+ Unchecked_setCellAt(columnIndex_1, index, cell, values);
429
+ }, newCells);
430
+ }
431
+
432
+ export function Unchecked_addRows(index, newRows, headers, values) {
433
+ const rowCount = getRowCount(values) | 0;
434
+ const columnCount = getColumnCount(headers) | 0;
435
+ const numNewRows = newRows.length | 0;
436
+ let increaseRowIndices;
437
+ if (index < rowCount) {
438
+ const lastRowIndex = max(rowCount - 1, 0) | 0;
439
+ for (let rowIndex = lastRowIndex; rowIndex >= index; rowIndex--) {
440
+ for (let columnIndex = 0; columnIndex <= (columnCount - 1); columnIndex++) {
441
+ Unchecked_moveCellTo(columnIndex, rowIndex, columnIndex, rowIndex + numNewRows, values);
442
+ }
443
+ }
444
+ }
445
+ else {
446
+ increaseRowIndices = void 0;
447
+ }
448
+ let currentRowIndex = index;
449
+ for (let idx = 0; idx <= (newRows.length - 1); idx++) {
450
+ const setNewCells = iterateIndexed((columnIndex_1, cell) => {
451
+ Unchecked_setCellAt(columnIndex_1, currentRowIndex, cell, values);
452
+ }, item(idx, newRows));
453
+ currentRowIndex = ((currentRowIndex + 1) | 0);
454
+ }
455
+ }
456
+
457
+ /**
458
+ * Returns true, if two composite headers share the same main header string
459
+ */
460
+ export function Unchecked_compositeHeaderMainColumnEqual(ch1, ch2) {
461
+ return toString(ch1) === toString(ch2);
462
+ }
463
+
464
+ /**
465
+ * From a list of rows consisting of headers and values, creates a list of combined headers and the values as a sparse matrix
466
+ *
467
+ * The values cant be directly taken as they are, as there is no guarantee that the headers are aligned
468
+ *
469
+ * This function aligns the headers and values by the main header string
470
+ *
471
+ * If keepOrder is true, the order of values per row is kept intact, otherwise the values are allowed to be reordered
472
+ */
473
+ export function Unchecked_alignByHeaders(keepOrder, rows) {
474
+ const headers = [];
475
+ const values = new Dictionary([], {
476
+ Equals: equalArrays,
477
+ GetHashCode: arrayHash,
478
+ });
479
+ const loop = (colI_mut, rows_2_mut) => {
480
+ loop:
481
+ while (true) {
482
+ const colI = colI_mut, rows_2 = rows_2_mut;
483
+ if (!exists((arg) => !isEmpty(arg), rows_2)) {
484
+ return [headers, values];
485
+ }
486
+ else {
487
+ const firstElem = pick((l) => (isEmpty(l) ? void 0 : head(l)), rows_2)[0];
488
+ void (headers.push(firstElem));
489
+ colI_mut = (colI + 1);
490
+ rows_2_mut = mapIndexed((rowI, l_1) => {
491
+ if (keepOrder) {
492
+ if (!isEmpty(l_1)) {
493
+ if (Unchecked_compositeHeaderMainColumnEqual(head(l_1)[0], firstElem)) {
494
+ addToDict(values, [colI, rowI], head(l_1)[1]);
495
+ return tail_1(l_1);
496
+ }
497
+ else {
498
+ return l_1;
499
+ }
500
+ }
501
+ else {
502
+ return empty();
503
+ }
504
+ }
505
+ else {
506
+ const patternInput = List_tryPickAndRemove((tupledArg) => {
507
+ if (Unchecked_compositeHeaderMainColumnEqual(tupledArg[0], firstElem)) {
508
+ return tupledArg[1];
509
+ }
510
+ else {
511
+ return void 0;
512
+ }
513
+ }, l_1);
514
+ const newL = patternInput[1];
515
+ const firstMatch = patternInput[0];
516
+ if (firstMatch == null) {
517
+ return newL;
518
+ }
519
+ else {
520
+ addToDict(values, [colI, rowI], firstMatch);
521
+ return newL;
522
+ }
523
+ }
524
+ }, rows_2);
525
+ continue loop;
526
+ }
527
+ break;
528
+ }
529
+ };
530
+ return loop(0, rows);
531
+ }
532
+
@@ -1,17 +1,16 @@
1
- import { append, toArray, reduce, choose, map as map_1, delay, toList, length, findIndex, tryFindIndex } from "../../../fable_modules/fable-library-js.4.13.0/Seq.js";
2
- import { Dict_tryFind } from "../Helper.js";
3
- import { addToSet, addToDict } from "../../../fable_modules/fable-library-js.4.13.0/MapUtil.js";
4
- import { toIterator, equals, comparePrimitives, stringHash, compare, disposeSafe, getEnumerator } from "../../../fable_modules/fable-library-js.4.13.0/Util.js";
5
- import { bind, map as map_3, unwrap, defaultArg, value as value_2 } from "../../../fable_modules/fable-library-js.4.13.0/Option.js";
6
- import { collect as collect_1, map as map_4, item, insertRangeInPlace, fold } from "../../../fable_modules/fable-library-js.4.13.0/Array.js";
1
+ import { append, toArray, reduce, choose, map as map_1, delay, toList, length, findIndex, tryFindIndex } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
2
+ import { Dictionary_tryFind } from "../Helper/Collections.js";
3
+ import { addToSet, addToDict } from "../../fable_modules/fable-library-js.4.16.0/MapUtil.js";
4
+ import { toIterator, equals, comparePrimitives, stringHash, compare, disposeSafe, getEnumerator } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
5
+ import { bind, map as map_2, unwrap, defaultArg, value as value_2 } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
6
+ import { collect, map as map_3, item, insertRangeInPlace, fold } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
7
7
  import { CompositeHeader } from "./CompositeHeader.js";
8
- import { Array_groupBy, distinct } from "../../../fable_modules/fable-library-js.4.13.0/Seq2.js";
9
- import { FSharpSet__get_IsEmpty, ofSeq, intersect } from "../../../fable_modules/fable-library-js.4.13.0/Set.js";
8
+ import { Array_groupBy, distinct } from "../../fable_modules/fable-library-js.4.16.0/Seq2.js";
9
+ import { FSharpSet__get_IsEmpty, ofSeq, intersect } from "../../fable_modules/fable-library-js.4.16.0/Set.js";
10
10
  import { ArcTable } from "./ArcTable.js";
11
- import { map as map_2, collect } from "../../../fable_modules/fable-library-js.4.13.0/List.js";
12
- import { Unchecked_fillMissingCells, ProcessParsing_groupProcesses, ProcessParsing_processToRows, ProcessParsing_alignByHeaders } from "./ArcTableAux.js";
13
- import { tryFind, ofSeq as ofSeq_1 } from "../../../fable_modules/fable-library-js.4.13.0/Map.js";
14
- import { class_type } from "../../../fable_modules/fable-library-js.4.13.0/Reflection.js";
11
+ import { tryFind, ofSeq as ofSeq_1 } from "../../fable_modules/fable-library-js.4.16.0/Map.js";
12
+ import { Unchecked_fillMissingCells } from "./ArcTableAux.js";
13
+ import { class_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
15
14
 
16
15
  /**
17
16
  * If a table with the given name exists in the TableList, returns it, else returns None.
@@ -40,7 +39,7 @@ export function ArcTablesAux_getIOMap(tables) {
40
39
  const mappings = new Map([]);
41
40
  const includeInMap = (name, ioType) => {
42
41
  if (name !== "") {
43
- const matchValue = Dict_tryFind(name, mappings);
42
+ const matchValue = Dictionary_tryFind(name, mappings);
44
43
  if (matchValue == null) {
45
44
  addToDict(mappings, name, ioType);
46
45
  }
@@ -95,7 +94,7 @@ export function ArcTablesAux_applyIOMap(map, tables) {
95
94
  const ic = matchValue;
96
95
  const index = findIndex((x) => x.isInput, table.Headers) | 0;
97
96
  const newIOType = fold((io, c) => {
98
- const matchValue_1 = Dict_tryFind(c.ToFreeTextCell().AsFreeText, map);
97
+ const matchValue_1 = Dictionary_tryFind(c.ToFreeTextCell().AsFreeText, map);
99
98
  if (matchValue_1 == null) {
100
99
  return io;
101
100
  }
@@ -113,7 +112,7 @@ export function ArcTablesAux_applyIOMap(map, tables) {
113
112
  const oc = matchValue_2;
114
113
  const index_1 = findIndex((x_1) => x_1.isOutput, table.Headers) | 0;
115
114
  const newIOType_1 = fold((io_1, c_1) => {
116
- const matchValue_3 = Dict_tryFind(c_1.ToFreeTextCell().AsFreeText, map);
115
+ const matchValue_3 = Dictionary_tryFind(c_1.ToFreeTextCell().AsFreeText, map);
117
116
  if (matchValue_3 == null) {
118
117
  return io_1;
119
118
  }
@@ -409,10 +408,6 @@ export class ArcTables {
409
408
  const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.Tables), rowIndex];
410
409
  return this$.GetRowAt(tupledArg[0], tupledArg[1]);
411
410
  }
412
- GetProcesses() {
413
- const this$ = this;
414
- return collect((t) => t.GetProcesses(), toList(this$.Tables));
415
- }
416
411
  static ofSeq(tables) {
417
412
  return new ArcTables(Array.from(tables));
418
413
  }
@@ -422,24 +417,17 @@ export class ArcTables {
422
417
  this$.Tables.splice(oldIndex, 1);
423
418
  this$.Tables.splice(newIndex, 0, table);
424
419
  }
425
- static fromProcesses(ps) {
426
- let collection;
427
- return new ArcTables((collection = map_2((tupledArg) => {
428
- const tupledArg_1 = ProcessParsing_alignByHeaders(true, collect(ProcessParsing_processToRows, tupledArg[1]));
429
- return ArcTable.create(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
430
- }, ProcessParsing_groupProcesses(ps)), Array.from(collection)));
431
- }
432
420
  static updateReferenceTablesBySheets(referenceTables, sheetTables, keepUnusedRefTables) {
433
421
  let collection, s, array;
434
422
  const keepUnusedRefTables_1 = defaultArg(keepUnusedRefTables, false);
435
423
  const usedTables = new Set([]);
436
- const referenceTableMap = ofSeq_1(choose((t) => map_3((c) => [item(0, c.Cells).AsFreeText, t], t.TryGetProtocolNameColumn()), referenceTables.Tables), {
424
+ const referenceTableMap = ofSeq_1(choose((t) => map_2((c) => [item(0, c.Cells).AsFreeText, t], t.TryGetProtocolNameColumn()), referenceTables.Tables), {
437
425
  Compare: comparePrimitives,
438
426
  });
439
- return new ArcTables((collection = ((s = map_4((t_3) => {
427
+ return new ArcTables((collection = ((s = map_3((t_3) => {
440
428
  Unchecked_fillMissingCells(t_3.Headers, t_3.Values);
441
429
  return t_3;
442
- }, map_4((tupledArg) => reduce((table, table_1) => ArcTable.append(table, table_1), tupledArg[1]), Array_groupBy((t_2) => t_2.Name, map_4((t_1) => {
430
+ }, map_3((tupledArg) => reduce((table, table_1) => ArcTable.append(table, table_1), tupledArg[1]), Array_groupBy((t_2) => t_2.Name, map_3((t_1) => {
443
431
  const k = defaultArg(bind((c_1) => {
444
432
  if (c_1.AsFreeText === "") {
445
433
  return void 0;
@@ -458,7 +446,7 @@ export class ArcTables {
458
446
  const updatedTable = ArcTable.updateReferenceByAnnotationTable(rt, t_1);
459
447
  return ArcTable.create(t_1.Name, updatedTable.Headers, updatedTable.Values);
460
448
  }
461
- }, (array = toArray(sheetTables.Tables), collect_1(ArcTable.SplitByProtocolREF, array))), {
449
+ }, (array = toArray(sheetTables.Tables), collect(ArcTable.SplitByProtocolREF, array))), {
462
450
  Equals: (x_2, y_1) => (x_2 === y_1),
463
451
  GetHashCode: stringHash,
464
452
  }))), keepUnusedRefTables_1 ? append(choose((kv) => {
@@ -484,10 +472,10 @@ export class ArcTables {
484
472
  }
485
473
 
486
474
  export function ArcTables_$reflection() {
487
- return class_type("ARCtrl.ISA.ArcTables", void 0, ArcTables);
475
+ return class_type("ARCtrl.ArcTables", void 0, ArcTables);
488
476
  }
489
477
 
490
- export function ArcTables_$ctor_Z18C2F36D(initTables) {
478
+ export function ArcTables_$ctor_Z420F2E1A(initTables) {
491
479
  return new ArcTables(initTables);
492
480
  }
493
481