@revisium/schema-toolkit-ui 0.6.13 → 0.6.14
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/dist/index.cjs +13 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -31
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +39 -31
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +13 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9535,6 +9535,14 @@ var SortModel = class {
|
|
|
9535
9535
|
direction: sort.direction
|
|
9536
9536
|
}));
|
|
9537
9537
|
}
|
|
9538
|
+
serializeToQuerySorts() {
|
|
9539
|
+
const lookup = this._fieldLookup;
|
|
9540
|
+
return this.sorts.map((sort) => ({
|
|
9541
|
+
field: stripDataFieldPrefix(sort.field),
|
|
9542
|
+
direction: sort.direction,
|
|
9543
|
+
type: lookup.get(sort.field)?.fieldType ?? "String"
|
|
9544
|
+
}));
|
|
9545
|
+
}
|
|
9538
9546
|
applyViewSorts(viewSorts) {
|
|
9539
9547
|
const lookup = this._fieldLookup;
|
|
9540
9548
|
const sorts = [];
|
|
@@ -9864,7 +9872,7 @@ const SortingsWidget = (0, mobx_react_lite.observer)(({ model, availableFields,
|
|
|
9864
9872
|
children: "Clear all"
|
|
9865
9873
|
}),
|
|
9866
9874
|
model.hasSorts && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopyJsonPopover, {
|
|
9867
|
-
data: model.
|
|
9875
|
+
data: model.serializeToQuerySorts(),
|
|
9868
9876
|
tooltipContent: "Copy sort JSON",
|
|
9869
9877
|
testId: "sort-copy-json"
|
|
9870
9878
|
}),
|
|
@@ -13996,10 +14004,7 @@ var TableEditorCore = class {
|
|
|
13996
14004
|
_buildQuery(after = null) {
|
|
13997
14005
|
return {
|
|
13998
14006
|
where: this.filters.hasActiveFilters ? this.filters.buildCurrentWhereClause() : null,
|
|
13999
|
-
orderBy: this.sorts.
|
|
14000
|
-
field: stripDataFieldPrefix(s.field),
|
|
14001
|
-
direction: s.direction
|
|
14002
|
-
})),
|
|
14007
|
+
orderBy: this.sorts.serializeToQuerySorts(),
|
|
14003
14008
|
search: this.search.debouncedQuery,
|
|
14004
14009
|
first: this._pageSize,
|
|
14005
14010
|
after
|
|
@@ -14012,9 +14017,10 @@ var TableEditorCore = class {
|
|
|
14012
14017
|
this._replaceRowVMs(result.rows);
|
|
14013
14018
|
this._endCursor = result.endCursor;
|
|
14014
14019
|
this._hasNextPage = result.hasNextPage;
|
|
14020
|
+
const isFiltering = this.filters.hasActiveFilters || this.search.hasActiveSearch;
|
|
14015
14021
|
this.rowCount.setTotalCount(result.totalCount);
|
|
14016
|
-
this.rowCount.setBaseTotalCount(result.totalCount);
|
|
14017
|
-
this.rowCount.setIsFiltering(
|
|
14022
|
+
if (!isFiltering) this.rowCount.setBaseTotalCount(result.totalCount);
|
|
14023
|
+
this.rowCount.setIsFiltering(isFiltering);
|
|
14018
14024
|
this._updateNavigationContext();
|
|
14019
14025
|
});
|
|
14020
14026
|
}
|