@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.mjs CHANGED
@@ -5276,6 +5276,7 @@ var Select = dynamic(() => import('react-select'), { ssr: false });
5276
5276
  var DateRangeOptions = [
5277
5277
  { value: "today", label: "Hoje" },
5278
5278
  { value: "yesterday", label: "Ontem" },
5279
+ { value: "current-month", label: "M\xEAs atual" },
5279
5280
  { value: "last-30-days", label: "\xDAltimos 30 dias" },
5280
5281
  { value: "last-month", label: "\xDAltimo m\xEAs" },
5281
5282
  { value: "custom", label: "Data personalizada" }
@@ -5351,6 +5352,9 @@ var Content = ({
5351
5352
  case "yesterday":
5352
5353
  const yesterday = subDays(today, 1);
5353
5354
  return { startDate: yesterday, endDate: yesterday };
5355
+ case "current-month":
5356
+ const firstDayCurrentMonth = startOfMonth(today);
5357
+ return { startDate: firstDayCurrentMonth, endDate: today };
5354
5358
  case "last-30-days":
5355
5359
  return { startDate: subDays(today, 29), endDate: today };
5356
5360
  // 29 + today = 30
@@ -6199,10 +6203,12 @@ var TableContent = ({
6199
6203
  let shouldPaginate = false;
6200
6204
  if (searchParams?.has("perPage")) {
6201
6205
  setItemsPerPage(perPage);
6206
+ nextReplaceUrl("perPage", String(perPage), pathname);
6202
6207
  shouldPaginate = true;
6203
6208
  }
6204
6209
  if (searchParams?.has("search")) {
6205
6210
  setSearchQuery(searchParam);
6211
+ nextReplaceUrl("search", searchParam, pathname);
6206
6212
  shouldPaginate = true;
6207
6213
  }
6208
6214
  if (shouldPaginate) {
@@ -6503,20 +6509,15 @@ var TableContent = ({
6503
6509
  const newPerPage = Number(e.target.value);
6504
6510
  setItemsPerPage(newPerPage);
6505
6511
  setCurrentPage(RESET_PAGE);
6506
- Promise.all([
6507
- nextReplaceUrl("page", "1", pathname),
6508
- nextReplaceUrl("perPage", String(newPerPage), pathname)
6509
- ]).then(() => {
6510
- handlePagination();
6511
- });
6512
+ nextReplaceUrl("page", "1", pathname);
6513
+ nextReplaceUrl("perPage", String(newPerPage), pathname);
6512
6514
  },
6513
6515
  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",
6514
6516
  children: [
6515
6517
  /* @__PURE__ */ jsx("option", { value: 10, children: "10" }),
6516
- /* @__PURE__ */ jsx("option", { value: 20, children: "20" }),
6517
- /* @__PURE__ */ jsx("option", { value: 40, children: "40" }),
6518
- /* @__PURE__ */ jsx("option", { value: 60, children: "60" }),
6519
- /* @__PURE__ */ jsx("option", { value: 80, children: "80" })
6518
+ /* @__PURE__ */ jsx("option", { value: 25, children: "25" }),
6519
+ /* @__PURE__ */ jsx("option", { value: 50, children: "50" }),
6520
+ /* @__PURE__ */ jsx("option", { value: 100, children: "100" })
6520
6521
  ]
6521
6522
  }
6522
6523
  ),