tsdf 9.1.0 → 9.2.0

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/main.cjs CHANGED
@@ -1255,6 +1255,8 @@ function newTSDFListQueryStore({
1255
1255
  const queryState = getQueryState(params);
1256
1256
  if (!queryState || !queryState.hasMore)
1257
1257
  return "skipped";
1258
+ if (queryState.status !== "success")
1259
+ return "skipped";
1258
1260
  return fetchQueryOrquestrator.get(getQueryKey(params)).scheduleFetch("highPriority", ["loadMore", params, size]);
1259
1261
  }
1260
1262
  function getQueryItems(query, itemDataSelector) {
@@ -1409,7 +1411,8 @@ function newTSDFListQueryStore({
1409
1411
  error: null,
1410
1412
  hasMore: false,
1411
1413
  payload: omitPayload ? void 0 : payload,
1412
- isLoading: returnIdleStatus ? false : true
1414
+ isLoading: returnIdleStatus ? false : true,
1415
+ isLoadingMore: false
1413
1416
  };
1414
1417
  }
1415
1418
  let status = query.status;
@@ -1423,7 +1426,8 @@ function newTSDFListQueryStore({
1423
1426
  error: query.error,
1424
1427
  hasMore: query.hasMore,
1425
1428
  isLoading: status === "loading",
1426
- payload: omitPayload ? void 0 : query.payload
1429
+ payload: omitPayload ? void 0 : query.payload,
1430
+ isLoadingMore: status === "loadingMore"
1427
1431
  };
1428
1432
  }
1429
1433
  );
@@ -1485,7 +1489,8 @@ function newTSDFListQueryStore({
1485
1489
  isLoading: false,
1486
1490
  status: "idle",
1487
1491
  queryKey: "",
1488
- items: []
1492
+ items: [],
1493
+ isLoadingMore: false
1489
1494
  },
1490
1495
  [queryResult]
1491
1496
  );
package/dist/main.d.ts CHANGED
@@ -159,6 +159,7 @@ type TSFDUseListQueryReturn<Selected, ItemPayload, NError> = {
159
159
  queryKey: string;
160
160
  hasMore: boolean;
161
161
  isLoading: boolean;
162
+ isLoadingMore: boolean;
162
163
  };
163
164
  type TSFDUseListItemReturn<Selected, NError, ItemPayload> = {
164
165
  data: Selected;
package/dist/main.js CHANGED
@@ -1221,6 +1221,8 @@ function newTSDFListQueryStore({
1221
1221
  const queryState = getQueryState(params);
1222
1222
  if (!queryState || !queryState.hasMore)
1223
1223
  return "skipped";
1224
+ if (queryState.status !== "success")
1225
+ return "skipped";
1224
1226
  return fetchQueryOrquestrator.get(getQueryKey(params)).scheduleFetch("highPriority", ["loadMore", params, size]);
1225
1227
  }
1226
1228
  function getQueryItems(query, itemDataSelector) {
@@ -1375,7 +1377,8 @@ function newTSDFListQueryStore({
1375
1377
  error: null,
1376
1378
  hasMore: false,
1377
1379
  payload: omitPayload ? void 0 : payload,
1378
- isLoading: returnIdleStatus ? false : true
1380
+ isLoading: returnIdleStatus ? false : true,
1381
+ isLoadingMore: false
1379
1382
  };
1380
1383
  }
1381
1384
  let status = query.status;
@@ -1389,7 +1392,8 @@ function newTSDFListQueryStore({
1389
1392
  error: query.error,
1390
1393
  hasMore: query.hasMore,
1391
1394
  isLoading: status === "loading",
1392
- payload: omitPayload ? void 0 : query.payload
1395
+ payload: omitPayload ? void 0 : query.payload,
1396
+ isLoadingMore: status === "loadingMore"
1393
1397
  };
1394
1398
  }
1395
1399
  );
@@ -1451,7 +1455,8 @@ function newTSDFListQueryStore({
1451
1455
  isLoading: false,
1452
1456
  status: "idle",
1453
1457
  queryKey: "",
1454
- items: []
1458
+ items: [],
1459
+ isLoadingMore: false
1455
1460
  },
1456
1461
  [queryResult]
1457
1462
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdf",
3
- "version": "9.1.0",
3
+ "version": "9.2.0",
4
4
  "description": "A data fetching solution based on t-state",
5
5
  "license": "MIT",
6
6
  "author": "Lucas Santos",
@@ -24,6 +24,7 @@
24
24
  },
25
25
  "scripts": {
26
26
  "test": "vitest --ui --mode development",
27
+ "test:changed": "vitest --changed --ui --mode development",
27
28
  "lint": "pnpm tsc && pnpm eslint && pnpm format",
28
29
  "eslint": "CI=true eslint --color --ext .jsx,.js,.ts,.tsx src/ test/",
29
30
  "format": "prettier --write src/**/*.ts",