@nfdi4plants/arctrl 1.0.0-alpha6 → 1.0.0-alpha8
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 → ARC.js} +7 -2
- package/ISA/ISA/ArcTypes/ArcTableAux.js +14 -50
- package/ISA/ISA/ArcTypes/ArcTypes.js +177 -8
- package/ISA/ISA/Regex.js +1 -1
- package/ISA/ISA.Json/Assay.js +7 -7
- package/ISA/ISA.Json/Comment.js +7 -7
- package/ISA/ISA.Json/Data.js +10 -10
- package/ISA/ISA.Json/Decode.js +3 -3
- package/ISA/ISA.Json/Factor.js +10 -10
- package/ISA/ISA.Json/Investigation.js +7 -7
- package/ISA/ISA.Json/Material.js +10 -10
- package/ISA/ISA.Json/Ontology.js +7 -7
- package/ISA/ISA.Json/Person.js +7 -7
- package/ISA/ISA.Json/Process.js +16 -16
- package/ISA/ISA.Json/Protocol.js +9 -9
- package/ISA/ISA.Json/Publication.js +7 -7
- package/ISA/ISA.Json/Study.js +7 -7
- package/Templates/{Templates.Json.js → Template.Json.js} +49 -5
- package/Templates/{Templates.Spreadsheet.js → Template.Spreadsheet.js} +6 -6
- package/Templates/Template.Web.js +27 -0
- package/Templates/{Templates.js → Template.js} +3 -3
- package/WebRequest/WebRequest.js +38 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fable.Fetch.fableproj +21 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs +469 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +111 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +104 -0
- package/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +217 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +19 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Fable.SimpleHttp.fableproj +23 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs +357 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +429 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs +52 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +112 -0
- package/fable_modules/project_cracked.json +1 -1
- package/index.js +12 -0
- package/package.json +4 -2
package/ISA/ISA.Json/Material.js
CHANGED
|
@@ -10,7 +10,7 @@ import { empty, singleton, append, delay, toList } from "../../fable_modules/fab
|
|
|
10
10
|
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
11
11
|
import { tryInclude } from "./GEncode.js";
|
|
12
12
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
13
|
-
import { hasUnknownFields,
|
|
13
|
+
import { hasUnknownFields, fromJsonString, uri } from "./Decode.js";
|
|
14
14
|
import { MaterialAttribute } from "../ISA/JsonTypes/MaterialAttribute.js";
|
|
15
15
|
import { Value_decoder, Value_encoder } from "./Factor.js";
|
|
16
16
|
import { MaterialAttributeValue } from "../ISA/JsonTypes/MaterialAttributeValue.js";
|
|
@@ -89,11 +89,11 @@ export function MaterialAttribute_decoder(options) {
|
|
|
89
89
|
}, path, v));
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
export function
|
|
93
|
-
return
|
|
92
|
+
export function MaterialAttribute_fromJsonString(s) {
|
|
93
|
+
return fromJsonString(uncurry2(MaterialAttribute_decoder(ConverterOptions_$ctor())), s);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export function
|
|
96
|
+
export function MaterialAttribute_toJsonString(m) {
|
|
97
97
|
return toString(2, MaterialAttribute_encoder(ConverterOptions_$ctor(), m));
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -144,11 +144,11 @@ export function MaterialAttributeValue_decoder(options) {
|
|
|
144
144
|
}, path, v));
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
export function
|
|
148
|
-
return
|
|
147
|
+
export function MaterialAttributeValue_fromJsonString(s) {
|
|
148
|
+
return fromJsonString(uncurry2(MaterialAttributeValue_decoder(ConverterOptions_$ctor())), s);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
export function
|
|
151
|
+
export function MaterialAttributeValue_toJsonString(m) {
|
|
152
152
|
return toString(2, MaterialAttributeValue_encoder(ConverterOptions_$ctor(), m));
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -214,12 +214,12 @@ export function Material_decoder(options, s, json) {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
export function
|
|
217
|
+
export function Material_fromJsonString(s) {
|
|
218
218
|
let options;
|
|
219
|
-
return
|
|
219
|
+
return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Material_decoder(options, s_1, json)))), s);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
export function
|
|
222
|
+
export function Material_toJsonString(m) {
|
|
223
223
|
return toString(2, Material_encoder(ConverterOptions_$ctor(), m));
|
|
224
224
|
}
|
|
225
225
|
|
package/ISA/ISA.Json/Ontology.js
CHANGED
|
@@ -9,7 +9,7 @@ import { empty, singleton, append, delay, toList } from "../../fable_modules/fab
|
|
|
9
9
|
import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetID_Z1FBCCD16, ConverterOptions_$ctor, ConverterOptions__get_IncludeType, ConverterOptions__get_SetID } from "./ConverterOptions.js";
|
|
10
10
|
import { tryInclude } from "./GEncode.js";
|
|
11
11
|
import { decoder as decoder_1, encoder } from "./Comment.js";
|
|
12
|
-
import {
|
|
12
|
+
import { fromJsonString, uri } from "./Decode.js";
|
|
13
13
|
import { OntologySourceReference } from "../ISA/JsonTypes/OntologySourceReference.js";
|
|
14
14
|
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
15
15
|
import { OntologyAnnotation } from "../ISA/JsonTypes/OntologyAnnotation.js";
|
|
@@ -111,11 +111,11 @@ export function OntologySourceReference_decoder(options) {
|
|
|
111
111
|
}, path_4, v));
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
export function
|
|
115
|
-
return
|
|
114
|
+
export function OntologySourceReference_fromJsonString(s) {
|
|
115
|
+
return fromJsonString(uncurry2(OntologySourceReference_decoder(ConverterOptions_$ctor())), s);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
export function
|
|
118
|
+
export function OntologySourceReference_toJsonString(oa) {
|
|
119
119
|
return toString(2, OntologySourceReference_encoder(ConverterOptions_$ctor(), oa));
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -186,11 +186,11 @@ export function OntologyAnnotation_decoder(options) {
|
|
|
186
186
|
}, path_3, v));
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
export function
|
|
190
|
-
return
|
|
189
|
+
export function OntologyAnnotation_fromJsonString(s) {
|
|
190
|
+
return fromJsonString(uncurry2(OntologyAnnotation_decoder(ConverterOptions_$ctor())), s);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
export function
|
|
193
|
+
export function OntologyAnnotation_toJsonString(oa) {
|
|
194
194
|
return toString(2, OntologyAnnotation_encoder(ConverterOptions_$ctor(), oa));
|
|
195
195
|
}
|
|
196
196
|
|
package/ISA/ISA.Json/Person.js
CHANGED
|
@@ -2,7 +2,7 @@ import { tryPick } from "../../fable_modules/fable-library.4.1.4/Array.js";
|
|
|
2
2
|
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
3
3
|
import { URIModule_toString } from "../ISA/JsonTypes/URI.js";
|
|
4
4
|
import { Person } from "../ISA/JsonTypes/Person.js";
|
|
5
|
-
import { toString
|
|
5
|
+
import { toString, nil, object as object_22 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
6
6
|
import { choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
7
7
|
import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
8
8
|
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
@@ -11,7 +11,7 @@ import { tryInclude } from "./GEncode.js";
|
|
|
11
11
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
12
12
|
import { decoder as decoder_3, encoder as encoder_1 } from "./Comment.js";
|
|
13
13
|
import { array as array_1, string, object as object_23 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
14
|
-
import {
|
|
14
|
+
import { fromJsonString as fromJsonString_1, uri } from "./Decode.js";
|
|
15
15
|
|
|
16
16
|
export function genID(p) {
|
|
17
17
|
const matchValue = p.ID;
|
|
@@ -186,12 +186,12 @@ export function decoder(options) {
|
|
|
186
186
|
}, path_10, v));
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
export function
|
|
190
|
-
return
|
|
189
|
+
export function fromJsonString(s) {
|
|
190
|
+
return fromJsonString_1(uncurry2(decoder(ConverterOptions_$ctor())), s);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
export function
|
|
194
|
-
return
|
|
193
|
+
export function toJsonString(p) {
|
|
194
|
+
return toString(2, encoder(ConverterOptions_$ctor(), p));
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/**
|
|
@@ -199,6 +199,6 @@ export function toString(p) {
|
|
|
199
199
|
*/
|
|
200
200
|
export function toStringLD(p) {
|
|
201
201
|
let returnVal;
|
|
202
|
-
return
|
|
202
|
+
return toString(2, encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
203
203
|
}
|
|
204
204
|
|
package/ISA/ISA.Json/Process.js
CHANGED
|
@@ -12,7 +12,7 @@ import { Value_decoder, Value_encoder } from "./Factor.js";
|
|
|
12
12
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
13
13
|
import { list as list_1, string, object as object_23 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
14
14
|
import { ProcessParameterValue } from "../ISA/JsonTypes/ProcessParameterValue.js";
|
|
15
|
-
import { uri,
|
|
15
|
+
import { uri, fromJsonString } from "./Decode.js";
|
|
16
16
|
import { ProcessInput } from "../ISA/JsonTypes/ProcessInput.js";
|
|
17
17
|
import { Data_decoder, Sample_decoder, Source_decoder, Source_encoder, Data_encoder, Sample_encoder } from "./Data.js";
|
|
18
18
|
import { Material_decoder, Material_encoder } from "./Material.js";
|
|
@@ -72,11 +72,11 @@ export function ProcessParameterValue_decoder(options) {
|
|
|
72
72
|
}, path, v));
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
export function
|
|
76
|
-
return
|
|
75
|
+
export function ProcessParameterValue_fromJsonString(s) {
|
|
76
|
+
return fromJsonString(uncurry2(ProcessParameterValue_decoder(ConverterOptions_$ctor())), s);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export function
|
|
79
|
+
export function ProcessParameterValue_toJsonString(p) {
|
|
80
80
|
return toString(2, ProcessParameterValue_encoder(ConverterOptions_$ctor(), p));
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -136,12 +136,12 @@ export function ProcessInput_decoder(options, s, json) {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
export function
|
|
139
|
+
export function ProcessInput_fromJsonString(s) {
|
|
140
140
|
let options;
|
|
141
|
-
return
|
|
141
|
+
return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => ProcessInput_decoder(options, s_1, json)))), s);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
export function
|
|
144
|
+
export function ProcessInput_toJsonString(m) {
|
|
145
145
|
return toString(2, ProcessInput_encoder(ConverterOptions_$ctor(), m));
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -189,12 +189,12 @@ export function ProcessOutput_decoder(options, s, json) {
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
export function
|
|
192
|
+
export function ProcessOutput_fromJsonString(s) {
|
|
193
193
|
let options;
|
|
194
|
-
return
|
|
194
|
+
return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => ProcessOutput_decoder(options, s_1, json)))), s);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
export function
|
|
197
|
+
export function ProcessOutput_toJsonString(m) {
|
|
198
198
|
return toString(2, ProcessOutput_encoder(ConverterOptions_$ctor(), m));
|
|
199
199
|
}
|
|
200
200
|
|
|
@@ -255,11 +255,11 @@ export function Process_decoder(options) {
|
|
|
255
255
|
}, path_7, v));
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
export function
|
|
259
|
-
return
|
|
258
|
+
export function Process_fromJsonString(s) {
|
|
259
|
+
return fromJsonString(uncurry2(Process_decoder(ConverterOptions_$ctor())), s);
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
export function
|
|
262
|
+
export function Process_toJsonString(p) {
|
|
263
263
|
return toString(2, Process_encoder(ConverterOptions_$ctor(), p));
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -271,12 +271,12 @@ export function Process_toStringLD(p) {
|
|
|
271
271
|
return toString(2, Process_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
export function
|
|
274
|
+
export function ProcessSequence_fromJsonString(s) {
|
|
275
275
|
let decoder;
|
|
276
|
-
return
|
|
276
|
+
return fromJsonString(uncurry2((decoder = Process_decoder(ConverterOptions_$ctor()), (path) => ((value) => list_1(uncurry2(decoder), path, value)))), s);
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
export function
|
|
279
|
+
export function ProcessSequence_toJsonString(p) {
|
|
280
280
|
let options;
|
|
281
281
|
return toString(2, list_2(map((options = ConverterOptions_$ctor(), (oa) => Process_encoder(options, oa)), p)));
|
|
282
282
|
}
|
package/ISA/ISA.Json/Protocol.js
CHANGED
|
@@ -8,7 +8,7 @@ import { ConverterOptions__set_IncludeType_Z1FBCCD16, ConverterOptions__set_SetI
|
|
|
8
8
|
import { tryInclude } from "./GEncode.js";
|
|
9
9
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
10
10
|
import { list as list_1, string, object as object_19 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
11
|
-
import {
|
|
11
|
+
import { fromJsonString, uri } from "./Decode.js";
|
|
12
12
|
import { ProtocolParameter } from "../ISA/JsonTypes/ProtocolParameter.js";
|
|
13
13
|
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
14
14
|
import { Result_Map } from "../../fable_modules/fable-library.4.1.4/Choice.js";
|
|
@@ -74,8 +74,8 @@ export function ProtocolParameter_decoder(options) {
|
|
|
74
74
|
}, path, v));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export function
|
|
78
|
-
return
|
|
77
|
+
export function ProtocolParameter_fromJsonString(s) {
|
|
78
|
+
return fromJsonString(uncurry2(ProtocolParameter_decoder(ConverterOptions_$ctor())), s);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export function ProtocolParameter_toString(p) {
|
|
@@ -140,12 +140,12 @@ export function Component_decoder(options, s, json) {
|
|
|
140
140
|
}, s, json));
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
export function
|
|
143
|
+
export function Component_fromJsonString(s) {
|
|
144
144
|
let options;
|
|
145
|
-
return
|
|
145
|
+
return fromJsonString(uncurry2((options = ConverterOptions_$ctor(), (s_1) => ((json) => Component_decoder(options, s_1, json)))), s);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
export function
|
|
148
|
+
export function Component_toJsonString(p) {
|
|
149
149
|
return toString(2, Component_encoder(ConverterOptions_$ctor(), p));
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -224,11 +224,11 @@ export function Protocol_decoder(options) {
|
|
|
224
224
|
}, path_6, v));
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
export function
|
|
228
|
-
return
|
|
227
|
+
export function Protocol_fromJsonString(s) {
|
|
228
|
+
return fromJsonString(uncurry2(Protocol_decoder(ConverterOptions_$ctor())), s);
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
export function
|
|
231
|
+
export function Protocol_toJsonString(p) {
|
|
232
232
|
return toString(2, Protocol_encoder(ConverterOptions_$ctor(), p));
|
|
233
233
|
}
|
|
234
234
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { replace } from "../../fable_modules/fable-library.4.1.4/String.js";
|
|
2
|
-
import { toString
|
|
2
|
+
import { toString, nil, object as object_12 } from "../../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
3
3
|
import { choose } from "../../fable_modules/fable-library.4.1.4/List.js";
|
|
4
4
|
import { uncurry2, equals } from "../../fable_modules/fable-library.4.1.4/Util.js";
|
|
5
5
|
import { empty, singleton, append, delay, toList } from "../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
@@ -8,7 +8,7 @@ import { tryInclude } from "./GEncode.js";
|
|
|
8
8
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "./Ontology.js";
|
|
9
9
|
import { decoder as decoder_2, encoder as encoder_1 } from "./Comment.js";
|
|
10
10
|
import { array, string, object as object_13 } from "../../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
11
|
-
import {
|
|
11
|
+
import { fromJsonString as fromJsonString_1, uri } from "./Decode.js";
|
|
12
12
|
import { Publication } from "../ISA/JsonTypes/Publication.js";
|
|
13
13
|
|
|
14
14
|
export function genID(p) {
|
|
@@ -74,12 +74,12 @@ export function decoder(options) {
|
|
|
74
74
|
}, path_4, v));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export function
|
|
78
|
-
return
|
|
77
|
+
export function fromJsonString(s) {
|
|
78
|
+
return fromJsonString_1(uncurry2(decoder(ConverterOptions_$ctor())), s);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
export function
|
|
82
|
-
return
|
|
81
|
+
export function toJsonString(p) {
|
|
82
|
+
return toString(2, encoder(ConverterOptions_$ctor(), p));
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
@@ -87,6 +87,6 @@ export function toString(p) {
|
|
|
87
87
|
*/
|
|
88
88
|
export function toStringLD(p) {
|
|
89
89
|
let returnVal;
|
|
90
|
-
return
|
|
90
|
+
return toString(2, encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), p));
|
|
91
91
|
}
|
|
92
92
|
|
package/ISA/ISA.Json/Study.js
CHANGED
|
@@ -18,7 +18,7 @@ import { Process_decoder, Process_encoder } from "./Process.js";
|
|
|
18
18
|
import { Assay_decoder, Assay_encoder } from "./Assay.js";
|
|
19
19
|
import { Factor_decoder, Factor_encoder } from "./Factor.js";
|
|
20
20
|
import { decoder as decoder_12, encoder as encoder_2 } from "./Comment.js";
|
|
21
|
-
import {
|
|
21
|
+
import { fromJsonString, uri } from "./Decode.js";
|
|
22
22
|
import { Study } from "../ISA/JsonTypes/Study.js";
|
|
23
23
|
import { ArcStudy } from "../ISA/ArcTypes/ArcTypes.js";
|
|
24
24
|
|
|
@@ -195,11 +195,11 @@ export function Study_decoder(options) {
|
|
|
195
195
|
}, path_16, v));
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
export function
|
|
199
|
-
return
|
|
198
|
+
export function Study_fromJsonString(s) {
|
|
199
|
+
return fromJsonString(uncurry2(Study_decoder(ConverterOptions_$ctor())), s);
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
export function
|
|
202
|
+
export function Study_toJsonString(p) {
|
|
203
203
|
return toString(2, Study_encoder(ConverterOptions_$ctor(), p));
|
|
204
204
|
}
|
|
205
205
|
|
|
@@ -211,12 +211,12 @@ export function Study_toStringLD(s) {
|
|
|
211
211
|
return toString(2, Study_encoder((returnVal = ConverterOptions_$ctor(), ((ConverterOptions__set_SetID_Z1FBCCD16(returnVal, true), ConverterOptions__set_IncludeType_Z1FBCCD16(returnVal, true)), returnVal)), s));
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
export function
|
|
215
|
-
const arg =
|
|
214
|
+
export function ArcStudy_fromJsonString(s) {
|
|
215
|
+
const arg = fromJsonString(uncurry2(Study_decoder(ConverterOptions_$ctor())), s);
|
|
216
216
|
return ArcStudy.fromStudy(arg);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
export function
|
|
219
|
+
export function ArcStudy_toJsonString(a, assays) {
|
|
220
220
|
return toString(2, Study_encoder(ConverterOptions_$ctor(), a.ToStudy(assays)));
|
|
221
221
|
}
|
|
222
222
|
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { toString } from "../fable_modules/fable-library.4.1.4/Types.js";
|
|
2
|
-
import { datetimeUtc, array, map as map_2, list as list_2, guid as guid_1, object as object_1, string, succeed, andThen } from "../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
2
|
+
import { dict, fromString, datetimeUtc, array as array_1, map as map_2, list as list_2, guid as guid_1, object as object_1, string, succeed, andThen } from "../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
|
|
3
3
|
import { uncurry2, uncurry3 } from "../fable_modules/fable-library.4.1.4/Util.js";
|
|
4
|
-
import { Template, Organisation } from "./
|
|
4
|
+
import { Template, Organisation } from "./Template.js";
|
|
5
5
|
import { ConverterOptions_$ctor } from "../ISA/ISA.Json/ConverterOptions.js";
|
|
6
6
|
import { decoder as decoder_2, encoder } from "../ISA/ISA.Json/Person.js";
|
|
7
7
|
import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../ISA/ISA.Json/Ontology.js";
|
|
8
|
-
import { datetime, list as list_1, guid, object } from "../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
9
|
-
import { map } from "../fable_modules/fable-library.4.1.4/List.js";
|
|
8
|
+
import { toString as toString_1, datetime, list as list_1, guid, object } from "../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
|
|
9
|
+
import { ofArray, map } from "../fable_modules/fable-library.4.1.4/List.js";
|
|
10
10
|
import { Process_decoder, Process_encoder } from "../ISA/ISA.Json/Process.js";
|
|
11
11
|
import { map as map_1, delay, toList } from "../fable_modules/fable-library.4.1.4/Seq.js";
|
|
12
12
|
import { ArcTables_fromProcesses_134EBDED, ArcTables__get_Item_Z524259A4 } from "../ISA/ISA/ArcTypes/ArcTables.js";
|
|
13
|
+
import { printf, toFail } from "../fable_modules/fable-library.4.1.4/String.js";
|
|
14
|
+
import { defaultArg } from "../fable_modules/fable-library.4.1.4/Option.js";
|
|
13
15
|
|
|
14
16
|
export const Organisation_encode = toString;
|
|
15
17
|
|
|
@@ -34,7 +36,49 @@ export const Template_decode = (() => {
|
|
|
34
36
|
const oaDecoder = OntologyAnnotation_decoder(ConverterOptions_$ctor());
|
|
35
37
|
return (path_10) => ((v) => object_1((get$) => {
|
|
36
38
|
let objectArg, arg_3, d, decoder, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, objectArg_9;
|
|
37
|
-
return Template.create((objectArg = get$.Required, objectArg.Field("id", guid_1)), (arg_3 = ((d = ((decoder = Process_decoder(ConverterOptions_$ctor()), (path_1) => ((value_1) => list_2(uncurry2(decoder), path_1, value_1)))), (path_2) => ((value_2) => map_2((ps) => ArcTables__get_Item_Z524259A4(ArcTables_fromProcesses_134EBDED(ps), 0), uncurry2(d), path_2, value_2)))), (objectArg_1 = get$.Required, objectArg_1.Field("table", uncurry2(arg_3)))), (objectArg_2 = get$.Required, objectArg_2.Field("name", string)), (objectArg_3 = get$.Required, objectArg_3.Field("description", string)), (objectArg_4 = get$.Required, objectArg_4.Field("organisation", uncurry2(Organisation_decode))), (objectArg_5 = get$.Required, objectArg_5.Field("version", string)), (objectArg_6 = get$.Required, objectArg_6.Field("authors", (path_6, value_6) =>
|
|
39
|
+
return Template.create((objectArg = get$.Required, objectArg.Field("id", guid_1)), (arg_3 = ((d = ((decoder = Process_decoder(ConverterOptions_$ctor()), (path_1) => ((value_1) => list_2(uncurry2(decoder), path_1, value_1)))), (path_2) => ((value_2) => map_2((ps) => ArcTables__get_Item_Z524259A4(ArcTables_fromProcesses_134EBDED(ps), 0), uncurry2(d), path_2, value_2)))), (objectArg_1 = get$.Required, objectArg_1.Field("table", uncurry2(arg_3)))), (objectArg_2 = get$.Required, objectArg_2.Field("name", string)), (objectArg_3 = get$.Required, objectArg_3.Field("description", string)), (objectArg_4 = get$.Required, objectArg_4.Field("organisation", uncurry2(Organisation_decode))), (objectArg_5 = get$.Required, objectArg_5.Field("version", string)), (objectArg_6 = get$.Required, objectArg_6.Field("authors", (path_6, value_6) => array_1(uncurry2(personDecoder), path_6, value_6))), (objectArg_7 = get$.Required, objectArg_7.Field("endpoint_repositories", (path_7, value_7) => array_1(uncurry2(oaDecoder), path_7, value_7))), (objectArg_8 = get$.Required, objectArg_8.Field("tags", (path_8, value_8) => array_1(uncurry2(oaDecoder), path_8, value_8))), (objectArg_9 = get$.Required, objectArg_9.Field("last_updated", datetimeUtc)));
|
|
38
40
|
}, path_10, v));
|
|
39
41
|
})();
|
|
40
42
|
|
|
43
|
+
export function Template_fromJsonString(jsonString) {
|
|
44
|
+
const matchValue = fromString(uncurry2(Template_decode), jsonString);
|
|
45
|
+
if (matchValue.tag === 1) {
|
|
46
|
+
return toFail(printf("Error. Given json string cannot be parsed to Template: %A"))(matchValue.fields[0]);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
return matchValue.fields[0];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function Template_toJsonString(spaces, template) {
|
|
54
|
+
return toString_1(spaces, Template_encode(template));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function Templates_encode(templateList) {
|
|
58
|
+
return object(map((tupledArg) => [tupledArg[0], Template_encode(tupledArg[1])], ofArray(templateList)));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const Templates_decode = (() => {
|
|
62
|
+
const d = dict(uncurry2(Template_decode));
|
|
63
|
+
return (value) => fromString(uncurry2(d), value);
|
|
64
|
+
})();
|
|
65
|
+
|
|
66
|
+
export function Templates_fromJsonString(jsonString) {
|
|
67
|
+
const matchValue = Templates_decode(jsonString);
|
|
68
|
+
if (matchValue.tag === 1) {
|
|
69
|
+
return toFail(printf("Error. Given json string cannot be parsed to Templates map: %A"))(matchValue.fields[0]);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
return matchValue.fields[0];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function Templates_toJsonString(spaces, templateList) {
|
|
77
|
+
return toString_1(spaces, Templates_encode(templateList));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function ARCtrl_Template_Template__Template_ToJson_71136F3F(this$, spaces) {
|
|
81
|
+
const spaces_1 = defaultArg(spaces, 0) | 0;
|
|
82
|
+
return (template) => Template_toJsonString(spaces_1, template);
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -14,7 +14,7 @@ import { Person } from "../ISA/ISA/JsonTypes/Person.js";
|
|
|
14
14
|
import { toArray } from "../fable_modules/fable-library.4.1.4/Option.js";
|
|
15
15
|
import { toRows as toRows_1, fromRows as fromRows_1 } from "../ISA/ISA.Spreadsheet/Metadata/Contacts.js";
|
|
16
16
|
import { parse } from "../fable_modules/fable-library.4.1.4/Guid.js";
|
|
17
|
-
import { Template, Organisation } from "./
|
|
17
|
+
import { Template, Organisation } from "./Template.js";
|
|
18
18
|
import { FsWorksheet } from "../fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js";
|
|
19
19
|
import { printf, toFail } from "../fable_modules/fable-library.4.1.4/String.js";
|
|
20
20
|
import { toFsWorksheet, tryFromFsWorksheet } from "../ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js";
|
|
@@ -73,7 +73,7 @@ export class Metadata_Template_TemplateInfo extends Record {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export function Metadata_Template_TemplateInfo_$reflection() {
|
|
76
|
-
return record_type("ARCtrl.
|
|
76
|
+
return record_type("ARCtrl.Template.Spreadsheet.Metadata.Template.TemplateInfo", [], Metadata_Template_TemplateInfo, () => [["Id", string_type], ["Name", string_type], ["Version", string_type], ["Description", string_type], ["Organisation", string_type], ["Table", string_type], ["Comments", list_type(Comment$_$reflection())]]);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
export function Metadata_Template_TemplateInfo_create(id, name, version, description, organisation, table, comments) {
|
|
@@ -93,7 +93,7 @@ export function Metadata_Template_TemplateInfo_FromSparseTable_651559CC(matrix)
|
|
|
93
93
|
return Metadata_Template_TemplateInfo_create(SparseTable__TryGetValueDefault_5BAE6133(matrix, createMissingIdentifier(), ["Id", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Name", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Version", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Description", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Organisation", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Table", 0]), comments);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export function
|
|
96
|
+
export function Metadata_Template_TemplateInfo_ToSparseTable_2285DF3F(template) {
|
|
97
97
|
let copyOfStruct, copyOfStruct_1;
|
|
98
98
|
const matrix = SparseTable_Create_Z2192E64B(void 0, Metadata_Template_TemplateInfo_get_Labels(), void 0, 2);
|
|
99
99
|
let commentKeys = empty();
|
|
@@ -114,8 +114,8 @@ export function Metadata_Template_TemplateInfo_fromRows_9F97F2A(rows) {
|
|
|
114
114
|
return [tupledArg[0], Metadata_Template_TemplateInfo_FromSparseTable_651559CC(tupledArg[3])];
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
export function
|
|
118
|
-
return SparseTable_ToRows_6A3D4534(
|
|
117
|
+
export function Metadata_Template_TemplateInfo_toRows_2285DF3F(template) {
|
|
118
|
+
return SparseTable_ToRows_6A3D4534(Metadata_Template_TemplateInfo_ToSparseTable_2285DF3F(template));
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
export function Metadata_Template_mapDeprecatedKeys(rows) {
|
|
@@ -247,7 +247,7 @@ export function Metadata_Template_fromRows(rows) {
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
export function Metadata_Template_toRows(template) {
|
|
250
|
-
return delay(() => append(singleton(SparseRowModule_fromValues(["TEMPLATE"])), delay(() => append(
|
|
250
|
+
return delay(() => append(singleton(SparseRowModule_fromValues(["TEMPLATE"])), delay(() => append(Metadata_Template_TemplateInfo_toRows_2285DF3F(template), delay(() => append(singleton(SparseRowModule_fromValues(["ERS"])), delay(() => append(Metadata_ER_toRows(void 0, ofArray(template.EndpointRepositories)), delay(() => append(singleton(SparseRowModule_fromValues(["TAGS"])), delay(() => append(Metadata_Tags_toRows(void 0, ofArray(template.Tags)), delay(() => append(singleton(SparseRowModule_fromValues(["AUTHORS"])), delay(() => toRows_1("Author", ofArray(template.Authors)))))))))))))))));
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
export function Template_fromParts(templateInfo, ers, tags, authors, table, lastUpdated) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defaultArg } from "../fable_modules/fable-library.4.1.4/Option.js";
|
|
2
|
+
import { singleton } from "../fable_modules/fable-library.4.1.4/AsyncBuilder.js";
|
|
3
|
+
import { downloadFile } from "../WebRequest/WebRequest.js";
|
|
4
|
+
import { Templates_fromJsonString } from "./Template.Json.js";
|
|
5
|
+
import { startAsPromise } from "../fable_modules/fable-library.4.1.4/Async.js";
|
|
6
|
+
import { class_type } from "../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
7
|
+
|
|
8
|
+
export function getTemplates(url) {
|
|
9
|
+
const url_1 = defaultArg(url, "https://github.com/nfdi4plants/Swate-templates/releases/download/latest/templates.json");
|
|
10
|
+
return singleton.Delay(() => singleton.Bind(downloadFile(url_1), (_arg) => {
|
|
11
|
+
const mapResult = Templates_fromJsonString(_arg);
|
|
12
|
+
return singleton.Return(mapResult);
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class JsWeb {
|
|
17
|
+
constructor() {
|
|
18
|
+
}
|
|
19
|
+
static getTemplates(url) {
|
|
20
|
+
return startAsPromise(singleton.Delay(() => singleton.Bind(getTemplates(url), (_arg) => singleton.Return(new Map(_arg)))));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function JsWeb_$reflection() {
|
|
25
|
+
return class_type("ARCtrl.Template.Web.JsWeb", void 0, JsWeb);
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -31,7 +31,7 @@ export class Organisation extends Union {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export function Organisation_$reflection() {
|
|
34
|
-
return union_type("ARCtrl.
|
|
34
|
+
return union_type("ARCtrl.Template.Organisation", [], Organisation, () => [[], [["Item", string_type]]]);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export class Template {
|
|
@@ -170,10 +170,10 @@ export class Template {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
export function Template_$reflection() {
|
|
173
|
-
return class_type("ARCtrl.
|
|
173
|
+
return class_type("ARCtrl.Template.Template", void 0, Template);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
export function Template_$
|
|
176
|
+
export function Template_$ctor_4AC720A8(id, table, name, description, organisation, version, authors, repos, tags, lastUpdated) {
|
|
177
177
|
return new Template(id, table, name, description, organisation, version, authors, repos, tags, lastUpdated);
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { awaitPromise } from "../fable_modules/fable-library.4.1.4/Async.js";
|
|
2
|
+
import { fetch$ } from "../fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js";
|
|
3
|
+
import { empty } from "../fable_modules/fable-library.4.1.4/List.js";
|
|
4
|
+
import { singleton } from "../fable_modules/fable-library.4.1.4/AsyncBuilder.js";
|
|
5
|
+
import { Http_get } from "../fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js";
|
|
6
|
+
import { printf, toFail } from "../fable_modules/fable-library.4.1.4/String.js";
|
|
7
|
+
import "isomorphic-fetch";
|
|
8
|
+
|
|
9
|
+
export function NodeJs_isNode() {
|
|
10
|
+
return typeof process !== "undefined" &&
|
|
11
|
+
process.versions != null &&
|
|
12
|
+
process.versions.node != null;;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function NodeJs_downloadFile(url) {
|
|
16
|
+
let pr_1, pr;
|
|
17
|
+
return awaitPromise((pr_1 = ((pr = fetch$(url, empty()), pr.then((res) => res.text()))), pr_1.then((txt) => txt)));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function downloadFile(url) {
|
|
21
|
+
let isFable = false;
|
|
22
|
+
isFable = true;
|
|
23
|
+
const browserAndDotnet = () => singleton.Delay(() => singleton.Bind(Http_get(url), (_arg) => {
|
|
24
|
+
const statusCode = _arg[0] | 0;
|
|
25
|
+
const responseText = _arg[1];
|
|
26
|
+
return singleton.Return((statusCode === 200) ? responseText : toFail(printf("Status %d => %s"))(statusCode)(responseText));
|
|
27
|
+
}));
|
|
28
|
+
if (!isFable) {
|
|
29
|
+
return browserAndDotnet();
|
|
30
|
+
}
|
|
31
|
+
else if (NodeJs_isNode()) {
|
|
32
|
+
return NodeJs_downloadFile(url);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return browserAndDotnet();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
|
3
|
+
<PropertyGroup>
|
|
4
|
+
<Version>2.6.0</Version>
|
|
5
|
+
<PackageVersion>2.6.0</PackageVersion>
|
|
6
|
+
<TargetFramework>netstandard2.0</TargetFramework>
|
|
7
|
+
</PropertyGroup>
|
|
8
|
+
<ItemGroup>
|
|
9
|
+
<Compile Include="Fetch.fs" />
|
|
10
|
+
</ItemGroup>
|
|
11
|
+
<ItemGroup>
|
|
12
|
+
<Content Include="*.fsproj; *.fs" PackagePath="fable\" />
|
|
13
|
+
</ItemGroup>
|
|
14
|
+
<ItemGroup>
|
|
15
|
+
<PackageReference Include="Fable.Browser.Blob" Version="1.2.0" />
|
|
16
|
+
<PackageReference Include="Fable.Browser.Event" Version="1.5.0" />
|
|
17
|
+
<PackageReference Include="Fable.Core" Version="3.7.1" />
|
|
18
|
+
<PackageReference Include="Fable.Promise" Version="2.2.2" />
|
|
19
|
+
<PackageReference Update="FSharp.Core" Version="4.7.2" />
|
|
20
|
+
</ItemGroup>
|
|
21
|
+
</Project>
|