ballerina-core 1.0.203 → 1.0.204
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/package.json
CHANGED
|
@@ -342,12 +342,45 @@ export const TableAbstractRendererState = {
|
|
|
342
342
|
const parsedFiltersValues = parsedFilters
|
|
343
343
|
.map((filter) => filter.map((f) => (f as Value<PredicateValue>).value))
|
|
344
344
|
.toJS();
|
|
345
|
+
|
|
346
|
+
const valueSorting = sorting
|
|
347
|
+
.entrySeq()
|
|
348
|
+
.filter(([_, direction]) => direction != undefined)
|
|
349
|
+
.map(([columnName, direction]) =>
|
|
350
|
+
PredicateValue.Default.tuple(List([columnName, direction as string])),
|
|
351
|
+
);
|
|
352
|
+
|
|
353
|
+
const parsedValueSorting = ValueOrErrors.Operations.All(
|
|
354
|
+
valueSorting
|
|
355
|
+
.map((sorting) =>
|
|
356
|
+
toApiRaw(
|
|
357
|
+
DispatchParsedType.Default.tuple([
|
|
358
|
+
{
|
|
359
|
+
kind: "primitive",
|
|
360
|
+
name: "string",
|
|
361
|
+
asString: () => "string",
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
kind: "primitive",
|
|
365
|
+
name: "string",
|
|
366
|
+
asString: () => "string",
|
|
367
|
+
},
|
|
368
|
+
]),
|
|
369
|
+
sorting,
|
|
370
|
+
{},
|
|
371
|
+
),
|
|
372
|
+
)
|
|
373
|
+
.toList(),
|
|
374
|
+
);
|
|
375
|
+
|
|
376
|
+
const finalSorting =
|
|
377
|
+
parsedValueSorting.kind == "errors"
|
|
378
|
+
? []
|
|
379
|
+
: parsedValueSorting.value.toArray();
|
|
380
|
+
|
|
345
381
|
const params = {
|
|
346
382
|
Filters: parsedFiltersValues,
|
|
347
|
-
Sorting:
|
|
348
|
-
.entrySeq()
|
|
349
|
-
.toList()
|
|
350
|
-
.filter((sorting) => sorting[1] != undefined),
|
|
383
|
+
Sorting: finalSorting,
|
|
351
384
|
};
|
|
352
385
|
return btoa(JSON.stringify(params));
|
|
353
386
|
},
|