@nfdi4plants/arctrl 1.0.0-alpha6

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 (277) hide show
  1. package/ARCtrl.js +257 -0
  2. package/Contract/Contract.js +95 -0
  3. package/Contracts/Contracts.ARCtrl.js +35 -0
  4. package/Contracts/Contracts.ArcAssay.js +65 -0
  5. package/Contracts/Contracts.ArcInvestigation.js +58 -0
  6. package/Contracts/Contracts.ArcStudy.js +65 -0
  7. package/Contracts/Contracts.Git.js +91 -0
  8. package/FileSystem/Commit.js +18 -0
  9. package/FileSystem/DefaultGitignore.js +3 -0
  10. package/FileSystem/FileSystem.js +53 -0
  11. package/FileSystem/FileSystemTree.js +223 -0
  12. package/FileSystem/Path.js +38 -0
  13. package/FileSystemTree.js +51 -0
  14. package/ISA/ISA/ArcTypes/ArcTable.js +744 -0
  15. package/ISA/ISA/ArcTypes/ArcTableAux.js +1142 -0
  16. package/ISA/ISA/ArcTypes/ArcTables.js +380 -0
  17. package/ISA/ISA/ArcTypes/ArcTypes.js +2018 -0
  18. package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
  19. package/ISA/ISA/ArcTypes/CompositeColumn.js +42 -0
  20. package/ISA/ISA/ArcTypes/CompositeHeader.js +358 -0
  21. package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
  22. package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
  23. package/ISA/ISA/Builder/Types.js +243 -0
  24. package/ISA/ISA/Fable.js +50 -0
  25. package/ISA/ISA/Helper.js +326 -0
  26. package/ISA/ISA/Identifier.js +76 -0
  27. package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
  28. package/ISA/ISA/JsonTypes/Assay.js +620 -0
  29. package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
  30. package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
  31. package/ISA/ISA/JsonTypes/Comment.js +58 -0
  32. package/ISA/ISA/JsonTypes/CommentList.js +139 -0
  33. package/ISA/ISA/JsonTypes/Component.js +158 -0
  34. package/ISA/ISA/JsonTypes/Data.js +55 -0
  35. package/ISA/ISA/JsonTypes/DataFile.js +68 -0
  36. package/ISA/ISA/JsonTypes/Factor.js +128 -0
  37. package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
  38. package/ISA/ISA/JsonTypes/Investigation.js +204 -0
  39. package/ISA/ISA/JsonTypes/Material.js +66 -0
  40. package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
  41. package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
  42. package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
  43. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
  44. package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
  45. package/ISA/ISA/JsonTypes/Person.js +137 -0
  46. package/ISA/ISA/JsonTypes/Process.js +401 -0
  47. package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
  48. package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
  49. package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
  50. package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
  51. package/ISA/ISA/JsonTypes/Protocol.js +277 -0
  52. package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
  53. package/ISA/ISA/JsonTypes/Publication.js +105 -0
  54. package/ISA/ISA/JsonTypes/Sample.js +71 -0
  55. package/ISA/ISA/JsonTypes/Source.js +54 -0
  56. package/ISA/ISA/JsonTypes/Study.js +942 -0
  57. package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
  58. package/ISA/ISA/JsonTypes/URI.js +19 -0
  59. package/ISA/ISA/JsonTypes/Value.js +210 -0
  60. package/ISA/ISA/Regex.js +588 -0
  61. package/ISA/ISA.Json/Assay.js +123 -0
  62. package/ISA/ISA.Json/Comment.js +84 -0
  63. package/ISA/ISA.Json/ConverterOptions.js +33 -0
  64. package/ISA/ISA.Json/Data.js +271 -0
  65. package/ISA/ISA.Json/Decode.js +46 -0
  66. package/ISA/ISA.Json/Factor.js +194 -0
  67. package/ISA/ISA.Json/GEncode.js +15 -0
  68. package/ISA/ISA.Json/Investigation.js +132 -0
  69. package/ISA/ISA.Json/Material.js +233 -0
  70. package/ISA/ISA.Json/Ontology.js +204 -0
  71. package/ISA/ISA.Json/Person.js +204 -0
  72. package/ISA/ISA.Json/Process.js +291 -0
  73. package/ISA/ISA.Json/Protocol.js +242 -0
  74. package/ISA/ISA.Json/Publication.js +92 -0
  75. package/ISA/ISA.Json/Study.js +230 -0
  76. package/ISA/ISA.Json/Validation/Fable.js +69 -0
  77. package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
  78. package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
  79. package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
  80. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
  81. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
  82. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
  83. package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
  84. package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
  85. package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
  86. package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
  87. package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
  88. package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
  89. package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
  90. package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
  91. package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
  92. package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
  93. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
  94. package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
  95. package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
  96. package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
  97. package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
  98. package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
  99. package/README.md +277 -0
  100. package/SemVer.js +60 -0
  101. package/Templates/Templates.Json.js +40 -0
  102. package/Templates/Templates.Spreadsheet.js +315 -0
  103. package/Templates/Templates.js +179 -0
  104. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
  105. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
  106. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
  107. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
  108. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
  109. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
  110. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
  111. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
  112. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
  113. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
  114. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
  115. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
  116. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
  117. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
  118. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
  119. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
  120. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
  121. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
  122. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
  123. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
  124. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
  125. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
  126. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
  127. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
  128. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
  129. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
  130. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
  131. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
  132. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
  133. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
  134. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
  135. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
  136. package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
  137. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
  138. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
  139. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
  140. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
  141. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
  142. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
  143. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
  144. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
  145. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
  146. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
  147. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
  148. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
  149. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
  150. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
  151. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
  152. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
  153. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
  154. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
  155. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
  156. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
  157. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
  158. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
  159. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  160. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  161. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  162. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  163. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
  164. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
  165. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
  166. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
  167. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
  168. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
  169. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
  170. package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
  171. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
  172. package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
  173. package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
  174. package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
  175. package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
  176. package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
  177. package/fable_modules/fable-library.4.1.4/Async.js +158 -0
  178. package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
  179. package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
  180. package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
  181. package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
  182. package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
  183. package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
  184. package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
  185. package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
  186. package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
  187. package/fable_modules/fable-library.4.1.4/Char.js +169 -0
  188. package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
  189. package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
  190. package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
  191. package/fable_modules/fable-library.4.1.4/Date.js +451 -0
  192. package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
  193. package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
  194. package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
  195. package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
  196. package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
  197. package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
  198. package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
  199. package/fable_modules/fable-library.4.1.4/Double.js +46 -0
  200. package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
  201. package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
  202. package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
  203. package/fable_modules/fable-library.4.1.4/Event.js +93 -0
  204. package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
  205. package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
  206. package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
  207. package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
  208. package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
  209. package/fable_modules/fable-library.4.1.4/Global.js +8 -0
  210. package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
  211. package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
  212. package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
  213. package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
  214. package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
  215. package/fable_modules/fable-library.4.1.4/List.js +1273 -0
  216. package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
  217. package/fable_modules/fable-library.4.1.4/Long.js +46 -0
  218. package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
  219. package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
  220. package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
  221. package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
  222. package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
  223. package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
  224. package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
  225. package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
  226. package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
  227. package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
  228. package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
  229. package/fable_modules/fable-library.4.1.4/Native.js +8 -0
  230. package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
  231. package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
  232. package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
  233. package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
  234. package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
  235. package/fable_modules/fable-library.4.1.4/Option.js +96 -0
  236. package/fable_modules/fable-library.4.1.4/README.md +3 -0
  237. package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
  238. package/fable_modules/fable-library.4.1.4/Random.js +170 -0
  239. package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
  240. package/fable_modules/fable-library.4.1.4/Range.js +45 -0
  241. package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
  242. package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
  243. package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
  244. package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
  245. package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
  246. package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
  247. package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
  248. package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
  249. package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
  250. package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
  251. package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
  252. package/fable_modules/fable-library.4.1.4/String.js +540 -0
  253. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
  254. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
  255. package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
  256. package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
  257. package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
  258. package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
  259. package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
  260. package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
  261. package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
  262. package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
  263. package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
  264. package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
  265. package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
  266. package/fable_modules/fable-library.4.1.4/Types.js +208 -0
  267. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
  268. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
  269. package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
  270. package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
  271. package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
  272. package/fable_modules/fable-library.4.1.4/Util.js +662 -0
  273. package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
  274. package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
  275. package/fable_modules/fable-library.4.1.4/package.json +23 -0
  276. package/fable_modules/project_cracked.json +1 -0
  277. package/package.json +22 -0
@@ -0,0 +1,151 @@
1
+ namespace FsSpreadsheet.DSL
2
+
3
+ open FsSpreadsheet
4
+
5
+ [<AutoOpen>]
6
+ type Message =
7
+ | Text of string
8
+ | Exception of exn
9
+
10
+ static member message (s : string) = Text s
11
+
12
+ static member message (e : #exn) = Exception e
13
+
14
+ member this.MapText(m : string -> string) =
15
+ match this with
16
+ | Text s -> Text (m s)
17
+ | Exception e -> this
18
+
19
+ member this.AsString() =
20
+ match this with
21
+ | Text s -> s
22
+ | Exception e -> e.Message
23
+
24
+ member this.TryText() =
25
+ match this with
26
+ | Text s -> Some s
27
+ | _ -> None
28
+
29
+ member this.TryException() =
30
+ match this with
31
+ | Exception e -> Some e
32
+ | _ -> None
33
+
34
+ member this.IsTxt =
35
+ match this with
36
+ | Text s -> true
37
+ | _ -> false
38
+
39
+ member this.IsExc =
40
+ match this with
41
+ | Text s -> true
42
+ | _ -> false
43
+
44
+
45
+ module Messages =
46
+
47
+ let format (ms : Message list) =
48
+ ms
49
+ |> List.map (fun m -> m.AsString())
50
+ |> List.reduce (fun a b -> a + ";" + b)
51
+
52
+ let fail (ms : Message list) =
53
+ let s = format ms
54
+ if ms |> List.exists (fun m -> m.IsExc) then
55
+ printfn "s"
56
+ raise (ms |> List.pick (fun m -> m.TryException()))
57
+ else
58
+ failwith s
59
+
60
+
61
+ [<AutoOpen>]
62
+ type SheetEntity<'T> =
63
+
64
+ | Some of 'T * Message list
65
+ | NoneOptional of Message list
66
+ | NoneRequired of Message list
67
+
68
+ static member some (v : 'T) : SheetEntity<'T> = SheetEntity.Some (v,[])
69
+
70
+ /// Get messages
71
+ member this.Messages =
72
+
73
+ match this with
74
+ | Some (f,errs) -> errs
75
+ | NoneOptional errs -> errs
76
+ | NoneRequired errs -> errs
77
+
78
+ [<AutoOpen>]
79
+ module SheetEntityExtensions =
80
+ type SheetEntity<'T> with
81
+ member inline this.Value =
82
+ match this with
83
+ | Some (f,errs) -> f
84
+ | NoneOptional ms | NoneRequired ms when ms = [] ->
85
+ #if FABLE_COMPILER
86
+ failwith $"SheetEntity does not contain Value."
87
+ #else
88
+ failwith $"SheetEntity of type {typeof<'T>.Name} does not contain Value."
89
+ #endif
90
+ | NoneOptional ms | NoneRequired ms ->
91
+ let appendedMessages = Messages.format ms
92
+ #if FABLE_COMPILER
93
+ failwith $"SheetEntity does not contain Value: \n\t{appendedMessages}"
94
+ #else
95
+ failwith $"SheetEntity of type {typeof<'T>.Name} does not contain Value: \n\t{appendedMessages}"
96
+ #endif
97
+
98
+ type Value = DataType * string
99
+
100
+ type CellElement = Value * int option
101
+
102
+ type ColumnIndex =
103
+
104
+ | Col of int
105
+
106
+ member self.Index = match self with | Col i -> i
107
+
108
+ type RowIndex =
109
+
110
+ | Row of int
111
+
112
+ member self.Index = match self with | Row i -> i
113
+
114
+ type ColumnElement =
115
+ | IndexedCell of RowIndex * Value
116
+ | UnindexedCell of Value
117
+
118
+ type RowElement =
119
+ | IndexedCell of ColumnIndex * Value
120
+ | UnindexedCell of Value
121
+
122
+ type TableElement =
123
+ | UnindexedRow of RowElement list
124
+ | UnindexedColumn of ColumnElement list
125
+
126
+ member this.IsRow =
127
+ match this with
128
+ | UnindexedRow _ -> true
129
+ | _ -> false
130
+
131
+ member this.IsColumn =
132
+ match this with
133
+ | UnindexedColumn _ -> true
134
+ | _ -> false
135
+
136
+ type SheetElement =
137
+ | Table of string * TableElement list
138
+ | IndexedRow of RowIndex * RowElement list
139
+ | UnindexedRow of RowElement list
140
+ | IndexedColumn of ColumnIndex * ColumnElement list
141
+ | UnindexedColumn of ColumnElement list
142
+ | IndexedCell of RowIndex * ColumnIndex * Value
143
+ | UnindexedCell of Value
144
+
145
+
146
+ type WorkbookElement =
147
+ | UnnamedSheet of SheetElement list
148
+ | NamedSheet of string * SheetElement list
149
+
150
+ type Workbook =
151
+ | Workbook of WorkbookElement list
@@ -0,0 +1,277 @@
1
+ import { Union } from "../../fable-library.4.1.4/Types.js";
2
+ import { tuple_type, int32_type, list_type, union_type, class_type, string_type } from "../../fable-library.4.1.4/Reflection.js";
3
+ import { empty, pick, exists, map, reduce } from "../../fable-library.4.1.4/List.js";
4
+ import { printf, toConsole } from "../../fable-library.4.1.4/String.js";
5
+ import { DataType_$reflection } from "../Cells/FsCell.fs.js";
6
+
7
+ export class Message extends Union {
8
+ constructor(tag, fields) {
9
+ super();
10
+ this.tag = tag;
11
+ this.fields = fields;
12
+ }
13
+ cases() {
14
+ return ["Text", "Exception"];
15
+ }
16
+ }
17
+
18
+ export function Message_$reflection() {
19
+ return union_type("FsSpreadsheet.DSL.Message", [], Message, () => [[["Item", string_type]], [["Item", class_type("System.Exception")]]]);
20
+ }
21
+
22
+ export function Message_message_Z721C83C5(s) {
23
+ return new Message(0, [s]);
24
+ }
25
+
26
+ export function Message_message_2BC701FD(e) {
27
+ return new Message(1, [e]);
28
+ }
29
+
30
+ export function Message__MapText_11D407F6(this$, m) {
31
+ if (this$.tag === 1) {
32
+ return this$;
33
+ }
34
+ else {
35
+ return new Message(0, [m(this$.fields[0])]);
36
+ }
37
+ }
38
+
39
+ export function Message__AsString(this$) {
40
+ if (this$.tag === 1) {
41
+ return this$.fields[0].message;
42
+ }
43
+ else {
44
+ return this$.fields[0];
45
+ }
46
+ }
47
+
48
+ export function Message__TryText(this$) {
49
+ if (this$.tag === 0) {
50
+ return this$.fields[0];
51
+ }
52
+ else {
53
+ return void 0;
54
+ }
55
+ }
56
+
57
+ export function Message__TryException(this$) {
58
+ if (this$.tag === 1) {
59
+ return this$.fields[0];
60
+ }
61
+ else {
62
+ return void 0;
63
+ }
64
+ }
65
+
66
+ export function Message__get_IsTxt(this$) {
67
+ if (this$.tag === 0) {
68
+ return true;
69
+ }
70
+ else {
71
+ return false;
72
+ }
73
+ }
74
+
75
+ export function Message__get_IsExc(this$) {
76
+ if (this$.tag === 0) {
77
+ return true;
78
+ }
79
+ else {
80
+ return false;
81
+ }
82
+ }
83
+
84
+ export function Messages_format(ms) {
85
+ return reduce((a, b) => ((a + ";") + b), map(Message__AsString, ms));
86
+ }
87
+
88
+ export function Messages_fail(ms) {
89
+ const s = Messages_format(ms);
90
+ if (exists(Message__get_IsExc, ms)) {
91
+ toConsole(printf("s"));
92
+ throw pick(Message__TryException, ms);
93
+ }
94
+ else {
95
+ throw new Error(s);
96
+ }
97
+ }
98
+
99
+ export class SheetEntity$1 extends Union {
100
+ constructor(tag, fields) {
101
+ super();
102
+ this.tag = tag;
103
+ this.fields = fields;
104
+ }
105
+ cases() {
106
+ return ["Some", "NoneOptional", "NoneRequired"];
107
+ }
108
+ }
109
+
110
+ export function SheetEntity$1_$reflection(gen0) {
111
+ return union_type("FsSpreadsheet.DSL.SheetEntity`1", [gen0], SheetEntity$1, () => [[["Item1", gen0], ["Item2", list_type(Message_$reflection())]], [["Item", list_type(Message_$reflection())]], [["Item", list_type(Message_$reflection())]]]);
112
+ }
113
+
114
+ export function SheetEntity$1_some_2B595(v) {
115
+ return new SheetEntity$1(0, [v, empty()]);
116
+ }
117
+
118
+ /**
119
+ * Get messages
120
+ */
121
+ export function SheetEntity$1__get_Messages(this$) {
122
+ switch (this$.tag) {
123
+ case 1:
124
+ return this$.fields[0];
125
+ case 2:
126
+ return this$.fields[0];
127
+ default:
128
+ return this$.fields[1];
129
+ }
130
+ }
131
+
132
+ export class ColumnIndex extends Union {
133
+ constructor(Item) {
134
+ super();
135
+ this.tag = 0;
136
+ this.fields = [Item];
137
+ }
138
+ cases() {
139
+ return ["Col"];
140
+ }
141
+ }
142
+
143
+ export function ColumnIndex_$reflection() {
144
+ return union_type("FsSpreadsheet.DSL.ColumnIndex", [], ColumnIndex, () => [[["Item", int32_type]]]);
145
+ }
146
+
147
+ export function ColumnIndex__get_Index(self) {
148
+ return self.fields[0];
149
+ }
150
+
151
+ export class RowIndex extends Union {
152
+ constructor(Item) {
153
+ super();
154
+ this.tag = 0;
155
+ this.fields = [Item];
156
+ }
157
+ cases() {
158
+ return ["Row"];
159
+ }
160
+ }
161
+
162
+ export function RowIndex_$reflection() {
163
+ return union_type("FsSpreadsheet.DSL.RowIndex", [], RowIndex, () => [[["Item", int32_type]]]);
164
+ }
165
+
166
+ export function RowIndex__get_Index(self) {
167
+ return self.fields[0];
168
+ }
169
+
170
+ export class ColumnElement extends Union {
171
+ constructor(tag, fields) {
172
+ super();
173
+ this.tag = tag;
174
+ this.fields = fields;
175
+ }
176
+ cases() {
177
+ return ["IndexedCell", "UnindexedCell"];
178
+ }
179
+ }
180
+
181
+ export function ColumnElement_$reflection() {
182
+ return union_type("FsSpreadsheet.DSL.ColumnElement", [], ColumnElement, () => [[["Item1", RowIndex_$reflection()], ["Item2", tuple_type(DataType_$reflection(), string_type)]], [["Item", tuple_type(DataType_$reflection(), string_type)]]]);
183
+ }
184
+
185
+ export class RowElement extends Union {
186
+ constructor(tag, fields) {
187
+ super();
188
+ this.tag = tag;
189
+ this.fields = fields;
190
+ }
191
+ cases() {
192
+ return ["IndexedCell", "UnindexedCell"];
193
+ }
194
+ }
195
+
196
+ export function RowElement_$reflection() {
197
+ return union_type("FsSpreadsheet.DSL.RowElement", [], RowElement, () => [[["Item1", ColumnIndex_$reflection()], ["Item2", tuple_type(DataType_$reflection(), string_type)]], [["Item", tuple_type(DataType_$reflection(), string_type)]]]);
198
+ }
199
+
200
+ export class TableElement extends Union {
201
+ constructor(tag, fields) {
202
+ super();
203
+ this.tag = tag;
204
+ this.fields = fields;
205
+ }
206
+ cases() {
207
+ return ["UnindexedRow", "UnindexedColumn"];
208
+ }
209
+ }
210
+
211
+ export function TableElement_$reflection() {
212
+ return union_type("FsSpreadsheet.DSL.TableElement", [], TableElement, () => [[["Item", list_type(RowElement_$reflection())]], [["Item", list_type(ColumnElement_$reflection())]]]);
213
+ }
214
+
215
+ export function TableElement__get_IsRow(this$) {
216
+ if (this$.tag === 0) {
217
+ return true;
218
+ }
219
+ else {
220
+ return false;
221
+ }
222
+ }
223
+
224
+ export function TableElement__get_IsColumn(this$) {
225
+ if (this$.tag === 1) {
226
+ return true;
227
+ }
228
+ else {
229
+ return false;
230
+ }
231
+ }
232
+
233
+ export class SheetElement extends Union {
234
+ constructor(tag, fields) {
235
+ super();
236
+ this.tag = tag;
237
+ this.fields = fields;
238
+ }
239
+ cases() {
240
+ return ["Table", "IndexedRow", "UnindexedRow", "IndexedColumn", "UnindexedColumn", "IndexedCell", "UnindexedCell"];
241
+ }
242
+ }
243
+
244
+ export function SheetElement_$reflection() {
245
+ return union_type("FsSpreadsheet.DSL.SheetElement", [], SheetElement, () => [[["Item1", string_type], ["Item2", list_type(TableElement_$reflection())]], [["Item1", RowIndex_$reflection()], ["Item2", list_type(RowElement_$reflection())]], [["Item", list_type(RowElement_$reflection())]], [["Item1", ColumnIndex_$reflection()], ["Item2", list_type(ColumnElement_$reflection())]], [["Item", list_type(ColumnElement_$reflection())]], [["Item1", RowIndex_$reflection()], ["Item2", ColumnIndex_$reflection()], ["Item3", tuple_type(DataType_$reflection(), string_type)]], [["Item", tuple_type(DataType_$reflection(), string_type)]]]);
246
+ }
247
+
248
+ export class WorkbookElement extends Union {
249
+ constructor(tag, fields) {
250
+ super();
251
+ this.tag = tag;
252
+ this.fields = fields;
253
+ }
254
+ cases() {
255
+ return ["UnnamedSheet", "NamedSheet"];
256
+ }
257
+ }
258
+
259
+ export function WorkbookElement_$reflection() {
260
+ return union_type("FsSpreadsheet.DSL.WorkbookElement", [], WorkbookElement, () => [[["Item", list_type(SheetElement_$reflection())]], [["Item1", string_type], ["Item2", list_type(SheetElement_$reflection())]]]);
261
+ }
262
+
263
+ export class Workbook extends Union {
264
+ constructor(Item) {
265
+ super();
266
+ this.tag = 0;
267
+ this.fields = [Item];
268
+ }
269
+ cases() {
270
+ return ["Workbook"];
271
+ }
272
+ }
273
+
274
+ export function Workbook_$reflection() {
275
+ return union_type("FsSpreadsheet.DSL.Workbook", [], Workbook, () => [[["Item", list_type(WorkbookElement_$reflection())]]]);
276
+ }
277
+
@@ -0,0 +1,114 @@
1
+ namespace FsSpreadsheet.DSL
2
+
3
+ open FsSpreadsheet
4
+ open FsSpreadsheet.DSL
5
+
6
+ open Microsoft.FSharp.Quotations
7
+ open Expression
8
+
9
+ type WorkbookBuilder() =
10
+
11
+ static member Empty : SheetEntity<WorkbookElement list> = SheetEntity.some []
12
+
13
+ // -- Computation Expression methods -->
14
+
15
+ member inline this.Zero() : SheetEntity<WorkbookElement list> = SheetEntity.some []
16
+
17
+ member this.SignMessages (messages : Message list) : Message list =
18
+ messages
19
+ |> List.map (fun m -> m.MapText (sprintf "In Workbook: %s"))
20
+
21
+ member inline _.Yield(c: WorkbookElement) =
22
+ SheetEntity.some [c]
23
+
24
+ member inline _.Yield(w: SheetEntity<WorkbookElement>) =
25
+ match w with
26
+ | Some (w, messages) ->
27
+ SheetEntity.Some ([w], messages)
28
+ | NoneOptional messages ->
29
+ NoneOptional messages
30
+ | NoneRequired messages ->
31
+ NoneRequired messages
32
+
33
+ member inline _.Yield(cs: WorkbookElement list) =
34
+ SheetEntity.some cs
35
+
36
+ member inline _.Yield(cs: SheetEntity<WorkbookElement list> ) =
37
+ cs
38
+
39
+ member inline _.Yield(c: SheetEntity<SheetElement list>) =
40
+ match c with
41
+ | Some (re,messages) ->
42
+ SheetEntity.Some ([WorkbookElement.UnnamedSheet re], messages)
43
+ | NoneOptional messages ->
44
+ NoneOptional messages
45
+ | NoneRequired messages ->
46
+ NoneRequired messages
47
+
48
+ member inline _.Yield(cs: SheetElement list) =
49
+ SheetEntity.some [WorkbookElement.UnnamedSheet cs]
50
+
51
+ member inline _.Yield(c: SheetEntity<string * SheetElement list>) =
52
+ match c with
53
+ | Some ((name,re),messages) ->
54
+ SheetEntity.Some ([WorkbookElement.NamedSheet (name,re)], messages)
55
+ | NoneOptional messages ->
56
+ NoneOptional messages
57
+ | NoneRequired messages ->
58
+ NoneRequired messages
59
+
60
+ member inline _.Yield(cs: string * SheetElement list) =
61
+ SheetEntity.some [WorkbookElement.NamedSheet (cs)]
62
+
63
+
64
+ member inline this.YieldFrom(ns: SheetEntity<WorkbookElement list> seq) =
65
+ ns
66
+ |> Seq.fold (fun state we ->
67
+ this.Combine(state,we)
68
+
69
+ ) WorkbookBuilder.Empty
70
+
71
+
72
+ member inline this.For(vs : seq<'T>, f : 'T -> SheetEntity<WorkbookElement list>) =
73
+ vs
74
+ |> Seq.map f
75
+ |> this.YieldFrom
76
+
77
+
78
+ member inline this.Run(children: SheetEntity<WorkbookElement list>) =
79
+ match children with
80
+ | Some (children,messages) ->
81
+ SheetEntity.Some (Workbook children, messages)
82
+ | NoneOptional messages ->
83
+ NoneOptional messages
84
+ | NoneRequired messages ->
85
+ NoneRequired messages
86
+
87
+ member this.Combine(wx1: SheetEntity<WorkbookElement list>, wx2: SheetEntity<WorkbookElement list>) : SheetEntity<WorkbookElement list>=
88
+ match wx1,wx2 with
89
+ // If both contain content, combine the content
90
+ | Some (l1,messages1), Some (l2,messages2) ->
91
+ Some (List.append l1 l2
92
+ ,List.append messages1 messages2)
93
+
94
+ // If any of the two is missing and was required, return a missing required
95
+ | _, NoneRequired messages2 ->
96
+ NoneRequired (List.append wx1.Messages messages2)
97
+
98
+ | NoneRequired messages1, _ ->
99
+ NoneRequired (List.append messages1 wx2.Messages)
100
+
101
+ // If only one of the two is missing and was optional, take the content of the functioning one
102
+ | Some (f1,messages1), NoneOptional messages2 ->
103
+ Some (f1
104
+ ,List.append messages1 messages2)
105
+
106
+ | NoneOptional messages1, Some (f2,messages2) ->
107
+ Some (f2
108
+ ,List.append messages1 messages2)
109
+
110
+ // If both are missing and were optional, return a missing optional
111
+ | NoneOptional messages1, NoneOptional messages2 ->
112
+ NoneOptional (List.append messages1 messages2)
113
+
114
+ member inline _.Delay(n: unit -> SheetEntity<WorkbookElement list>) = n()
@@ -0,0 +1,104 @@
1
+ import { class_type } from "../../fable-library.4.1.4/Reflection.js";
2
+ import { SheetEntity$1__get_Messages, SheetEntity$1, Message__MapText_11D407F6, SheetEntity$1_some_2B595 } from "./Types.fs.js";
3
+ import { append, map, empty } from "../../fable-library.4.1.4/List.js";
4
+ import { printf, toText } from "../../fable-library.4.1.4/String.js";
5
+
6
+ export class WorkbookBuilder {
7
+ constructor() {
8
+ }
9
+ }
10
+
11
+ export function WorkbookBuilder_$reflection() {
12
+ return class_type("FsSpreadsheet.DSL.WorkbookBuilder", void 0, WorkbookBuilder);
13
+ }
14
+
15
+ export function WorkbookBuilder_$ctor() {
16
+ return new WorkbookBuilder();
17
+ }
18
+
19
+ export function WorkbookBuilder_get_Empty() {
20
+ return SheetEntity$1_some_2B595(empty());
21
+ }
22
+
23
+ export function WorkbookBuilder__SignMessages_3F89FFFC(this$, messages) {
24
+ return map((m) => {
25
+ let clo;
26
+ return Message__MapText_11D407F6(m, (clo = toText(printf("In Workbook: %s")), clo));
27
+ }, messages);
28
+ }
29
+
30
+ export function WorkbookBuilder__Combine_49CE2EC0(this$, wx1, wx2) {
31
+ let matchResult, l1, l2, messages1, messages2, messages2_1, messages1_1, f1, messages1_2, messages2_2, f2, messages1_3, messages2_3, messages1_4, messages2_4;
32
+ switch (wx1.tag) {
33
+ case 2: {
34
+ if (wx2.tag === 2) {
35
+ matchResult = 1;
36
+ messages2_1 = wx2.fields[0];
37
+ }
38
+ else {
39
+ matchResult = 2;
40
+ messages1_1 = wx1.fields[0];
41
+ }
42
+ break;
43
+ }
44
+ case 1: {
45
+ switch (wx2.tag) {
46
+ case 0: {
47
+ matchResult = 4;
48
+ f2 = wx2.fields[0];
49
+ messages1_3 = wx1.fields[0];
50
+ messages2_3 = wx2.fields[1];
51
+ break;
52
+ }
53
+ case 1: {
54
+ matchResult = 5;
55
+ messages1_4 = wx1.fields[0];
56
+ messages2_4 = wx2.fields[0];
57
+ break;
58
+ }
59
+ default: {
60
+ matchResult = 1;
61
+ messages2_1 = wx2.fields[0];
62
+ }
63
+ }
64
+ break;
65
+ }
66
+ default:
67
+ switch (wx2.tag) {
68
+ case 2: {
69
+ matchResult = 1;
70
+ messages2_1 = wx2.fields[0];
71
+ break;
72
+ }
73
+ case 1: {
74
+ matchResult = 3;
75
+ f1 = wx1.fields[0];
76
+ messages1_2 = wx1.fields[1];
77
+ messages2_2 = wx2.fields[0];
78
+ break;
79
+ }
80
+ default: {
81
+ matchResult = 0;
82
+ l1 = wx1.fields[0];
83
+ l2 = wx2.fields[0];
84
+ messages1 = wx1.fields[1];
85
+ messages2 = wx2.fields[1];
86
+ }
87
+ }
88
+ }
89
+ switch (matchResult) {
90
+ case 0:
91
+ return new SheetEntity$1(0, [append(l1, l2), append(messages1, messages2)]);
92
+ case 1:
93
+ return new SheetEntity$1(2, [append(SheetEntity$1__get_Messages(wx1), messages2_1)]);
94
+ case 2:
95
+ return new SheetEntity$1(2, [append(messages1_1, SheetEntity$1__get_Messages(wx2))]);
96
+ case 3:
97
+ return new SheetEntity$1(0, [f1, append(messages1_2, messages2_2)]);
98
+ case 4:
99
+ return new SheetEntity$1(0, [f2, append(messages1_3, messages2_3)]);
100
+ default:
101
+ return new SheetEntity$1(1, [append(messages1_4, messages2_4)]);
102
+ }
103
+ }
104
+