@yeverlibs/ds 1.0.13 → 1.1.1

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.js CHANGED
@@ -5306,6 +5306,7 @@ var Select = dynamic__default.default(() => import('react-select'), { ssr: false
5306
5306
  var DateRangeOptions = [
5307
5307
  { value: "today", label: "Hoje" },
5308
5308
  { value: "yesterday", label: "Ontem" },
5309
+ { value: "current-month", label: "M\xEAs atual" },
5309
5310
  { value: "last-30-days", label: "\xDAltimos 30 dias" },
5310
5311
  { value: "last-month", label: "\xDAltimo m\xEAs" },
5311
5312
  { value: "custom", label: "Data personalizada" }
@@ -5381,6 +5382,9 @@ var Content = ({
5381
5382
  case "yesterday":
5382
5383
  const yesterday = dateFns.subDays(today, 1);
5383
5384
  return { startDate: yesterday, endDate: yesterday };
5385
+ case "current-month":
5386
+ const firstDayCurrentMonth = dateFns.startOfMonth(today);
5387
+ return { startDate: firstDayCurrentMonth, endDate: today };
5384
5388
  case "last-30-days":
5385
5389
  return { startDate: dateFns.subDays(today, 29), endDate: today };
5386
5390
  // 29 + today = 30
@@ -6229,10 +6233,12 @@ var TableContent = ({
6229
6233
  let shouldPaginate = false;
6230
6234
  if (searchParams?.has("perPage")) {
6231
6235
  setItemsPerPage(perPage);
6236
+ nextReplaceUrl("perPage", String(perPage), pathname);
6232
6237
  shouldPaginate = true;
6233
6238
  }
6234
6239
  if (searchParams?.has("search")) {
6235
6240
  setSearchQuery(searchParam);
6241
+ nextReplaceUrl("search", searchParam, pathname);
6236
6242
  shouldPaginate = true;
6237
6243
  }
6238
6244
  if (shouldPaginate) {
@@ -6533,20 +6539,15 @@ var TableContent = ({
6533
6539
  const newPerPage = Number(e.target.value);
6534
6540
  setItemsPerPage(newPerPage);
6535
6541
  setCurrentPage(RESET_PAGE);
6536
- Promise.all([
6537
- nextReplaceUrl("page", "1", pathname),
6538
- nextReplaceUrl("perPage", String(newPerPage), pathname)
6539
- ]).then(() => {
6540
- handlePagination();
6541
- });
6542
+ nextReplaceUrl("page", "1", pathname);
6543
+ nextReplaceUrl("perPage", String(newPerPage), pathname);
6542
6544
  },
6543
6545
  className: "block h-8 w-full cursor-pointer appearance-none rounded border border-gray-300 bg-white p-2 text-sm leading-tight text-gray-700 focus:border-gray-500 focus:bg-white focus:outline-none",
6544
6546
  children: [
6545
6547
  /* @__PURE__ */ jsxRuntime.jsx("option", { value: 10, children: "10" }),
6546
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: 20, children: "20" }),
6547
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: 40, children: "40" }),
6548
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: 60, children: "60" }),
6549
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: 80, children: "80" })
6548
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: 25, children: "25" }),
6549
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: 50, children: "50" }),
6550
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: 100, children: "100" })
6550
6551
  ]
6551
6552
  }
6552
6553
  ),