@archbase/data 4.0.4 → 4.0.18

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.
Binary file
package/dist/index.js CHANGED
@@ -1887,7 +1887,7 @@ class Qe {
1887
1887
  refreshData(e) {
1888
1888
  console.log("[V2 refreshData] Chamado com options:", e), e?.pageSize !== void 0 && (this.pageSize = e.pageSize);
1889
1889
  const t = e?.currentPage ?? this.currentPage;
1890
- if (this.currentPage = t, console.log("[V2 refreshData] Página atual definida:", this.currentPage), "filter" in (e || {}) && (this.currentFilter = e?.filter, console.log("[V2 refreshData] Filtro definido:", this.currentFilter)), e?.sort !== void 0 && (this.currentSort = e.sort, this.defaultSortFields = e.sort.map((r) => r.split(":")[0])), this.currentFilter && this.currentFilter.trim() !== "") {
1890
+ if (this.currentPage = t, console.log("[V2 refreshData] Página atual definida:", this.currentPage), "filter" in (e || {}) && (this.currentFilter = e?.filter, console.log("[V2 refreshData] Filtro definido:", this.currentFilter)), e?.sort !== void 0 && (this.currentSort = e.sort, this.defaultSortFields = e.sort), this.currentFilter && this.currentFilter.trim() !== "") {
1891
1891
  console.log("[V2 refreshData] Chamando getDataWithRsqlFilter para página:", t), this.getDataWithRsqlFilter(t);
1892
1892
  return;
1893
1893
  }
@@ -2145,9 +2145,10 @@ class Qe {
2145
2145
  }
2146
2146
  async getDataWithoutFilter(e, t) {
2147
2147
  try {
2148
- console.log("[V2 getDataWithoutFilter] Buscando página:", e, "pageSize:", this.getPageSize(), "sort:", this.defaultSortFields);
2149
- let r;
2150
- return this.defaultSortFields.length > 0 ? r = await this.service.findAllWithSort(e, this.getPageSize(), this.defaultSortFields) : r = await this.service.findAll(e, this.getPageSize()), console.log("[V2 getDataWithoutFilter] Resultado:", r?.totalElements, "registros totais,", r?.content?.length, "na página"), r && r.content && (this.grandTotalRecords = r.totalElements || r.content.length, this.setRecords(r.content), console.log("[V2 getDataWithoutFilter] Após setRecords - currentPage:", this.currentPage, "grandTotal:", this.grandTotalRecords)), t && t(), r;
2148
+ const r = this.currentSort && this.currentSort.length > 0 ? this.currentSort : this.defaultSortFields;
2149
+ console.log("[V2 getDataWithoutFilter] Buscando página:", e, "pageSize:", this.getPageSize(), "sort:", r);
2150
+ let i;
2151
+ return r.length > 0 ? i = await this.service.findAllWithSort(e, this.getPageSize(), r) : i = await this.service.findAll(e, this.getPageSize()), console.log("[V2 getDataWithoutFilter] Resultado:", i?.totalElements, "registros totais,", i?.content?.length, "na página"), i && i.content && (this.grandTotalRecords = i.totalElements || i.content.length, this.setRecords(i.content), console.log("[V2 getDataWithoutFilter] Após setRecords - currentPage:", this.currentPage, "grandTotal:", this.grandTotalRecords)), t && t(), i;
2151
2152
  } catch (r) {
2152
2153
  throw this.handleRemoteError(r, t), r;
2153
2154
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archbase/data",
3
- "version": "4.0.4",
3
+ "version": "4.0.18",
4
4
  "description": "Data management layer for Archbase React v3 - DataSource, hooks, and API services",
5
5
  "author": "Edson Martins <edsonmartins2005@gmail.com>",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  "reflect-metadata": "^0.2.2",
39
39
  "rxjs": "^7.8.2",
40
40
  "zustand": "^5.0.6",
41
- "@archbase/core": "4.0.4"
41
+ "@archbase/core": "4.0.18"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@mantine/hooks": "9.1.1",
Binary file