@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.
- package/ARCtrl.js +257 -0
- package/Contract/Contract.js +95 -0
- package/Contracts/Contracts.ARCtrl.js +35 -0
- package/Contracts/Contracts.ArcAssay.js +65 -0
- package/Contracts/Contracts.ArcInvestigation.js +58 -0
- package/Contracts/Contracts.ArcStudy.js +65 -0
- package/Contracts/Contracts.Git.js +91 -0
- package/FileSystem/Commit.js +18 -0
- package/FileSystem/DefaultGitignore.js +3 -0
- package/FileSystem/FileSystem.js +53 -0
- package/FileSystem/FileSystemTree.js +223 -0
- package/FileSystem/Path.js +38 -0
- package/FileSystemTree.js +51 -0
- package/ISA/ISA/ArcTypes/ArcTable.js +744 -0
- package/ISA/ISA/ArcTypes/ArcTableAux.js +1142 -0
- package/ISA/ISA/ArcTypes/ArcTables.js +380 -0
- package/ISA/ISA/ArcTypes/ArcTypes.js +2018 -0
- package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
- package/ISA/ISA/ArcTypes/CompositeColumn.js +42 -0
- package/ISA/ISA/ArcTypes/CompositeHeader.js +358 -0
- package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
- package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
- package/ISA/ISA/Builder/Types.js +243 -0
- package/ISA/ISA/Fable.js +50 -0
- package/ISA/ISA/Helper.js +326 -0
- package/ISA/ISA/Identifier.js +76 -0
- package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
- package/ISA/ISA/JsonTypes/Assay.js +620 -0
- package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
- package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
- package/ISA/ISA/JsonTypes/Comment.js +58 -0
- package/ISA/ISA/JsonTypes/CommentList.js +139 -0
- package/ISA/ISA/JsonTypes/Component.js +158 -0
- package/ISA/ISA/JsonTypes/Data.js +55 -0
- package/ISA/ISA/JsonTypes/DataFile.js +68 -0
- package/ISA/ISA/JsonTypes/Factor.js +128 -0
- package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
- package/ISA/ISA/JsonTypes/Investigation.js +204 -0
- package/ISA/ISA/JsonTypes/Material.js +66 -0
- package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
- package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
- package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
- package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
- package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
- package/ISA/ISA/JsonTypes/Person.js +137 -0
- package/ISA/ISA/JsonTypes/Process.js +401 -0
- package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
- package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
- package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
- package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
- package/ISA/ISA/JsonTypes/Protocol.js +277 -0
- package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
- package/ISA/ISA/JsonTypes/Publication.js +105 -0
- package/ISA/ISA/JsonTypes/Sample.js +71 -0
- package/ISA/ISA/JsonTypes/Source.js +54 -0
- package/ISA/ISA/JsonTypes/Study.js +942 -0
- package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
- package/ISA/ISA/JsonTypes/URI.js +19 -0
- package/ISA/ISA/JsonTypes/Value.js +210 -0
- package/ISA/ISA/Regex.js +588 -0
- package/ISA/ISA.Json/Assay.js +123 -0
- package/ISA/ISA.Json/Comment.js +84 -0
- package/ISA/ISA.Json/ConverterOptions.js +33 -0
- package/ISA/ISA.Json/Data.js +271 -0
- package/ISA/ISA.Json/Decode.js +46 -0
- package/ISA/ISA.Json/Factor.js +194 -0
- package/ISA/ISA.Json/GEncode.js +15 -0
- package/ISA/ISA.Json/Investigation.js +132 -0
- package/ISA/ISA.Json/Material.js +233 -0
- package/ISA/ISA.Json/Ontology.js +204 -0
- package/ISA/ISA.Json/Person.js +204 -0
- package/ISA/ISA.Json/Process.js +291 -0
- package/ISA/ISA.Json/Protocol.js +242 -0
- package/ISA/ISA.Json/Publication.js +92 -0
- package/ISA/ISA.Json/Study.js +230 -0
- package/ISA/ISA.Json/Validation/Fable.js +69 -0
- package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
- package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
- package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
- package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
- package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
- package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
- package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
- package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
- package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
- package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
- package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
- package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
- package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
- package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
- package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
- package/README.md +277 -0
- package/SemVer.js +60 -0
- package/Templates/Templates.Json.js +40 -0
- package/Templates/Templates.Spreadsheet.js +315 -0
- package/Templates/Templates.js +179 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
- package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
- package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
- package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
- package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
- package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
- package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
- package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
- package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
- package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
- package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
- package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
- package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
- package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
- package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Async.js +158 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
- package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
- package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
- package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
- package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
- package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
- package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
- package/fable_modules/fable-library.4.1.4/Char.js +169 -0
- package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
- package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
- package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
- package/fable_modules/fable-library.4.1.4/Date.js +451 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
- package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
- package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
- package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
- package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
- package/fable_modules/fable-library.4.1.4/Double.js +46 -0
- package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
- package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
- package/fable_modules/fable-library.4.1.4/Event.js +93 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
- package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
- package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
- package/fable_modules/fable-library.4.1.4/Global.js +8 -0
- package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
- package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
- package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
- package/fable_modules/fable-library.4.1.4/List.js +1273 -0
- package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
- package/fable_modules/fable-library.4.1.4/Long.js +46 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
- package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
- package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
- package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
- package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
- package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
- package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Native.js +8 -0
- package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
- package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
- package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
- package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
- package/fable_modules/fable-library.4.1.4/Option.js +96 -0
- package/fable_modules/fable-library.4.1.4/README.md +3 -0
- package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
- package/fable_modules/fable-library.4.1.4/Random.js +170 -0
- package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
- package/fable_modules/fable-library.4.1.4/Range.js +45 -0
- package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
- package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
- package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
- package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
- package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
- package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
- package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
- package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
- package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
- package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
- package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
- package/fable_modules/fable-library.4.1.4/String.js +540 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
- package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
- package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
- package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
- package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
- package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
- package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
- package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
- package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
- package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
- package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
- package/fable_modules/fable-library.4.1.4/Types.js +208 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
- package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
- package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
- package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
- package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
- package/fable_modules/fable-library.4.1.4/Util.js +662 -0
- package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
- package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
- package/fable_modules/fable-library.4.1.4/package.json +23 -0
- package/fable_modules/project_cracked.json +1 -0
- package/package.json +22 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { checkValidCharacters } from "../Identifier.js";
|
|
2
|
+
|
|
3
|
+
export function setArcTableName(newName, table) {
|
|
4
|
+
checkValidCharacters(newName);
|
|
5
|
+
table.Name = newName;
|
|
6
|
+
return table;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function setAssayIdentifier(newIdentifier, assay) {
|
|
10
|
+
checkValidCharacters(newIdentifier);
|
|
11
|
+
assay.Identifier = newIdentifier;
|
|
12
|
+
return assay;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function setStudyIdentifier(newIdentifier, study) {
|
|
16
|
+
checkValidCharacters(newIdentifier);
|
|
17
|
+
study.Identifier = newIdentifier;
|
|
18
|
+
return study;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function setInvestigationIdentifier(newIdentifier, investigation) {
|
|
22
|
+
checkValidCharacters(newIdentifier);
|
|
23
|
+
investigation.Identifier = newIdentifier;
|
|
24
|
+
return investigation;
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { Union } from "../../../fable_modules/fable-library.4.1.4/Types.js";
|
|
2
|
+
import { list_type, union_type, string_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
3
|
+
import { OntologyAnnotation_$reflection } from "../JsonTypes/OntologyAnnotation.js";
|
|
4
|
+
import { Protocol_get_empty, Protocol } from "../JsonTypes/Protocol.js";
|
|
5
|
+
import { ProcessParameterValue_$reflection } from "../JsonTypes/ProcessParameterValue.js";
|
|
6
|
+
import { MaterialAttributeValue_$reflection } from "../JsonTypes/MaterialAttributeValue.js";
|
|
7
|
+
import { FactorValue_$reflection } from "../JsonTypes/FactorValue.js";
|
|
8
|
+
import { map as map_1, exists, fold, singleton, empty, append } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
9
|
+
import { map, value as value_4, defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
|
|
10
|
+
import { Process_get_empty, Process } from "../JsonTypes/Process.js";
|
|
11
|
+
import { Assay_get_empty, Assay } from "../JsonTypes/Assay.js";
|
|
12
|
+
import { printf, toFail } from "../../../fable_modules/fable-library.4.1.4/String.js";
|
|
13
|
+
import { Study } from "../JsonTypes/Study.js";
|
|
14
|
+
|
|
15
|
+
export class ProtocolTransformation extends Union {
|
|
16
|
+
constructor(tag, fields) {
|
|
17
|
+
super();
|
|
18
|
+
this.tag = tag;
|
|
19
|
+
this.fields = fields;
|
|
20
|
+
}
|
|
21
|
+
cases() {
|
|
22
|
+
return ["AddName", "AddProtocolType", "AddDescription"];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function ProtocolTransformation_$reflection() {
|
|
27
|
+
return union_type("ARCtrl.ISA.Builder.ProtocolTransformation", [], ProtocolTransformation, () => [[["Item", string_type]], [["Item", OntologyAnnotation_$reflection()]], [["Item", string_type]]]);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function ProtocolTransformation__Transform_Z5F51792E(this$, p) {
|
|
31
|
+
switch (this$.tag) {
|
|
32
|
+
case 1:
|
|
33
|
+
return new Protocol(p.ID, p.Name, this$.fields[0], p.Description, p.Uri, p.Version, p.Parameters, p.Components, p.Comments);
|
|
34
|
+
case 2:
|
|
35
|
+
return new Protocol(p.ID, p.Name, p.ProtocolType, this$.fields[0], p.Uri, p.Version, p.Parameters, p.Components, p.Comments);
|
|
36
|
+
default:
|
|
37
|
+
return new Protocol(p.ID, this$.fields[0], p.ProtocolType, p.Description, p.Uri, p.Version, p.Parameters, p.Components, p.Comments);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function ProtocolTransformation__Equals_Z5F51792E(this$, p) {
|
|
42
|
+
const matchValue = p.Name;
|
|
43
|
+
let matchResult, n_1, n$0027_1;
|
|
44
|
+
if (this$.tag === 0) {
|
|
45
|
+
if (matchValue != null) {
|
|
46
|
+
if (this$.fields[0] === matchValue) {
|
|
47
|
+
matchResult = 0;
|
|
48
|
+
n_1 = this$.fields[0];
|
|
49
|
+
n$0027_1 = matchValue;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
matchResult = 1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
matchResult = 1;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
matchResult = 1;
|
|
61
|
+
}
|
|
62
|
+
switch (matchResult) {
|
|
63
|
+
case 0:
|
|
64
|
+
return true;
|
|
65
|
+
default:
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export class ProcessTransformation extends Union {
|
|
71
|
+
constructor(tag, fields) {
|
|
72
|
+
super();
|
|
73
|
+
this.tag = tag;
|
|
74
|
+
this.fields = fields;
|
|
75
|
+
}
|
|
76
|
+
cases() {
|
|
77
|
+
return ["AddName", "AddParameter", "AddCharacteristic", "AddFactor", "AddProtocol"];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function ProcessTransformation_$reflection() {
|
|
82
|
+
return union_type("ARCtrl.ISA.Builder.ProcessTransformation", [], ProcessTransformation, () => [[["Item", string_type]], [["Item", ProcessParameterValue_$reflection()]], [["Item", MaterialAttributeValue_$reflection()]], [["Item", FactorValue_$reflection()]], [["Item", list_type(ProtocolTransformation_$reflection())]]]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function ProcessTransformation__Transform_716E708F(this$, p) {
|
|
86
|
+
let pro;
|
|
87
|
+
switch (this$.tag) {
|
|
88
|
+
case 1: {
|
|
89
|
+
const pv = this$.fields[0];
|
|
90
|
+
const parameterValues = append(defaultArg(p.ParameterValues, empty()), singleton(pv));
|
|
91
|
+
return new Process(p.ID, p.Name, (pro = defaultArg(p.ExecutesProtocol, Protocol_get_empty()), new Protocol(pro.ID, pro.Name, pro.ProtocolType, pro.Description, pro.Uri, pro.Version, append(defaultArg(pro.Parameters, empty()), singleton(value_4(pv.Category))), pro.Components, pro.Comments)), parameterValues, p.Performer, p.Date, p.PreviousProcess, p.NextProcess, p.Inputs, p.Outputs, p.Comments);
|
|
92
|
+
}
|
|
93
|
+
case 2:
|
|
94
|
+
return new Process(p.ID, p.Name, p.ExecutesProtocol, p.ParameterValues, p.Performer, p.Date, p.PreviousProcess, p.NextProcess, map((i) => i, p.Inputs), p.Outputs, p.Comments);
|
|
95
|
+
case 3:
|
|
96
|
+
return new Process(p.ID, p.Name, p.ExecutesProtocol, p.ParameterValues, p.Performer, p.Date, p.PreviousProcess, p.NextProcess, p.Inputs, map((i_1) => i_1, p.Outputs), p.Comments);
|
|
97
|
+
case 4:
|
|
98
|
+
return new Process(p.ID, p.Name, fold((pro_2, trans) => ProtocolTransformation__Transform_Z5F51792E(trans, pro_2), defaultArg(p.ExecutesProtocol, Protocol_get_empty()), this$.fields[0]), p.ParameterValues, p.Performer, p.Date, p.PreviousProcess, p.NextProcess, p.Inputs, p.Outputs, p.Comments);
|
|
99
|
+
default:
|
|
100
|
+
return new Process(p.ID, this$.fields[0], p.ExecutesProtocol, p.ParameterValues, p.Performer, p.Date, p.PreviousProcess, p.NextProcess, p.Inputs, p.Outputs, p.Comments);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function ProcessTransformation__Equals_716E708F(this$, p) {
|
|
105
|
+
const matchValue = p.Name;
|
|
106
|
+
let matchResult, n_1, n$0027_1;
|
|
107
|
+
if (this$.tag === 0) {
|
|
108
|
+
if (matchValue != null) {
|
|
109
|
+
if (this$.fields[0] === matchValue) {
|
|
110
|
+
matchResult = 0;
|
|
111
|
+
n_1 = this$.fields[0];
|
|
112
|
+
n$0027_1 = matchValue;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
matchResult = 1;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
matchResult = 1;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
matchResult = 1;
|
|
124
|
+
}
|
|
125
|
+
switch (matchResult) {
|
|
126
|
+
case 0:
|
|
127
|
+
return true;
|
|
128
|
+
default:
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export class AssayTransformation extends Union {
|
|
134
|
+
constructor(tag, fields) {
|
|
135
|
+
super();
|
|
136
|
+
this.tag = tag;
|
|
137
|
+
this.fields = fields;
|
|
138
|
+
}
|
|
139
|
+
cases() {
|
|
140
|
+
return ["AddFileName", "AddParameter", "AddCharacteristic", "AddFactor", "AddProcess"];
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function AssayTransformation_$reflection() {
|
|
145
|
+
return union_type("ARCtrl.ISA.Builder.AssayTransformation", [], AssayTransformation, () => [[["Item", string_type]], [["Item", ProcessParameterValue_$reflection()]], [["Item", MaterialAttributeValue_$reflection()]], [["Item", FactorValue_$reflection()]], [["Item", list_type(ProcessTransformation_$reflection())]]]);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function AssayTransformation__Transform_722A269D(this$, a) {
|
|
149
|
+
switch (this$.tag) {
|
|
150
|
+
case 4: {
|
|
151
|
+
const pts = this$.fields[0];
|
|
152
|
+
const processes = defaultArg(a.ProcessSequence, empty());
|
|
153
|
+
return new Assay(a.ID, a.FileName, a.MeasurementType, a.TechnologyType, a.TechnologyPlatform, a.DataFiles, a.Materials, a.CharacteristicCategories, a.UnitCategories, exists((p) => exists((trans) => ProcessTransformation__Equals_716E708F(trans, p), pts), processes) ? map_1((p_1) => {
|
|
154
|
+
if (exists((trans_1) => ProcessTransformation__Equals_716E708F(trans_1, p_1), pts)) {
|
|
155
|
+
return fold((p_2, trans_2) => ProcessTransformation__Transform_716E708F(trans_2, p_2), p_1, pts);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
return p_1;
|
|
159
|
+
}
|
|
160
|
+
}, processes) : append(processes, singleton(fold((p_3, trans_3) => ProcessTransformation__Transform_716E708F(trans_3, p_3), Process_get_empty(), pts))), a.Comments);
|
|
161
|
+
}
|
|
162
|
+
case 0:
|
|
163
|
+
return new Assay(a.ID, this$.fields[0], a.MeasurementType, a.TechnologyType, a.TechnologyPlatform, a.DataFiles, a.Materials, a.CharacteristicCategories, a.UnitCategories, a.ProcessSequence, a.Comments);
|
|
164
|
+
default:
|
|
165
|
+
return toFail(printf("Builder failed: Case %O Not implemented"))(this$);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function AssayTransformation__Equals_722A269D(this$, a) {
|
|
170
|
+
const matchValue = a.FileName;
|
|
171
|
+
let matchResult, n_1, n$0027_1;
|
|
172
|
+
if (this$.tag === 0) {
|
|
173
|
+
if (matchValue != null) {
|
|
174
|
+
if (this$.fields[0] === matchValue) {
|
|
175
|
+
matchResult = 0;
|
|
176
|
+
n_1 = this$.fields[0];
|
|
177
|
+
n$0027_1 = matchValue;
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
matchResult = 1;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
matchResult = 1;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
matchResult = 1;
|
|
189
|
+
}
|
|
190
|
+
switch (matchResult) {
|
|
191
|
+
case 0:
|
|
192
|
+
return true;
|
|
193
|
+
default:
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export class StudyTransformation extends Union {
|
|
199
|
+
constructor(tag, fields) {
|
|
200
|
+
super();
|
|
201
|
+
this.tag = tag;
|
|
202
|
+
this.fields = fields;
|
|
203
|
+
}
|
|
204
|
+
cases() {
|
|
205
|
+
return ["AddParameter", "AddCharacteristic", "AddFactor", "AddProcess", "AddAssay"];
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function StudyTransformation_$reflection() {
|
|
210
|
+
return union_type("ARCtrl.ISA.Builder.StudyTransformation", [], StudyTransformation, () => [[["Item", ProcessParameterValue_$reflection()]], [["Item", MaterialAttributeValue_$reflection()]], [["Item", FactorValue_$reflection()]], [["Item", list_type(ProcessTransformation_$reflection())]], [["Item", list_type(AssayTransformation_$reflection())]]]);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function StudyTransformation__Transform_7312BC8B(this$, s) {
|
|
214
|
+
switch (this$.tag) {
|
|
215
|
+
case 3: {
|
|
216
|
+
const pts = this$.fields[0];
|
|
217
|
+
const processes = defaultArg(s.ProcessSequence, empty());
|
|
218
|
+
return new Study(s.ID, s.FileName, s.Identifier, s.Title, s.Description, s.SubmissionDate, s.PublicReleaseDate, s.Publications, s.Contacts, s.StudyDesignDescriptors, s.Protocols, s.Materials, exists((p) => exists((trans) => ProcessTransformation__Equals_716E708F(trans, p), pts), processes) ? map_1((p_1) => {
|
|
219
|
+
if (exists((trans_1) => ProcessTransformation__Equals_716E708F(trans_1, p_1), pts)) {
|
|
220
|
+
return fold((p_2, trans_2) => ProcessTransformation__Transform_716E708F(trans_2, p_2), p_1, pts);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
return p_1;
|
|
224
|
+
}
|
|
225
|
+
}, processes) : append(processes, singleton(fold((p_3, trans_3) => ProcessTransformation__Transform_716E708F(trans_3, p_3), Process_get_empty(), pts))), s.Assays, s.Factors, s.CharacteristicCategories, s.UnitCategories, s.Comments);
|
|
226
|
+
}
|
|
227
|
+
case 4: {
|
|
228
|
+
const ats = this$.fields[0];
|
|
229
|
+
const assays = defaultArg(s.Assays, empty());
|
|
230
|
+
return new Study(s.ID, s.FileName, s.Identifier, s.Title, s.Description, s.SubmissionDate, s.PublicReleaseDate, s.Publications, s.Contacts, s.StudyDesignDescriptors, s.Protocols, s.Materials, s.ProcessSequence, exists((a) => exists((trans_4) => AssayTransformation__Equals_722A269D(trans_4, a), ats), assays) ? map_1((a_1) => {
|
|
231
|
+
if (exists((trans_5) => AssayTransformation__Equals_722A269D(trans_5, a_1), ats)) {
|
|
232
|
+
return fold((a_2, trans_6) => AssayTransformation__Transform_722A269D(trans_6, a_2), a_1, ats);
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
return a_1;
|
|
236
|
+
}
|
|
237
|
+
}, assays) : append(assays, singleton(fold((a_3, trans_7) => AssayTransformation__Transform_722A269D(trans_7, a_3), Assay_get_empty(), ats))), s.Factors, s.CharacteristicCategories, s.UnitCategories, s.Comments);
|
|
238
|
+
}
|
|
239
|
+
default:
|
|
240
|
+
return toFail(printf("Builder failed: Case %O Not implemented"))(this$);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
package/ISA/ISA/Fable.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { toString } from "../../fable_modules/fable-library.4.1.4/Types.js";
|
|
2
|
+
import { append } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
3
|
+
import { append as append_1 } from "../../fable_modules/fable-library.4.1.4/Array.js";
|
|
4
|
+
import { Array_distinct, List_distinct } from "../../fable_modules/fable-library.4.1.4/Seq2.js";
|
|
5
|
+
import { structuralHash, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
6
|
+
|
|
7
|
+
export function isMap_generic(l1) {
|
|
8
|
+
let copyOfStruct;
|
|
9
|
+
return ((copyOfStruct = l1, toString(copyOfStruct))).indexOf("map [") === 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function isList_generic(l1) {
|
|
13
|
+
let s;
|
|
14
|
+
let copyOfStruct = l1;
|
|
15
|
+
s = toString(copyOfStruct);
|
|
16
|
+
if (s.indexOf("[") === 0) {
|
|
17
|
+
return !(s.indexOf("seq [") === 0);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function append_generic(l1, l2) {
|
|
25
|
+
if (l2 == null) {
|
|
26
|
+
return l1;
|
|
27
|
+
}
|
|
28
|
+
else if (isList_generic(l1)) {
|
|
29
|
+
return append(l1, l2);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return append_1(l1, l2);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function distinct_generic(l1) {
|
|
37
|
+
if (isList_generic(l1)) {
|
|
38
|
+
return List_distinct(l1, {
|
|
39
|
+
Equals: equals,
|
|
40
|
+
GetHashCode: structuralHash,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return Array_distinct(l1, {
|
|
45
|
+
Equals: equals,
|
|
46
|
+
GetHashCode: structuralHash,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { isIterable, defaultOf, structuralHash, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
2
|
+
import { value as value_1, some } from "../../fable_modules/fable-library.4.1.4/Option.js";
|
|
3
|
+
import { empty, singleton, append, head, tail, isEmpty } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
4
|
+
import { Dictionary } from "../../fable_modules/fable-library.4.1.4/MutableMap.js";
|
|
5
|
+
import { isEmpty as isEmpty_1, iterate } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
6
|
+
import { tryGetValue, addToDict } from "../../fable_modules/fable-library.4.1.4/MapUtil.js";
|
|
7
|
+
import { Union, toString, FSharpRef } from "../../fable_modules/fable-library.4.1.4/Types.js";
|
|
8
|
+
import { append_generic, distinct_generic, isList_generic, isMap_generic } from "./Fable.js";
|
|
9
|
+
import { union_type, makeUnion, option_type, makeGenericType, getUnionCases, name, obj_type } from "../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
10
|
+
import { exactlyOne, partition } from "../../fable_modules/fable-library.4.1.4/Array.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* If the value matches the default, a None is returned, else a Some is returned
|
|
14
|
+
*/
|
|
15
|
+
export function Option_fromValueWithDefault(d, v) {
|
|
16
|
+
if (equals(d, v)) {
|
|
17
|
+
return void 0;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return some(v);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Applies the function f on the value of the option if it exists, else applies it on the default value. If the result value matches the default, a None is returned
|
|
26
|
+
*/
|
|
27
|
+
export function Option_mapDefault(d, f, o) {
|
|
28
|
+
return Option_fromValueWithDefault(d, (o == null) ? f(d) : f(value_1(o)));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Applies the function f on the value of the option if it exists, else returns the default value.
|
|
33
|
+
*/
|
|
34
|
+
export function Option_mapOrDefault(d, f, o) {
|
|
35
|
+
if (o == null) {
|
|
36
|
+
return d;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
return some(f(value_1(o)));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function List_tryPickAndRemove(f, lst) {
|
|
44
|
+
const loop = (newList_mut, remainingList_mut) => {
|
|
45
|
+
loop:
|
|
46
|
+
while (true) {
|
|
47
|
+
const newList = newList_mut, remainingList = remainingList_mut;
|
|
48
|
+
if (!isEmpty(remainingList)) {
|
|
49
|
+
const t = tail(remainingList);
|
|
50
|
+
const h = head(remainingList);
|
|
51
|
+
const matchValue = f(h);
|
|
52
|
+
if (matchValue == null) {
|
|
53
|
+
newList_mut = append(newList, singleton(h));
|
|
54
|
+
remainingList_mut = t;
|
|
55
|
+
continue loop;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return [some(value_1(matchValue)), append(newList, t)];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return [void 0, newList];
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return loop(empty(), lst);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function Dict_ofSeq(s) {
|
|
71
|
+
const dict = new Dictionary([], {
|
|
72
|
+
Equals: equals,
|
|
73
|
+
GetHashCode: structuralHash,
|
|
74
|
+
});
|
|
75
|
+
iterate((tupledArg) => {
|
|
76
|
+
addToDict(dict, tupledArg[0], tupledArg[1]);
|
|
77
|
+
}, s);
|
|
78
|
+
return dict;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function Dict_tryFind(key, dict) {
|
|
82
|
+
let patternInput;
|
|
83
|
+
let outArg = defaultOf();
|
|
84
|
+
patternInput = [tryGetValue(dict, key, new FSharpRef(() => outArg, (v) => {
|
|
85
|
+
outArg = v;
|
|
86
|
+
})), outArg];
|
|
87
|
+
if (patternInput[0]) {
|
|
88
|
+
return some(patternInput[1]);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return void 0;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function Dict_ofSeqWithMerge(merge, s) {
|
|
96
|
+
const dict = new Dictionary([], {
|
|
97
|
+
Equals: equals,
|
|
98
|
+
GetHashCode: structuralHash,
|
|
99
|
+
});
|
|
100
|
+
iterate((tupledArg) => {
|
|
101
|
+
const k = tupledArg[0];
|
|
102
|
+
const v = tupledArg[1];
|
|
103
|
+
const matchValue = Dict_tryFind(k, dict);
|
|
104
|
+
if (matchValue == null) {
|
|
105
|
+
addToDict(dict, k, v);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const v$0027 = value_1(matchValue);
|
|
109
|
+
dict.delete(k);
|
|
110
|
+
addToDict(dict, k, merge(v$0027, v));
|
|
111
|
+
}
|
|
112
|
+
}, s);
|
|
113
|
+
return dict;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Get the type of the IEnumerable elements. E.g. for Array<'T> it would be 'T
|
|
118
|
+
*/
|
|
119
|
+
export function Update_isMapType(v) {
|
|
120
|
+
return isMap_generic(v);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function Update_isListType(v) {
|
|
124
|
+
return isList_generic(v);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Get the type of the IEnumerable elements. E.g. for Array<'T> it would be 'T
|
|
129
|
+
*/
|
|
130
|
+
export function Update_enumGetInnerType(v) {
|
|
131
|
+
return obj_type;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* updates oldRT with newRT by replacing all values, but appending all lists.
|
|
136
|
+
*
|
|
137
|
+
* newRTList@oldRTList
|
|
138
|
+
*/
|
|
139
|
+
export function Update_updateAppend(oldVal, newVal) {
|
|
140
|
+
let matchResult, oldInternal, others;
|
|
141
|
+
if (typeof oldVal === "string") {
|
|
142
|
+
matchResult = 0;
|
|
143
|
+
}
|
|
144
|
+
else if (isIterable(oldVal)) {
|
|
145
|
+
let activePatternResult;
|
|
146
|
+
const a = oldVal;
|
|
147
|
+
activePatternResult = ((a == null) ? void 0 : (undefined));
|
|
148
|
+
if (activePatternResult != null) {
|
|
149
|
+
matchResult = 1;
|
|
150
|
+
oldInternal = value_1(activePatternResult);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
matchResult = 2;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
let activePatternResult_1;
|
|
158
|
+
const a_1 = oldVal;
|
|
159
|
+
activePatternResult_1 = ((a_1 == null) ? void 0 : (undefined));
|
|
160
|
+
if (activePatternResult_1 != null) {
|
|
161
|
+
matchResult = 1;
|
|
162
|
+
oldInternal = value_1(activePatternResult_1);
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
matchResult = 3;
|
|
166
|
+
others = oldVal;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
switch (matchResult) {
|
|
170
|
+
case 0:
|
|
171
|
+
return newVal;
|
|
172
|
+
case 1:
|
|
173
|
+
if (typeof oldInternal === "string") {
|
|
174
|
+
return newVal;
|
|
175
|
+
}
|
|
176
|
+
else if (isIterable(oldInternal)) {
|
|
177
|
+
let activePatternResult_2;
|
|
178
|
+
const a_2 = newVal;
|
|
179
|
+
activePatternResult_2 = ((a_2 == null) ? void 0 : (undefined));
|
|
180
|
+
if (activePatternResult_2 != null) {
|
|
181
|
+
const newInternal = value_1(activePatternResult_2);
|
|
182
|
+
const v = Update_updateAppend(oldInternal, newInternal);
|
|
183
|
+
const cases_1 = partition((x) => (name(x) === "Some"), getUnionCases(makeGenericType(option_type(obj_type), [obj_type])));
|
|
184
|
+
const patternInput = [exactlyOne(cases_1[0]), [v]];
|
|
185
|
+
return makeUnion(patternInput[0], patternInput[1]);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
return oldVal;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
return newVal;
|
|
193
|
+
}
|
|
194
|
+
case 2: {
|
|
195
|
+
const oldSeq = oldVal;
|
|
196
|
+
const newSeq = newVal;
|
|
197
|
+
const innerType = Update_enumGetInnerType(oldVal);
|
|
198
|
+
if (Update_isMapType(oldVal)) {
|
|
199
|
+
return newVal;
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
return distinct_generic(append_generic(oldSeq, newSeq));
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
default:
|
|
206
|
+
return newVal;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* updates oldRT with newRT by replacing all values, but only if the new value is not empty.
|
|
212
|
+
*/
|
|
213
|
+
export function Update_updateOnlyByExisting(oldVal, newVal) {
|
|
214
|
+
if (equals(newVal, defaultOf())) {
|
|
215
|
+
return oldVal;
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
let activePatternResult;
|
|
219
|
+
const a = oldVal;
|
|
220
|
+
activePatternResult = ((a == null) ? void 0 : (undefined));
|
|
221
|
+
if (activePatternResult != null) {
|
|
222
|
+
const oldInternal = value_1(activePatternResult);
|
|
223
|
+
let activePatternResult_1;
|
|
224
|
+
const a_1 = newVal;
|
|
225
|
+
activePatternResult_1 = ((a_1 == null) ? void 0 : (undefined));
|
|
226
|
+
if (activePatternResult_1 != null) {
|
|
227
|
+
const newInternal = value_1(activePatternResult_1);
|
|
228
|
+
const v = Update_updateOnlyByExisting(oldInternal, newInternal);
|
|
229
|
+
const cases_1 = partition((x) => (name(x) === "Some"), getUnionCases(makeGenericType(option_type(obj_type), [obj_type])));
|
|
230
|
+
const patternInput = [exactlyOne(cases_1[0]), [v]];
|
|
231
|
+
return makeUnion(patternInput[0], patternInput[1]);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
return oldVal;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else if (typeof oldVal === "string") {
|
|
238
|
+
const newStr = newVal;
|
|
239
|
+
if (toString(newStr) === "") {
|
|
240
|
+
return oldVal;
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
return newStr;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else if (isIterable(oldVal)) {
|
|
247
|
+
const newSeq = newVal;
|
|
248
|
+
if (isEmpty_1(newSeq)) {
|
|
249
|
+
return oldVal;
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
return newSeq;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
return newVal;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* updates oldRT with newRT by replacing all values, but only if the new value is not empty.
|
|
263
|
+
*/
|
|
264
|
+
export function Update_updateOnlyByExistingAppend(oldVal, newVal) {
|
|
265
|
+
if (equals(newVal, defaultOf())) {
|
|
266
|
+
return oldVal;
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
let activePatternResult;
|
|
270
|
+
const a = oldVal;
|
|
271
|
+
activePatternResult = ((a == null) ? void 0 : (undefined));
|
|
272
|
+
if (activePatternResult != null) {
|
|
273
|
+
const oldInternal = value_1(activePatternResult);
|
|
274
|
+
let activePatternResult_1;
|
|
275
|
+
const a_1 = newVal;
|
|
276
|
+
activePatternResult_1 = ((a_1 == null) ? void 0 : (undefined));
|
|
277
|
+
if (activePatternResult_1 != null) {
|
|
278
|
+
const newInternal = value_1(activePatternResult_1);
|
|
279
|
+
const v = Update_updateOnlyByExistingAppend(oldInternal, newInternal);
|
|
280
|
+
const cases_1 = partition((x) => (name(x) === "Some"), getUnionCases(makeGenericType(option_type(obj_type), [obj_type])));
|
|
281
|
+
const patternInput = [exactlyOne(cases_1[0]), [v]];
|
|
282
|
+
return makeUnion(patternInput[0], patternInput[1]);
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
return oldVal;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
else if (typeof oldVal === "string") {
|
|
289
|
+
const newStr = newVal;
|
|
290
|
+
if (toString(newStr) === "") {
|
|
291
|
+
return oldVal;
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
return newStr;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
else if (isIterable(oldVal)) {
|
|
298
|
+
const innerType = Update_enumGetInnerType(oldVal);
|
|
299
|
+
if (Update_isMapType(oldVal)) {
|
|
300
|
+
return newVal;
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
return distinct_generic(append_generic(oldVal, newVal));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
return newVal;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export class Update_UpdateOptions extends Union {
|
|
313
|
+
constructor(tag, fields) {
|
|
314
|
+
super();
|
|
315
|
+
this.tag = tag;
|
|
316
|
+
this.fields = fields;
|
|
317
|
+
}
|
|
318
|
+
cases() {
|
|
319
|
+
return ["UpdateAll", "UpdateByExisting", "UpdateAllAppendLists", "UpdateByExistingAppendLists"];
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export function Update_UpdateOptions_$reflection() {
|
|
324
|
+
return union_type("ARCtrl.ISA.Aux.Update.UpdateOptions", [], Update_UpdateOptions, () => [[], [], [], []]);
|
|
325
|
+
}
|
|
326
|
+
|