@nfdi4plants/arctrl 3.0.0-alpha.4 → 3.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +16 -8
  2. package/dist/ts/cjs/ts/ARC.js +31 -20
  3. package/dist/ts/cjs/ts/Conversion.js +122 -76
  4. package/dist/ts/cjs/ts/Core/ArcTypes.js +1 -1
  5. package/dist/ts/cjs/ts/Core/Conversion.js +110 -43
  6. package/dist/ts/cjs/ts/Core/Data.js +4 -2
  7. package/dist/ts/cjs/ts/Core/Helper/Collections.js +69 -1
  8. package/dist/ts/cjs/ts/Core/OntologyAnnotation.js +27 -23
  9. package/dist/ts/cjs/ts/Core/Table/ArcTable.js +234 -217
  10. package/dist/ts/cjs/ts/Core/Table/ArcTableAux.js +904 -255
  11. package/dist/ts/cjs/ts/Core/Table/ArcTables.js +12 -19
  12. package/dist/ts/cjs/ts/Core/Table/CompositeColumn.js +4 -2
  13. package/dist/ts/cjs/ts/FileSystem/DefaultGitattributes.js +1 -1
  14. package/dist/ts/cjs/ts/Json/Decode.js +105 -0
  15. package/dist/ts/cjs/ts/Json/Encode.js +42 -0
  16. package/dist/ts/cjs/ts/Json/Table/ArcTable.js +100 -113
  17. package/dist/ts/cjs/ts/Json.js +46 -1
  18. package/dist/ts/cjs/ts/ROCrateIO.js +12 -1
  19. package/dist/ts/cjs/ts/Spreadsheet/AnnotationTable/ArcTable.js +15 -4
  20. package/dist/ts/cjs/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +77 -6
  21. package/dist/ts/cjs/ts/Spreadsheet/ArcInvestigation.js +31 -15
  22. package/dist/ts/cjs/ts/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
  23. package/dist/ts/cjs/ts/Spreadsheet/Metadata/SparseTable.js +2 -5
  24. package/dist/ts/esm/ts/ARC.js +34 -23
  25. package/dist/ts/esm/ts/Conversion.js +128 -82
  26. package/dist/ts/esm/ts/Core/ArcTypes.js +1 -1
  27. package/dist/ts/esm/ts/Core/Conversion.js +112 -45
  28. package/dist/ts/esm/ts/Core/Data.js +7 -5
  29. package/dist/ts/esm/ts/Core/Helper/Collections.js +61 -1
  30. package/dist/ts/esm/ts/Core/OntologyAnnotation.js +29 -25
  31. package/dist/ts/esm/ts/Core/Table/ArcTable.js +243 -226
  32. package/dist/ts/esm/ts/Core/Table/ArcTableAux.js +897 -264
  33. package/dist/ts/esm/ts/Core/Table/ArcTables.js +15 -22
  34. package/dist/ts/esm/ts/Core/Table/CompositeColumn.js +5 -3
  35. package/dist/ts/esm/ts/FileSystem/DefaultGitattributes.js +1 -1
  36. package/dist/ts/esm/ts/Json/Decode.js +105 -3
  37. package/dist/ts/esm/ts/Json/Encode.js +42 -2
  38. package/dist/ts/esm/ts/Json/Table/ArcTable.js +108 -121
  39. package/dist/ts/esm/ts/Json.js +39 -0
  40. package/dist/ts/esm/ts/ROCrateIO.js +14 -3
  41. package/dist/ts/esm/ts/Spreadsheet/AnnotationTable/ArcTable.js +17 -7
  42. package/dist/ts/esm/ts/Spreadsheet/AnnotationTable/CompositeColumn.js +78 -9
  43. package/dist/ts/esm/ts/Spreadsheet/ArcInvestigation.js +33 -17
  44. package/dist/ts/esm/ts/Spreadsheet/DataMapTable/DataMapHeader.js +1 -1
  45. package/dist/ts/esm/ts/Spreadsheet/Metadata/SparseTable.js +3 -6
  46. package/dist/ts/types/ts/ARC.d.ts +2 -2
  47. package/dist/ts/types/ts/ARC.d.ts.map +1 -1
  48. package/dist/ts/types/ts/Conversion.d.ts +15 -16
  49. package/dist/ts/types/ts/Conversion.d.ts.map +1 -1
  50. package/dist/ts/types/ts/Core/ArcTypes.d.ts +2 -0
  51. package/dist/ts/types/ts/Core/ArcTypes.d.ts.map +1 -1
  52. package/dist/ts/types/ts/Core/Conversion.d.ts +14 -15
  53. package/dist/ts/types/ts/Core/Conversion.d.ts.map +1 -1
  54. package/dist/ts/types/ts/Core/Data.d.ts.map +1 -1
  55. package/dist/ts/types/ts/Core/Helper/Collections.d.ts +8 -0
  56. package/dist/ts/types/ts/Core/Helper/Collections.d.ts.map +1 -1
  57. package/dist/ts/types/ts/Core/OntologyAnnotation.d.ts +9 -0
  58. package/dist/ts/types/ts/Core/OntologyAnnotation.d.ts.map +1 -1
  59. package/dist/ts/types/ts/Core/Table/ArcTable.d.ts +35 -28
  60. package/dist/ts/types/ts/Core/Table/ArcTable.d.ts.map +1 -1
  61. package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts +83 -35
  62. package/dist/ts/types/ts/Core/Table/ArcTableAux.d.ts.map +1 -1
  63. package/dist/ts/types/ts/Core/Table/ArcTables.d.ts.map +1 -1
  64. package/dist/ts/types/ts/Core/Table/CompositeColumn.d.ts.map +1 -1
  65. package/dist/ts/types/ts/FileSystem/DefaultGitattributes.d.ts +1 -1
  66. package/dist/ts/types/ts/FileSystem/DefaultGitattributes.d.ts.map +1 -1
  67. package/dist/ts/types/ts/Json/Decode.d.ts +6 -0
  68. package/dist/ts/types/ts/Json/Decode.d.ts.map +1 -1
  69. package/dist/ts/types/ts/Json/Encode.d.ts +2 -0
  70. package/dist/ts/types/ts/Json/Encode.d.ts.map +1 -1
  71. package/dist/ts/types/ts/Json/Table/ArcTable.d.ts +4 -3
  72. package/dist/ts/types/ts/Json/Table/ArcTable.d.ts.map +1 -1
  73. package/dist/ts/types/ts/Json.d.ts +17 -0
  74. package/dist/ts/types/ts/Json.d.ts.map +1 -1
  75. package/dist/ts/types/ts/ROCrateIO.d.ts +1 -1
  76. package/dist/ts/types/ts/ROCrateIO.d.ts.map +1 -1
  77. package/dist/ts/types/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts +5 -0
  78. package/dist/ts/types/ts/Spreadsheet/AnnotationTable/ArcTable.d.ts.map +1 -1
  79. package/dist/ts/types/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts +7 -0
  80. package/dist/ts/types/ts/Spreadsheet/AnnotationTable/CompositeColumn.d.ts.map +1 -1
  81. package/dist/ts/types/ts/Spreadsheet/ArcInvestigation.d.ts.map +1 -1
  82. package/dist/ts/types/ts/Spreadsheet/Metadata/SparseTable.d.ts.map +1 -1
  83. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  import { fromString } from "./fable_modules/Thoth.Json.JavaScript.0.3.0/Decode.fs.js";
2
2
  import { Decode_datetime } from "./Json/Decode.js";
3
- import { join, remove, toFail, printf, toText } from "@fable-org/fable-library-js/String.js";
3
+ import { join, toFail, printf, toText } from "@fable-org/fable-library-js/String.js";
4
4
  import { bind, defaultArg, map, unwrap, value as value_4 } from "@fable-org/fable-library-js/Option.js";
5
5
  import { toString } from "./fable_modules/Thoth.Json.JavaScript.0.3.0/Encode.fs.js";
6
6
  import { dateTime } from "./Json/Encode.js";
7
7
  import { parse, tryParse } from "@fable-org/fable-library-js/Int32.js";
8
8
  import { toString as toString_1, FSharpRef } from "@fable-org/fable-library-js/Types.js";
9
9
  import { LDRef, LDNode } from "./ROCrate/LDObject.js";
10
- import { safeHash, equals, disposeSafe, getEnumerator, stringHash, comparePrimitives, int32ToString } from "@fable-org/fable-library-js/Util.js";
10
+ import { safeHash, equals, disposeSafe, getEnumerator, comparePrimitives, stringHash, int32ToString } from "@fable-org/fable-library-js/Util.js";
11
11
  import { class_type } from "@fable-org/fable-library-js/Reflection.js";
12
12
  import { LDComment } from "./ROCrate/Generic/Comment.js";
13
13
  import { Comment$ } from "./Core/Comment.js";
@@ -24,17 +24,15 @@ import { DataContext_$ctor_Z780A8A2A, DataContext__get_Label, DataContext__get_D
24
24
  import { LDSample } from "./ROCrate/Generic/Sample.js";
25
25
  import { ActivePatterns_$007CRegex$007C_$007C } from "./Core/Helper/Regex.js";
26
26
  import { LDLabProtocol } from "./ROCrate/Generic/LabProtocol.js";
27
- import { getItemFromDict } from "@fable-org/fable-library-js/MapUtil.js";
27
+ import { Unchecked_alignByHeaders, getEmptyCellForHeader, Unchecked_tryGetCellAt } from "./Core/Table/ArcTableAux.js";
28
+ import { ArcTable } from "./Core/Table/ArcTable.js";
28
29
  import { LDPerson } from "./ROCrate/Generic/Person.js";
29
- import { isEmpty, zip, fold, singleton, empty as empty_1, append, delay, max, map as map_1, choose as choose_1, tryPick, filter, toList, indexed } from "@fable-org/fable-library-js/Seq.js";
30
- import { ofSeq, collect, initialize, singleton as singleton_2, sortBy, map as map_2, empty, length, choose } from "@fable-org/fable-library-js/List.js";
30
+ import { isEmpty, zip, fold, singleton, empty as empty_1, append, delay, map as map_1, choose as choose_1, tryPick, filter, toList, indexed } from "@fable-org/fable-library-js/Seq.js";
31
+ import { ofSeq, collect, initialize, singleton as singleton_1, sortBy, map as map_2, empty, length, choose } from "@fable-org/fable-library-js/List.js";
31
32
  import { LDLabProcess } from "./ROCrate/Generic/LabProcess.js";
32
33
  import { List_distinct, List_groupBy } from "@fable-org/fable-library-js/Seq2.js";
33
34
  import { createMissingIdentifier } from "./Core/Helper/Identifier.js";
34
- import { ArcTable } from "./Core/Table/ArcTable.js";
35
- import { singleton as singleton_1 } from "@fable-org/fable-library-js/Array.js";
36
35
  import { rangeDouble } from "@fable-org/fable-library-js/Range.js";
37
- import { Unchecked_alignByHeaders } from "./Core/Table/ArcTableAux.js";
38
36
  import { ArcTables } from "./Core/Table/ArcTables.js";
39
37
  import { DataMap_init, DataMap_$ctor_4E3220A7, DataMap__get_DataContexts } from "./Core/DataMap.js";
40
38
  import { LDOrganization } from "./ROCrate/Generic/Organization.js";
@@ -604,8 +602,9 @@ export function ProcessConversion_decomposeProcessName_Z721C83C5(name) {
604
602
  export function ProcessConversion_tryComponentGetter(generalI, valueI, valueHeader) {
605
603
  if (valueHeader.tag === /* Component */ 0) {
606
604
  const oa = valueHeader.fields[0];
607
- return (matrix) => ((i) => {
608
- const c = BaseTypes_composeComponent(valueHeader, getItemFromDict(matrix, [generalI, i]));
605
+ return (table) => ((i) => {
606
+ let matchValue;
607
+ const c = BaseTypes_composeComponent(valueHeader, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(valueHeader, undefined) : value_4(matchValue)));
609
608
  ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(c, valueI);
610
609
  return c;
611
610
  });
@@ -620,8 +619,9 @@ export function ProcessConversion_tryComponentGetter(generalI, valueI, valueHead
620
619
  export function ProcessConversion_tryParameterGetter(generalI, valueI, valueHeader) {
621
620
  if (valueHeader.tag === /* Parameter */ 3) {
622
621
  const oa = valueHeader.fields[0];
623
- return (matrix) => ((i) => {
624
- const p = BaseTypes_composeParameterValue(valueHeader, getItemFromDict(matrix, [generalI, i]));
622
+ return (table) => ((i) => {
623
+ let matchValue;
624
+ const p = BaseTypes_composeParameterValue(valueHeader, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(valueHeader, undefined) : value_4(matchValue)));
625
625
  ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(p, valueI);
626
626
  return p;
627
627
  });
@@ -636,8 +636,9 @@ export function ProcessConversion_tryParameterGetter(generalI, valueI, valueHead
636
636
  export function ProcessConversion_tryFactorGetter(generalI, valueI, valueHeader) {
637
637
  if (valueHeader.tag === /* Factor */ 2) {
638
638
  const oa = valueHeader.fields[0];
639
- return (matrix) => ((i) => {
640
- const f = BaseTypes_composeFactorValue(valueHeader, getItemFromDict(matrix, [generalI, i]));
639
+ return (table) => ((i) => {
640
+ let matchValue;
641
+ const f = BaseTypes_composeFactorValue(valueHeader, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(valueHeader, undefined) : value_4(matchValue)));
641
642
  ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(f, valueI);
642
643
  return f;
643
644
  });
@@ -652,8 +653,9 @@ export function ProcessConversion_tryFactorGetter(generalI, valueI, valueHeader)
652
653
  export function ProcessConversion_tryCharacteristicGetter(generalI, valueI, valueHeader) {
653
654
  if (valueHeader.tag === /* Characteristic */ 1) {
654
655
  const oa = valueHeader.fields[0];
655
- return (matrix) => ((i) => {
656
- const c = BaseTypes_composeCharacteristicValue(valueHeader, getItemFromDict(matrix, [generalI, i]));
656
+ return (table) => ((i) => {
657
+ let matchValue;
658
+ const c = BaseTypes_composeCharacteristicValue(valueHeader, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(valueHeader, undefined) : value_4(matchValue)));
657
659
  ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(c, valueI);
658
660
  return c;
659
661
  });
@@ -667,7 +669,10 @@ export function ProcessConversion_tryCharacteristicGetter(generalI, valueI, valu
667
669
  */
668
670
  export function ProcessConversion_tryGetProtocolTypeGetter(generalI, header) {
669
671
  if (header.tag === /* ProtocolType */ 4) {
670
- return (matrix) => ((i) => BaseTypes_composeDefinedTerm_ZDED3A0F(getItemFromDict(matrix, [generalI, i]).AsTerm));
672
+ return (table) => ((i) => {
673
+ let matchValue, cell;
674
+ return BaseTypes_composeDefinedTerm_ZDED3A0F((matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? (new OntologyAnnotation()) : ((cell = value_4(matchValue), cell.AsTerm))));
675
+ });
671
676
  }
672
677
  else {
673
678
  return undefined;
@@ -678,7 +683,16 @@ export function ProcessConversion_tryGetProtocolTypeGetter(generalI, header) {
678
683
  */
679
684
  export function ProcessConversion_tryGetProtocolREFGetter(generalI, header) {
680
685
  if (header.tag === /* ProtocolREF */ 8) {
681
- return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
686
+ return (table) => ((i) => {
687
+ const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
688
+ if (matchValue == null) {
689
+ return "";
690
+ }
691
+ else {
692
+ const cell = value_4(matchValue);
693
+ return cell.AsFreeText;
694
+ }
695
+ });
682
696
  }
683
697
  else {
684
698
  return undefined;
@@ -689,7 +703,16 @@ export function ProcessConversion_tryGetProtocolREFGetter(generalI, header) {
689
703
  */
690
704
  export function ProcessConversion_tryGetProtocolDescriptionGetter(generalI, header) {
691
705
  if (header.tag === /* ProtocolDescription */ 5) {
692
- return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
706
+ return (table) => ((i) => {
707
+ const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
708
+ if (matchValue == null) {
709
+ return "";
710
+ }
711
+ else {
712
+ const cell = value_4(matchValue);
713
+ return cell.AsFreeText;
714
+ }
715
+ });
693
716
  }
694
717
  else {
695
718
  return undefined;
@@ -700,7 +723,16 @@ export function ProcessConversion_tryGetProtocolDescriptionGetter(generalI, head
700
723
  */
701
724
  export function ProcessConversion_tryGetProtocolURIGetter(generalI, header) {
702
725
  if (header.tag === /* ProtocolUri */ 6) {
703
- return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
726
+ return (table) => ((i) => {
727
+ const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
728
+ if (matchValue == null) {
729
+ return "";
730
+ }
731
+ else {
732
+ const cell = value_4(matchValue);
733
+ return cell.AsFreeText;
734
+ }
735
+ });
704
736
  }
705
737
  else {
706
738
  return undefined;
@@ -711,7 +743,16 @@ export function ProcessConversion_tryGetProtocolURIGetter(generalI, header) {
711
743
  */
712
744
  export function ProcessConversion_tryGetProtocolVersionGetter(generalI, header) {
713
745
  if (header.tag === /* ProtocolVersion */ 7) {
714
- return (matrix) => ((i) => getItemFromDict(matrix, [generalI, i]).AsFreeText);
746
+ return (table) => ((i) => {
747
+ const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
748
+ if (matchValue == null) {
749
+ return "";
750
+ }
751
+ else {
752
+ const cell = value_4(matchValue);
753
+ return cell.AsFreeText;
754
+ }
755
+ });
715
756
  }
716
757
  else {
717
758
  return undefined;
@@ -723,7 +764,10 @@ export function ProcessConversion_tryGetProtocolVersionGetter(generalI, header)
723
764
  export function ProcessConversion_tryGetInputGetter(generalI, header) {
724
765
  if (header.tag === /* Input */ 11) {
725
766
  const io = header.fields[0];
726
- return (matrix) => ((i) => BaseTypes_composeProcessInput(header, getItemFromDict(matrix, [generalI, i])));
767
+ return (table) => ((i) => {
768
+ let matchValue;
769
+ return BaseTypes_composeProcessInput(header, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(header, undefined) : value_4(matchValue)));
770
+ });
727
771
  }
728
772
  else {
729
773
  return undefined;
@@ -735,7 +779,10 @@ export function ProcessConversion_tryGetInputGetter(generalI, header) {
735
779
  export function ProcessConversion_tryGetOutputGetter(generalI, header) {
736
780
  if (header.tag === /* Output */ 12) {
737
781
  const io = header.fields[0];
738
- return (matrix) => ((i) => BaseTypes_composeProcessOutput(header, getItemFromDict(matrix, [generalI, i])));
782
+ return (table) => ((i) => {
783
+ let matchValue;
784
+ return BaseTypes_composeProcessOutput(header, (matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? getEmptyCellForHeader(header, undefined) : value_4(matchValue)));
785
+ });
739
786
  }
740
787
  else {
741
788
  return undefined;
@@ -747,7 +794,10 @@ export function ProcessConversion_tryGetOutputGetter(generalI, header) {
747
794
  export function ProcessConversion_tryGetCommentGetter(generalI, header) {
748
795
  if (header.tag === /* Comment */ 14) {
749
796
  const c = header.fields[0];
750
- return (matrix) => ((i) => toString_1(new Comment$(c, getItemFromDict(matrix, [generalI, i]).AsFreeText)));
797
+ return (table) => ((i) => {
798
+ let matchValue, cell;
799
+ return toString_1((matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values), (matchValue == null) ? (new Comment$(c)) : ((cell = value_4(matchValue), new Comment$(c, cell.AsFreeText)))));
800
+ });
751
801
  }
752
802
  else {
753
803
  return undefined;
@@ -755,8 +805,16 @@ export function ProcessConversion_tryGetCommentGetter(generalI, header) {
755
805
  }
756
806
  export function ProcessConversion_tryGetPerformerGetter(generalI, header) {
757
807
  if (header.tag === /* Performer */ 9) {
758
- return (matrix) => ((i) => {
759
- const performer = getItemFromDict(matrix, [generalI, i]).AsFreeText;
808
+ return (table) => ((i) => {
809
+ let performer;
810
+ const matchValue = Unchecked_tryGetCellAt(generalI, i, table.Values);
811
+ if (matchValue == null) {
812
+ performer = "";
813
+ }
814
+ else {
815
+ const cell = value_4(matchValue);
816
+ performer = cell.AsFreeText;
817
+ }
760
818
  return LDPerson.create(performer);
761
819
  });
762
820
  }
@@ -796,20 +854,20 @@ export function ProcessConversion_getProcessGetter(assayName, studyName, process
796
854
  let inputGetter_1;
797
855
  const matchValue = tryPick((tupledArg_11) => ProcessConversion_tryGetInputGetter(tupledArg_11[0], tupledArg_11[1]), headers_1);
798
856
  if (matchValue == null) {
799
- inputGetter_1 = ((length(charGetters) !== 0) ? ((matrix_1) => ((i_1) => {
857
+ inputGetter_1 = ((length(charGetters) !== 0) ? ((table_1) => ((i_1) => {
800
858
  let chars_1;
801
- const collection_1 = map_1((f_1) => f_1(matrix_1)(i_1), charGetters);
859
+ const collection_1 = map_1((f_1) => f_1(table_1)(i_1), charGetters);
802
860
  chars_1 = Array.from(collection_1);
803
861
  return ResizeArray_singleton(LDSample.createSample(`${processNameRoot}_Input_${i_1}`, undefined, chars_1));
804
- })) : ((matrix_2) => ((i_2) => [])));
862
+ })) : ((table_2) => ((i_2) => [])));
805
863
  }
806
864
  else {
807
865
  const inputGetter = value_4(matchValue);
808
- inputGetter_1 = ((matrix) => ((i) => {
866
+ inputGetter_1 = ((table) => ((i) => {
809
867
  let chars;
810
- const collection = map_1((f) => f(matrix)(i), charGetters);
868
+ const collection = map_1((f) => f(table)(i), charGetters);
811
869
  chars = Array.from(collection);
812
- const input = inputGetter(matrix)(i);
870
+ const input = inputGetter(table)(i);
813
871
  if (chars.length > 0) {
814
872
  LDSample.setAdditionalProperties(input, chars);
815
873
  }
@@ -819,41 +877,39 @@ export function ProcessConversion_getProcessGetter(assayName, studyName, process
819
877
  let outputGetter_1;
820
878
  const matchValue_1 = tryPick((tupledArg_12) => ProcessConversion_tryGetOutputGetter(tupledArg_12[0], tupledArg_12[1]), headers_1);
821
879
  if (matchValue_1 == null) {
822
- outputGetter_1 = ((length(factorValueGetters) !== 0) ? ((matrix_4) => ((i_4) => {
880
+ outputGetter_1 = ((length(factorValueGetters) !== 0) ? ((table_4) => ((i_4) => {
823
881
  let factors_1;
824
- const collection_3 = map_1((f_3) => f_3(matrix_4)(i_4), factorValueGetters);
882
+ const collection_3 = map_1((f_3) => f_3(table_4)(i_4), factorValueGetters);
825
883
  factors_1 = Array.from(collection_3);
826
884
  return ResizeArray_singleton(LDSample.createSample(`${processNameRoot}_Output_${i_4}`, undefined, factors_1));
827
- })) : ((matrix_5) => ((i_5) => [])));
885
+ })) : ((table_5) => ((i_5) => [])));
828
886
  }
829
887
  else {
830
888
  const outputGetter = value_4(matchValue_1);
831
- outputGetter_1 = ((matrix_3) => ((i_3) => {
889
+ outputGetter_1 = ((table_3) => ((i_3) => {
832
890
  let factors;
833
- const collection_2 = map_1((f_2) => f_2(matrix_3)(i_3), factorValueGetters);
891
+ const collection_2 = map_1((f_2) => f_2(table_3)(i_3), factorValueGetters);
834
892
  factors = Array.from(collection_2);
835
- const output = outputGetter(matrix_3)(i_3);
893
+ const output = outputGetter(table_3)(i_3);
836
894
  if (factors.length > 0) {
837
895
  LDSample.setAdditionalProperties(output, factors);
838
896
  }
839
897
  return ResizeArray_singleton(output);
840
898
  }));
841
899
  }
842
- return (matrix_6) => ((i_6) => {
843
- const pn = ((1 + max(map_1((tuple_1) => tuple_1[1], matrix_6.keys()), {
844
- Compare: comparePrimitives,
845
- })) === 1) ? processNameRoot : ProcessConversion_composeProcessName(processNameRoot, i_6);
846
- const paramvalues = map((collection_4) => Array.from(collection_4), Option_fromValueWithDefault(empty(), map_2((f_4) => f_4(matrix_6)(i_6), parameterValueGetters)));
847
- const comments = map((collection_5) => Array.from(collection_5), Option_fromValueWithDefault(empty(), map_2((f_5) => f_5(matrix_6)(i_6), commentGetters)));
848
- const components = map((collection_6) => Array.from(collection_6), Option_fromValueWithDefault(empty(), map_2((f_6) => f_6(matrix_6)(i_6), componentGetters)));
900
+ return (table_6) => ((i_6) => {
901
+ const pn = (table_6.RowCount === 1) ? processNameRoot : ProcessConversion_composeProcessName(processNameRoot, i_6);
902
+ const paramvalues = map((collection_4) => Array.from(collection_4), Option_fromValueWithDefault(empty(), map_2((f_4) => f_4(table_6)(i_6), parameterValueGetters)));
903
+ const comments = map((collection_5) => Array.from(collection_5), Option_fromValueWithDefault(empty(), map_2((f_5) => f_5(table_6)(i_6), commentGetters)));
904
+ const components = map((collection_6) => Array.from(collection_6), Option_fromValueWithDefault(empty(), map_2((f_6) => f_6(table_6)(i_6), componentGetters)));
849
905
  const id = LDLabProcess.genId(processNameRoot, unwrap(assayName), unwrap(studyName)) + (`_${i_6}`);
850
906
  let protocol;
851
- const name = map((f_7) => f_7(matrix_6)(i_6), protocolREFGetter);
907
+ const name = map((f_7) => f_7(table_6)(i_6), protocolREFGetter);
852
908
  const protocolId = LDLabProtocol.genId(unwrap(name), processNameRoot);
853
- protocol = LDLabProtocol.create(protocolId, unwrap(name), unwrap(map((f_8) => f_8(matrix_6)(i_6), protocolDescriptionGetter)), unwrap(map((f_9) => f_9(matrix_6)(i_6), protocolTypeGetter)), undefined, undefined, unwrap(components), undefined, unwrap(map((f_10) => f_10(matrix_6)(i_6), protocolURIGetter)), unwrap(map((f_11) => f_11(matrix_6)(i_6), protocolVersionGetter)));
854
- const matchValue_2 = inputGetter_1(matrix_6)(i_6);
855
- const matchValue_3 = outputGetter_1(matrix_6)(i_6);
856
- const agent = map((f_12) => f_12(matrix_6)(i_6), performerGetter);
909
+ protocol = LDLabProtocol.create(protocolId, unwrap(name), unwrap(map((f_8) => f_8(table_6)(i_6), protocolDescriptionGetter)), unwrap(map((f_9) => f_9(table_6)(i_6), protocolTypeGetter)), undefined, undefined, unwrap(components), undefined, unwrap(map((f_10) => f_10(table_6)(i_6), protocolURIGetter)), unwrap(map((f_11) => f_11(table_6)(i_6), protocolVersionGetter)));
910
+ const matchValue_2 = inputGetter_1(table_6)(i_6);
911
+ const matchValue_3 = outputGetter_1(table_6)(i_6);
912
+ const agent = map((f_12) => f_12(table_6)(i_6), performerGetter);
857
913
  return LDLabProcess.create(pn, matchValue_2, matchValue_3, id, unwrap(agent), unwrap(protocol), unwrap(paramvalues), undefined, unwrap(comments));
858
914
  });
859
915
  }
@@ -866,36 +922,28 @@ export function ProcessConversion_getProcessGetter(assayName, studyName, process
866
922
  */
867
923
  export function ProcessConversion_groupProcesses_Z27F0B586(processes, graph, context) {
868
924
  return List_groupBy((p) => {
869
- let protocol, name_1, name_2, protocol_1;
925
+ let protocol, protocol_1;
870
926
  const matchValue = LDLabProcess.tryGetNameAsString(p, unwrap(context));
871
927
  const matchValue_1 = LDLabProcess.tryGetExecutesLabProtocol(p, unwrap(graph), unwrap(context));
872
- let matchResult, name_3, protocol_2, name_4, name_5, protocol_3;
928
+ let matchResult, name_1, protocol_2, name_2, protocol_3;
873
929
  if (matchValue != null) {
874
930
  if (ProcessConversion_decomposeProcessName_Z721C83C5(value_4(matchValue))[1] != null) {
875
931
  matchResult = 0;
876
- name_3 = value_4(matchValue);
932
+ name_1 = value_4(matchValue);
877
933
  }
878
934
  else if (matchValue_1 != null) {
879
935
  if ((protocol = value_4(matchValue_1), LDLabProtocol.tryGetNameAsString(protocol, unwrap(context)) != null)) {
880
936
  matchResult = 1;
881
937
  protocol_2 = value_4(matchValue_1);
882
938
  }
883
- else if ((name_1 = value_4(matchValue), name_1.indexOf("_") >= 0)) {
884
- matchResult = 2;
885
- name_4 = value_4(matchValue);
886
- }
887
939
  else {
888
- matchResult = 3;
889
- name_5 = value_4(matchValue);
940
+ matchResult = 2;
941
+ name_2 = value_4(matchValue);
890
942
  }
891
943
  }
892
- else if ((name_2 = value_4(matchValue), name_2.indexOf("_") >= 0)) {
893
- matchResult = 2;
894
- name_4 = value_4(matchValue);
895
- }
896
944
  else {
897
- matchResult = 3;
898
- name_5 = value_4(matchValue);
945
+ matchResult = 2;
946
+ name_2 = value_4(matchValue);
899
947
  }
900
948
  }
901
949
  else if (matchValue_1 != null) {
@@ -904,23 +952,21 @@ export function ProcessConversion_groupProcesses_Z27F0B586(processes, graph, con
904
952
  protocol_2 = value_4(matchValue_1);
905
953
  }
906
954
  else {
907
- matchResult = 4;
955
+ matchResult = 3;
908
956
  protocol_3 = value_4(matchValue_1);
909
957
  }
910
958
  }
911
959
  else {
912
- matchResult = 5;
960
+ matchResult = 4;
913
961
  }
914
962
  switch (matchResult) {
915
963
  case 0:
916
- return ProcessConversion_decomposeProcessName_Z721C83C5(name_3)[0];
964
+ return ProcessConversion_decomposeProcessName_Z721C83C5(name_1)[0];
917
965
  case 1:
918
966
  return defaultArg(LDLabProtocol.tryGetNameAsString(protocol_2, unwrap(context)), "");
919
967
  case 2:
920
- return remove(name_4, name_4.lastIndexOf("_"));
968
+ return name_2;
921
969
  case 3:
922
- return name_5;
923
- case 4:
924
970
  return protocol_3.Id;
925
971
  default:
926
972
  return createMissingIdentifier();
@@ -1127,25 +1173,25 @@ export function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_Z6839B9E8(p, graph
1127
1173
  while (enumerator["System.Collections.IEnumerator.MoveNext"]()) {
1128
1174
  const c = enumerator["System.Collections.Generic.IEnumerator`1.get_Current"]();
1129
1175
  const patternInput = BaseTypes_decomposeComponent_Z2F770004(c, unwrap(context));
1130
- t.AddColumn(patternInput[0], singleton_1(patternInput[1]), unwrap(ARCtrl_ROCrate_LDNode__LDNode_TryGetColumnIndex(c)));
1176
+ t.AddColumn(patternInput[0], ResizeArray_singleton(patternInput[1]), unwrap(ARCtrl_ROCrate_LDNode__LDNode_TryGetColumnIndex(c)));
1131
1177
  }
1132
1178
  }
1133
1179
  finally {
1134
1180
  disposeSafe(enumerator);
1135
1181
  }
1136
1182
  map((d) => {
1137
- t.AddProtocolDescriptionColumn([d]);
1183
+ t.AddProtocolDescriptionColumn(ResizeArray_singleton(d));
1138
1184
  }, LDLabProtocol.tryGetDescriptionAsString(p, unwrap(context)));
1139
1185
  map((d_1) => {
1140
- t.AddProtocolVersionColumn([d_1]);
1186
+ t.AddProtocolVersionColumn(ResizeArray_singleton(d_1));
1141
1187
  }, LDLabProtocol.tryGetVersionAsString(p, unwrap(context)));
1142
1188
  map((d_2) => {
1143
- t.AddProtocolTypeColumn([d_2]);
1189
+ t.AddProtocolTypeColumn(ResizeArray_singleton(d_2));
1144
1190
  }, ProcessConversion_tryGetProtocolType_Z6839B9E8(p, undefined, unwrap(context)));
1145
1191
  map((d_3) => {
1146
- t.AddProtocolUriColumn([d_3]);
1192
+ t.AddProtocolUriColumn(ResizeArray_singleton(d_3));
1147
1193
  }, LDLabProtocol.tryGetUrl(p, unwrap(context)));
1148
- t.AddProtocolNameColumn([name]);
1194
+ t.AddProtocolNameColumn(ResizeArray_singleton(name));
1149
1195
  return t;
1150
1196
  }
1151
1197
  /**
@@ -1154,7 +1200,7 @@ export function ARCtrl_ArcTable__ArcTable_fromProtocol_Static_Z6839B9E8(p, graph
1154
1200
  export function ARCtrl_ArcTable__ArcTable_GetProtocols(this$) {
1155
1201
  let source;
1156
1202
  if (this$.RowCount === 0) {
1157
- return singleton_2((source = this$.Headers, fold((p, h) => {
1203
+ return singleton_1((source = this$.Headers, fold((p, h) => {
1158
1204
  if (h.tag === /* Component */ 0) {
1159
1205
  const oa = h.fields[0];
1160
1206
  const matchValue = oa.NameText;
@@ -1182,11 +1228,11 @@ export function ARCtrl_ArcTable__ArcTable_GetProtocols(this$) {
1182
1228
  */
1183
1229
  export function ARCtrl_ArcTable__ArcTable_GetProcesses_40457300(this$, assayName, studyName) {
1184
1230
  if (this$.RowCount === 0) {
1185
- return singleton_2(LDLabProcess.create(this$.Name));
1231
+ return singleton_1(LDLabProcess.create(this$.Name));
1186
1232
  }
1187
1233
  else {
1188
1234
  const getter = ProcessConversion_getProcessGetter(assayName, studyName, this$.Name, this$.Headers);
1189
- return toList(delay(() => map_1((i) => getter(this$.Values)(i), rangeDouble(0, 1, this$.RowCount - 1))));
1235
+ return toList(delay(() => map_1((i) => getter(this$)(i), rangeDouble(0, 1, this$.RowCount - 1))));
1190
1236
  }
1191
1237
  }
1192
1238
  /**
@@ -1198,7 +1244,7 @@ export function ARCtrl_ArcTable__ArcTable_GetProcesses_40457300(this$, assayName
1198
1244
  */
1199
1245
  export function ARCtrl_ArcTable__ArcTable_fromProcesses_Static_Z3575FB5F(name, ps, graph, context) {
1200
1246
  const tupledArg = Unchecked_alignByHeaders(true, collect((p) => ofSeq(ProcessConversion_processToRows_Z6839B9E8(p, unwrap(graph), unwrap(context))), ps));
1201
- return ArcTable.create(name, tupledArg[0], tupledArg[1]);
1247
+ return ArcTable.fromArcTableValues(name, tupledArg[0], tupledArg[1]);
1202
1248
  }
1203
1249
  /**
1204
1250
  * Return a list of all the processes in all the tables.
@@ -1217,7 +1263,7 @@ export function ARCtrl_ArcTables__ArcTables_fromProcesses_Static_Z27F0B586(ps, g
1217
1263
  let collection;
1218
1264
  return new ArcTables((collection = map_2((tupledArg) => {
1219
1265
  const tupledArg_1 = Unchecked_alignByHeaders(true, collect((p) => ofSeq(ProcessConversion_processToRows_Z6839B9E8(p, unwrap(graph), unwrap(context))), tupledArg[1]));
1220
- return ArcTable.create(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
1266
+ return ArcTable.fromArcTableValues(tupledArg[0], tupledArg_1[0], tupledArg_1[1]);
1221
1267
  }, ProcessConversion_groupProcesses_Z27F0B586(ps, unwrap(graph), unwrap(context))), Array.from(collection)));
1222
1268
  }
1223
1269
  export class DatamapConversion {
@@ -1607,7 +1607,7 @@ export class ArcRun extends ArcTables {
1607
1607
  return newRun;
1608
1608
  };
1609
1609
  }
1610
- static updateTable(name, updateFun) {
1610
+ static mapTable(name, updateFun) {
1611
1611
  return (run) => {
1612
1612
  const newRun = run.Copy();
1613
1613
  newRun.MapTable(name, updateFun);