jett.admin.npmpackage 1.0.65 → 1.0.67

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
@@ -778,7 +778,7 @@ var AppSideBar = ({
778
778
  const closeMobileMenu = () => {
779
779
  setIsMobileMenuOpen(false);
780
780
  };
781
- return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "fixed top-0 left-0 w-full z-50 md:hidden bg-white dark:bg-[#18181b] border-b border-gray-200 dark:border-[#303036] shadow-lg px-4 py-3 flex items-center justify-between" }, /* @__PURE__ */ import_react12.default.createElement(
781
+ return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "fixed top-0 left-0 w-full z-50 flex items-center justify-between px-4 py-3 bg-white dark:bg-[#18181b] border-b border-gray-200 dark:border-[#303036] shadow-lg md:hidden" }, /* @__PURE__ */ import_react12.default.createElement(
782
782
  "button",
783
783
  {
784
784
  onClick: toggleMobileMenu,
@@ -1008,7 +1008,7 @@ var Pagination = ({
1008
1008
  data = [],
1009
1009
  children,
1010
1010
  component: Component,
1011
- itemsPerPage = 10,
1011
+ itemsPerPage = 6,
1012
1012
  itemsPerPageOptions = [5, 10, 20, 50, 100],
1013
1013
  // Controlled props (optional)
1014
1014
  currentPage: controlledCurrentPage,
@@ -1018,7 +1018,9 @@ var Pagination = ({
1018
1018
  totalPages,
1019
1019
  totalItems: legacyTotalItems,
1020
1020
  onPageChange: legacyOnPageChange,
1021
- onItemsPerPageChange: legacyOnItemsPerPageChange
1021
+ onItemsPerPageChange: legacyOnItemsPerPageChange,
1022
+ tableHeader,
1023
+ isHideCheckbox
1022
1024
  }) => {
1023
1025
  const [internalCurrentPage, setInternalCurrentPage] = (0, import_react15.useState)(1);
1024
1026
  const [internalItemsPerPage, setInternalItemsPerPage] = (0, import_react15.useState)(itemsPerPage);
@@ -1068,23 +1070,6 @@ var Pagination = ({
1068
1070
  }
1069
1071
  }
1070
1072
  };
1071
- const handleItemsPerPageChange = (value) => {
1072
- const newItemsPerPage = Number(value);
1073
- if (isControlled && controlledOnItemsPerPageChange) {
1074
- controlledOnItemsPerPageChange(newItemsPerPage);
1075
- if (controlledOnPageChange) {
1076
- controlledOnPageChange(1);
1077
- }
1078
- } else if (legacyOnItemsPerPageChange) {
1079
- legacyOnItemsPerPageChange(newItemsPerPage);
1080
- if (legacyOnPageChange) {
1081
- legacyOnPageChange(1);
1082
- }
1083
- } else {
1084
- setInternalItemsPerPage(newItemsPerPage);
1085
- setInternalCurrentPage(1);
1086
- }
1087
- };
1088
1073
  const startItem = totalItems !== void 0 ? (currentPage - 1) * activeItemsPerPage + 1 : null;
1089
1074
  const endItem = totalItems !== void 0 ? Math.min(currentPage * activeItemsPerPage, totalItems) : null;
1090
1075
  const renderContent = () => {
@@ -1095,7 +1080,7 @@ var Pagination = ({
1095
1080
  }
1096
1081
  return null;
1097
1082
  };
1098
- return /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, null, /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, null, renderContent()), /* @__PURE__ */ import_react15.default.createElement("div", { className: "flex flex-col sm:flex-row justify-between items-center gap-4 px-4 py-3 border-t border-[#e5e5e5] dark:border-[#303036] bg-white dark:bg-[#18181b] z-10" }, totalItems !== void 0 && /* @__PURE__ */ import_react15.default.createElement("div", { className: "text-sm text-[#737373] dark:text-white" }, "Showing ", startItem, " to ", endItem, " of ", totalItems, " entries"), /* @__PURE__ */ import_react15.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react15.default.createElement(
1083
+ return /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, null, /* @__PURE__ */ import_react15.default.createElement(import_react15.default.Fragment, null, renderContent()), /* @__PURE__ */ import_react15.default.createElement("tr", null, /* @__PURE__ */ import_react15.default.createElement("td", { colSpan: tableHeader.length + (isHideCheckbox ? 0 : 1) }, /* @__PURE__ */ import_react15.default.createElement("div", { className: "flex flex-col sm:flex-row justify-between items-center gap-4 px-4 py-3 border-t border-[#e5e5e5] dark:border-[#303036] bg-white dark:bg-[#18181b] z-10" }, totalItems !== void 0 && /* @__PURE__ */ import_react15.default.createElement("div", { className: "text-sm text-[#737373] dark:text-white" }, "Showing ", startItem, " to ", endItem, " of ", totalItems, " entries"), /* @__PURE__ */ import_react15.default.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ import_react15.default.createElement(
1099
1084
  "button",
1100
1085
  {
1101
1086
  onClick: () => handlePageChange(1),
@@ -1139,7 +1124,7 @@ var Pagination = ({
1139
1124
  title: "Last page"
1140
1125
  },
1141
1126
  /* @__PURE__ */ import_react15.default.createElement(import_lucide_react7.ChevronsRight, { size: 16 })
1142
- ))));
1127
+ ))))));
1143
1128
  };
1144
1129
  // Annotate the CommonJS export names for ESM import in node:
1145
1130
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -743,7 +743,7 @@ var AppSideBar = ({
743
743
  const closeMobileMenu = () => {
744
744
  setIsMobileMenuOpen(false);
745
745
  };
746
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("div", { className: "fixed top-0 left-0 w-full z-50 md:hidden bg-white dark:bg-[#18181b] border-b border-gray-200 dark:border-[#303036] shadow-lg px-4 py-3 flex items-center justify-between" }, /* @__PURE__ */ React12.createElement(
746
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("div", { className: "fixed top-0 left-0 w-full z-50 flex items-center justify-between px-4 py-3 bg-white dark:bg-[#18181b] border-b border-gray-200 dark:border-[#303036] shadow-lg md:hidden" }, /* @__PURE__ */ React12.createElement(
747
747
  "button",
748
748
  {
749
749
  onClick: toggleMobileMenu,
@@ -973,7 +973,7 @@ var Pagination = ({
973
973
  data = [],
974
974
  children,
975
975
  component: Component,
976
- itemsPerPage = 10,
976
+ itemsPerPage = 6,
977
977
  itemsPerPageOptions = [5, 10, 20, 50, 100],
978
978
  // Controlled props (optional)
979
979
  currentPage: controlledCurrentPage,
@@ -983,7 +983,9 @@ var Pagination = ({
983
983
  totalPages,
984
984
  totalItems: legacyTotalItems,
985
985
  onPageChange: legacyOnPageChange,
986
- onItemsPerPageChange: legacyOnItemsPerPageChange
986
+ onItemsPerPageChange: legacyOnItemsPerPageChange,
987
+ tableHeader,
988
+ isHideCheckbox
987
989
  }) => {
988
990
  const [internalCurrentPage, setInternalCurrentPage] = useState5(1);
989
991
  const [internalItemsPerPage, setInternalItemsPerPage] = useState5(itemsPerPage);
@@ -1033,23 +1035,6 @@ var Pagination = ({
1033
1035
  }
1034
1036
  }
1035
1037
  };
1036
- const handleItemsPerPageChange = (value) => {
1037
- const newItemsPerPage = Number(value);
1038
- if (isControlled && controlledOnItemsPerPageChange) {
1039
- controlledOnItemsPerPageChange(newItemsPerPage);
1040
- if (controlledOnPageChange) {
1041
- controlledOnPageChange(1);
1042
- }
1043
- } else if (legacyOnItemsPerPageChange) {
1044
- legacyOnItemsPerPageChange(newItemsPerPage);
1045
- if (legacyOnPageChange) {
1046
- legacyOnPageChange(1);
1047
- }
1048
- } else {
1049
- setInternalItemsPerPage(newItemsPerPage);
1050
- setInternalCurrentPage(1);
1051
- }
1052
- };
1053
1038
  const startItem = totalItems !== void 0 ? (currentPage - 1) * activeItemsPerPage + 1 : null;
1054
1039
  const endItem = totalItems !== void 0 ? Math.min(currentPage * activeItemsPerPage, totalItems) : null;
1055
1040
  const renderContent = () => {
@@ -1060,7 +1045,7 @@ var Pagination = ({
1060
1045
  }
1061
1046
  return null;
1062
1047
  };
1063
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(React15.Fragment, null, renderContent()), /* @__PURE__ */ React15.createElement("div", { className: "flex flex-col sm:flex-row justify-between items-center gap-4 px-4 py-3 border-t border-[#e5e5e5] dark:border-[#303036] bg-white dark:bg-[#18181b] z-10" }, totalItems !== void 0 && /* @__PURE__ */ React15.createElement("div", { className: "text-sm text-[#737373] dark:text-white" }, "Showing ", startItem, " to ", endItem, " of ", totalItems, " entries"), /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React15.createElement(
1048
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(React15.Fragment, null, renderContent()), /* @__PURE__ */ React15.createElement("tr", null, /* @__PURE__ */ React15.createElement("td", { colSpan: tableHeader.length + (isHideCheckbox ? 0 : 1) }, /* @__PURE__ */ React15.createElement("div", { className: "flex flex-col sm:flex-row justify-between items-center gap-4 px-4 py-3 border-t border-[#e5e5e5] dark:border-[#303036] bg-white dark:bg-[#18181b] z-10" }, totalItems !== void 0 && /* @__PURE__ */ React15.createElement("div", { className: "text-sm text-[#737373] dark:text-white" }, "Showing ", startItem, " to ", endItem, " of ", totalItems, " entries"), /* @__PURE__ */ React15.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React15.createElement(
1064
1049
  "button",
1065
1050
  {
1066
1051
  onClick: () => handlePageChange(1),
@@ -1104,7 +1089,7 @@ var Pagination = ({
1104
1089
  title: "Last page"
1105
1090
  },
1106
1091
  /* @__PURE__ */ React15.createElement(ChevronsRight, { size: 16 })
1107
- ))));
1092
+ ))))));
1108
1093
  };
1109
1094
  export {
1110
1095
  AppSideBar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jett.admin.npmpackage",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "exports": {