@nfdi4plants/arctrl 2.1.0-alpha.4 → 2.2.0

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 (83) hide show
  1. package/CWL/CWLTypes.js +135 -0
  2. package/CWL/Decode.js +585 -0
  3. package/CWL/Inputs.js +62 -0
  4. package/CWL/Outputs.js +59 -0
  5. package/CWL/Requirements.js +72 -0
  6. package/CWL/ToolDescription.js +81 -0
  7. package/CWL/WorkflowDescription.js +81 -0
  8. package/CWL/WorkflowSteps.js +98 -0
  9. package/Core/ArcTypes.js +76 -87
  10. package/Core/Helper/Identifier.js +2 -2
  11. package/Core/OntologyAnnotation.js +8 -5
  12. package/Core/Table/ArcTable.js +15 -7
  13. package/Core/Table/CompositeHeader.js +4 -0
  14. package/Core/Template.js +8 -0
  15. package/Json/{ROCrateObject.js → LDObject.js} +66 -17
  16. package/JsonIO/LDObject.js +31 -0
  17. package/ROCrate/ArcROCrateMetadata.js +35 -0
  18. package/ROCrate/ISAProfile/Assay.js +30 -2
  19. package/ROCrate/ISAProfile/Data.js +32 -5
  20. package/ROCrate/ISAProfile/Dataset.js +3 -3
  21. package/ROCrate/ISAProfile/Investigation.js +30 -2
  22. package/ROCrate/ISAProfile/LabProcess.js +113 -5
  23. package/ROCrate/ISAProfile/LabProtocol.js +4 -4
  24. package/ROCrate/ISAProfile/Person.js +32 -5
  25. package/ROCrate/ISAProfile/PropertyValue.js +59 -5
  26. package/ROCrate/ISAProfile/Sample.js +32 -5
  27. package/ROCrate/ISAProfile/ScholarlyArticle.js +59 -5
  28. package/ROCrate/ISAProfile/Study.js +30 -2
  29. package/ROCrate/LDObject.js +105 -0
  30. package/Spreadsheet/AnnotationTable/ArcTable.js +8 -5
  31. package/Spreadsheet/Template.js +29 -11
  32. package/Yaml/ValidationPackage.js +6 -6
  33. package/Yaml/ValidationPackagesConfig.js +6 -6
  34. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynObj.fs +4 -4
  35. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynObj.fs.js +0 -44
  36. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/HashCodes.fs +4 -1
  37. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/HashCodes.fs.js +8 -3
  38. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Debug/netstandard2.0/DynamicObj.AssemblyInfo.fs +1 -1
  39. package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Release/netstandard2.0/DynamicObj.AssemblyInfo.fs +3 -3
  40. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Decode.fs +398 -373
  41. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Decode.fs.js +35 -2
  42. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Debug/netstandard2.0/YAMLicious.AssemblyInfo.fs +1 -1
  43. package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Release/netstandard2.0/YAMLicious.AssemblyInfo.fs +1 -1
  44. package/fable_modules/project_cracked.json +1 -1
  45. package/package.json +1 -1
  46. package/JsonIO/ROCrateObject.js +0 -146
  47. package/ROCrate/ROCrateObject.js +0 -61
  48. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fableproj +0 -0
  49. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fs +0 -0
  50. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/DynamicObj.fs.js +0 -0
  51. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FableJS.fs +0 -0
  52. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FableJS.fs.js +0 -0
  53. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/FablePy.fs +0 -0
  54. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/PropertyHelper.fs +0 -0
  55. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/PropertyHelper.fs.js +0 -0
  56. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/ReflectionUtils.fs +0 -0
  57. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/ReflectionUtils.fs.js +0 -0
  58. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  59. /package/fable_modules/{DynamicObj.4.0.0 → DynamicObj.4.0.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  60. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Encode.fs +0 -0
  61. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Encode.fs.js +0 -0
  62. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/JsInterop.fs +0 -0
  63. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/JsInterop.fs.js +0 -0
  64. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Interop/PyInterop.fs +0 -0
  65. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Library.fs +0 -0
  66. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Library.fs.js +0 -0
  67. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Persil.fs +0 -0
  68. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Persil.fs.js +0 -0
  69. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Preprocessing.fs +0 -0
  70. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Preprocessing.fs.js +0 -0
  71. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Reader.fs +0 -0
  72. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Reader.fs.js +0 -0
  73. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Regex.fs +0 -0
  74. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Regex.fs.js +0 -0
  75. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/RegexActivePatterns.fs +0 -0
  76. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/RegexActivePatterns.fs.js +0 -0
  77. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Writer.fs +0 -0
  78. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/Writer.fs.js +0 -0
  79. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLicious.fableproj +0 -0
  80. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLiciousTypes.fs +0 -0
  81. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/YAMLiciousTypes.fs.js +0 -0
  82. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
  83. /package/fable_modules/{YAMLicious.0.0.1 → YAMLicious.0.0.3}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
@@ -1,6 +1,7 @@
1
+ import { setOptionalProperty, setProperty, tryGetPropertyValue } from "../../fable_modules/DynamicObj.4.0.3/DynObj.fs.js";
2
+ import { value as value_1 } from "../../fable_modules/fable-library-js.4.22.0/Option.js";
1
3
  import { defaultOf } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
2
4
  import { FSharpRef } from "../../fable_modules/fable-library-js.4.22.0/Types.js";
3
- import { setOptionalProperty, setProperty } from "../../fable_modules/DynamicObj.4.0.0/DynObj.fs.js";
4
5
  import { Dataset_$reflection, Dataset } from "./Dataset.js";
5
6
  import { class_type } from "../../fable_modules/fable-library-js.4.22.0/Reflection.js";
6
7
 
@@ -23,13 +24,40 @@ export class Study extends Dataset {
23
24
  setOptionalProperty("headline", headline, this$.contents);
24
25
  setOptionalProperty("url", url, this$.contents);
25
26
  }
27
+ GetIdentifier() {
28
+ const this$ = this;
29
+ const obj = this$;
30
+ if (tryGetPropertyValue("identifier", obj) != null) {
31
+ let matchValue;
32
+ const matchValue_1 = obj.TryGetPropertyValue("identifier");
33
+ if (matchValue_1 != null) {
34
+ const o = value_1(matchValue_1);
35
+ matchValue = ((typeof o === "string") ? o : undefined);
36
+ }
37
+ else {
38
+ matchValue = undefined;
39
+ }
40
+ if (matchValue == null) {
41
+ throw new Error(`Property '${"identifier"}' is set on this '${"Study"}' object but cannot be cast to '${"String"}'`);
42
+ }
43
+ else {
44
+ return matchValue;
45
+ }
46
+ }
47
+ else {
48
+ throw new Error(`No property '${"identifier"}' set on this '${"Study"}' object although it is mandatory. Was it created correctly?`);
49
+ }
50
+ }
51
+ static get getIdentifier() {
52
+ return (inv) => inv.GetIdentifier();
53
+ }
26
54
  }
27
55
 
28
56
  export function Study_$reflection() {
29
57
  return class_type("ARCtrl.ROCrate.Study", undefined, Study, Dataset_$reflection());
30
58
  }
31
59
 
32
- export function Study_$ctor_Z3E174868(id, identifier, about, citation, comment, creator, dateCreated, dateModified, datePublished, description, hasPart, headline, url) {
60
+ export function Study_$ctor_Z47833D48(id, identifier, about, citation, comment, creator, dateCreated, dateModified, datePublished, description, hasPart, headline, url) {
33
61
  return new Study(id, identifier, about, citation, comment, creator, dateCreated, dateModified, datePublished, description, hasPart, headline, url);
34
62
  }
35
63
 
@@ -0,0 +1,105 @@
1
+ import { DynamicObj_$reflection, DynamicObj } from "../fable_modules/DynamicObj.4.0.3/DynamicObj.fs.js";
2
+ import { class_type } from "../fable_modules/fable-library-js.4.22.0/Reflection.js";
3
+ import { value as value_1, unwrap } from "../fable_modules/fable-library-js.4.22.0/Option.js";
4
+
5
+ export class LDContext extends DynamicObj {
6
+ constructor() {
7
+ super();
8
+ }
9
+ }
10
+
11
+ export function LDContext_$reflection() {
12
+ return class_type("ARCtrl.ROCrate.LDContext", undefined, LDContext, DynamicObj_$reflection());
13
+ }
14
+
15
+ export function LDContext_$ctor() {
16
+ return new LDContext();
17
+ }
18
+
19
+ export class LDObject extends DynamicObj {
20
+ constructor(id, schemaType, additionalType) {
21
+ super();
22
+ this.id = id;
23
+ this["schemaType@22"] = schemaType;
24
+ this["additionalType@23"] = additionalType;
25
+ }
26
+ get Id() {
27
+ const this$ = this;
28
+ return this$.id;
29
+ }
30
+ get SchemaType() {
31
+ const this$ = this;
32
+ return this$["schemaType@22"];
33
+ }
34
+ set SchemaType(value) {
35
+ const this$ = this;
36
+ this$["schemaType@22"] = value;
37
+ }
38
+ get AdditionalType() {
39
+ const this$ = this;
40
+ return unwrap(this$["additionalType@23"]);
41
+ }
42
+ set AdditionalType(value) {
43
+ const this$ = this;
44
+ this$["additionalType@23"] = value;
45
+ }
46
+ SetContext(context) {
47
+ const this$ = this;
48
+ this$.SetProperty("@context", context);
49
+ }
50
+ static setContext(context) {
51
+ return (roc) => {
52
+ roc.SetContext(context);
53
+ };
54
+ }
55
+ TryGetContext() {
56
+ const this$ = this;
57
+ const matchValue = this$.TryGetPropertyValue("@context");
58
+ if (matchValue != null) {
59
+ const o = value_1(matchValue);
60
+ return (o instanceof DynamicObj) ? o : undefined;
61
+ }
62
+ else {
63
+ return undefined;
64
+ }
65
+ }
66
+ static tryGetContext() {
67
+ return (roc) => roc.TryGetContext();
68
+ }
69
+ RemoveContext() {
70
+ const this$ = this;
71
+ return this$.RemoveProperty("@context");
72
+ }
73
+ static removeContext() {
74
+ return (roc) => roc.RemoveContext();
75
+ }
76
+ get SchemaType() {
77
+ const this$ = this;
78
+ return this$["schemaType@22"];
79
+ }
80
+ set SchemaType(value) {
81
+ const this$ = this;
82
+ this$["schemaType@22"] = value;
83
+ }
84
+ get Id() {
85
+ const this$ = this;
86
+ return this$.id;
87
+ }
88
+ get AdditionalType() {
89
+ const this$ = this;
90
+ return unwrap(this$["additionalType@23"]);
91
+ }
92
+ set AdditionalType(value) {
93
+ const this$ = this;
94
+ this$["additionalType@23"] = value;
95
+ }
96
+ }
97
+
98
+ export function LDObject_$reflection() {
99
+ return class_type("ARCtrl.ROCrate.LDObject", undefined, LDObject, DynamicObj_$reflection());
100
+ }
101
+
102
+ export function LDObject_$ctor_Z2FC25A28(id, schemaType, additionalType) {
103
+ return new LDObject(id, schemaType, additionalType);
104
+ }
105
+
@@ -1,6 +1,6 @@
1
1
  import { iterateIndexed, length, sortBy, collect as collect_1, exists, toArray, ofArray, empty, tail, head, isEmpty, cons, singleton, fold, map, reverse } from "../../fable_modules/fable-library-js.4.22.0/List.js";
2
2
  import { item, map as map_1 } from "../../fable_modules/fable-library-js.4.22.0/Array.js";
3
- import { singleton as singleton_1, collect, map as map_2, delay, toArray as toArray_1, tryFind } from "../../fable_modules/fable-library-js.4.22.0/Seq.js";
3
+ import { fold as fold_1, singleton as singleton_1, collect, map as map_2, delay, toArray as toArray_1, tryFind } from "../../fable_modules/fable-library-js.4.22.0/Seq.js";
4
4
  import { toStringCellColumns, fixDeprecatedIOHeader, fromStringCellColumns } from "./CompositeColumn.js";
5
5
  import { printf, toFail } from "../../fable_modules/fable-library-js.4.22.0/String.js";
6
6
  import { Dictionary_tryGet, FsCellsCollection__TryGetCell_Z37302880 } from "../../fable_modules/FsSpreadsheet.6.3.0-alpha.4/Cells/FsCellsCollection.fs.js";
@@ -11,6 +11,7 @@ import { FsRangeBase__Cell_Z3407A44B, FsRangeBase__get_RangeAddress } from "../.
11
11
  import { ArcTable } from "../../Core/Table/ArcTable.js";
12
12
  import { FsWorksheet } from "../../fable_modules/FsSpreadsheet.6.3.0-alpha.4/FsWorksheet.fs.js";
13
13
  import { comparePrimitives } from "../../fable_modules/fable-library-js.4.22.0/Util.js";
14
+ import { max } from "../../fable_modules/fable-library-js.4.22.0/Double.js";
14
15
  import { addToDict } from "../../fable_modules/fable-library-js.4.22.0/MapUtil.js";
15
16
 
16
17
  /**
@@ -121,17 +122,19 @@ export function tryFromFsWorksheet(sheet) {
121
122
  export function toFsWorksheet(index, table) {
122
123
  const stringCount = new Map([]);
123
124
  const ws = new FsWorksheet(table.Name);
124
- if (table.Columns.length === 0) {
125
+ if (table.ColumnCount === 0) {
125
126
  return ws;
126
127
  }
127
128
  else {
128
129
  const columns = collect_1(toStringCellColumns, sortBy(classifyColumnOrder, ofArray(table.Columns), {
129
130
  Compare: comparePrimitives,
130
131
  }));
131
- const maxRow = length(head(columns)) | 0;
132
- const maxCol = length(columns) | 0;
132
+ let tableRowCount;
133
+ const maxRow = fold_1((acc, c) => max(acc, length(c)), 0, columns) | 0;
134
+ tableRowCount = ((maxRow === 1) ? 2 : maxRow);
135
+ const tableColumnCount = length(columns) | 0;
133
136
  const name = (index == null) ? "annotationTable" : (`${"annotationTable"}${index}`);
134
- const fsTable = ws.Table(name, FsRangeAddress_$ctor_7E77A4A0(FsAddress_$ctor_Z37302880(1, 1), FsAddress_$ctor_Z37302880(maxRow, maxCol)));
137
+ const fsTable = ws.Table(name, FsRangeAddress_$ctor_7E77A4A0(FsAddress_$ctor_Z37302880(1, 1), FsAddress_$ctor_Z37302880(tableRowCount, tableColumnCount)));
135
138
  iterateIndexed((colI, col) => {
136
139
  iterateIndexed((rowI, stringCell) => {
137
140
  let value;
@@ -9,13 +9,14 @@ import { createMissingIdentifier } from "../Core/Helper/Identifier.js";
9
9
  import { addToDict } from "../fable_modules/fable-library-js.4.22.0/MapUtil.js";
10
10
  import { List_distinct } from "../fable_modules/fable-library-js.4.22.0/Seq2.js";
11
11
  import { getEnumerator, stringHash } from "../fable_modules/fable-library-js.4.22.0/Util.js";
12
- import { tryPick, iterateIndexed, toList, delay, singleton, append, head, exists, map as map_1 } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
12
+ import { tryPick, iterateIndexed, tryFind, toList, delay, singleton, append, head, exists, map as map_1 } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
13
13
  import { Person_orcidKey } from "../Core/Conversion.js";
14
14
  import { toArray } from "../fable_modules/fable-library-js.4.22.0/Option.js";
15
15
  import { toRows as toRows_1, fromRows as fromRows_1 } from "./Metadata/Contacts.js";
16
16
  import { parse } from "../fable_modules/fable-library-js.4.22.0/Guid.js";
17
17
  import { Template, Organisation } from "../Core/Template.js";
18
18
  import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.3.0-alpha.4/FsWorksheet.fs.js";
19
+ import { printf, toConsole } from "../fable_modules/fable-library-js.4.22.0/String.js";
19
20
  import { toFsWorksheet, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
20
21
  import { now } from "../fable_modules/fable-library-js.4.22.0/Date.js";
21
22
  import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.3.0-alpha.4/FsWorkbook.fs.js";
@@ -269,6 +270,23 @@ export function Template_fromParts(templateInfo, ers, tags, authors, table, last
269
270
  return Template.make(id, table, templateInfo.Name, templateInfo.Description, organisation, templateInfo.Version, authors_1, repos, tags_1, lastUpdated);
270
271
  }
271
272
 
273
+ export function Template_isMetadataSheetName(name) {
274
+ if (name === "isa_template") {
275
+ return true;
276
+ }
277
+ else {
278
+ return name === "SwateTemplateMetadata";
279
+ }
280
+ }
281
+
282
+ export function Template_isMetadataSheet(sheet) {
283
+ return Template_isMetadataSheetName(sheet.Name);
284
+ }
285
+
286
+ export function Template_tryGetMetadataSheet(doc) {
287
+ return tryFind(Template_isMetadataSheet, doc.GetWorksheets());
288
+ }
289
+
272
290
  export function Template_toMetadataSheet(template) {
273
291
  const sheet = new FsWorksheet("isa_template");
274
292
  iterateIndexed((rowI, r) => {
@@ -293,39 +311,39 @@ export function Template_fromMetadataCollection(collection) {
293
311
  * Reads an assay from a spreadsheet
294
312
  */
295
313
  export function Template_fromFsWorkbook(doc) {
296
- let matchValue_2, matchValue_4, ws_3, matchValue_5, ws_2, matchValue_3;
314
+ let matchValue_1, matchValue_3, ws_3, matchValue_4, ws_2, matchValue_2;
297
315
  let patternInput;
298
- const matchValue = doc.TryGetWorksheetByName("isa_template");
316
+ const matchValue = Template_tryGetMetadataSheet(doc);
299
317
  if (matchValue == null) {
300
- const matchValue_1 = doc.TryGetWorksheetByName("SwateTemplateMetadata");
301
- patternInput = ((matchValue_1 == null) ? [Metadata_Template_TemplateInfo_get_empty(), empty(), empty(), empty()] : Template_fromMetadataSheet(matchValue_1));
318
+ toConsole(printf("Could not find metadata sheet with sheetname \"isa_template\" or deprecated sheetname \"Template\""));
319
+ patternInput = [Metadata_Template_TemplateInfo_get_empty(), empty(), empty(), empty()];
302
320
  }
303
321
  else {
304
322
  patternInput = Template_fromMetadataSheet(matchValue);
305
323
  }
306
324
  const templateInfo = patternInput[0];
307
325
  const sheets = doc.GetWorksheets();
308
- return Template_fromParts(templateInfo, patternInput[1], patternInput[2], patternInput[3], (matchValue_2 = tryPick((ws) => {
326
+ return Template_fromParts(templateInfo, patternInput[1], patternInput[2], patternInput[3], (matchValue_1 = tryPick((ws) => {
309
327
  if (exists((t) => (t.Name === templateInfo.Table), ws.Tables)) {
310
328
  return ws;
311
329
  }
312
330
  else {
313
331
  return undefined;
314
332
  }
315
- }, sheets), (matchValue_2 == null) ? ((matchValue_4 = tryPick((ws_1) => {
333
+ }, sheets), (matchValue_1 == null) ? ((matchValue_3 = tryPick((ws_1) => {
316
334
  if (ws_1.Name === templateInfo.Table) {
317
335
  return ws_1;
318
336
  }
319
337
  else {
320
338
  return undefined;
321
339
  }
322
- }, sheets), (matchValue_4 == null) ? (() => {
340
+ }, sheets), (matchValue_3 == null) ? (() => {
323
341
  throw new TemplateReadError(`No worksheet or table with name \`${templateInfo.Table}\` found`);
324
- })() : ((ws_3 = matchValue_4, (matchValue_5 = tryFromFsWorksheet(ws_3), (matchValue_5 == null) ? (() => {
342
+ })() : ((ws_3 = matchValue_3, (matchValue_4 = tryFromFsWorksheet(ws_3), (matchValue_4 == null) ? (() => {
325
343
  throw new TemplateReadError(`Ws with name \`${ws_3.Name}\` could not be converted to a table`);
326
- })() : matchValue_5))))) : ((ws_2 = matchValue_2, (matchValue_3 = tryFromFsWorksheet(ws_2), (matchValue_3 == null) ? (() => {
344
+ })() : matchValue_4))))) : ((ws_2 = matchValue_1, (matchValue_2 = tryFromFsWorksheet(ws_2), (matchValue_2 == null) ? (() => {
327
345
  throw new TemplateReadError(`Ws with name \`${ws_2.Name}\` could not be converted to a table`);
328
- })() : matchValue_3)))), now());
346
+ })() : matchValue_2)))), now());
329
347
  }
330
348
 
331
349
  export function Template_toFsWorkbook(template) {
@@ -1,15 +1,15 @@
1
1
  import { ofArray, choose } from "../fable_modules/fable-library-js.4.22.0/List.js";
2
2
  import { equals } from "../fable_modules/fable-library-js.4.22.0/Util.js";
3
- import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
4
- import { tryInclude, string } from "../fable_modules/YAMLicious.0.0.1/Encode.fs.js";
3
+ import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js";
4
+ import { tryInclude, string } from "../fable_modules/YAMLicious.0.0.3/Encode.fs.js";
5
5
  import { singleton, collect, delay, toList } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
6
- import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
7
- import { string as string_1, object } from "../fable_modules/YAMLicious.0.0.1/Decode.fs.js";
6
+ import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js";
7
+ import { string as string_1, object } from "../fable_modules/YAMLicious.0.0.3/Decode.fs.js";
8
8
  import { ValidationPackage } from "../ValidationPackages/ValidationPackage.js";
9
9
  import { unwrap } from "../fable_modules/fable-library-js.4.22.0/Option.js";
10
- import { read } from "../fable_modules/YAMLicious.0.0.1/Reader.fs.js";
10
+ import { read } from "../fable_modules/YAMLicious.0.0.3/Reader.fs.js";
11
11
  import { defaultWhitespace } from "./Encode.js";
12
- import { write } from "../fable_modules/YAMLicious.0.0.1/Writer.fs.js";
12
+ import { write } from "../fable_modules/YAMLicious.0.0.3/Writer.fs.js";
13
13
 
14
14
  export function ValidationPackage_encoder(validationpackage) {
15
15
  const objSeq = choose((tupledArg) => {
@@ -1,16 +1,16 @@
1
1
  import { ofArray, choose } from "../fable_modules/fable-library-js.4.22.0/List.js";
2
2
  import { equals } from "../fable_modules/fable-library-js.4.22.0/Util.js";
3
- import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
4
- import { resizearray, string, tryInclude } from "../fable_modules/YAMLicious.0.0.1/Encode.fs.js";
3
+ import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js";
4
+ import { resizearray, string, tryInclude } from "../fable_modules/YAMLicious.0.0.3/Encode.fs.js";
5
5
  import { ValidationPackage_decoder, ValidationPackage_encoder } from "./ValidationPackage.js";
6
6
  import { singleton, collect, delay, toList } from "../fable_modules/fable-library-js.4.22.0/Seq.js";
7
- import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
8
- import { string as string_1, resizearray as resizearray_1, object } from "../fable_modules/YAMLicious.0.0.1/Decode.fs.js";
7
+ import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.3/YAMLiciousTypes.fs.js";
8
+ import { string as string_1, resizearray as resizearray_1, object } from "../fable_modules/YAMLicious.0.0.3/Decode.fs.js";
9
9
  import { ValidationPackagesConfig } from "../ValidationPackages/ValidationPackagesConfig.js";
10
10
  import { unwrap } from "../fable_modules/fable-library-js.4.22.0/Option.js";
11
- import { read } from "../fable_modules/YAMLicious.0.0.1/Reader.fs.js";
11
+ import { read } from "../fable_modules/YAMLicious.0.0.3/Reader.fs.js";
12
12
  import { defaultWhitespace } from "./Encode.js";
13
- import { write } from "../fable_modules/YAMLicious.0.0.1/Writer.fs.js";
13
+ import { write } from "../fable_modules/YAMLicious.0.0.3/Writer.fs.js";
14
14
 
15
15
  export function ValidationPackagesConfig_encoder(validationpackage) {
16
16
  const objSeq = choose((tupledArg) => {
@@ -95,7 +95,7 @@ module DynObj =
95
95
  /// <param name="propertyValue">The value of the property to set</param>
96
96
  /// <param name="dynObj">The DynamicObj to set the property on</param>
97
97
  /// <remarks>This function mutates the input DynamicObj</remarks>
98
- let withProperty (propertyName:string) (propertyValue:'TPropertyValue) (dynObj: DynamicObj) =
98
+ let inline withProperty (propertyName:string) (propertyValue:'TPropertyValue) (dynObj: #DynamicObj) =
99
99
  setProperty propertyName propertyValue dynObj
100
100
  dynObj
101
101
 
@@ -120,7 +120,7 @@ module DynObj =
120
120
  /// <param name="propertyValue">The value of the property to set</param>
121
121
  /// <param name="dynObj">The DynamicObj to set the property on</param>
122
122
  /// <remarks>This function mutates the input DynamicObj</remarks>
123
- let withOptionalProperty (propertyName: string) (propertyValue: 'TPropertyValue option) (dynObj: DynamicObj) =
123
+ let inline withOptionalProperty (propertyName: string) (propertyValue: 'TPropertyValue option) (dynObj: #DynamicObj) =
124
124
  match propertyValue with
125
125
  | Some pv -> dynObj |> withProperty propertyName pv
126
126
  | None -> dynObj
@@ -148,7 +148,7 @@ module DynObj =
148
148
  /// <param name="mapping">A function to apply to the property value before setting it on the DynamicObj</param>
149
149
  /// <param name="dynObj">The DynamicObj to set the property on</param>
150
150
  /// <remarks>This function mutates the input DynamicObj</remarks>
151
- let withOptionalPropertyBy (propertyName: string) (propertyValue: 'TPropertyValue option) (mapping: 'TPropertyValue -> 'UPropertyValue) (dynObj: DynamicObj) =
151
+ let inline withOptionalPropertyBy (propertyName: string) (propertyValue: 'TPropertyValue option) (mapping: 'TPropertyValue -> 'UPropertyValue) (dynObj: #DynamicObj) =
152
152
  match propertyValue with
153
153
  | Some pv -> dynObj |> withProperty propertyName (mapping pv)
154
154
  | None -> dynObj
@@ -182,7 +182,7 @@ module DynObj =
182
182
  /// <param name="dynObj">The DynamicObj to remove the property from</param>
183
183
  /// <remarks>This function mutates the input DynamicObj</remarks>
184
184
  /// <exception cref="System.MemberAccessException">Thrown if the dynamic property does not exist</exception>
185
- let withoutProperty(propertyName: string) (dynObj: DynamicObj) =
185
+ let inline withoutProperty(propertyName: string) (dynObj: #DynamicObj) =
186
186
  dynObj |> removeProperty propertyName
187
187
  dynObj
188
188
 
@@ -75,14 +75,6 @@ export function setProperty(propertyName, propertyValue, dynObj) {
75
75
  dynObj.SetProperty(propertyName, propertyValue);
76
76
  }
77
77
 
78
- /**
79
- * Sets the dynamic (or static) property value with the given name, creating a new dynamic property if none exists on the given DynamicObj and returns it.
80
- */
81
- export function withProperty(propertyName, propertyValue, dynObj) {
82
- setProperty(propertyName, propertyValue, dynObj);
83
- return dynObj;
84
- }
85
-
86
78
  /**
87
79
  * Sets the dynamic (or static) property value with the given name on the given DynamicObj if the value is Some('TPropertyValue), creating a new dynamic property if none exists.
88
80
  * If the given propertyValue is None, does nothing to the input DynamicObj.
@@ -95,19 +87,6 @@ export function setOptionalProperty(propertyName, propertyValue, dynObj) {
95
87
  }
96
88
  }
97
89
 
98
- /**
99
- * Sets the dynamic (or static) property value with the given name on the given DynamicObj if the value is Some('TPropertyValue), creating a new dynamic property if none exists, and returns it.
100
- * If the given propertyValue is None, does nothing to the input DynamicObj.
101
- */
102
- export function withOptionalProperty(propertyName, propertyValue, dynObj) {
103
- if (propertyValue == null) {
104
- return dynObj;
105
- }
106
- else {
107
- return withProperty(propertyName, value_1(propertyValue), dynObj);
108
- }
109
- }
110
-
111
90
  /**
112
91
  * Sets the given dynamic (or static) property with the result of a mapping function applied to the given property value on the given DynamicObj if the value is Some('TPropertyValue).
113
92
  * If the given propertyValue is None, does nothing to the input DynamicObj.
@@ -120,19 +99,6 @@ export function setOptionalPropertyBy(propertyName, propertyValue, mapping, dynO
120
99
  }
121
100
  }
122
101
 
123
- /**
124
- * Sets the given dynamic (or static) property with the result of a mapping function applied to the given property value on the given DynamicObj if the value is Some('TPropertyValue) and returns it.
125
- * If the given propertyValue is None, returns the unchanged DynamicObj.
126
- */
127
- export function withOptionalPropertyBy(propertyName, propertyValue, mapping, dynObj) {
128
- if (propertyValue == null) {
129
- return dynObj;
130
- }
131
- else {
132
- return withProperty(propertyName, mapping(value_1(propertyValue)), dynObj);
133
- }
134
- }
135
-
136
102
  /**
137
103
  * Returns Some(boxed property value) if a dynamic (or static) property with the given name exists on the input, otherwise None.
138
104
  */
@@ -149,16 +115,6 @@ export function removeProperty(propertyName, dynObj) {
149
115
  dynObj.RemoveProperty(propertyName);
150
116
  }
151
117
 
152
- /**
153
- * Removes any dynamic property with the given name from the input DynamicObj and returns it.
154
- * If the property is static and mutable, it will be set to null.
155
- * Static immutable properties cannot be removed.
156
- */
157
- export function withoutProperty(propertyName, dynObj) {
158
- removeProperty(propertyName, dynObj);
159
- return dynObj;
160
- }
161
-
162
118
  /**
163
119
  * Returns a formatted string containing all static and dynamic properties of the given DynamicObj
164
120
  */
@@ -15,7 +15,10 @@ let hashDateTime (dt : System.DateTime) : int =
15
15
 
16
16
 
17
17
  let hash obj =
18
- obj.GetHashCode()
18
+ if obj = null then
19
+ 0
20
+ else
21
+ obj.GetHashCode()
19
22
 
20
23
  let boxHashOption (a: 'a option) : obj =
21
24
  if a.IsSome then a.Value.GetHashCode() else (0).GetHashCode()
@@ -1,5 +1,5 @@
1
1
  import { second, minute, hour, day, month, year } from "../fable-library-js.4.22.0/Date.js";
2
- import { numberHash, identityHash } from "../fable-library-js.4.22.0/Util.js";
2
+ import { numberHash, identityHash, defaultOf, equals } from "../fable-library-js.4.22.0/Util.js";
3
3
  import { value as value_1 } from "../fable-library-js.4.22.0/Option.js";
4
4
  import { fold } from "../fable-library-js.4.22.0/Array.js";
5
5
  import { fold as fold_1 } from "../fable-library-js.4.22.0/Seq.js";
@@ -20,8 +20,13 @@ export function hashDateTime(dt) {
20
20
  }
21
21
 
22
22
  export function hash(obj) {
23
- let copyOfStruct = obj;
24
- return identityHash(copyOfStruct) | 0;
23
+ if (equals(obj, defaultOf())) {
24
+ return 0;
25
+ }
26
+ else {
27
+ let copyOfStruct = obj;
28
+ return identityHash(copyOfStruct) | 0;
29
+ }
25
30
  }
26
31
 
27
32
  export function boxHashOption(a) {
@@ -11,7 +11,7 @@ open System.Reflection
11
11
  [<assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")>]
12
12
  [<assembly: System.Reflection.AssemblyDescriptionAttribute("F# library supporting Dynamic Objects including inheritance in functional style. Compatible with Fable javascript and python transpilation.")>]
13
13
  [<assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")>]
14
- [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+1d5799f222ea3f1f0885bc3e0efcee4fd0473a4c")>]
14
+ [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+36c543f1c23ec27364ae79a3905daa1ac18c8887")>]
15
15
  [<assembly: System.Reflection.AssemblyProductAttribute("DynamicObj")>]
16
16
  [<assembly: System.Reflection.AssemblyTitleAttribute("DynamicObj")>]
17
17
  [<assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")>]
@@ -10,10 +10,10 @@ open System.Reflection
10
10
  [<assembly: System.Reflection.AssemblyCompanyAttribute("Timo Mühlhaus, Kevin Schneider, Heinrich Lukas Weil, F# open source contributors")>]
11
11
  [<assembly: System.Reflection.AssemblyConfigurationAttribute("Release")>]
12
12
  [<assembly: System.Reflection.AssemblyDescriptionAttribute("F# library supporting Dynamic Objects including inheritance in functional style. Compatible with Fable javascript and python transpilation.")>]
13
- [<assembly: System.Reflection.AssemblyFileVersionAttribute("4.0.0.0")>]
14
- [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("4.0.0+1d5799f222ea3f1f0885bc3e0efcee4fd0473a4c")>]
13
+ [<assembly: System.Reflection.AssemblyFileVersionAttribute("4.0.3.0")>]
14
+ [<assembly: System.Reflection.AssemblyInformationalVersionAttribute("4.0.3+36c543f1c23ec27364ae79a3905daa1ac18c8887")>]
15
15
  [<assembly: System.Reflection.AssemblyProductAttribute("DynamicObj")>]
16
16
  [<assembly: System.Reflection.AssemblyTitleAttribute("DynamicObj")>]
17
- [<assembly: System.Reflection.AssemblyVersionAttribute("4.0.0.0")>]
17
+ [<assembly: System.Reflection.AssemblyVersionAttribute("4.0.3.0")>]
18
18
  [<assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/CSBiology/DynamicObj")>]
19
19
  do()