@nfdi4plants/arctrl 1.0.0-alpha8 → 1.0.0-beta.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.
- package/ARC.js +5 -6
- package/ISA/ISA/ArcTypes/ArcTable.js +141 -37
- package/ISA/ISA/ArcTypes/ArcTableAux.js +13 -14
- package/ISA/ISA/ArcTypes/ArcTables.js +380 -277
- package/ISA/ISA/ArcTypes/ArcTypes.js +128 -318
- package/ISA/ISA/ArcTypes/CompositeColumn.js +7 -1
- package/ISA/ISA/ArcTypes/CompositeHeader.js +311 -1
- package/ISA/ISA/Helper.js +15 -3
- package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +17 -15
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +2 -2
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +4 -4
- package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +6 -6
- package/ISA/ISA.Spreadsheet/ArcAssay.js +6 -9
- package/ISA/ISA.Spreadsheet/ArcInvestigation.js +4 -4
- package/ISA/ISA.Spreadsheet/ArcStudy.js +5 -5
- package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +9 -9
- package/README.md +3 -0
- package/Templates/Template.Json.js +7 -3
- package/Templates/Template.Spreadsheet.js +23 -7
- package/Templates/Template.Web.js +1 -1
- package/Templates/Templates.js +82 -0
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Cells/FsCell.fs +85 -36
- package/fable_modules/FsSpreadsheet.5.0.0/Cells/FsCell.fs.js +272 -0
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/CellBuilder.fs +1 -0
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/CellBuilder.fs.js +18 -18
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Transform.fs +1 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Transform.fs.js +2 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Types.fs +1 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Types.fs.js +4 -4
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsColumn.fs +3 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsRow.fs +2 -0
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorksheet.fs +10 -1
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorksheet.fs.js +5 -0
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/SheetBuilder.fs +4 -4
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/SheetBuilder.fs.js +3 -3
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTable.fs +20 -4
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTable.fs.js +26 -6
- package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
- package/fable_modules/project_cracked.json +1 -1
- package/index.js +1 -0
- package/package.json +1 -1
- package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +0 -240
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Cells/FsCellsCollection.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Cells/FsCellsCollection.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/ColumnBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/ColumnBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/DSL.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/DSL.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Expression.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Expression.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Operators.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/Operators.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/RowBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/RowBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/TableBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/TableBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/WorkbookBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/DSL/WorkbookBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsSpreadsheet.fableproj +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorkbook.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/FsWorkbook.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRange.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRange.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeBase.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeBase.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Ranges/FsRangeRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableField.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableField.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/Tables/FsTableRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.4.1.0 → FsSpreadsheet.5.0.0}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { append, toArray, reduce, choose, map, delay, toList, length, tryFindIndex } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
2
|
-
import {
|
|
1
|
+
import { append, toArray, reduce, choose, map as map_1, delay, toList, length, findIndex, tryFindIndex } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
|
|
2
|
+
import { Dict_tryFind } from "../Helper.js";
|
|
3
|
+
import { addToSet, addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
|
|
4
|
+
import { toIterator, equals, comparePrimitives, stringHash, compare, disposeSafe, getEnumerator } from "../../../fable_modules/fable-library.4.1.4/Util.js";
|
|
5
|
+
import { bind, map as map_3, unwrap, defaultArg, value as value_2 } from "../../../fable_modules/fable-library.4.1.4/Option.js";
|
|
6
|
+
import { collect as collect_1, map as map_4, insertRangeInPlace, fold } from "../../../fable_modules/fable-library.4.1.4/Array.js";
|
|
7
|
+
import { CompositeHeader } from "./CompositeHeader.js";
|
|
3
8
|
import { Array_groupBy, distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
|
|
4
9
|
import { FSharpSet__get_IsEmpty, ofSeq, intersect } from "../../../fable_modules/fable-library.4.1.4/Set.js";
|
|
5
|
-
import { class_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
6
|
-
import { bind, map as map_2, unwrap, defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
|
|
7
|
-
import { collect as collect_1, map as map_3, insertRangeInPlace } from "../../../fable_modules/fable-library.4.1.4/Array.js";
|
|
8
10
|
import { ArcTable } from "./ArcTable.js";
|
|
9
|
-
import { map as
|
|
11
|
+
import { map as map_2, collect } from "../../../fable_modules/fable-library.4.1.4/List.js";
|
|
10
12
|
import { Unchecked_fillMissingCells, ProcessParsing_groupProcesses, ProcessParsing_processToRows, ProcessParsing_alignByHeaders } from "./ArcTableAux.js";
|
|
11
13
|
import { tryFind, ofSeq as ofSeq_1 } from "../../../fable_modules/fable-library.4.1.4/Map.js";
|
|
12
|
-
import {
|
|
13
|
-
import { addToSet } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
|
|
14
|
+
import { class_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* If a table with the given name exists in the TableList, returns it, else returns None.
|
|
@@ -32,6 +33,104 @@ export function ArcTablesAux_findIndexByTableName(name, tables) {
|
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Collects the IOType of each distinct entity in the tables. Then merges the IOType of each entity according to the IOType.Merge function.
|
|
38
|
+
*/
|
|
39
|
+
export function ArcTablesAux_getIOMap(tables) {
|
|
40
|
+
const mappings = new Map([]);
|
|
41
|
+
const includeInMap = (name, ioType) => {
|
|
42
|
+
if (name !== "") {
|
|
43
|
+
const matchValue = Dict_tryFind(name, mappings);
|
|
44
|
+
if (matchValue == null) {
|
|
45
|
+
addToDict(mappings, name, ioType);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
const oldIOType = matchValue;
|
|
49
|
+
const newIOType = oldIOType.Merge(ioType);
|
|
50
|
+
mappings.set(name, newIOType);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
let enumerator = getEnumerator(tables);
|
|
55
|
+
try {
|
|
56
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
57
|
+
const table = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
58
|
+
const matchValue_1 = table.TryGetInputColumn();
|
|
59
|
+
if (matchValue_1 == null) {
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const ic = matchValue_1;
|
|
63
|
+
const ioType_1 = value_2(ic.Header.tryInput());
|
|
64
|
+
ic.Cells.forEach((c) => {
|
|
65
|
+
includeInMap(c.ToFreeTextCell().AsFreeText, ioType_1);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const matchValue_2 = table.TryGetOutputColumn();
|
|
69
|
+
if (matchValue_2 == null) {
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
const oc = matchValue_2;
|
|
73
|
+
const ioType_2 = value_2(oc.Header.tryOutput());
|
|
74
|
+
oc.Cells.forEach((c_1) => {
|
|
75
|
+
includeInMap(c_1.ToFreeTextCell().AsFreeText, ioType_2);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
disposeSafe(enumerator);
|
|
82
|
+
}
|
|
83
|
+
return mappings;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function ArcTablesAux_applyIOMap(map, tables) {
|
|
87
|
+
let enumerator = getEnumerator(tables);
|
|
88
|
+
try {
|
|
89
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
90
|
+
const table = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
91
|
+
const matchValue = table.TryGetInputColumn();
|
|
92
|
+
if (matchValue == null) {
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const ic = matchValue;
|
|
96
|
+
const index = findIndex((x) => x.isInput, table.Headers) | 0;
|
|
97
|
+
const newIOType = fold((io, c) => {
|
|
98
|
+
const matchValue_1 = Dict_tryFind(c.ToFreeTextCell().AsFreeText, map);
|
|
99
|
+
if (matchValue_1 == null) {
|
|
100
|
+
return io;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
const newIO = matchValue_1;
|
|
104
|
+
return io.Merge(newIO);
|
|
105
|
+
}
|
|
106
|
+
}, value_2(ic.Header.tryInput()), ic.Cells);
|
|
107
|
+
table.UpdateHeader(index, new CompositeHeader(11, [newIOType]));
|
|
108
|
+
}
|
|
109
|
+
const matchValue_2 = table.TryGetOutputColumn();
|
|
110
|
+
if (matchValue_2 == null) {
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const oc = matchValue_2;
|
|
114
|
+
const index_1 = findIndex((x_1) => x_1.isOutput, table.Headers) | 0;
|
|
115
|
+
const newIOType_1 = fold((io_1, c_1) => {
|
|
116
|
+
const matchValue_3 = Dict_tryFind(c_1.ToFreeTextCell().AsFreeText, map);
|
|
117
|
+
if (matchValue_3 == null) {
|
|
118
|
+
return io_1;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
const newIO_1 = matchValue_3;
|
|
122
|
+
return io_1.Merge(newIO_1);
|
|
123
|
+
}
|
|
124
|
+
}, value_2(oc.Header.tryOutput()), oc.Cells);
|
|
125
|
+
table.UpdateHeader(index_1, new CompositeHeader(12, [newIOType_1]));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
finally {
|
|
130
|
+
disposeSafe(enumerator);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
35
134
|
/**
|
|
36
135
|
* Fails, if the index is out of range of the Tables collection. When allowAppend is set to true, it may be out of range by at most 1.
|
|
37
136
|
*/
|
|
@@ -100,281 +199,285 @@ export function ArcTablesAux_SanityChecks_validateNewNamesUnique(newNames, exist
|
|
|
100
199
|
}
|
|
101
200
|
|
|
102
201
|
export class ArcTables {
|
|
103
|
-
constructor(
|
|
104
|
-
this
|
|
202
|
+
constructor(initTables) {
|
|
203
|
+
this["Tables@"] = initTables;
|
|
105
204
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return class_type("ARCtrl.ISA.ArcTables", void 0, ArcTables);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export function ArcTables_$ctor_Z18C2F36D(thisTables) {
|
|
113
|
-
return new ArcTables(thisTables);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export function ArcTables__get_Count(this$) {
|
|
117
|
-
return this$.thisTables.length;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export function ArcTables__get_TableNames(this$) {
|
|
121
|
-
return toList(delay(() => map((s) => s.Name, this$.thisTables)));
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export function ArcTables__get_Tables(this$) {
|
|
125
|
-
return this$.thisTables;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export function ArcTables__get_Item_Z524259A4(this$, index) {
|
|
129
|
-
return this$.thisTables[index];
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export function ArcTables__AddTable_EC12B15(this$, table, index) {
|
|
133
|
-
const index_1 = defaultArg(index, ArcTables__get_Count(this$)) | 0;
|
|
134
|
-
ArcTablesAux_SanityChecks_validateSheetIndex(index_1, true, this$.thisTables);
|
|
135
|
-
ArcTablesAux_SanityChecks_validateNewNameUnique(table.Name, ArcTables__get_TableNames(this$));
|
|
136
|
-
this$.thisTables.splice(index_1, 0, table);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export function ArcTables__AddTables_Z2D453886(this$, tables, index) {
|
|
140
|
-
const index_1 = defaultArg(index, ArcTables__get_Count(this$)) | 0;
|
|
141
|
-
ArcTablesAux_SanityChecks_validateSheetIndex(index_1, true, this$.thisTables);
|
|
142
|
-
ArcTablesAux_SanityChecks_validateNewNamesUnique(map((x) => x.Name, tables), ArcTables__get_TableNames(this$));
|
|
143
|
-
insertRangeInPlace(index_1, tables, this$.thisTables);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export function ArcTables__InitTable_3B406CA4(this$, tableName, index) {
|
|
147
|
-
const index_1 = defaultArg(index, ArcTables__get_Count(this$)) | 0;
|
|
148
|
-
const table = ArcTable.init(tableName);
|
|
149
|
-
ArcTablesAux_SanityChecks_validateSheetIndex(index_1, true, this$.thisTables);
|
|
150
|
-
ArcTablesAux_SanityChecks_validateNewNameUnique(table.Name, ArcTables__get_TableNames(this$));
|
|
151
|
-
this$.thisTables.splice(index_1, 0, table);
|
|
152
|
-
return table;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export function ArcTables__InitTables_7B28792B(this$, tableNames, index) {
|
|
156
|
-
const index_1 = defaultArg(index, ArcTables__get_Count(this$)) | 0;
|
|
157
|
-
const tables = map((x) => ArcTable.init(x), tableNames);
|
|
158
|
-
ArcTablesAux_SanityChecks_validateSheetIndex(index_1, true, this$.thisTables);
|
|
159
|
-
ArcTablesAux_SanityChecks_validateNewNamesUnique(map((x_1) => x_1.Name, tables), ArcTables__get_TableNames(this$));
|
|
160
|
-
insertRangeInPlace(index_1, tables, this$.thisTables);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export function ArcTables__GetTableAt_Z524259A4(this$, index) {
|
|
164
|
-
ArcTablesAux_SanityChecks_validateSheetIndex(index, false, this$.thisTables);
|
|
165
|
-
return this$.thisTables[index];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export function ArcTables__GetTable_Z721C83C5(this$, name) {
|
|
169
|
-
return ArcTables__GetTableAt_Z524259A4(this$, ArcTablesAux_findIndexByTableName(name, this$.thisTables));
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export function ArcTables__UpdateTableAt_7E571736(this$, index, table) {
|
|
173
|
-
ArcTablesAux_SanityChecks_validateSheetIndex(index, false, this$.thisTables);
|
|
174
|
-
ArcTablesAux_SanityChecks_validateNewNameAtUnique(index, table.Name, ArcTables__get_TableNames(this$));
|
|
175
|
-
this$.thisTables[index] = table;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export function ArcTables__UpdateTable_51766571(this$, name, table) {
|
|
179
|
-
const tupledArg = [ArcTablesAux_findIndexByTableName(name, this$.thisTables), table];
|
|
180
|
-
ArcTables__UpdateTableAt_7E571736(this$, tupledArg[0], tupledArg[1]);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export function ArcTables__SetTableAt_7E571736(this$, index, table) {
|
|
184
|
-
ArcTablesAux_SanityChecks_validateSheetIndex(index, true, this$.thisTables);
|
|
185
|
-
ArcTablesAux_SanityChecks_validateNewNameAtUnique(index, table.Name, ArcTables__get_TableNames(this$));
|
|
186
|
-
this$.thisTables[index] = table;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export function ArcTables__SetTable_51766571(this$, name, table) {
|
|
190
|
-
const matchValue = ArcTablesAux_tryFindIndexByTableName(name, this$.thisTables);
|
|
191
|
-
if (matchValue == null) {
|
|
192
|
-
ArcTables__AddTable_EC12B15(this$, table);
|
|
205
|
+
get Tables() {
|
|
206
|
+
const __ = this;
|
|
207
|
+
return __["Tables@"];
|
|
193
208
|
}
|
|
194
|
-
|
|
195
|
-
|
|
209
|
+
set Tables(v) {
|
|
210
|
+
const __ = this;
|
|
211
|
+
__["Tables@"] = v;
|
|
196
212
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
export function ArcTables__GetColumn_Z18115A39(this$, tableName, columnIndex) {
|
|
267
|
-
const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.thisTables), columnIndex];
|
|
268
|
-
return ArcTables__GetColumnAt_Z37302880(this$, tupledArg[0], tupledArg[1]);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export function ArcTables__AddRowAt_Z12CDB784(this$, tableIndex, cells, rowIndex) {
|
|
272
|
-
ArcTables__MapTableAt_8FC095C(this$, tableIndex, (table) => {
|
|
273
|
-
table.AddRow(unwrap(cells), unwrap(rowIndex));
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
export function ArcTables__AddRow_Z16315DE5(this$, tableName, cells, rowIndex) {
|
|
278
|
-
ArcTables__AddRowAt_Z12CDB784(this$, ArcTablesAux_findIndexByTableName(tableName, this$.thisTables), unwrap(cells), unwrap(rowIndex));
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export function ArcTables__RemoveRowAt_Z37302880(this$, tableIndex, rowIndex) {
|
|
282
|
-
ArcTables__MapTableAt_8FC095C(this$, tableIndex, (table) => {
|
|
283
|
-
table.RemoveRow(rowIndex);
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export function ArcTables__RemoveRow_Z18115A39(this$, tableName, rowIndex) {
|
|
288
|
-
const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.thisTables), rowIndex];
|
|
289
|
-
ArcTables__RemoveRowAt_Z37302880(this$, tupledArg[0], tupledArg[1]);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
export function ArcTables__UpdateRowAt_1CF7B5DC(this$, tableIndex, rowIndex, cells) {
|
|
293
|
-
ArcTables__MapTableAt_8FC095C(this$, tableIndex, (table) => {
|
|
294
|
-
table.UpdateRow(rowIndex, cells);
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
export function ArcTables__UpdateRow_1BFE2CFB(this$, tableName, rowIndex, cells) {
|
|
299
|
-
const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.thisTables), rowIndex, cells];
|
|
300
|
-
ArcTables__UpdateRowAt_1CF7B5DC(this$, tupledArg[0], tupledArg[1], tupledArg[2]);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export function ArcTables__GetRowAt_Z37302880(this$, tableIndex, rowIndex) {
|
|
304
|
-
const table = ArcTables__GetTableAt_Z524259A4(this$, tableIndex);
|
|
305
|
-
return table.GetRow(rowIndex);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
export function ArcTables__GetRow_Z18115A39(this$, tableName, rowIndex) {
|
|
309
|
-
const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.thisTables), rowIndex];
|
|
310
|
-
return ArcTables__GetRowAt_Z37302880(this$, tupledArg[0], tupledArg[1]);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Return a list of all the processes in all the tables.
|
|
315
|
-
*/
|
|
316
|
-
export function ArcTables__GetProcesses(this$) {
|
|
317
|
-
return collect((t) => t.GetProcesses(), toList(ArcTables__get_Tables(this$)));
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
export function ArcTables_ofSeq_3B4333A5(tables) {
|
|
321
|
-
return ArcTables_$ctor_Z18C2F36D(Array.from(tables));
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Create a collection of tables from a list of processes.
|
|
326
|
-
*
|
|
327
|
-
* For this, the processes are grouped by nameroot ("nameroot_1", "nameroot_2" ...) or exectued protocol if no name exists
|
|
328
|
-
*
|
|
329
|
-
* Then each group is converted to a table with this nameroot as sheetname
|
|
330
|
-
*/
|
|
331
|
-
export function ArcTables_fromProcesses_134EBDED(ps) {
|
|
332
|
-
let arg;
|
|
333
|
-
return ArcTables_$ctor_Z18C2F36D((arg = map_1((tupledArg) => {
|
|
334
|
-
const tupledArg_1 = ProcessParsing_alignByHeaders(true, collect(ProcessParsing_processToRows, tupledArg[1]));
|
|
335
|
-
return ArcTable.create(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
|
|
336
|
-
}, ProcessParsing_groupProcesses(ps)), Array.from(arg)));
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
export function ArcTables_updateReferenceTablesBySheets_Z2EE88E97(referenceTables, sheetTables, keepUnusedRefTables) {
|
|
340
|
-
let arg_4, s, array;
|
|
341
|
-
const keepUnusedRefTables_1 = defaultArg(keepUnusedRefTables, false);
|
|
342
|
-
const usedTables = new Set([]);
|
|
343
|
-
const referenceTableMap = ofSeq_1(choose((t) => map_2((c) => [c.Cells[0].AsFreeText, t], t.TryGetProtocolNameColumn()), ArcTables__get_Tables(referenceTables)), {
|
|
344
|
-
Compare: comparePrimitives,
|
|
345
|
-
});
|
|
346
|
-
return ArcTables_$ctor_Z18C2F36D((arg_4 = ((s = map_3((t_3) => {
|
|
347
|
-
Unchecked_fillMissingCells(t_3.Headers, t_3.Values);
|
|
348
|
-
return t_3;
|
|
349
|
-
}, map_3((tupledArg) => reduce((arg_2, arg_3) => ArcTable.append(arg_2, arg_3), tupledArg[1]), Array_groupBy((t_2) => t_2.Name, map_3((t_1) => {
|
|
350
|
-
const k = defaultArg(bind((c_1) => {
|
|
351
|
-
if (c_1.AsFreeText === "") {
|
|
352
|
-
return void 0;
|
|
353
|
-
}
|
|
354
|
-
else {
|
|
355
|
-
return c_1.AsFreeText;
|
|
356
|
-
}
|
|
357
|
-
}, bind((i) => t_1.TryGetCellAt(i, 0), tryFindIndex((x_1) => equals(x_1, new CompositeHeader(8, [])), t_1.Headers))), t_1.Name);
|
|
358
|
-
const matchValue = tryFind(k, referenceTableMap);
|
|
213
|
+
get TableNames() {
|
|
214
|
+
const this$ = this;
|
|
215
|
+
return toList(delay(() => map_1((s) => s.Name, this$.Tables)));
|
|
216
|
+
}
|
|
217
|
+
get TableCount() {
|
|
218
|
+
const this$ = this;
|
|
219
|
+
return this$.Tables.length | 0;
|
|
220
|
+
}
|
|
221
|
+
AddTable(table, index) {
|
|
222
|
+
const this$ = this;
|
|
223
|
+
const index_1 = defaultArg(index, this$.TableCount) | 0;
|
|
224
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index_1, true, this$.Tables);
|
|
225
|
+
ArcTablesAux_SanityChecks_validateNewNameUnique(table.Name, this$.TableNames);
|
|
226
|
+
this$.Tables.splice(index_1, 0, table);
|
|
227
|
+
}
|
|
228
|
+
AddTables(tables, index) {
|
|
229
|
+
const this$ = this;
|
|
230
|
+
const index_1 = defaultArg(index, this$.TableCount) | 0;
|
|
231
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index_1, true, this$.Tables);
|
|
232
|
+
ArcTablesAux_SanityChecks_validateNewNamesUnique(map_1((x) => x.Name, tables), this$.TableNames);
|
|
233
|
+
insertRangeInPlace(index_1, tables, this$.Tables);
|
|
234
|
+
}
|
|
235
|
+
InitTable(tableName, index) {
|
|
236
|
+
const this$ = this;
|
|
237
|
+
const index_1 = defaultArg(index, this$.TableCount) | 0;
|
|
238
|
+
const table = ArcTable.init(tableName);
|
|
239
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index_1, true, this$.Tables);
|
|
240
|
+
ArcTablesAux_SanityChecks_validateNewNameUnique(table.Name, this$.TableNames);
|
|
241
|
+
this$.Tables.splice(index_1, 0, table);
|
|
242
|
+
return table;
|
|
243
|
+
}
|
|
244
|
+
InitTables(tableNames, index) {
|
|
245
|
+
const this$ = this;
|
|
246
|
+
const index_1 = defaultArg(index, this$.TableCount) | 0;
|
|
247
|
+
const tables = map_1((x) => ArcTable.init(x), tableNames);
|
|
248
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index_1, true, this$.Tables);
|
|
249
|
+
ArcTablesAux_SanityChecks_validateNewNamesUnique(map_1((x_1) => x_1.Name, tables), this$.TableNames);
|
|
250
|
+
insertRangeInPlace(index_1, tables, this$.Tables);
|
|
251
|
+
}
|
|
252
|
+
GetTableAt(index) {
|
|
253
|
+
const this$ = this;
|
|
254
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index, false, this$.Tables);
|
|
255
|
+
return this$.Tables[index];
|
|
256
|
+
}
|
|
257
|
+
GetTable(name) {
|
|
258
|
+
const this$ = this;
|
|
259
|
+
const arg = ArcTablesAux_findIndexByTableName(name, this$.Tables) | 0;
|
|
260
|
+
return this$.GetTableAt(arg);
|
|
261
|
+
}
|
|
262
|
+
UpdateTableAt(index, table) {
|
|
263
|
+
const this$ = this;
|
|
264
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index, false, this$.Tables);
|
|
265
|
+
ArcTablesAux_SanityChecks_validateNewNameAtUnique(index, table.Name, this$.TableNames);
|
|
266
|
+
this$.Tables[index] = table;
|
|
267
|
+
}
|
|
268
|
+
UpdateTable(name, table) {
|
|
269
|
+
const this$ = this;
|
|
270
|
+
const tupledArg = [ArcTablesAux_findIndexByTableName(name, this$.Tables), table];
|
|
271
|
+
this$.UpdateTableAt(tupledArg[0], tupledArg[1]);
|
|
272
|
+
}
|
|
273
|
+
SetTableAt(index, table) {
|
|
274
|
+
const this$ = this;
|
|
275
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index, true, this$.Tables);
|
|
276
|
+
ArcTablesAux_SanityChecks_validateNewNameAtUnique(index, table.Name, this$.TableNames);
|
|
277
|
+
this$.Tables[index] = table;
|
|
278
|
+
}
|
|
279
|
+
SetTable(name, table) {
|
|
280
|
+
const this$ = this;
|
|
281
|
+
const matchValue = ArcTablesAux_tryFindIndexByTableName(name, this$.Tables);
|
|
359
282
|
if (matchValue == null) {
|
|
360
|
-
|
|
283
|
+
this$.AddTable(table);
|
|
361
284
|
}
|
|
362
285
|
else {
|
|
363
|
-
const
|
|
364
|
-
|
|
365
|
-
const updatedTable = ArcTable.updateReferenceByAnnotationTable(rt, t_1);
|
|
366
|
-
return ArcTable.create(t_1.Name, updatedTable.Headers, updatedTable.Values);
|
|
286
|
+
const index = matchValue | 0;
|
|
287
|
+
this$.SetTableAt(index, table);
|
|
367
288
|
}
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
}
|
|
289
|
+
}
|
|
290
|
+
RemoveTableAt(index) {
|
|
291
|
+
const this$ = this;
|
|
292
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index, false, this$.Tables);
|
|
293
|
+
this$.Tables.splice(index, 1);
|
|
294
|
+
}
|
|
295
|
+
RemoveTable(name) {
|
|
296
|
+
const this$ = this;
|
|
297
|
+
const arg = ArcTablesAux_findIndexByTableName(name, this$.Tables) | 0;
|
|
298
|
+
this$.RemoveTableAt(arg);
|
|
299
|
+
}
|
|
300
|
+
MapTableAt(index, updateFun) {
|
|
301
|
+
const this$ = this;
|
|
302
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index, false, this$.Tables);
|
|
303
|
+
updateFun(this$.Tables[index]);
|
|
304
|
+
}
|
|
305
|
+
MapTable(name, updateFun) {
|
|
306
|
+
const this$ = this;
|
|
307
|
+
const tupledArg = [ArcTablesAux_findIndexByTableName(name, this$.Tables), updateFun];
|
|
308
|
+
this$.MapTableAt(tupledArg[0], tupledArg[1]);
|
|
309
|
+
}
|
|
310
|
+
RenameTableAt(index, newName) {
|
|
311
|
+
const this$ = this;
|
|
312
|
+
ArcTablesAux_SanityChecks_validateSheetIndex(index, false, this$.Tables);
|
|
313
|
+
ArcTablesAux_SanityChecks_validateNewNameUnique(newName, this$.TableNames);
|
|
314
|
+
const table = this$.GetTableAt(index);
|
|
315
|
+
table.Name = newName;
|
|
316
|
+
}
|
|
317
|
+
RenameTable(name, newName) {
|
|
318
|
+
const this$ = this;
|
|
319
|
+
const tupledArg = [ArcTablesAux_findIndexByTableName(name, this$.Tables), newName];
|
|
320
|
+
this$.RenameTableAt(tupledArg[0], tupledArg[1]);
|
|
321
|
+
}
|
|
322
|
+
AddColumnAt(tableIndex, header, cells, columnIndex, forceReplace) {
|
|
323
|
+
const this$ = this;
|
|
324
|
+
this$.MapTableAt(tableIndex, (table) => {
|
|
325
|
+
table.AddColumn(header, unwrap(cells), unwrap(columnIndex), unwrap(forceReplace));
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
AddColumn(tableName, header, cells, columnIndex, forceReplace) {
|
|
329
|
+
const this$ = this;
|
|
330
|
+
const i = ArcTablesAux_findIndexByTableName(tableName, this$.Tables) | 0;
|
|
331
|
+
this$.AddColumnAt(i, header, unwrap(cells), unwrap(columnIndex), unwrap(forceReplace));
|
|
332
|
+
}
|
|
333
|
+
RemoveColumnAt(tableIndex, columnIndex) {
|
|
334
|
+
const this$ = this;
|
|
335
|
+
this$.MapTableAt(tableIndex, (table) => {
|
|
336
|
+
table.RemoveColumn(columnIndex);
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
RemoveColumn(tableName, columnIndex) {
|
|
340
|
+
const this$ = this;
|
|
341
|
+
const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.Tables), columnIndex];
|
|
342
|
+
this$.RemoveColumnAt(tupledArg[0], tupledArg[1]);
|
|
343
|
+
}
|
|
344
|
+
UpdateColumnAt(tableIndex, columnIndex, header, cells) {
|
|
345
|
+
const this$ = this;
|
|
346
|
+
this$.MapTableAt(tableIndex, (table) => {
|
|
347
|
+
table.UpdateColumn(columnIndex, header, unwrap(cells));
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
UpdateColumn(tableName, columnIndex, header, cells) {
|
|
351
|
+
const this$ = this;
|
|
352
|
+
const tableIndex = ArcTablesAux_findIndexByTableName(tableName, this$.Tables) | 0;
|
|
353
|
+
this$.UpdateColumnAt(tableIndex, columnIndex, header, unwrap(cells));
|
|
354
|
+
}
|
|
355
|
+
GetColumnAt(tableIndex, columnIndex) {
|
|
356
|
+
const this$ = this;
|
|
357
|
+
const table = this$.GetTableAt(tableIndex);
|
|
358
|
+
return table.GetColumn(columnIndex);
|
|
359
|
+
}
|
|
360
|
+
GetColumn(tableName, columnIndex) {
|
|
361
|
+
const this$ = this;
|
|
362
|
+
const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.Tables), columnIndex];
|
|
363
|
+
return this$.GetColumnAt(tupledArg[0], tupledArg[1]);
|
|
364
|
+
}
|
|
365
|
+
AddRowAt(tableIndex, cells, rowIndex) {
|
|
366
|
+
const this$ = this;
|
|
367
|
+
this$.MapTableAt(tableIndex, (table) => {
|
|
368
|
+
table.AddRow(unwrap(cells), unwrap(rowIndex));
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
AddRow(tableName, cells, rowIndex) {
|
|
372
|
+
const this$ = this;
|
|
373
|
+
const i = ArcTablesAux_findIndexByTableName(tableName, this$.Tables) | 0;
|
|
374
|
+
this$.AddRowAt(i, unwrap(cells), unwrap(rowIndex));
|
|
375
|
+
}
|
|
376
|
+
RemoveRowAt(tableIndex, rowIndex) {
|
|
377
|
+
const this$ = this;
|
|
378
|
+
this$.MapTableAt(tableIndex, (table) => {
|
|
379
|
+
table.RemoveRow(rowIndex);
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
RemoveRow(tableName, rowIndex) {
|
|
383
|
+
const this$ = this;
|
|
384
|
+
const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.Tables), rowIndex];
|
|
385
|
+
this$.RemoveRowAt(tupledArg[0], tupledArg[1]);
|
|
386
|
+
}
|
|
387
|
+
UpdateRowAt(tableIndex, rowIndex, cells) {
|
|
388
|
+
const this$ = this;
|
|
389
|
+
this$.MapTableAt(tableIndex, (table) => {
|
|
390
|
+
table.UpdateRow(rowIndex, cells);
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
UpdateRow(tableName, rowIndex, cells) {
|
|
394
|
+
const this$ = this;
|
|
395
|
+
const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.Tables), rowIndex, cells];
|
|
396
|
+
this$.UpdateRowAt(tupledArg[0], tupledArg[1], tupledArg[2]);
|
|
397
|
+
}
|
|
398
|
+
GetRowAt(tableIndex, rowIndex) {
|
|
399
|
+
const this$ = this;
|
|
400
|
+
const table = this$.GetTableAt(tableIndex);
|
|
401
|
+
return table.GetRow(rowIndex);
|
|
402
|
+
}
|
|
403
|
+
GetRow(tableName, rowIndex) {
|
|
404
|
+
const this$ = this;
|
|
405
|
+
const tupledArg = [ArcTablesAux_findIndexByTableName(tableName, this$.Tables), rowIndex];
|
|
406
|
+
return this$.GetRowAt(tupledArg[0], tupledArg[1]);
|
|
407
|
+
}
|
|
408
|
+
GetProcesses() {
|
|
409
|
+
const this$ = this;
|
|
410
|
+
return collect((t) => t.GetProcesses(), toList(this$.Tables));
|
|
411
|
+
}
|
|
412
|
+
static ofSeq(tables) {
|
|
413
|
+
return new ArcTables(Array.from(tables));
|
|
414
|
+
}
|
|
415
|
+
static fromProcesses(ps) {
|
|
416
|
+
let arg;
|
|
417
|
+
return new ArcTables((arg = map_2((tupledArg) => {
|
|
418
|
+
const tupledArg_1 = ProcessParsing_alignByHeaders(true, collect(ProcessParsing_processToRows, tupledArg[1]));
|
|
419
|
+
return ArcTable.create(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
|
|
420
|
+
}, ProcessParsing_groupProcesses(ps)), Array.from(arg)));
|
|
421
|
+
}
|
|
422
|
+
static updateReferenceTablesBySheets(referenceTables, sheetTables, keepUnusedRefTables) {
|
|
423
|
+
let arg_4, s, array;
|
|
424
|
+
const keepUnusedRefTables_1 = defaultArg(keepUnusedRefTables, false);
|
|
425
|
+
const usedTables = new Set([]);
|
|
426
|
+
const referenceTableMap = ofSeq_1(choose((t) => map_3((c) => [c.Cells[0].AsFreeText, t], t.TryGetProtocolNameColumn()), referenceTables.Tables), {
|
|
427
|
+
Compare: comparePrimitives,
|
|
428
|
+
});
|
|
429
|
+
return new ArcTables((arg_4 = ((s = map_4((t_3) => {
|
|
430
|
+
Unchecked_fillMissingCells(t_3.Headers, t_3.Values);
|
|
431
|
+
return t_3;
|
|
432
|
+
}, map_4((tupledArg) => reduce((arg_2, arg_3) => ArcTable.append(arg_2, arg_3), tupledArg[1]), Array_groupBy((t_2) => t_2.Name, map_4((t_1) => {
|
|
433
|
+
const k = defaultArg(bind((c_1) => {
|
|
434
|
+
if (c_1.AsFreeText === "") {
|
|
435
|
+
return void 0;
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
return c_1.AsFreeText;
|
|
439
|
+
}
|
|
440
|
+
}, bind((i) => t_1.TryGetCellAt(i, 0), tryFindIndex((x_1) => equals(x_1, new CompositeHeader(8, [])), t_1.Headers))), t_1.Name);
|
|
441
|
+
const matchValue = tryFind(k, referenceTableMap);
|
|
442
|
+
if (matchValue == null) {
|
|
443
|
+
return t_1;
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
const rt = matchValue;
|
|
447
|
+
addToSet(k, usedTables);
|
|
448
|
+
const updatedTable = ArcTable.updateReferenceByAnnotationTable(rt, t_1);
|
|
449
|
+
return ArcTable.create(t_1.Name, updatedTable.Headers, updatedTable.Values);
|
|
450
|
+
}
|
|
451
|
+
}, (array = toArray(sheetTables.Tables), collect_1(ArcTable.SplitByProtocolREF, array))), {
|
|
452
|
+
Equals: (x_2, y_1) => (x_2 === y_1),
|
|
453
|
+
GetHashCode: stringHash,
|
|
454
|
+
}))), keepUnusedRefTables_1 ? append(choose((kv) => {
|
|
455
|
+
if (usedTables.has(kv[0])) {
|
|
456
|
+
return void 0;
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
return kv[1];
|
|
460
|
+
}
|
|
461
|
+
}, referenceTableMap), s) : s)), Array.from(arg_4)));
|
|
462
|
+
}
|
|
463
|
+
GetEnumerator() {
|
|
464
|
+
const this$ = this;
|
|
465
|
+
return getEnumerator(this$.Tables);
|
|
466
|
+
}
|
|
467
|
+
[Symbol.iterator]() {
|
|
468
|
+
return toIterator(getEnumerator(this));
|
|
469
|
+
}
|
|
470
|
+
"System.Collections.IEnumerable.GetEnumerator"() {
|
|
471
|
+
const this$ = this;
|
|
472
|
+
return getEnumerator(this$.Tables);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export function ArcTables_$reflection() {
|
|
477
|
+
return class_type("ARCtrl.ISA.ArcTables", void 0, ArcTables);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export function ArcTables_$ctor_Z18C2F36D(initTables) {
|
|
481
|
+
return new ArcTables(initTables);
|
|
379
482
|
}
|
|
380
483
|
|