@simpoobusiness/sdk 1.0.2 → 1.0.5

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.
@@ -0,0 +1,4 @@
1
+ <svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="120" height="120" rx="12" fill="#E1E3EA"/>
3
+ <path d="M40.1667 85.5H79.8333C82.9629 85.5 85.5 82.9629 85.5 79.8333V40.1667C85.5 37.0371 82.9629 34.5 79.8333 34.5H40.1667C37.0371 34.5 34.5 37.0371 34.5 40.1667V79.8333C34.5 82.9629 37.0371 85.5 40.1667 85.5ZM40.1667 85.5L71.3333 54.3333L85.5 68.5M54.3333 50.0833C54.3333 52.4305 52.4305 54.3333 50.0833 54.3333C47.7361 54.3333 45.8333 52.4305 45.8333 50.0833C45.8333 47.7361 47.7361 45.8333 50.0833 45.8333C52.4305 45.8333 54.3333 47.7361 54.3333 50.0833Z" stroke="#5E6278" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
package/dist/cjs/index.js CHANGED
@@ -2627,6 +2627,9 @@ const useSDK = () => {
2627
2627
  return context;
2628
2628
  };
2629
2629
  const SimpooProvider = ({ apiKey, children, }) => {
2630
+ if (typeof window === "undefined") {
2631
+ return null; // SSR-safe
2632
+ }
2630
2633
  return (jsxRuntime.jsx(SDKContext.Provider, { value: { apiKey }, children: jsxRuntime.jsx(Provider_default, { store: store, children: children }) }));
2631
2634
  };
2632
2635
 
@@ -29380,6 +29383,7 @@ const Title = ({ title, item_uuid, item_type_id, data, }) => {
29380
29383
  return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("button", { className: cn(`text-primary font-bold text-sm first-letter:uppercase truncate max-w-[265px]`, data.expired ? "text-danger" : ""), title: title, children: title }) }));
29381
29384
  };
29382
29385
 
29386
+ const emptyImage = require("../../../assets/images/placeholder-image.svg");
29383
29387
  const InventoryTable = () => {
29384
29388
  const { apiKey } = useSDK();
29385
29389
  const [items, setItems] = React.useState([]);
@@ -29419,7 +29423,7 @@ const InventoryTable = () => {
29419
29423
  if (item.images?.length > 0) {
29420
29424
  return item.images[0].image;
29421
29425
  }
29422
- return "../../../assets/images/placeholder-image.svg";
29426
+ return emptyImage;
29423
29427
  };
29424
29428
  return {
29425
29429
  item_description: item?.name,
@@ -29442,7 +29446,6 @@ const InventoryTable = () => {
29442
29446
  fullData: item,
29443
29447
  };
29444
29448
  });
29445
- console.log(items, "items");
29446
29449
  return (jsxRuntime.jsx(Table, { loading: loading, columns: itemColumns, data: tableData || [], emptyData: tableData.length === 0, emptyProps: {
29447
29450
  header: "No item yet",
29448
29451
  subText: "Add new item to start managing your inventory.",