@yeverlibs/ds 1.0.12 → 1.1.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/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6229,10 +6229,12 @@ var TableContent = ({
|
|
|
6229
6229
|
let shouldPaginate = false;
|
|
6230
6230
|
if (searchParams?.has("perPage")) {
|
|
6231
6231
|
setItemsPerPage(perPage);
|
|
6232
|
+
nextReplaceUrl("perPage", String(perPage), pathname);
|
|
6232
6233
|
shouldPaginate = true;
|
|
6233
6234
|
}
|
|
6234
6235
|
if (searchParams?.has("search")) {
|
|
6235
6236
|
setSearchQuery(searchParam);
|
|
6237
|
+
nextReplaceUrl("search", searchParam, pathname);
|
|
6236
6238
|
shouldPaginate = true;
|
|
6237
6239
|
}
|
|
6238
6240
|
if (shouldPaginate) {
|
|
@@ -6336,7 +6338,7 @@ var TableContent = ({
|
|
|
6336
6338
|
]
|
|
6337
6339
|
}
|
|
6338
6340
|
),
|
|
6339
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-auto w-full overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: cn("w-full", paginationVariant === "primary" ? "mb-8" : "mb-0"), children: [
|
|
6341
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-auto w-full overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: cn("w-full", paginationVariant === "primary" && !noPagination ? "mb-8" : "mb-0"), children: [
|
|
6340
6342
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "border-b border-gray-300 bg-gray-0", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
6341
6343
|
selectable && /* @__PURE__ */ jsxRuntime.jsx("th", { className: "!w-[20px] py-3 pl-3", children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-4" }) }),
|
|
6342
6344
|
visibleColumns.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-6 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-24" }) }, index))
|
|
@@ -6404,7 +6406,7 @@ var TableContent = ({
|
|
|
6404
6406
|
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: handleDeleteSelection, $variant: "warning", className: "max-w-[101px] text-xs", children: "Deletar" })
|
|
6405
6407
|
] })
|
|
6406
6408
|
] }),
|
|
6407
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-auto w-full overflow-x-auto transition-all duration-300", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: cn("w-full", paginationVariant === "primary" ? "mb-8" : "mb-0"), children: [
|
|
6409
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-auto w-full overflow-x-auto transition-all duration-300", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: cn("w-full", paginationVariant === "primary" && !noPagination ? "mb-8" : "mb-0"), children: [
|
|
6408
6410
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "border-b border-gray-300 bg-gray-0", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
6409
6411
|
selectable && /* @__PURE__ */ jsxRuntime.jsx("th", { className: "!w-[20px] py-3 pl-3 text-left text-xs font-bold uppercase text-gray-700", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6410
6412
|
"input",
|
|
@@ -6533,12 +6535,8 @@ var TableContent = ({
|
|
|
6533
6535
|
const newPerPage = Number(e.target.value);
|
|
6534
6536
|
setItemsPerPage(newPerPage);
|
|
6535
6537
|
setCurrentPage(RESET_PAGE);
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
nextReplaceUrl("perPage", String(newPerPage), pathname)
|
|
6539
|
-
]).then(() => {
|
|
6540
|
-
handlePagination();
|
|
6541
|
-
});
|
|
6538
|
+
nextReplaceUrl("page", "1", pathname);
|
|
6539
|
+
nextReplaceUrl("perPage", String(newPerPage), pathname);
|
|
6542
6540
|
},
|
|
6543
6541
|
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
6542
|
children: [
|