@nfdi4plants/arctrl 2.0.0-beta.8 → 2.0.1

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.
@@ -10,17 +10,17 @@ import { Option_fromValueWithDefault, ResizeArray_iter } from "../Core/Helper/Co
10
10
  import { List_distinctBy, List_distinct } from "../fable_modules/fable-library-js.4.16.0/Seq2.js";
11
11
  import { comparePrimitives, getEnumerator, stringHash } from "../fable_modules/fable-library-js.4.16.0/Util.js";
12
12
  import { ArcStudy, ArcInvestigation } from "../Core/ArcTypes.js";
13
- import { toRows as toRows_1, fromRows as fromRows_1 } from "./Metadata/OntologySourceReference.js";
14
- import { toRows as toRows_2, fromRows as fromRows_2 } from "./Metadata/Publication.js";
15
- import { toRows as toRows_3, fromRows as fromRows_3 } from "./Metadata/Contacts.js";
16
- import { toRows as toRows_4, fromRows as fromRows_4 } from "./Metadata/Study.js";
17
- import { iterateIndexed, map as map_1, toList, collect, singleton, append as append_1, delay } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
13
+ import { toRows, fromRows } from "./Metadata/OntologySourceReference.js";
14
+ import { toRows as toRows_1, fromRows as fromRows_1 } from "./Metadata/Publication.js";
15
+ import { toRows as toRows_2, fromRows as fromRows_2 } from "./Metadata/Contacts.js";
16
+ import { toRows as toRows_3, fromRows as fromRows_3 } from "./Metadata/Study.js";
17
+ import { iterateIndexed, map as map_1, tryFind as tryFind_1, toList, collect, singleton, append as append_1, delay } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
18
18
  import { tryFind, ofList } from "../fable_modules/fable-library-js.4.16.0/Map.js";
19
19
  import { printf, toFail } from "../fable_modules/fable-library-js.4.16.0/String.js";
20
20
  import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorksheet.fs.js";
21
21
  import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorkbook.fs.js";
22
22
 
23
- export class InvestigationInfo extends Record {
23
+ export class ArcInvestigation_InvestigationInfo extends Record {
24
24
  constructor(Identifier, Title, Description, SubmissionDate, PublicReleaseDate, Comments) {
25
25
  super();
26
26
  this.Identifier = Identifier;
@@ -32,25 +32,25 @@ export class InvestigationInfo extends Record {
32
32
  }
33
33
  }
34
34
 
35
- export function InvestigationInfo_$reflection() {
36
- return record_type("ARCtrl.Spreadsheet.ArcInvestigation.InvestigationInfo", [], InvestigationInfo, () => [["Identifier", string_type], ["Title", string_type], ["Description", string_type], ["SubmissionDate", string_type], ["PublicReleaseDate", string_type], ["Comments", list_type(Comment$_$reflection())]]);
35
+ export function ArcInvestigation_InvestigationInfo_$reflection() {
36
+ return record_type("ARCtrl.Spreadsheet.ArcInvestigation.InvestigationInfo", [], ArcInvestigation_InvestigationInfo, () => [["Identifier", string_type], ["Title", string_type], ["Description", string_type], ["SubmissionDate", string_type], ["PublicReleaseDate", string_type], ["Comments", list_type(Comment$_$reflection())]]);
37
37
  }
38
38
 
39
- export function InvestigationInfo_create(identifier, title, description, submissionDate, publicReleaseDate, comments) {
40
- return new InvestigationInfo(identifier, title, description, submissionDate, publicReleaseDate, comments);
39
+ export function ArcInvestigation_InvestigationInfo_create(identifier, title, description, submissionDate, publicReleaseDate, comments) {
40
+ return new ArcInvestigation_InvestigationInfo(identifier, title, description, submissionDate, publicReleaseDate, comments);
41
41
  }
42
42
 
43
- export function InvestigationInfo_get_Labels() {
43
+ export function ArcInvestigation_InvestigationInfo_get_Labels() {
44
44
  return ofArray(["Investigation Identifier", "Investigation Title", "Investigation Description", "Investigation Submission Date", "Investigation Public Release Date"]);
45
45
  }
46
46
 
47
- export function InvestigationInfo_FromSparseTable_3ECCA699(matrix) {
47
+ export function ArcInvestigation_InvestigationInfo_FromSparseTable_3ECCA699(matrix) {
48
48
  const comments = map((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, 0])), matrix.CommentKeys);
49
- return InvestigationInfo_create(SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Identifier", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Title", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Description", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Submission Date", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Public Release Date", 0]), comments);
49
+ return ArcInvestigation_InvestigationInfo_create(SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Identifier", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Title", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Description", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Submission Date", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Investigation Public Release Date", 0]), comments);
50
50
  }
51
51
 
52
- export function InvestigationInfo_ToSparseTable_Z720BD3FF(investigation) {
53
- const matrix = SparseTable_Create_Z2192E64B(void 0, InvestigationInfo_get_Labels(), void 0, 2);
52
+ export function ArcInvestigation_InvestigationInfo_ToSparseTable_Z720BD3FF(investigation) {
53
+ const matrix = SparseTable_Create_Z2192E64B(void 0, ArcInvestigation_InvestigationInfo_get_Labels(), void 0, 2);
54
54
  let commentKeys = empty();
55
55
  addToDict(matrix.Matrix, ["Investigation Identifier", 1], investigation.Identifier);
56
56
  addToDict(matrix.Matrix, ["Investigation Title", 1], defaultArg(investigation.Title, ""));
@@ -69,16 +69,16 @@ export function InvestigationInfo_ToSparseTable_Z720BD3FF(investigation) {
69
69
  })), matrix.ColumnCount);
70
70
  }
71
71
 
72
- export function InvestigationInfo_fromRows(lineNumber, rows) {
73
- const tupledArg = SparseTable_FromRows_Z5579EC29(rows, InvestigationInfo_get_Labels(), lineNumber);
74
- return [tupledArg[0], tupledArg[1], tupledArg[2], InvestigationInfo_FromSparseTable_3ECCA699(tupledArg[3])];
72
+ export function ArcInvestigation_InvestigationInfo_fromRows(lineNumber, rows) {
73
+ const tupledArg = SparseTable_FromRows_Z5579EC29(rows, ArcInvestigation_InvestigationInfo_get_Labels(), lineNumber);
74
+ return [tupledArg[0], tupledArg[1], tupledArg[2], ArcInvestigation_InvestigationInfo_FromSparseTable_3ECCA699(tupledArg[3])];
75
75
  }
76
76
 
77
- export function InvestigationInfo_toRows_Z720BD3FF(investigation) {
78
- return SparseTable_ToRows_759CAFC1(InvestigationInfo_ToSparseTable_Z720BD3FF(investigation));
77
+ export function ArcInvestigation_InvestigationInfo_toRows_Z720BD3FF(investigation) {
78
+ return SparseTable_ToRows_759CAFC1(ArcInvestigation_InvestigationInfo_ToSparseTable_Z720BD3FF(investigation));
79
79
  }
80
80
 
81
- export function fromParts(investigationInfo, ontologySourceReference, publications, contacts, studies, assays, remarks) {
81
+ export function ArcInvestigation_fromParts(investigationInfo, ontologySourceReference, publications, contacts, studies, assays, remarks) {
82
82
  const studyIdentifiers = map((s) => s.Identifier, studies);
83
83
  const title = Option_fromValueWithDefault("", investigationInfo.Title);
84
84
  const description = Option_fromValueWithDefault("", investigationInfo.Description);
@@ -95,9 +95,9 @@ export function fromParts(investigationInfo, ontologySourceReference, publicatio
95
95
  return ArcInvestigation.make(investigationInfo.Identifier, title, description, submissionDate, publicReleaseDate, ontologySourceReferences, publications_1, contacts_1, assays_1, studies_1, registeredStudyIdentifiers, comments, remarks_1);
96
96
  }
97
97
 
98
- export function fromRows(rows) {
98
+ export function ArcInvestigation_fromRows(rows) {
99
99
  const en = getEnumerator(rows);
100
- const emptyInvestigationInfo = InvestigationInfo_create("", "", "", "", "", empty());
100
+ const emptyInvestigationInfo = ArcInvestigation_InvestigationInfo_create("", "", "", "", "", empty());
101
101
  const loop = (lastLine_mut, ontologySourceReferences_mut, investigationInfo_mut, publications_mut, contacts_mut, studies_mut, remarks_mut, lineNumber_mut) => {
102
102
  loop:
103
103
  while (true) {
@@ -142,7 +142,7 @@ export function fromRows(rows) {
142
142
  }
143
143
  switch (matchResult) {
144
144
  case 0: {
145
- const patternInput = fromRows_1(lineNumber + 1, en);
145
+ const patternInput = fromRows(lineNumber + 1, en);
146
146
  lastLine_mut = patternInput[0];
147
147
  ontologySourceReferences_mut = patternInput[3];
148
148
  investigationInfo_mut = investigationInfo;
@@ -154,7 +154,7 @@ export function fromRows(rows) {
154
154
  continue loop;
155
155
  }
156
156
  case 1: {
157
- const patternInput_1 = InvestigationInfo_fromRows(lineNumber + 1, en);
157
+ const patternInput_1 = ArcInvestigation_InvestigationInfo_fromRows(lineNumber + 1, en);
158
158
  lastLine_mut = patternInput_1[0];
159
159
  ontologySourceReferences_mut = ontologySourceReferences;
160
160
  investigationInfo_mut = patternInput_1[3];
@@ -166,7 +166,7 @@ export function fromRows(rows) {
166
166
  continue loop;
167
167
  }
168
168
  case 2: {
169
- const patternInput_2 = fromRows_2("Investigation Publication", lineNumber + 1, en);
169
+ const patternInput_2 = fromRows_1("Investigation Publication", lineNumber + 1, en);
170
170
  lastLine_mut = patternInput_2[0];
171
171
  ontologySourceReferences_mut = ontologySourceReferences;
172
172
  investigationInfo_mut = investigationInfo;
@@ -178,7 +178,7 @@ export function fromRows(rows) {
178
178
  continue loop;
179
179
  }
180
180
  case 3: {
181
- const patternInput_3 = fromRows_3("Investigation Person", lineNumber + 1, en);
181
+ const patternInput_3 = fromRows_2("Investigation Person", lineNumber + 1, en);
182
182
  lastLine_mut = patternInput_3[0];
183
183
  ontologySourceReferences_mut = ontologySourceReferences;
184
184
  investigationInfo_mut = investigationInfo;
@@ -190,7 +190,7 @@ export function fromRows(rows) {
190
190
  continue loop;
191
191
  }
192
192
  case 4: {
193
- const patternInput_4 = fromRows_4(lineNumber + 1, en);
193
+ const patternInput_4 = fromRows_3(lineNumber + 1, en);
194
194
  const study = patternInput_4[3];
195
195
  const newRemarks_4 = patternInput_4[2];
196
196
  const lineNumber_6 = patternInput_4[1] | 0;
@@ -225,7 +225,7 @@ export function fromRows(rows) {
225
225
  Equals: (x, y) => (x === y),
226
226
  GetHashCode: stringHash,
227
227
  })];
228
- return fromParts(investigationInfo, ontologySourceReferences, publications, contacts, patternInput_5[0], patternInput_5[1], remarks);
228
+ return ArcInvestigation_fromParts(investigationInfo, ontologySourceReferences, publications, contacts, patternInput_5[0], patternInput_5[1], remarks);
229
229
  }
230
230
  }
231
231
  break;
@@ -239,11 +239,11 @@ export function fromRows(rows) {
239
239
  }
240
240
  }
241
241
 
242
- export function toRows(investigation) {
242
+ export function ArcInvestigation_toRows(investigation) {
243
243
  let remarks, rows;
244
- return (remarks = ofSeq(investigation.Remarks), (rows = delay(() => append_1(singleton(SparseRowModule_fromValues(["ONTOLOGY SOURCE REFERENCE"])), delay(() => append_1(toRows_1(ofSeq(investigation.OntologySourceReferences)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION"])), delay(() => append_1(InvestigationInfo_toRows_Z720BD3FF(investigation), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION PUBLICATIONS"])), delay(() => append_1(toRows_2("Investigation Publication", ofSeq(investigation.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION CONTACTS"])), delay(() => append_1(toRows_3("Investigation Person", ofSeq(investigation.Contacts)), delay(() => collect((studyIdentifier) => {
244
+ return (remarks = ofSeq(investigation.Remarks), (rows = delay(() => append_1(singleton(SparseRowModule_fromValues(["ONTOLOGY SOURCE REFERENCE"])), delay(() => append_1(toRows(ofSeq(investigation.OntologySourceReferences)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION"])), delay(() => append_1(ArcInvestigation_InvestigationInfo_toRows_Z720BD3FF(investigation), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION PUBLICATIONS"])), delay(() => append_1(toRows_1("Investigation Publication", ofSeq(investigation.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["INVESTIGATION CONTACTS"])), delay(() => append_1(toRows_2("Investigation Person", ofSeq(investigation.Contacts)), delay(() => collect((studyIdentifier) => {
245
245
  const study = defaultArg(investigation.TryGetStudy(studyIdentifier), new ArcStudy(studyIdentifier));
246
- return append_1(singleton(SparseRowModule_fromValues(["STUDY"])), delay(() => toRows_4(study, void 0)));
246
+ return append_1(singleton(SparseRowModule_fromValues(["STUDY"])), delay(() => toRows_3(study, void 0)));
247
247
  }, investigation.RegisteredStudyIdentifiers)))))))))))))))))), (() => {
248
248
  try {
249
249
  const rm = ofList(map((remark) => Remark.toTuple(remark), remarks), {
@@ -283,12 +283,29 @@ export function toRows(investigation) {
283
283
  })()));
284
284
  }
285
285
 
286
- export function fromFsWorkbook(doc) {
287
- let sheet_2, matchValue, matchValue_1;
286
+ export function ArcInvestigation_isMetadataSheetName(name) {
287
+ if (name === "isa_investigation") {
288
+ return true;
289
+ }
290
+ else {
291
+ return name === "Investigation";
292
+ }
293
+ }
294
+
295
+ export function ArcInvestigation_isMetadataSheet(sheet) {
296
+ return ArcInvestigation_isMetadataSheetName(sheet.Name);
297
+ }
298
+
299
+ export function ArcInvestigation_tryGetMetadataSheet(doc) {
300
+ return tryFind_1(ArcInvestigation_isMetadataSheet, doc.GetWorksheets());
301
+ }
302
+
303
+ export function ARCtrl_ArcInvestigation__ArcInvestigation_fromFsWorkbook_Static_32154C9D(doc) {
304
+ let sheet_1, matchValue;
288
305
  try {
289
- return fromRows(map_1(SparseRowModule_fromFsRow, (sheet_2 = ((matchValue = doc.TryGetWorksheetByName("isa_investigation"), (matchValue == null) ? ((matchValue_1 = doc.TryGetWorksheetByName("Investigation"), (matchValue_1 == null) ? (() => {
306
+ return ArcInvestigation_fromRows(map_1(SparseRowModule_fromFsRow, (sheet_1 = ((matchValue = ArcInvestigation_tryGetMetadataSheet(doc), (matchValue == null) ? (() => {
290
307
  throw new Error("Could not find metadata sheet with sheetname \"isa_investigation\" or deprecated sheetname \"Investigation\"");
291
- })() : matchValue_1)) : matchValue)), FsWorksheet.getRows(sheet_2))));
308
+ })() : matchValue)), FsWorksheet.getRows(sheet_1))));
292
309
  }
293
310
  catch (err) {
294
311
  const arg = err.message;
@@ -296,13 +313,13 @@ export function fromFsWorkbook(doc) {
296
313
  }
297
314
  }
298
315
 
299
- export function toFsWorkbook(investigation) {
316
+ export function ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(investigation) {
300
317
  try {
301
318
  const wb = new FsWorkbook();
302
319
  const sheet = new FsWorksheet("isa_investigation");
303
320
  iterateIndexed((rowI, r) => {
304
321
  SparseRowModule_writeToSheet(rowI + 1, r, sheet);
305
- }, toRows(investigation));
322
+ }, ArcInvestigation_toRows(investigation));
306
323
  wb.AddWorksheet(sheet);
307
324
  return wb;
308
325
  }
@@ -312,3 +329,7 @@ export function toFsWorkbook(investigation) {
312
329
  }
313
330
  }
314
331
 
332
+ export function ARCtrl_ArcInvestigation__ArcInvestigation_ToFsWorkbook(this$) {
333
+ return ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(this$);
334
+ }
335
+
@@ -1,14 +1,14 @@
1
1
  import { FsWorksheet } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorksheet.fs.js";
2
- import { iterate, tryPick, map, append, iterateIndexed } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
2
+ import { iterate, tryPick, tryFind, map, append, iterateIndexed } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
3
3
  import { SparseRowModule_fromFsRow, SparseRowModule_fromValues, SparseRowModule_writeToSheet } from "./Metadata/SparseTable.js";
4
4
  import { fromRows as fromRows_1, toRows } from "./Metadata/Study.js";
5
5
  import { toConsole, printf, toFail } from "../fable_modules/fable-library-js.4.16.0/String.js";
6
- import { toArray, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
6
+ import { unwrap, toArray, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
7
7
  import { getEnumerator } from "../fable_modules/fable-library-js.4.16.0/Util.js";
8
8
  import { ArcStudy } from "../Core/ArcTypes.js";
9
9
  import { createMissingIdentifier } from "../Core/Helper/Identifier.js";
10
10
  import { empty } from "../fable_modules/fable-library-js.4.16.0/List.js";
11
- import { ResizeArray_iter, ResizeArray_isEmpty, ResizeArray_choose } from "../Core/Helper/Collections.js";
11
+ import { ResizeArray_isEmpty, ResizeArray_choose } from "../Core/Helper/Collections.js";
12
12
  import { toFsWorksheet as toFsWorksheet_1, tryFromFsWorksheet } from "./AnnotationTable/ArcTable.js";
13
13
  import { toFsWorksheet, tryFromFsWorksheet as tryFromFsWorksheet_1 } from "./DataMapTable/DataMapTable.js";
14
14
  import { FsWorkbook } from "../fable_modules/FsSpreadsheet.6.2.0/FsWorkbook.fs.js";
@@ -33,22 +33,33 @@ export function ArcStudy_fromMetadataSheet(sheet) {
33
33
  }
34
34
  }
35
35
 
36
+ export function ArcStudy_isMetadataSheetName(name) {
37
+ if (name === "isa_study") {
38
+ return true;
39
+ }
40
+ else {
41
+ return name === "Study";
42
+ }
43
+ }
44
+
45
+ export function ArcStudy_isMetadataSheet(sheet) {
46
+ return ArcStudy_isMetadataSheetName(sheet.Name);
47
+ }
48
+
49
+ export function ArcStudy_tryGetMetadataSheet(doc) {
50
+ return tryFind(ArcStudy_isMetadataSheet, doc.GetWorksheets());
51
+ }
52
+
36
53
  /**
37
54
  * Reads an assay from a spreadsheet
38
55
  */
39
56
  export function ARCtrl_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D(doc) {
40
57
  try {
41
58
  let patternInput;
42
- const matchValue = doc.TryGetWorksheetByName("isa_study");
59
+ const matchValue = ArcStudy_tryGetMetadataSheet(doc);
43
60
  if (matchValue == null) {
44
- const matchValue_1 = doc.TryGetWorksheetByName("Study");
45
- if (matchValue_1 == null) {
46
- toConsole(printf("Cannot retrieve metadata: Study file does not contain \"%s\" or \"%s\" sheet."))("isa_study")("Study");
47
- patternInput = [ArcStudy.create(createMissingIdentifier()), empty()];
48
- }
49
- else {
50
- patternInput = ArcStudy_fromMetadataSheet(matchValue_1);
51
- }
61
+ toConsole(printf("Cannot retrieve metadata: Study file does not contain \"%s\" or \"%s\" sheet."))("isa_study")("Study");
62
+ patternInput = [ArcStudy.create(createMissingIdentifier()), empty()];
52
63
  }
53
64
  else {
54
65
  patternInput = ArcStudy_fromMetadataSheet(matchValue);
@@ -77,18 +88,22 @@ export function ARCtrl_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D(doc) {
77
88
  export function ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522(study, assays, datamapSheet) {
78
89
  const datamapSheet_1 = defaultArg(datamapSheet, true);
79
90
  const doc = new FsWorkbook();
80
- const metaDataSheet = ArcStudy_toMetadataSheet(study, assays);
81
- doc.AddWorksheet(metaDataSheet);
91
+ const metadataSheet = ArcStudy_toMetadataSheet(study, assays);
92
+ doc.AddWorksheet(metadataSheet);
82
93
  if (datamapSheet_1) {
83
94
  iterate((arg) => {
84
95
  const sheet = toFsWorksheet(arg);
85
96
  doc.AddWorksheet(sheet);
86
97
  }, toArray(study.DataMap));
87
98
  }
88
- ResizeArray_iter((arg_1) => {
89
- const sheet_1 = toFsWorksheet_1(arg_1);
99
+ iterateIndexed((i, arg_1) => {
100
+ const sheet_1 = toFsWorksheet_1(i, arg_1);
90
101
  doc.AddWorksheet(sheet_1);
91
102
  }, study.Tables);
92
103
  return doc;
93
104
  }
94
105
 
106
+ export function ARCtrl_ArcStudy__ArcStudy_ToFsWorkbook_257FC1F0(this$, assays, datamapSheet) {
107
+ return ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522(this$, unwrap(assays), unwrap(datamapSheet));
108
+ }
109
+
@@ -324,7 +324,7 @@ export function Template_toFsWorkbook(template) {
324
324
  const doc = new FsWorkbook();
325
325
  const metaDataSheet = Template_toMetadataSheet(template);
326
326
  doc.AddWorksheet(metaDataSheet);
327
- const sheet = toFsWorksheet(template.Table);
327
+ const sheet = toFsWorksheet(void 0, template.Table);
328
328
  doc.AddWorksheet(sheet);
329
329
  return doc;
330
330
  }
@@ -1,12 +1,15 @@
1
- import { unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
1
+ import { value as value_1, unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
2
+ import { join } from "../fable_modules/fable-library-js.4.16.0/String.js";
3
+ import { empty, singleton, append, delay, toList } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
2
4
  import { stringHash, equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
3
5
  import { boxHashOption, boxHashArray } from "../Core/Helper/HashCodes.js";
4
6
  import { class_type } from "../fable_modules/fable-library-js.4.16.0/Reflection.js";
5
7
 
6
8
  export class ValidationPackage {
7
9
  constructor(name, version) {
10
+ this.version = version;
8
11
  this._name = name;
9
- this._version = version;
12
+ this._version = this.version;
10
13
  }
11
14
  get Name() {
12
15
  const this$ = this;
@@ -33,6 +36,10 @@ export class ValidationPackage {
33
36
  const version = this$.Version;
34
37
  return ValidationPackage.make(name, version);
35
38
  }
39
+ toString() {
40
+ const this$ = this;
41
+ return join("\n", toList(delay(() => append(singleton("{"), delay(() => append(singleton(` Name = ${this$.Name}`), delay(() => append((this$.version != null) ? singleton(` Version = ${value_1(this$.Version)}`) : empty(), delay(() => singleton("}"))))))))));
42
+ }
36
43
  Equals(obj) {
37
44
  let other_vp;
38
45
  const this$ = this;
@@ -1,13 +1,17 @@
1
- import { unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
2
- import { equalsWith } from "../fable_modules/fable-library-js.4.16.0/Array.js";
3
- import { identityHash, equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
4
- import { boxHashOption, boxHashArray } from "../Core/Helper/HashCodes.js";
1
+ import { value, unwrap } from "../fable_modules/fable-library-js.4.16.0/Option.js";
2
+ import { join } from "../fable_modules/fable-library-js.4.16.0/String.js";
3
+ import { item, fold, length, map, empty, singleton, append, delay, toList } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
4
+ import { toString } from "../fable_modules/fable-library-js.4.16.0/Types.js";
5
+ import { sortBy } from "../fable_modules/fable-library-js.4.16.0/Array.js";
6
+ import { equals, compareArrays } from "../fable_modules/fable-library-js.4.16.0/Util.js";
7
+ import { rangeDouble } from "../fable_modules/fable-library-js.4.16.0/Range.js";
8
+ import { boxHashSeq, boxHashOption, boxHashArray } from "../Core/Helper/HashCodes.js";
5
9
  import { class_type } from "../fable_modules/fable-library-js.4.16.0/Reflection.js";
6
10
 
7
11
  export class ValidationPackagesConfig {
8
12
  constructor(validation_packages, arc_specification) {
9
- this._validation_packages = validation_packages;
10
13
  this._arc_specification = arc_specification;
14
+ this._validation_packages = validation_packages;
11
15
  }
12
16
  get ValidationPackages() {
13
17
  const this$ = this;
@@ -34,14 +38,43 @@ export class ValidationPackagesConfig {
34
38
  const arc_specification = this$.ARCSpecification;
35
39
  return ValidationPackagesConfig.make(validation_packages, arc_specification);
36
40
  }
37
- Equals(obj) {
38
- let other_vpc;
41
+ toString() {
42
+ const this$ = this;
43
+ return join("\n", toList(delay(() => append(singleton("{"), delay(() => append((this$.ARCSpecification != null) ? singleton(` ARCSpecification = ${value(this$.ARCSpecification)}`) : empty(), delay(() => append(singleton(" ValidationPackages = ["), delay(() => append(singleton(join(`;${"\n"}`, map(toString, this$.ValidationPackages))), delay(() => append(singleton("]"), delay(() => singleton("}"))))))))))))));
44
+ }
45
+ StructurallyEquals(other) {
46
+ const this$ = this;
47
+ const sort = (arg) => sortBy((vp) => [vp.Name, vp.Version], Array.from(arg), {
48
+ Compare: compareArrays,
49
+ });
50
+ if (equals(this$.ARCSpecification, other.ARCSpecification)) {
51
+ const a = sort(this$.ValidationPackages);
52
+ const b = sort(other.ValidationPackages);
53
+ return (length(a) === length(b)) && fold((acc, e) => {
54
+ if (acc) {
55
+ return e;
56
+ }
57
+ else {
58
+ return false;
59
+ }
60
+ }, true, toList(delay(() => map((i) => equals(item(i, a), item(i, b)), rangeDouble(0, 1, length(a) - 1)))));
61
+ }
62
+ else {
63
+ return false;
64
+ }
65
+ }
66
+ ReferenceEquals(other) {
67
+ const this$ = this;
68
+ return this$ === other;
69
+ }
70
+ Equals(other) {
71
+ let other_vp;
39
72
  const this$ = this;
40
- return (obj instanceof ValidationPackagesConfig) && ((other_vpc = obj, equalsWith(equals, other_vpc.ValidationPackages, this$.ValidationPackages) && equals(other_vpc.ARCSpecification, this$.ARCSpecification)));
73
+ return (other instanceof ValidationPackagesConfig) && ((other_vp = other, this$.StructurallyEquals(other_vp)));
41
74
  }
42
75
  GetHashCode() {
43
76
  const this$ = this;
44
- return boxHashArray([identityHash(this$.ValidationPackages), boxHashOption(this$.ARCSpecification)]) | 0;
77
+ return boxHashArray([boxHashOption(this$.ARCSpecification), boxHashSeq(this$.ValidationPackages)]) | 0;
45
78
  }
46
79
  }
47
80
 
package/Xlsx.js CHANGED
@@ -4,7 +4,7 @@ import { ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F, ARCtrl_ArcAssa
4
4
  import { ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522, ARCtrl_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D } from "./Spreadsheet/ArcStudy.js";
5
5
  import { map } from "./fable_modules/fable-library-js.4.16.0/Option.js";
6
6
  import { ofSeq } from "./fable_modules/fable-library-js.4.16.0/List.js";
7
- import { toFsWorkbook as toFsWorkbook_1, fromFsWorkbook as fromFsWorkbook_1 } from "./Spreadsheet/ArcInvestigation.js";
7
+ import { ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF, ARCtrl_ArcInvestigation__ArcInvestigation_fromFsWorkbook_Static_32154C9D } from "./Spreadsheet/ArcInvestigation.js";
8
8
 
9
9
  export class XlsxHelper_DatamapXlsx {
10
10
  constructor() {
@@ -67,10 +67,10 @@ export class XlsxHelper_InvestigationXlsx {
67
67
  constructor() {
68
68
  }
69
69
  fromFsWorkbook(fswb) {
70
- return fromFsWorkbook_1(fswb);
70
+ return ARCtrl_ArcInvestigation__ArcInvestigation_fromFsWorkbook_Static_32154C9D(fswb);
71
71
  }
72
72
  toFsWorkbook(investigation) {
73
- return toFsWorkbook_1(investigation);
73
+ return ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(investigation);
74
74
  }
75
75
  }
76
76
 
@@ -1,7 +1,7 @@
1
1
  import { ofArray, choose } from "../fable_modules/fable-library-js.4.16.0/List.js";
2
2
  import { equals } from "../fable_modules/fable-library-js.4.16.0/Util.js";
3
3
  import { Config, YAMLElement } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
4
- import { string, tryInclude, resizearray } from "../fable_modules/YAMLicious.0.0.1/Encode.fs.js";
4
+ import { resizearray, string, tryInclude } from "../fable_modules/YAMLicious.0.0.1/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.16.0/Seq.js";
7
7
  import { YAMLContent_create_27AED5E3 } from "../fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js";
@@ -21,7 +21,7 @@ export function ValidationPackagesConfig_encoder(validationpackage) {
21
21
  else {
22
22
  return [tupledArg[0], v];
23
23
  }
24
- }, ofArray([["validation_packages", resizearray(ValidationPackage_encoder, validationpackage.ValidationPackages)], tryInclude("arc_specification", string, validationpackage.ARCSpecification)]));
24
+ }, ofArray([tryInclude("arc_specification", string, validationpackage.ARCSpecification), ["validation_packages", resizearray(ValidationPackage_encoder, validationpackage.ValidationPackages)]]));
25
25
  return new YAMLElement(3, [toList(delay(() => collect((matchValue) => singleton(new YAMLElement(0, [YAMLContent_create_27AED5E3(matchValue[0]), matchValue[1]])), objSeq)))]);
26
26
  }
27
27