@simpoobusiness/sdk 1.0.1 → 1.0.2
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/README.md +1 -1
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,4 +62,4 @@ Each component may accept specific props. For example, `InventoryTable`:
|
|
|
62
62
|
|
|
63
63
|
## 📖 Documentation
|
|
64
64
|
|
|
65
|
-
See the [official docs](https://
|
|
65
|
+
See the [official docs](https://savics407.github.io/simpoo-sdk/) for more details and advanced usage.
|
package/dist/cjs/index.js
CHANGED
|
@@ -28771,7 +28771,7 @@ function PaginationComponent({ showBulkActions = true, meta, }) {
|
|
|
28771
28771
|
}, [meta?.per_page]);
|
|
28772
28772
|
return (jsxRuntime.jsxs("div", { className: cn("flex items-center justify-between gap-4 flex-wrap", meta && meta?.total > 0 ? null : "hidden"), children: [showBulkActions ? (jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5 shrink-0", children: [jsxRuntime.jsxs(DropdownMenu, { children: [jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: jsxRuntime.jsxs("button", { className: "rounded-md h-9 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 ", children: [perview, jsxRuntime.jsx("span", { className: "rotate-90", children: icons.arrow })] }) }), jsxRuntime.jsx(DropdownMenuContent, { align: "center", className: "flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5", children: rowsPerPage.map((count, index) => (jsxRuntime.jsx(DropdownMenuItem, { className: `capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] ${perview === count
|
|
28773
28773
|
? "bg-primary_light text-primary"
|
|
28774
|
-
: "text-gray-700"} `, onClick: () => dispatch(setPerview(count)), children: count }, index))) })] }), jsxRuntime.jsxs("p", { className: "font-normal text-gray-600 text-[15px]", children: ["Showing ", meta?.from, " - ", meta?.to, " of ", meta?.total] })] })) : null, jsxRuntime.jsx(Pagination, { count: meta?.last_page, page: meta?.current_page, shape: "rounded", color: "primary", onChange: handleChange })] }));
|
|
28774
|
+
: "text-gray-700"} `, onClick: () => dispatch(setPerview(count)), children: count }, index))) })] }), jsxRuntime.jsxs("p", { className: "font-normal text-gray-600 text-[15px]", children: ["Showing ", meta?.from, " - ", meta?.to, " of ", meta?.total] })] })) : null, jsxRuntime.jsx(Pagination, { count: meta?.last_page || 1, page: meta?.current_page ?? 1, shape: "rounded", color: "primary", onChange: handleChange })] }));
|
|
28775
28775
|
}
|
|
28776
28776
|
|
|
28777
28777
|
function ItemEmpty({ props = {} }) {
|
|
@@ -28800,12 +28800,12 @@ accordionData, hasAccordion, bodyRowClass, tableContainerClass, firstCellClass,
|
|
|
28800
28800
|
.fill(null)
|
|
28801
28801
|
.map((_, index) => (jsxRuntime.jsx(React.Fragment, { children: table.getHeaderGroups().map((headerGroup) => (jsxRuntime.jsx(TableRow, { className: cn("border-gray-300 hover:!bg-gray-100 rounded-xl"), children: headerGroup.headers.map((header) => {
|
|
28802
28802
|
return (jsxRuntime.jsx(TableCell, { children: jsxRuntime.jsx(Skeleton, { className: "w-full h-6 rounded-lg" }) }, header.id));
|
|
28803
|
-
}) }, headerGroup.id))) }, index)))) : table?.getRowModel().rows?.length ? (table?.getRowModel().rows.map((row, i) => (jsxRuntime.jsx(
|
|
28803
|
+
}) }, headerGroup.id))) }, index)))) : table?.getRowModel().rows?.length ? (table?.getRowModel().rows.map((row, i) => (jsxRuntime.jsx(React.Fragment, { children: jsxRuntime.jsx(TableRow, { onClick: () => toggleAccordion(i, row.original), "data-state": row.getIsSelected() && "selected", className: `border-gray-300 hover:!bg-gray-100 data-[state=selected]:bg-gray-100 ${bodyRowClass} `, children: row.getVisibleCells().map((cell, index) => (jsxRuntime.jsx(TableCell, { className: cn("text-gray-500 text-sm font-bold", tbCellClass, index === 0 && firstCellClass, index === row.getVisibleCells().length - 1 &&
|
|
28804
28804
|
lastCellClass), children: jsxRuntime.jsxs("div", { className: "flex", children: [hasAccordion &&
|
|
28805
28805
|
showAccordionDropdown &&
|
|
28806
28806
|
index === 0 && (jsxRuntime.jsx("div", { className: "cursor-pointer inline", children: jsxRuntime.jsx("div", { className: `transform transition-transform duration-200 ${openRowIndex === i
|
|
28807
28807
|
? "-rotate-90"
|
|
28808
|
-
: "rotate-90"}`, children: icons.arrow }) })), " ", jsxRuntime.jsx("div", { children: flexRender(cell.column.columnDef.cell, cell.getContext()) })] }) }, cell.id))) }, row.id) })))) : (jsxRuntime.jsx(TableRow, { children: jsxRuntime.jsx(TableCell, { colSpan: columns.length, className: "h-24 text-center hover:bg-gray-100", children: emptyData ? (jsxRuntime.jsx(ItemEmpty, { props: emptyProps })) : ("No results found.") }) })) })] }) }), showPaginate && (jsxRuntime.jsx(PaginationComponent, { showBulkActions: showBulkActions, meta: meta }))] }));
|
|
28808
|
+
: "rotate-90"}`, children: icons.arrow }) })), " ", jsxRuntime.jsx("div", { children: flexRender(cell.column.columnDef.cell, cell.getContext()) })] }) }, cell.id))) }, row.id) }, row.id)))) : (jsxRuntime.jsx(TableRow, { children: jsxRuntime.jsx(TableCell, { colSpan: columns.length, className: "h-24 text-center hover:bg-gray-100", children: emptyData ? (jsxRuntime.jsx(ItemEmpty, { props: emptyProps })) : ("No results found.") }) })) })] }) }), showPaginate && (jsxRuntime.jsx(PaginationComponent, { showBulkActions: showBulkActions, meta: meta }))] }));
|
|
28809
28809
|
}
|
|
28810
28810
|
|
|
28811
28811
|
function formatToCurrency(value, currency = "NGN", locale = "en-NG") {
|
|
@@ -29419,7 +29419,7 @@ const InventoryTable = () => {
|
|
|
29419
29419
|
if (item.images?.length > 0) {
|
|
29420
29420
|
return item.images[0].image;
|
|
29421
29421
|
}
|
|
29422
|
-
return "
|
|
29422
|
+
return "../../../assets/images/placeholder-image.svg";
|
|
29423
29423
|
};
|
|
29424
29424
|
return {
|
|
29425
29425
|
item_description: item?.name,
|