@nfdi4plants/arctrl 1.0.3 → 1.0.5

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.
@@ -568,10 +568,14 @@ export class ArcTable {
568
568
  static getRow(index) {
569
569
  return (table) => table.GetRow(index);
570
570
  }
571
- Join(table, joinOptions, forceReplace, SkipFillMissing) {
571
+ Join(table, index, joinOptions, forceReplace, skipFillMissing) {
572
572
  const this$ = this;
573
573
  const joinOptions_1 = defaultArg(joinOptions, "headers");
574
574
  const forceReplace_1 = defaultArg(forceReplace, false);
575
+ const skipFillMissing_1 = defaultArg(skipFillMissing, true);
576
+ let index_1 = defaultArg(index, this$.ColumnCount);
577
+ index_1 = (((index_1 === -1) ? this$.ColumnCount : index_1) | 0);
578
+ SanityChecks_validateColumnIndex(index_1, this$.ColumnCount, true);
575
579
  const onlyHeaders = joinOptions_1 === "headers";
576
580
  let columns;
577
581
  const pre = table.Columns;
@@ -596,22 +600,21 @@ export class ArcTable {
596
600
  columns.forEach((x_2) => {
597
601
  SanityChecks_validateColumn(x_2);
598
602
  });
599
- let index = this$.ColumnCount;
600
603
  columns.forEach((col) => {
601
604
  const prevHeadersCount = this$.Headers.length | 0;
602
- Unchecked_addColumn(col.Header, col.Cells, index, forceReplace_1, onlyHeaders, this$.Headers, this$.Values);
605
+ Unchecked_addColumn(col.Header, col.Cells, index_1, forceReplace_1, onlyHeaders, this$.Headers, this$.Values);
603
606
  if (this$.Headers.length > prevHeadersCount) {
604
- index = ((index + 1) | 0);
607
+ index_1 = ((index_1 + 1) | 0);
605
608
  }
606
609
  });
607
- if (!equals(SkipFillMissing, true)) {
610
+ if (!skipFillMissing_1) {
608
611
  Unchecked_fillMissingCells(this$.Headers, this$.Values);
609
612
  }
610
613
  }
611
- static join(table, joinOptions, forceReplace) {
614
+ static join(table, index, joinOptions, forceReplace) {
612
615
  return (this$) => {
613
616
  const copy = this$.Copy();
614
- copy.Join(table, joinOptions, forceReplace);
617
+ copy.Join(table, index, joinOptions, forceReplace);
615
618
  return copy;
616
619
  };
617
620
  }
@@ -177,6 +177,20 @@ export function ArcAssay_toJsonString(a) {
177
177
  return toString(2, Assay_encoder(ConverterOptions_$ctor(), a.ToAssay()));
178
178
  }
179
179
 
180
+ export function ArcAssay_toArcJsonString(a) {
181
+ return toString(0, ArcAssay_encoder(a));
182
+ }
183
+
184
+ export function ArcAssay_fromArcJsonString(jsonString) {
185
+ const matchValue = fromString(uncurry2(ArcAssay_decoder), jsonString);
186
+ if (matchValue.tag === 1) {
187
+ return toFail(printf("Error. Unable to parse json string to ArcAssay: %s"))(matchValue.fields[0]);
188
+ }
189
+ else {
190
+ return matchValue.fields[0];
191
+ }
192
+ }
193
+
180
194
  export function ARCtrl_ISA_ArcAssay__ArcAssay_fromArcJsonString_Static_Z721C83C5(jsonString) {
181
195
  const matchValue = fromString(uncurry2(ArcAssay_decoder), jsonString);
182
196
  if (matchValue.tag === 1) {
@@ -59,6 +59,20 @@ export function ArcInvestigation_toJsonString(a) {
59
59
  return toString(2, encoder(ConverterOptions_$ctor(), a.ToInvestigation()));
60
60
  }
61
61
 
62
+ export function ArcInvestigation_toArcJsonString(a) {
63
+ return toString(0, ArcInvestigation_encoder(a));
64
+ }
65
+
66
+ export function ArcInvestigation_fromArcJsonString(jsonString) {
67
+ const matchValue = fromString(uncurry2(ArcInvestigation_decoder), jsonString);
68
+ if (matchValue.tag === 1) {
69
+ return toFail(printf("Error. Unable to parse json string to ArcInvestigation: %s"))(matchValue.fields[0]);
70
+ }
71
+ else {
72
+ return matchValue.fields[0];
73
+ }
74
+ }
75
+
62
76
  export function ARCtrl_ISA_ArcInvestigation__ArcInvestigation_fromArcJsonString_Static_Z721C83C5(jsonString) {
63
77
  const matchValue = fromString(uncurry2(ArcInvestigation_decoder), jsonString);
64
78
  if (matchValue.tag === 1) {
@@ -57,6 +57,20 @@ export function ArcStudy_toJsonString(a, assays) {
57
57
  return toString(2, Study_encoder(ConverterOptions_$ctor(), a.ToStudy(assays)));
58
58
  }
59
59
 
60
+ export function ArcStudy_toArcJsonString(a) {
61
+ return toString(0, ArcStudy_encoder(a));
62
+ }
63
+
64
+ export function ArcStudy_fromArcJsonString(jsonString) {
65
+ const matchValue = fromString(uncurry2(ArcStudy_decoder), jsonString);
66
+ if (matchValue.tag === 1) {
67
+ return toFail(printf("Error. Unable to parse json string to ArcStudy: %s"))(matchValue.fields[0]);
68
+ }
69
+ else {
70
+ return matchValue.fields[0];
71
+ }
72
+ }
73
+
60
74
  export function ARCtrl_ISA_ArcStudy__ArcStudy_fromArcJsonString_Static_Z721C83C5(jsonString) {
61
75
  const matchValue = fromString(uncurry2(ArcStudy_decoder), jsonString);
62
76
  if (matchValue.tag === 1) {
package/README.md CHANGED
@@ -6,7 +6,7 @@ and __JavaScript__! ❤️
6
6
  | Version | Downloads |
7
7
  | :--------|-----------:|
8
8
  |<a href="https://www.nuget.org/packages/ARCtrl/"><img alt="Nuget" src="https://img.shields.io/nuget/vpre/ARCtrl?logo=nuget&color=%234fb3d9"></a>|<a href="https://www.nuget.org/packages/ARCtrl/"><img alt="Nuget" src="https://img.shields.io/nuget/dt/ARCtrl?color=%234FB3D9"></a>|
9
- |<a href="https://www.npmjs.com/package/@nfdi4plants/arctrl"><img alt="NPM" src="https://img.shields.io/npm/v/%40nfdi4plants/arctrl/next?logo=npm&color=%234fb3d9"></a>|<a href="https://www.npmjs.com/package/@nfdi4plants/arctrl"><img alt="NPM" src="https://img.shields.io/npm/dt/%40nfdi4plants%2Farctrl?color=%234fb3d9"></a>|
9
+ |<a href="https://www.npmjs.com/package/@nfdi4plants/arctrl"><img alt="NPM" src="https://img.shields.io/npm/v/%40nfdi4plants/arctrl?logo=npm&color=%234fb3d9"></a>|<a href="https://www.npmjs.com/package/@nfdi4plants/arctrl"><img alt="NPM" src="https://img.shields.io/npm/dt/%40nfdi4plants%2Farctrl?color=%234fb3d9"></a>|
10
10
 
11
11
 
12
12
  ## Install
@@ -48,7 +48,6 @@ Currently we provide some documentation in form of markdown files in the `/docs`
48
48
  ### Local Setup
49
49
 
50
50
  1. `dotnet tool restore`
51
- 2. `dotnet paket install`
52
51
  3. `npm install`
53
52
 
54
53
  Verify correct setup with `./build.cmd runtests` ✨
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nfdi4plants/arctrl",
3
- "version": "1.0.3+533dab0",
3
+ "version": "1.0.5+b21e3bc",
4
4
  "description": "Top level ARC DataModel and API function descriptions.",
5
5
  "type": "module",
6
6
  "main": "index.js",