@nfdi4plants/arctrl 2.0.0-beta.2 → 2.0.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.
- package/ARC.js +55 -18
- package/Contract/ArcAssay.js +4 -4
- package/Contract/ArcInvestigation.js +4 -4
- package/Contract/ArcStudy.js +3 -3
- package/Contract/Datamap.js +1 -1
- package/Contract/ValidationPackagesConfig.js +96 -0
- package/Core/ArcTypes.js +93 -90
- package/Core/Conversion.js +13 -13
- package/Core/DataContext.js +53 -6
- package/Core/{Table/DataMap.js → DataMap.js} +34 -22
- package/Core/Process/Component.js +15 -5
- package/Core/Process/FactorValue.js +14 -5
- package/Core/Process/MaterialAttributeValue.js +14 -5
- package/Core/Process/ProcessParameterValue.js +11 -2
- package/Core/Table/ArcTable.js +99 -11
- package/Core/Table/CompositeCell.js +38 -23
- package/Core/Table/CompositeColumn.js +7 -30
- package/Core/Table/CompositeHeader.js +5 -215
- package/Core/{Process/Value.js → Value.js} +9 -9
- package/Json/Assay.js +10 -9
- package/Json/{Process/Data.js → Data.js} +17 -17
- package/Json/{Process/DataFile.js → DataFile.js} +9 -9
- package/Json/DataMap/DataContext.js +30 -0
- package/Json/DataMap/DataMap.js +25 -0
- package/Json/Encode.js +10 -1
- package/Json/Process/Component.js +1 -1
- package/Json/Process/FactorValue.js +1 -1
- package/Json/Process/MaterialAttributeValue.js +1 -1
- package/Json/Process/ProcessInput.js +1 -1
- package/Json/Process/ProcessOutput.js +1 -1
- package/Json/Process/ProcessParameterValue.js +2 -2
- package/Json/Process/Value.js +3 -3
- package/Json/{Process/PropertyValue.js → PropertyValue.js} +30 -21
- package/Json/Study.js +9 -8
- package/Json/Table/CompositeCell.js +1 -1
- package/Json/context/rocrate/isa_data_context.js +1 -1
- package/Json/context/rocrate/isa_investigation_context.js +1 -1
- package/Json/context/rocrate/property_value_context.js +1 -1
- package/Spreadsheet/AnnotationTable/ArcTable.js +3 -2
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +9 -7
- package/Spreadsheet/ArcAssay.js +62 -26
- package/Spreadsheet/ArcInvestigation.js +59 -38
- package/Spreadsheet/ArcStudy.js +51 -20
- package/Spreadsheet/DataMap.js +1 -1
- package/Spreadsheet/DataMapTable/DataMapTable.js +3 -3
- package/Spreadsheet/Template.js +1 -1
- package/ValidationPackages/ValidationPackage.js +61 -0
- package/ValidationPackages/ValidationPackagesConfig.js +88 -0
- package/Xlsx.js +9 -9
- package/Yaml/Encode.js +8 -0
- package/Yaml/ValidationPackage.js +47 -0
- package/Yaml/ValidationPackagesConfig.js +48 -0
- package/fable_modules/YAMLicious.0.0.1/Decode.fs +374 -0
- package/fable_modules/YAMLicious.0.0.1/Decode.fs.js +1684 -0
- package/fable_modules/YAMLicious.0.0.1/Encode.fs +148 -0
- package/fable_modules/YAMLicious.0.0.1/Encode.fs.js +74 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/JsInterop.fs +14 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/JsInterop.fs.js +11 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/PyInterop.fs +9 -0
- package/fable_modules/YAMLicious.0.0.1/Library.fs +138 -0
- package/fable_modules/YAMLicious.0.0.1/Library.fs.js +7 -0
- package/fable_modules/YAMLicious.0.0.1/Persil.fs +86 -0
- package/fable_modules/YAMLicious.0.0.1/Persil.fs.js +49 -0
- package/fable_modules/YAMLicious.0.0.1/Preprocessing.fs +59 -0
- package/fable_modules/YAMLicious.0.0.1/Preprocessing.fs.js +102 -0
- package/fable_modules/YAMLicious.0.0.1/Reader.fs +295 -0
- package/fable_modules/YAMLicious.0.0.1/Reader.fs.js +530 -0
- package/fable_modules/YAMLicious.0.0.1/Regex.fs +108 -0
- package/fable_modules/YAMLicious.0.0.1/Regex.fs.js +19 -0
- package/fable_modules/YAMLicious.0.0.1/RegexActivePatterns.fs +166 -0
- package/fable_modules/YAMLicious.0.0.1/RegexActivePatterns.fs.js +225 -0
- package/fable_modules/YAMLicious.0.0.1/Writer.fs +84 -0
- package/fable_modules/YAMLicious.0.0.1/Writer.fs.js +161 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLicious.fableproj +39 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs +82 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js +130 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Debug/netstandard2.0/YAMLicious.AssemblyInfo.fs +19 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Release/netstandard2.0/YAMLicious.AssemblyInfo.fs +19 -0
- package/fable_modules/project_cracked.json +1 -1
- package/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CompositeHeader, IOType } from "./CompositeHeader.js";
|
|
2
|
-
import { OntologyAnnotation } from "
|
|
3
|
-
import { ofArray } from "
|
|
4
|
-
import { iterateIndexed, map } from "
|
|
5
|
-
import { CompositeCell } from "./CompositeCell.js";
|
|
6
|
-
import { boxHashSeq, hash } from "
|
|
7
|
-
import { class_type } from "
|
|
8
|
-
import { DataContext__Copy, DataContext__set_Description_6DFDD678, DataContext__get_Description, DataContext__set_ObjectType_279AAFF2, DataContext__get_ObjectType, DataContext__set_Unit_279AAFF2, DataContext__get_Unit, DataContext__set_Explication_279AAFF2, DataContext__get_Explication } from "
|
|
1
|
+
import { CompositeHeader, IOType } from "./Table/CompositeHeader.js";
|
|
2
|
+
import { OntologyAnnotation } from "./OntologyAnnotation.js";
|
|
3
|
+
import { ofArray } from "../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
|
+
import { iterateIndexed, map } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
5
|
+
import { CompositeCell } from "./Table/CompositeCell.js";
|
|
6
|
+
import { boxHashSeq, hash } from "./Helper/HashCodes.js";
|
|
7
|
+
import { class_type } from "../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
8
|
+
import { DataContext__Copy, DataContext__set_Description_6DFDD678, DataContext__get_Description, DataContext__set_ObjectType_279AAFF2, DataContext__get_ObjectType, DataContext__set_Unit_279AAFF2, DataContext__get_Unit, DataContext__set_Explication_279AAFF2, DataContext__get_Explication } from "./DataContext.js";
|
|
9
9
|
|
|
10
10
|
export const DataMapAux_dataHeader = new CompositeHeader(11, [new IOType(2, [])]);
|
|
11
11
|
|
|
@@ -21,6 +21,8 @@ export const DataMapAux_objectType = new OntologyAnnotation("Data Type", "NCIT",
|
|
|
21
21
|
|
|
22
22
|
export const DataMapAux_objectTypeHeader = new CompositeHeader(3, [DataMapAux_objectType]);
|
|
23
23
|
|
|
24
|
+
export const DataMapAux_labelHeader = new CompositeHeader(13, ["Label"]);
|
|
25
|
+
|
|
24
26
|
export const DataMapAux_descriptionHeader = new CompositeHeader(13, ["Description"]);
|
|
25
27
|
|
|
26
28
|
export const DataMapAux_generatedByHeader = new CompositeHeader(13, ["Generated By"]);
|
|
@@ -87,7 +89,7 @@ export function DataMapAux_SanityChecks_lengthOfNewColumn(newColumn, dataContext
|
|
|
87
89
|
export class DataMap {
|
|
88
90
|
constructor(dataContexts) {
|
|
89
91
|
this.staticHash = 0;
|
|
90
|
-
this["dataContexts@
|
|
92
|
+
this["dataContexts@108"] = dataContexts;
|
|
91
93
|
}
|
|
92
94
|
Equals(obj) {
|
|
93
95
|
const this$ = this;
|
|
@@ -95,7 +97,7 @@ export class DataMap {
|
|
|
95
97
|
}
|
|
96
98
|
GetHashCode() {
|
|
97
99
|
const this$ = this;
|
|
98
|
-
return boxHashSeq(this$["dataContexts@
|
|
100
|
+
return boxHashSeq(this$["dataContexts@108"]) | 0;
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
|
|
@@ -116,7 +118,7 @@ export function DataMap__set_StaticHash_Z524259A4(this$, value) {
|
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
export function DataMap__get_DataContexts(this$) {
|
|
119
|
-
return this$["dataContexts@
|
|
121
|
+
return this$["dataContexts@108"];
|
|
120
122
|
}
|
|
121
123
|
|
|
122
124
|
export function DataMap_init() {
|
|
@@ -124,48 +126,58 @@ export function DataMap_init() {
|
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
export function DataMap__GetExplicationColumn(this$) {
|
|
127
|
-
return DataMapAux_getOntologyColumn(DataContext__get_Explication, this$["dataContexts@
|
|
129
|
+
return DataMapAux_getOntologyColumn(DataContext__get_Explication, this$["dataContexts@108"]);
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
export function DataMap__SetExplicationColumn_C98E589(this$, cells) {
|
|
131
133
|
DataMapAux_setOntologyColumn((dc, oa) => {
|
|
132
134
|
DataContext__set_Explication_279AAFF2(dc, oa);
|
|
133
|
-
}, cells, this$["dataContexts@
|
|
135
|
+
}, cells, this$["dataContexts@108"]);
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
export function DataMap__GetUnitColumn(this$) {
|
|
137
|
-
return DataMapAux_getOntologyColumn(DataContext__get_Unit, this$["dataContexts@
|
|
139
|
+
return DataMapAux_getOntologyColumn(DataContext__get_Unit, this$["dataContexts@108"]);
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
export function DataMap__SetUnitColumn_C98E589(this$, cells) {
|
|
141
143
|
DataMapAux_setOntologyColumn((dc, oa) => {
|
|
142
144
|
DataContext__set_Unit_279AAFF2(dc, oa);
|
|
143
|
-
}, cells, this$["dataContexts@
|
|
145
|
+
}, cells, this$["dataContexts@108"]);
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
export function DataMap__GetObjectTypeColumn(this$) {
|
|
147
|
-
return DataMapAux_getOntologyColumn(DataContext__get_ObjectType, this$["dataContexts@
|
|
149
|
+
return DataMapAux_getOntologyColumn(DataContext__get_ObjectType, this$["dataContexts@108"]);
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
export function DataMap__SetDataTypeColumn_C98E589(this$, cells) {
|
|
151
153
|
DataMapAux_setOntologyColumn((dc, oa) => {
|
|
152
154
|
DataContext__set_ObjectType_279AAFF2(dc, oa);
|
|
153
|
-
}, cells, this$["dataContexts@
|
|
155
|
+
}, cells, this$["dataContexts@108"]);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function DataMap__GetLabelColumn(this$) {
|
|
159
|
+
return DataMapAux_getStringColumn((dc) => dc.Name, this$["dataContexts@108"]);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function DataMap__SetLabelColumn_C98E589(this$, cells) {
|
|
163
|
+
DataMapAux_setStringColumn((dc, s) => {
|
|
164
|
+
dc.Name = s;
|
|
165
|
+
}, cells, this$["dataContexts@108"]);
|
|
154
166
|
}
|
|
155
167
|
|
|
156
168
|
export function DataMap__GetDescriptionColumn(this$) {
|
|
157
|
-
return DataMapAux_getStringColumn(DataContext__get_Description, this$["dataContexts@
|
|
169
|
+
return DataMapAux_getStringColumn(DataContext__get_Description, this$["dataContexts@108"]);
|
|
158
170
|
}
|
|
159
171
|
|
|
160
172
|
export function DataMap__SetDescriptionColumn_C98E589(this$, cells) {
|
|
161
173
|
DataMapAux_setStringColumn((dc, s) => {
|
|
162
174
|
DataContext__set_Description_6DFDD678(dc, s);
|
|
163
|
-
}, cells, this$["dataContexts@
|
|
175
|
+
}, cells, this$["dataContexts@108"]);
|
|
164
176
|
}
|
|
165
177
|
|
|
166
178
|
export function DataMap__GetDataContext_Z58338566(this$, row, SkipValidation) {
|
|
167
|
-
DataMapAux_SanityChecks_rowIndexInBoundaries(row, this$["dataContexts@
|
|
168
|
-
return this$["dataContexts@
|
|
179
|
+
DataMapAux_SanityChecks_rowIndexInBoundaries(row, this$["dataContexts@108"]);
|
|
180
|
+
return this$["dataContexts@108"][row];
|
|
169
181
|
}
|
|
170
182
|
|
|
171
183
|
export function DataMap_getDataContext_Z58338566(row, SkipValidation) {
|
|
@@ -174,6 +186,6 @@ export function DataMap_getDataContext_Z58338566(row, SkipValidation) {
|
|
|
174
186
|
|
|
175
187
|
export function DataMap__Copy(this$) {
|
|
176
188
|
let collection;
|
|
177
|
-
return DataMap_$ctor_4E3220A7((collection = map(DataContext__Copy, this$["dataContexts@
|
|
189
|
+
return DataMap_$ctor_4E3220A7((collection = map(DataContext__Copy, this$["dataContexts@108"]), Array.from(collection)));
|
|
178
190
|
}
|
|
179
191
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Record } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
2
|
-
import { Value, Value_$reflection } from "
|
|
2
|
+
import { Value, Value_$reflection } from "../Value.js";
|
|
3
3
|
import { record_type, option_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
4
4
|
import { OntologyAnnotation, OntologyAnnotation_$reflection } from "../OntologyAnnotation.js";
|
|
5
5
|
import { defaultArg, unwrap, map } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
@@ -14,6 +14,16 @@ export class Component extends Record {
|
|
|
14
14
|
this.ComponentUnit = ComponentUnit;
|
|
15
15
|
this.ComponentType = ComponentType;
|
|
16
16
|
}
|
|
17
|
+
AlternateName() {
|
|
18
|
+
const this$ = this;
|
|
19
|
+
return Component__get_ComponentName(this$);
|
|
20
|
+
}
|
|
21
|
+
MeasurementMethod() {
|
|
22
|
+
return void 0;
|
|
23
|
+
}
|
|
24
|
+
Description() {
|
|
25
|
+
return void 0;
|
|
26
|
+
}
|
|
17
27
|
GetCategory() {
|
|
18
28
|
const this$ = this;
|
|
19
29
|
return this$.ComponentType;
|
|
@@ -43,12 +53,12 @@ export function Component_make(value, unit, componentType) {
|
|
|
43
53
|
return new Component(value, unit, componentType);
|
|
44
54
|
}
|
|
45
55
|
|
|
46
|
-
export function
|
|
56
|
+
export function Component_create_Z2F0B38C7(value, unit, componentType) {
|
|
47
57
|
return Component_make(value, unit, componentType);
|
|
48
58
|
}
|
|
49
59
|
|
|
50
60
|
export function Component_get_empty() {
|
|
51
|
-
return
|
|
61
|
+
return Component_create_Z2F0B38C7();
|
|
52
62
|
}
|
|
53
63
|
|
|
54
64
|
/**
|
|
@@ -182,7 +192,7 @@ export function Component__SetCategory_ZDED3A0F(this$, c) {
|
|
|
182
192
|
return new Component(this$.ComponentValue, this$.ComponentUnit, c);
|
|
183
193
|
}
|
|
184
194
|
|
|
185
|
-
export function Component_createAsPV(category, value, unit) {
|
|
186
|
-
return
|
|
195
|
+
export function Component_createAsPV(alternateName, measurementMethod, description, category, value, unit) {
|
|
196
|
+
return Component_create_Z2F0B38C7(unwrap(value), unwrap(unit), unwrap(category));
|
|
187
197
|
}
|
|
188
198
|
|
|
@@ -2,7 +2,7 @@ import { Record, toString } from "../../fable_modules/fable-library-js.4.16.0/Ty
|
|
|
2
2
|
import { unwrap, defaultArg, bind, map } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
3
3
|
import { record_type, option_type, string_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
4
4
|
import { Factor, Factor_$reflection } from "./Factor.js";
|
|
5
|
-
import { Value_$reflection } from "
|
|
5
|
+
import { Value_$reflection } from "../Value.js";
|
|
6
6
|
import { OntologyAnnotation_$reflection } from "../OntologyAnnotation.js";
|
|
7
7
|
import { int32ToString } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
8
8
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
@@ -35,6 +35,15 @@ export class FactorValue extends Record {
|
|
|
35
35
|
}, this$.Value);
|
|
36
36
|
return (category == null) ? ((value == null) ? "" : ((value_2 = value, value_2))) : ((value == null) ? ((category_2 = category, (category_2 + ":") + "No Value")) : ((category_1 = category, (value_1 = value, (category_1 + ":") + value_1))));
|
|
37
37
|
}
|
|
38
|
+
AlternateName() {
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
41
|
+
MeasurementMethod() {
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
44
|
+
Description() {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
38
47
|
GetCategory() {
|
|
39
48
|
const this$ = this;
|
|
40
49
|
return bind((f) => f.FactorType, this$.Category);
|
|
@@ -60,12 +69,12 @@ export function FactorValue_make(id, category, value, unit) {
|
|
|
60
69
|
return new FactorValue(id, category, value, unit);
|
|
61
70
|
}
|
|
62
71
|
|
|
63
|
-
export function
|
|
72
|
+
export function FactorValue_create_30BDC49(Id, Category, Value, Unit) {
|
|
64
73
|
return FactorValue_make(Id, Category, Value, Unit);
|
|
65
74
|
}
|
|
66
75
|
|
|
67
76
|
export function FactorValue_get_empty() {
|
|
68
|
-
return
|
|
77
|
+
return FactorValue_create_30BDC49();
|
|
69
78
|
}
|
|
70
79
|
|
|
71
80
|
export function FactorValue__get_ValueText(this$) {
|
|
@@ -122,7 +131,7 @@ export function FactorValue_nameEqualsString(name, fv) {
|
|
|
122
131
|
return FactorValue__get_NameText(fv) === name;
|
|
123
132
|
}
|
|
124
133
|
|
|
125
|
-
export function FactorValue_createAsPV(category, value, unit) {
|
|
126
|
-
return
|
|
134
|
+
export function FactorValue_createAsPV(alternateName, measurementMethod, description, category, value, unit) {
|
|
135
|
+
return FactorValue_create_30BDC49(void 0, unwrap(map((c) => Factor.create(void 0, c), category)), unwrap(value), unwrap(unit));
|
|
127
136
|
}
|
|
128
137
|
|
|
@@ -2,7 +2,7 @@ import { Record, toString } from "../../fable_modules/fable-library-js.4.16.0/Ty
|
|
|
2
2
|
import { unwrap, defaultArg, bind, map } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
3
3
|
import { MaterialAttribute__SetCategory_ZDED3A0F, MaterialAttribute_create_A220A8A, MaterialAttribute__MapCategory_658CFBF6, MaterialAttribute__get_TryNameText, MaterialAttribute_$reflection, MaterialAttribute__get_NameText } from "./MaterialAttribute.js";
|
|
4
4
|
import { record_type, option_type, string_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
5
|
-
import { Value_$reflection } from "
|
|
5
|
+
import { Value_$reflection } from "../Value.js";
|
|
6
6
|
import { OntologyAnnotation_$reflection } from "../OntologyAnnotation.js";
|
|
7
7
|
import { int32ToString } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
8
8
|
import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
@@ -35,6 +35,15 @@ export class MaterialAttributeValue extends Record {
|
|
|
35
35
|
}, this$.Value);
|
|
36
36
|
return (category == null) ? ((value == null) ? "" : ((value_2 = value, value_2))) : ((value == null) ? ((category_2 = category, (category_2 + ":") + "No Value")) : ((category_1 = category, (value_1 = value, (category_1 + ":") + value_1))));
|
|
37
37
|
}
|
|
38
|
+
AlternateName() {
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
41
|
+
MeasurementMethod() {
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
44
|
+
Description() {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
38
47
|
GetCategory() {
|
|
39
48
|
const this$ = this;
|
|
40
49
|
return bind((x) => x.CharacteristicType, this$.Category);
|
|
@@ -60,12 +69,12 @@ export function MaterialAttributeValue_make(id, category, value, unit) {
|
|
|
60
69
|
return new MaterialAttributeValue(id, category, value, unit);
|
|
61
70
|
}
|
|
62
71
|
|
|
63
|
-
export function
|
|
72
|
+
export function MaterialAttributeValue_create_ZE1D108D(Id, Category, Value, Unit) {
|
|
64
73
|
return MaterialAttributeValue_make(Id, Category, Value, Unit);
|
|
65
74
|
}
|
|
66
75
|
|
|
67
76
|
export function MaterialAttributeValue_get_empty() {
|
|
68
|
-
return
|
|
77
|
+
return MaterialAttributeValue_create_ZE1D108D();
|
|
69
78
|
}
|
|
70
79
|
|
|
71
80
|
/**
|
|
@@ -139,7 +148,7 @@ export function MaterialAttributeValue_nameEqualsString(name, mv) {
|
|
|
139
148
|
return MaterialAttributeValue__get_NameText(mv) === name;
|
|
140
149
|
}
|
|
141
150
|
|
|
142
|
-
export function MaterialAttributeValue_createAsPV(category, value, unit) {
|
|
143
|
-
return
|
|
151
|
+
export function MaterialAttributeValue_createAsPV(alternateName, measurementMethod, description, category, value, unit) {
|
|
152
|
+
return MaterialAttributeValue_create_ZE1D108D(void 0, unwrap(map((c) => MaterialAttribute_create_A220A8A(void 0, c), category)), unwrap(value), unwrap(unit));
|
|
144
153
|
}
|
|
145
154
|
|
|
@@ -4,7 +4,7 @@ import { printf, toText } from "../../fable_modules/fable-library-js.4.16.0/Stri
|
|
|
4
4
|
import { ProtocolParameter_$reflection, ProtocolParameter } from "./ProtocolParameter.js";
|
|
5
5
|
import { Record, toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
6
6
|
import { record_type, option_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
7
|
-
import { Value_$reflection } from "
|
|
7
|
+
import { Value_$reflection } from "../Value.js";
|
|
8
8
|
import { OntologyAnnotation_$reflection } from "../OntologyAnnotation.js";
|
|
9
9
|
|
|
10
10
|
export class ProcessParameterValue extends Record {
|
|
@@ -79,7 +79,7 @@ export class ProcessParameterValue extends Record {
|
|
|
79
79
|
static getCategory(pv) {
|
|
80
80
|
return pv.Category;
|
|
81
81
|
}
|
|
82
|
-
static createAsPV(category, value, unit) {
|
|
82
|
+
static createAsPV(alternateName, measurementMethod, description, category, value, unit) {
|
|
83
83
|
const category_1 = map((c) => ProtocolParameter.create(void 0, c), category);
|
|
84
84
|
return ProcessParameterValue.create(unwrap(category_1), unwrap(value), unwrap(unit));
|
|
85
85
|
}
|
|
@@ -103,6 +103,15 @@ export class ProcessParameterValue extends Record {
|
|
|
103
103
|
}, this$.Value);
|
|
104
104
|
return (category == null) ? ((value == null) ? "" : ((value_2 = value, value_2))) : ((value == null) ? ((category_2 = category, (category_2 + ":") + "No Value")) : ((category_1 = category, (value_1 = value, (category_1 + ":") + value_1))));
|
|
105
105
|
}
|
|
106
|
+
AlternateName() {
|
|
107
|
+
return void 0;
|
|
108
|
+
}
|
|
109
|
+
MeasurementMethod() {
|
|
110
|
+
return void 0;
|
|
111
|
+
}
|
|
112
|
+
Description() {
|
|
113
|
+
return void 0;
|
|
114
|
+
}
|
|
106
115
|
GetCategory() {
|
|
107
116
|
const this$ = this;
|
|
108
117
|
return bind((p) => p.ParameterName, this$.Category);
|
package/Core/Table/ArcTable.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { boxHashValues, Unchecked_alignByHeaders, Unchecked_extendToRowCount, Unchecked_removeRowCells_withIndexChange, Unchecked_addRows, Unchecked_addRow, Unchecked_getEmptyCellForHeader, Unchecked_moveColumnTo, Unchecked_removeColumnCells_withIndexChange, tryFindDuplicateUniqueInArray, Unchecked_removeColumnCells, Unchecked_removeHeader, Unchecked_fillMissingCells, Unchecked_addColumn, tryFindDuplicateUnique, Unchecked_setCellAt,
|
|
1
|
+
import { boxHashValues, Unchecked_alignByHeaders, Unchecked_extendToRowCount, Unchecked_removeRowCells_withIndexChange, Unchecked_addRows, Unchecked_addRow, Unchecked_getEmptyCellForHeader, Unchecked_moveColumnTo, Unchecked_removeColumnCells_withIndexChange, tryFindDuplicateUniqueInArray, Unchecked_removeColumnCells, Unchecked_removeHeader, Unchecked_fillMissingCells, Unchecked_addColumn, SanityChecks_validateColumn, tryFindDuplicateUnique, Unchecked_setCellAt, SanityChecks_validateRowIndex, SanityChecks_validateColumnIndex, Unchecked_tryGetCellAt, getRowCount, getColumnCount, SanityChecks_validate } from "./ArcTableAux.js";
|
|
2
2
|
import { Dictionary } from "../../fable_modules/fable-library-js.4.16.0/MutableMap.js";
|
|
3
|
-
import { compareArrays, safeHash, comparePrimitives, equals, arrayHash, equalArrays } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
3
|
+
import { compareArrays, safeHash, comparePrimitives, equals, disposeSafe, getEnumerator, arrayHash, equalArrays } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
4
4
|
import { value as value_3, map as map_2, unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
5
5
|
import { item as item_1, fold, append as append_1, toList, indexed as indexed_1, choose, filter, length, tryFindIndex, empty, singleton, collect, removeAt, map, delay, toArray } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
6
6
|
import { rangeDouble } from "../../fable_modules/fable-library-js.4.16.0/Range.js";
|
|
7
|
+
import { join, printf, toFail } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
8
|
+
import { getItemFromDict } from "../../fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
7
9
|
import { CompositeColumn } from "./CompositeColumn.js";
|
|
8
|
-
import { sortBy, indexed, mapIndexed,
|
|
10
|
+
import { sortBy, indexed, mapIndexed, item, sortDescending, iterateIndexed, initialize, map as map_1 } from "../../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
9
11
|
import { append, iterate, isEmpty } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
10
12
|
import { StringBuilder__AppendLine_Z721C83C5, StringBuilder_$ctor } from "../../fable_modules/fable-library-js.4.16.0/System.Text.js";
|
|
11
13
|
import { toString } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
12
|
-
import { join, printf, toFail } from "../../fable_modules/fable-library-js.4.16.0/String.js";
|
|
13
14
|
import { CompositeCell } from "./CompositeCell.js";
|
|
14
15
|
import { CompositeHeader } from "./CompositeHeader.js";
|
|
15
16
|
import { Array_groupBy } from "../../fable_modules/fable-library-js.4.16.0/Seq2.js";
|
|
16
|
-
import { getItemFromDict } from "../../fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
17
17
|
import { boxHashSeq, boxHashArray } from "../Helper/HashCodes.js";
|
|
18
18
|
import { class_type } from "../../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
19
19
|
|
|
@@ -104,6 +104,19 @@ export class ArcTable {
|
|
|
104
104
|
static tryGetCellAt(column, row) {
|
|
105
105
|
return (table) => table.TryGetCellAt(column, row);
|
|
106
106
|
}
|
|
107
|
+
GetCellAt(column, row) {
|
|
108
|
+
const this$ = this;
|
|
109
|
+
try {
|
|
110
|
+
return getItemFromDict(this$.Values, [column, row]);
|
|
111
|
+
}
|
|
112
|
+
catch (matchValue) {
|
|
113
|
+
const arg_2 = this$.Name;
|
|
114
|
+
return toFail(printf("Unable to find cell for index: (%i, %i) in table %s"))(column)(row)(arg_2);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
static getCellAt(column, row) {
|
|
118
|
+
return (table) => table.GetCellAt(column, row);
|
|
119
|
+
}
|
|
107
120
|
IterColumns(action) {
|
|
108
121
|
const this$ = this;
|
|
109
122
|
for (let columnIndex = 0; columnIndex <= (this$.ColumnCount - 1); columnIndex++) {
|
|
@@ -130,20 +143,83 @@ export class ArcTable {
|
|
|
130
143
|
return copy;
|
|
131
144
|
};
|
|
132
145
|
}
|
|
133
|
-
UpdateCellAt(columnIndex, rowIndex, c) {
|
|
146
|
+
UpdateCellAt(columnIndex, rowIndex, c, skipValidation) {
|
|
134
147
|
const this$ = this;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
148
|
+
if (!defaultArg(skipValidation, false)) {
|
|
149
|
+
SanityChecks_validateColumnIndex(columnIndex, this$.ColumnCount, false);
|
|
150
|
+
SanityChecks_validateRowIndex(rowIndex, this$.RowCount, false);
|
|
151
|
+
c.ValidateAgainstHeader(this$.Headers[columnIndex], true);
|
|
152
|
+
}
|
|
153
|
+
Unchecked_setCellAt(columnIndex, rowIndex, c, this$.Values);
|
|
154
|
+
}
|
|
155
|
+
static updateCellAt(columnIndex, rowIndex, cell, skipValidation) {
|
|
156
|
+
return (table) => {
|
|
157
|
+
const newTable = table.Copy();
|
|
158
|
+
newTable.UpdateCellAt(columnIndex, rowIndex, cell, unwrap(skipValidation));
|
|
159
|
+
return newTable;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
SetCellAt(columnIndex, rowIndex, c, skipValidation) {
|
|
163
|
+
const this$ = this;
|
|
164
|
+
if (!defaultArg(skipValidation, false)) {
|
|
165
|
+
SanityChecks_validateColumnIndex(columnIndex, this$.ColumnCount, false);
|
|
166
|
+
c.ValidateAgainstHeader(this$.Headers[columnIndex], true);
|
|
167
|
+
}
|
|
138
168
|
Unchecked_setCellAt(columnIndex, rowIndex, c, this$.Values);
|
|
139
169
|
}
|
|
140
|
-
static
|
|
170
|
+
static setCellAt(columnIndex, rowIndex, cell, skipValidation) {
|
|
141
171
|
return (table) => {
|
|
142
172
|
const newTable = table.Copy();
|
|
143
|
-
newTable.
|
|
173
|
+
newTable.SetCellAt(columnIndex, rowIndex, cell, unwrap(skipValidation));
|
|
144
174
|
return newTable;
|
|
145
175
|
};
|
|
146
176
|
}
|
|
177
|
+
UpdateCellsBy(f, skipValidation) {
|
|
178
|
+
const this$ = this;
|
|
179
|
+
const skipValidation_1 = defaultArg(skipValidation, false);
|
|
180
|
+
let enumerator = getEnumerator(this$.Values);
|
|
181
|
+
try {
|
|
182
|
+
while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
|
|
183
|
+
const kv = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
|
|
184
|
+
const patternInput = kv[0];
|
|
185
|
+
const ri = patternInput[1] | 0;
|
|
186
|
+
const ci = patternInput[0] | 0;
|
|
187
|
+
const newCell = f(ci, ri, kv[1]);
|
|
188
|
+
if (!skipValidation_1) {
|
|
189
|
+
newCell.ValidateAgainstHeader(this$.Headers[ci], true);
|
|
190
|
+
}
|
|
191
|
+
Unchecked_setCellAt(ci, ri, newCell, this$.Values);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
finally {
|
|
195
|
+
disposeSafe(enumerator);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
static updateCellsBy(f, skipValidation) {
|
|
199
|
+
return (table) => {
|
|
200
|
+
const newTable = table.Copy();
|
|
201
|
+
newTable.UpdateCellsBy(f, unwrap(skipValidation));
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
UpdateCellBy(columnIndex, rowIndex, f, skipValidation) {
|
|
205
|
+
const this$ = this;
|
|
206
|
+
const skipValidation_1 = defaultArg(skipValidation, false);
|
|
207
|
+
if (!skipValidation_1) {
|
|
208
|
+
SanityChecks_validateColumnIndex(columnIndex, this$.ColumnCount, false);
|
|
209
|
+
SanityChecks_validateRowIndex(rowIndex, this$.RowCount, false);
|
|
210
|
+
}
|
|
211
|
+
const newCell = f(this$.GetCellAt(columnIndex, rowIndex));
|
|
212
|
+
if (!skipValidation_1) {
|
|
213
|
+
newCell.ValidateAgainstHeader(this$.Headers[columnIndex], true);
|
|
214
|
+
}
|
|
215
|
+
Unchecked_setCellAt(columnIndex, rowIndex, newCell, this$.Values);
|
|
216
|
+
}
|
|
217
|
+
static updateCellBy(columnIndex, rowIndex, f, skipValidation) {
|
|
218
|
+
return (table) => {
|
|
219
|
+
const newTable = table.Copy();
|
|
220
|
+
newTable.UpdateCellBy(columnIndex, rowIndex, f, unwrap(skipValidation));
|
|
221
|
+
};
|
|
222
|
+
}
|
|
147
223
|
UpdateHeader(index, newHeader, forceConvertCells) {
|
|
148
224
|
const this$ = this;
|
|
149
225
|
const forceConvertCells_1 = defaultArg(forceConvertCells, false);
|
|
@@ -199,6 +275,18 @@ export class ArcTable {
|
|
|
199
275
|
return newTable;
|
|
200
276
|
};
|
|
201
277
|
}
|
|
278
|
+
AddColumnFill(header, cell, index, forceReplace) {
|
|
279
|
+
const this$ = this;
|
|
280
|
+
const cells = initialize(this$.RowCount, (_arg) => cell.Copy());
|
|
281
|
+
this$.AddColumn(header, cells, index, forceReplace);
|
|
282
|
+
}
|
|
283
|
+
static addColumnFill(header, cell, index, forceReplace) {
|
|
284
|
+
return (table) => {
|
|
285
|
+
const newTable = table.Copy();
|
|
286
|
+
newTable.AddColumnFill(header, cell, unwrap(index), unwrap(forceReplace));
|
|
287
|
+
return newTable;
|
|
288
|
+
};
|
|
289
|
+
}
|
|
202
290
|
UpdateColumn(columnIndex, header, cells, skipFillMissing) {
|
|
203
291
|
const this$ = this;
|
|
204
292
|
SanityChecks_validateColumnIndex(columnIndex, this$.ColumnCount, false);
|
|
@@ -54,33 +54,19 @@ export class CompositeCell extends Union {
|
|
|
54
54
|
}
|
|
55
55
|
ToUnitizedCell() {
|
|
56
56
|
const this$ = this;
|
|
57
|
-
|
|
58
|
-
case 1:
|
|
59
|
-
return new CompositeCell(2, ["", OntologyAnnotation.create(this$.fields[0])]);
|
|
60
|
-
case 0:
|
|
61
|
-
return new CompositeCell(2, ["", this$.fields[0]]);
|
|
62
|
-
case 3:
|
|
63
|
-
throw new Error("Data cell cannot be converted to Unitized cell.");
|
|
64
|
-
default:
|
|
65
|
-
return this$;
|
|
66
|
-
}
|
|
57
|
+
return (this$.tag === 1) ? (new CompositeCell(2, ["", OntologyAnnotation.create(this$.fields[0])])) : ((this$.tag === 0) ? (new CompositeCell(2, ["", this$.fields[0]])) : ((this$.tag === 3) ? (new CompositeCell(2, ["", OntologyAnnotation.create(this$.fields[0].NameText)])) : this$));
|
|
67
58
|
}
|
|
68
59
|
ToTermCell() {
|
|
69
60
|
const this$ = this;
|
|
70
|
-
|
|
71
|
-
case 2:
|
|
72
|
-
return new CompositeCell(0, [this$.fields[1]]);
|
|
73
|
-
case 1:
|
|
74
|
-
return new CompositeCell(0, [OntologyAnnotation.create(this$.fields[0])]);
|
|
75
|
-
case 3:
|
|
76
|
-
throw new Error("Data cell cannot be converted to Term cell.");
|
|
77
|
-
default:
|
|
78
|
-
return this$;
|
|
79
|
-
}
|
|
61
|
+
return (this$.tag === 2) ? (new CompositeCell(0, [this$.fields[1]])) : ((this$.tag === 1) ? (new CompositeCell(0, [OntologyAnnotation.create(this$.fields[0])])) : ((this$.tag === 3) ? (new CompositeCell(0, [new OntologyAnnotation(this$.fields[0].NameText)])) : this$));
|
|
80
62
|
}
|
|
81
63
|
ToFreeTextCell() {
|
|
82
64
|
const this$ = this;
|
|
83
|
-
return (this$.tag === 0) ? (new CompositeCell(1, [this$.fields[0].NameText])) : ((this$.tag === 2) ? (new CompositeCell(1, [this$.fields[1].NameText])) : ((this$.tag === 3) ? (new CompositeCell(1, [
|
|
65
|
+
return (this$.tag === 0) ? (new CompositeCell(1, [this$.fields[0].NameText])) : ((this$.tag === 2) ? (new CompositeCell(1, [this$.fields[1].NameText])) : ((this$.tag === 3) ? (new CompositeCell(1, [this$.fields[0].NameText])) : this$));
|
|
66
|
+
}
|
|
67
|
+
ToDataCell() {
|
|
68
|
+
const this$ = this;
|
|
69
|
+
return (this$.tag === 1) ? CompositeCell.createDataFromString(this$.fields[0]) : ((this$.tag === 0) ? CompositeCell.createDataFromString(this$.fields[0].NameText) : ((this$.tag === 3) ? this$ : CompositeCell.createDataFromString(this$.fields[1].NameText)));
|
|
84
70
|
}
|
|
85
71
|
get AsUnitized() {
|
|
86
72
|
const this$ = this;
|
|
@@ -159,8 +145,11 @@ export class CompositeCell extends Union {
|
|
|
159
145
|
return CompositeCell.createUnitized(this$.fields[0], oa);
|
|
160
146
|
case 1:
|
|
161
147
|
return CompositeCell.createFreeText(oa.NameText);
|
|
162
|
-
case 3:
|
|
163
|
-
|
|
148
|
+
case 3: {
|
|
149
|
+
const d = this$.fields[0];
|
|
150
|
+
d.Name = oa.NameText;
|
|
151
|
+
return new CompositeCell(3, [d]);
|
|
152
|
+
}
|
|
164
153
|
default:
|
|
165
154
|
return CompositeCell.createTerm(oa);
|
|
166
155
|
}
|
|
@@ -176,6 +165,32 @@ export class CompositeCell extends Union {
|
|
|
176
165
|
const this$ = this;
|
|
177
166
|
return (this$.tag === 1) ? (new CompositeCell(1, [this$.fields[0]])) : ((this$.tag === 2) ? (new CompositeCell(2, [this$.fields[0], this$.fields[1].Copy()])) : ((this$.tag === 3) ? (new CompositeCell(3, [this$.fields[0].Copy()])) : (new CompositeCell(0, [this$.fields[0].Copy()]))));
|
|
178
167
|
}
|
|
168
|
+
ValidateAgainstHeader(header, raiseException) {
|
|
169
|
+
const this$ = this;
|
|
170
|
+
const raiseExeption = defaultArg(raiseException, false);
|
|
171
|
+
const cell = this$;
|
|
172
|
+
if (header.IsDataColumn && (cell.isData ? true : cell.isFreeText)) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
else if (header.IsDataColumn) {
|
|
176
|
+
if (raiseExeption) {
|
|
177
|
+
throw new Error(`Invalid combination of header \`${header}\` and cell \`${cell}\`, Data header should have either Data or Freetext cells`);
|
|
178
|
+
}
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
else if (header.IsTermColumn && (cell.isTerm ? true : cell.isUnitized)) {
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
else if (!header.IsTermColumn && cell.isFreeText) {
|
|
185
|
+
return true;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
if (raiseExeption) {
|
|
189
|
+
throw new Error(`Invalid combination of header \`${header}\` and cell \`${cell}\``);
|
|
190
|
+
}
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
179
194
|
static term(oa) {
|
|
180
195
|
return new CompositeCell(0, [oa]);
|
|
181
196
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
2
|
-
import {
|
|
3
|
-
import { fold, empty, singleton, collect, delay, toArray } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
1
|
+
import { unwrap, defaultArg } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
2
|
+
import { fold, empty, singleton, collect, delay, toArray, exists } from "../../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
4
3
|
import { CompositeCell_$reflection, CompositeCell } from "./CompositeCell.js";
|
|
5
4
|
import { Record } from "../../fable_modules/fable-library-js.4.16.0/Types.js";
|
|
6
5
|
import { CompositeHeader_$reflection } from "./CompositeHeader.js";
|
|
@@ -17,33 +16,7 @@ export class CompositeColumn extends Record {
|
|
|
17
16
|
}
|
|
18
17
|
Validate(raiseException) {
|
|
19
18
|
const this$ = this;
|
|
20
|
-
|
|
21
|
-
const header = this$.Header;
|
|
22
|
-
const cells = this$.Cells;
|
|
23
|
-
if (cells.length === 0) {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
else if (header.IsDataColumn && (item(0, cells).isData ? true : item(0, cells).isFreeText)) {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
else if (header.IsDataColumn) {
|
|
30
|
-
if (raiseExeption) {
|
|
31
|
-
throw new Error(`Invalid combination of header \`${header}\` and cells \`${item(0, cells)}\`, Data header should have either Data or Freetext cells`);
|
|
32
|
-
}
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
else if (header.IsTermColumn && (item(0, cells).isTerm ? true : item(0, cells).isUnitized)) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
else if (!header.IsTermColumn && item(0, cells).isFreeText) {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
if (raiseExeption) {
|
|
43
|
-
throw new Error(`Invalid combination of header \`${header}\` and cells \`${item(0, cells)}\``);
|
|
44
|
-
}
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
19
|
+
return !exists((c) => !c.ValidateAgainstHeader(this$.Header, unwrap(raiseException)), this$.Cells);
|
|
47
20
|
}
|
|
48
21
|
TryGetColumnUnits() {
|
|
49
22
|
const this$ = this;
|
|
@@ -71,6 +44,10 @@ export class CompositeColumn extends Record {
|
|
|
71
44
|
return (patternInput[1] >= patternInput[0]) ? CompositeCell.emptyTerm : CompositeCell.emptyUnitized;
|
|
72
45
|
}
|
|
73
46
|
}
|
|
47
|
+
get IsUnique() {
|
|
48
|
+
const this$ = this;
|
|
49
|
+
return this$.Header.IsUnique;
|
|
50
|
+
}
|
|
74
51
|
}
|
|
75
52
|
|
|
76
53
|
export function CompositeColumn_$reflection() {
|