hey-pharmacist-ecommerce 1.1.35 → 1.1.36
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 +13 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/AccountOrdersTab.tsx +3 -1
- package/src/components/CartItem.tsx +6 -2
- package/src/components/OrderCard.tsx +3 -1
- package/src/components/ProductCard.tsx +6 -1
- package/src/lib/constants/assets.ts +1 -0
- package/src/screens/CheckoutScreen.tsx +6 -4
- package/src/screens/OrderDetailScreen.tsx +5 -1
- package/src/screens/ProductDetailScreen.tsx +3 -1
- package/src/screens/ShopScreen.tsx +3 -1
- package/src/screens/WishlistScreen.tsx +3 -1
package/dist/index.mjs
CHANGED
|
@@ -12961,6 +12961,9 @@ function EcommerceProvider({ config, children, withToaster = true, basePath = ""
|
|
|
12961
12961
|
/* @__PURE__ */ jsx(NotificationDrawer, {})
|
|
12962
12962
|
] }) }) }) }) }) }) }) }) });
|
|
12963
12963
|
}
|
|
12964
|
+
|
|
12965
|
+
// src/lib/constants/assets.ts
|
|
12966
|
+
var PLACEHOLDER_IMAGE_SRC = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+CiAgPHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIyNCIgZmlsbD0iIzljYTNhZiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZG9taW5hbnQtYmFzZWxpbmU9Im1pZGRsZSI+Tm8gSW1hZ2U8L3RleHQ+CiAgPHJlY3QgeD0iMTUwIiB5PSIxMjAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBzdHJva2U9IiM5Y2EzYWYiIHN0cm9rZS13aWR0aD0iNCIgZmlsbD0ibm9uZSIgcng9IjgiLz4KICA8cGF0aCBkPSJNMTUwIDE4MCBMMTcwIDE2MCBMMjAwIDE5MCBMMjIwIDE3MCBMMjUwIDIwMCBMMjUwIDIyMCBMMTUwIDIyMCBaIiBmaWxsPSIjOWNhM2FmIiBvcGFjaXR5PSIwLjUiLz4KPC9zdmc+`;
|
|
12964
12967
|
function QuickViewModal({ product, onClose, onNavigateToProduct }) {
|
|
12965
12968
|
const [selectedVariantIndex, setSelectedVariantIndex] = useState(0);
|
|
12966
12969
|
const [selectedSizeIndex, setSelectedSizeIndex] = useState(0);
|
|
@@ -13287,7 +13290,7 @@ function ProductCard({
|
|
|
13287
13290
|
return selectedVariant ? selectedVariant.inventoryCount : product.variants?.[0]?.inventoryCount;
|
|
13288
13291
|
}, [selectedVariant, product.variants]);
|
|
13289
13292
|
const imageSource = useMemo(() => {
|
|
13290
|
-
const src = selectedVariantImage || selectedVariant?.media?.[0]?.file || product.media?.[0]?.file ||
|
|
13293
|
+
const src = selectedVariantImage || selectedVariant?.media?.[0]?.file || product.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC;
|
|
13291
13294
|
return {
|
|
13292
13295
|
src,
|
|
13293
13296
|
alt: product.name || "Product image"
|
|
@@ -14590,7 +14593,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
|
|
|
14590
14593
|
/* @__PURE__ */ jsx("div", { className: "relative h-48 w-full overflow-hidden rounded-2xl bg-gray-100 md:h-40 md:w-40", children: /* @__PURE__ */ jsx(
|
|
14591
14594
|
Image4,
|
|
14592
14595
|
{
|
|
14593
|
-
src: product.media?.[0]?.file ||
|
|
14596
|
+
src: product.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
14594
14597
|
alt: product.name,
|
|
14595
14598
|
fill: true,
|
|
14596
14599
|
className: "object-cover transition duration-500 group-hover:scale-105"
|
|
@@ -15510,7 +15513,7 @@ function ProductDetailScreen({ productId }) {
|
|
|
15510
15513
|
/* @__PURE__ */ jsx("h3", { className: "font-['Poppins',sans-serif] font-semibold text-[14px] text-secondary mb-3", children: "Select Variant" }),
|
|
15511
15514
|
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-3", children: product.variants.map((variant) => {
|
|
15512
15515
|
const isSelected = selectedVariant?._id === variant._id;
|
|
15513
|
-
const variantImage = variant.media?.[0]?.file || product.media?.[0]?.file || product.images?.[0] ||
|
|
15516
|
+
const variantImage = variant.media?.[0]?.file || product.media?.[0]?.file || product.images?.[0] || PLACEHOLDER_IMAGE_SRC;
|
|
15514
15517
|
return /* @__PURE__ */ jsxs(
|
|
15515
15518
|
"button",
|
|
15516
15519
|
{
|
|
@@ -15717,7 +15720,7 @@ function CartItem({ item }) {
|
|
|
15717
15720
|
/* @__PURE__ */ jsx("div", { className: "w-28 h-28 rounded-[16px] overflow-hidden bg-gray-50 shrink-0", children: /* @__PURE__ */ jsx(
|
|
15718
15721
|
Image4,
|
|
15719
15722
|
{
|
|
15720
|
-
src: item.productVariantData.media[0]?.file ||
|
|
15723
|
+
src: item.productVariantData.media[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
15721
15724
|
alt: item.productVariantData.name,
|
|
15722
15725
|
className: "w-full h-full object-cover",
|
|
15723
15726
|
height: 112,
|
|
@@ -17134,7 +17137,7 @@ function CheckoutScreen() {
|
|
|
17134
17137
|
/* @__PURE__ */ jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsx(
|
|
17135
17138
|
Image4,
|
|
17136
17139
|
{
|
|
17137
|
-
src: rate.providerImage75 ||
|
|
17140
|
+
src: rate.providerImage75 || PLACEHOLDER_IMAGE_SRC,
|
|
17138
17141
|
alt: rate.provider,
|
|
17139
17142
|
className: "w-12 h-12 rounded-lg object-contain bg-white border border-gray-200 p-1",
|
|
17140
17143
|
onError: (e) => {
|
|
@@ -17219,7 +17222,7 @@ function CheckoutScreen() {
|
|
|
17219
17222
|
/* @__PURE__ */ jsx("h2", { className: "font-['Poppins',sans-serif] font-semibold text-[#2B4B7C] mb-6 text-2xl", children: "Order Summary" }),
|
|
17220
17223
|
/* @__PURE__ */ jsxs("section", { className: "mt-8 pt-6 border-t border-slate-100", children: [
|
|
17221
17224
|
/* @__PURE__ */ jsx("div", { className: "space-y-4 mb-6", children: cart?.cartBody?.items?.map((item) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
17222
|
-
/* @__PURE__ */ jsx("div", { className: "w-16 h-16 rounded-xl overflow-hidden bg-white shrink-0", children: /* @__PURE__ */ jsx(Image4, { src: item.productVariantData?.media?.[0]?.file ||
|
|
17225
|
+
/* @__PURE__ */ jsx("div", { className: "w-16 h-16 rounded-xl overflow-hidden bg-white shrink-0", children: /* @__PURE__ */ jsx(Image4, { src: item.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC, alt: item.productVariantData.name, className: "w-full h-full object-cover", height: 200, width: 200 }) }),
|
|
17223
17226
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
17224
17227
|
/* @__PURE__ */ jsx("p", { className: "font-['Poppins',sans-serif] font-medium text-[12px] text-[#2B4B7C] mb-1", children: item?.productVariantData?.name }),
|
|
17225
17228
|
/* @__PURE__ */ jsxs("p", { className: "font-['Poppins',sans-serif] text-[11px] text-[#676c80]", children: [
|
|
@@ -18401,7 +18404,7 @@ function AccountOrdersTab() {
|
|
|
18401
18404
|
/* @__PURE__ */ jsx("div", { className: "relative w-12 h-12 rounded-lg bg-slate-100 shrink-0 overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
18402
18405
|
Image4,
|
|
18403
18406
|
{
|
|
18404
|
-
src: item?.productVariantData?.media?.[0]?.file ||
|
|
18407
|
+
src: item?.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
18405
18408
|
alt: item?.productVariantData?.name || "Product image",
|
|
18406
18409
|
fill: true,
|
|
18407
18410
|
className: "object-cover",
|
|
@@ -18957,7 +18960,7 @@ function OrderCard({ order, onDelete }) {
|
|
|
18957
18960
|
/* @__PURE__ */ jsx("div", { className: "relative w-12 h-12 rounded-sm bg-gray-100 shrink-0 overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
18958
18961
|
Image4,
|
|
18959
18962
|
{
|
|
18960
|
-
src: item?.productVariantData?.media?.[0]?.file ||
|
|
18963
|
+
src: item?.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
18961
18964
|
alt: item?.productVariantData?.name || "Product image",
|
|
18962
18965
|
fill: true,
|
|
18963
18966
|
className: "object-cover",
|
|
@@ -20226,7 +20229,7 @@ function WishlistScreen() {
|
|
|
20226
20229
|
Image4,
|
|
20227
20230
|
{
|
|
20228
20231
|
fill: true,
|
|
20229
|
-
src: product.media?.[0]?.file ||
|
|
20232
|
+
src: product.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
20230
20233
|
alt: product.name || "Wishlist item",
|
|
20231
20234
|
className: "h-full w-full object-cover"
|
|
20232
20235
|
}
|
|
@@ -21672,7 +21675,7 @@ function OrderDetailScreen({ id }) {
|
|
|
21672
21675
|
/* @__PURE__ */ jsx("div", { className: "relative w-20 h-20 bg-slate-100 rounded-2xl overflow-hidden shrink-0 border border-slate-100 group-hover:scale-105 transition-transform duration-300", children: /* @__PURE__ */ jsx(
|
|
21673
21676
|
Image4,
|
|
21674
21677
|
{
|
|
21675
|
-
src: item.productVariantData?.media?.[0]?.file ||
|
|
21678
|
+
src: item.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
21676
21679
|
alt: item.productVariantData?.name || "Item",
|
|
21677
21680
|
fill: true,
|
|
21678
21681
|
className: "object-cover",
|