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.js
CHANGED
|
@@ -12971,6 +12971,9 @@ function EcommerceProvider({ config, children, withToaster = true, basePath = ""
|
|
|
12971
12971
|
/* @__PURE__ */ jsxRuntime.jsx(NotificationDrawer, {})
|
|
12972
12972
|
] }) }) }) }) }) }) }) }) });
|
|
12973
12973
|
}
|
|
12974
|
+
|
|
12975
|
+
// src/lib/constants/assets.ts
|
|
12976
|
+
var PLACEHOLDER_IMAGE_SRC = `data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAwIiBoZWlnaHQ9IjQwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjZjNmNGY2Ii8+CiAgPHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIyNCIgZmlsbD0iIzljYTNhZiIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZG9taW5hbnQtYmFzZWxpbmU9Im1pZGRsZSI+Tm8gSW1hZ2U8L3RleHQ+CiAgPHJlY3QgeD0iMTUwIiB5PSIxMjAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBzdHJva2U9IiM5Y2EzYWYiIHN0cm9rZS13aWR0aD0iNCIgZmlsbD0ibm9uZSIgcng9IjgiLz4KICA8cGF0aCBkPSJNMTUwIDE4MCBMMTcwIDE2MCBMMjAwIDE5MCBMMjIwIDE3MCBMMjUwIDIwMCBMMjUwIDIyMCBMMTUwIDIyMCBaIiBmaWxsPSIjOWNhM2FmIiBvcGFjaXR5PSIwLjUiLz4KPC9zdmc+`;
|
|
12974
12977
|
function QuickViewModal({ product, onClose, onNavigateToProduct }) {
|
|
12975
12978
|
const [selectedVariantIndex, setSelectedVariantIndex] = React12.useState(0);
|
|
12976
12979
|
const [selectedSizeIndex, setSelectedSizeIndex] = React12.useState(0);
|
|
@@ -13297,7 +13300,7 @@ function ProductCard({
|
|
|
13297
13300
|
return selectedVariant ? selectedVariant.inventoryCount : product.variants?.[0]?.inventoryCount;
|
|
13298
13301
|
}, [selectedVariant, product.variants]);
|
|
13299
13302
|
const imageSource = React12.useMemo(() => {
|
|
13300
|
-
const src = selectedVariantImage || selectedVariant?.media?.[0]?.file || product.media?.[0]?.file ||
|
|
13303
|
+
const src = selectedVariantImage || selectedVariant?.media?.[0]?.file || product.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC;
|
|
13301
13304
|
return {
|
|
13302
13305
|
src,
|
|
13303
13306
|
alt: product.name || "Product image"
|
|
@@ -14600,7 +14603,7 @@ function ShopScreen({ initialFilters = {}, categoryName }) {
|
|
|
14600
14603
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-48 w-full overflow-hidden rounded-2xl bg-gray-100 md:h-40 md:w-40", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14601
14604
|
Image4__default.default,
|
|
14602
14605
|
{
|
|
14603
|
-
src: product.media?.[0]?.file ||
|
|
14606
|
+
src: product.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
14604
14607
|
alt: product.name,
|
|
14605
14608
|
fill: true,
|
|
14606
14609
|
className: "object-cover transition duration-500 group-hover:scale-105"
|
|
@@ -15520,7 +15523,7 @@ function ProductDetailScreen({ productId }) {
|
|
|
15520
15523
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-['Poppins',sans-serif] font-semibold text-[14px] text-secondary mb-3", children: "Select Variant" }),
|
|
15521
15524
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-3", children: product.variants.map((variant) => {
|
|
15522
15525
|
const isSelected = selectedVariant?._id === variant._id;
|
|
15523
|
-
const variantImage = variant.media?.[0]?.file || product.media?.[0]?.file || product.images?.[0] ||
|
|
15526
|
+
const variantImage = variant.media?.[0]?.file || product.media?.[0]?.file || product.images?.[0] || PLACEHOLDER_IMAGE_SRC;
|
|
15524
15527
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15525
15528
|
"button",
|
|
15526
15529
|
{
|
|
@@ -15727,7 +15730,7 @@ function CartItem({ item }) {
|
|
|
15727
15730
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-28 h-28 rounded-[16px] overflow-hidden bg-gray-50 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15728
15731
|
Image4__default.default,
|
|
15729
15732
|
{
|
|
15730
|
-
src: item.productVariantData.media[0]?.file ||
|
|
15733
|
+
src: item.productVariantData.media[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
15731
15734
|
alt: item.productVariantData.name,
|
|
15732
15735
|
className: "w-full h-full object-cover",
|
|
15733
15736
|
height: 112,
|
|
@@ -17144,7 +17147,7 @@ function CheckoutScreen() {
|
|
|
17144
17147
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17145
17148
|
Image4__default.default,
|
|
17146
17149
|
{
|
|
17147
|
-
src: rate.providerImage75 ||
|
|
17150
|
+
src: rate.providerImage75 || PLACEHOLDER_IMAGE_SRC,
|
|
17148
17151
|
alt: rate.provider,
|
|
17149
17152
|
className: "w-12 h-12 rounded-lg object-contain bg-white border border-gray-200 p-1",
|
|
17150
17153
|
onError: (e) => {
|
|
@@ -17229,7 +17232,7 @@ function CheckoutScreen() {
|
|
|
17229
17232
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-['Poppins',sans-serif] font-semibold text-[#2B4B7C] mb-6 text-2xl", children: "Order Summary" }),
|
|
17230
17233
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "mt-8 pt-6 border-t border-slate-100", children: [
|
|
17231
17234
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4 mb-6", children: cart?.cartBody?.items?.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3", children: [
|
|
17232
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 rounded-xl overflow-hidden bg-white shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(Image4__default.default, { src: item.productVariantData?.media?.[0]?.file ||
|
|
17235
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 rounded-xl overflow-hidden bg-white shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(Image4__default.default, { src: item.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC, alt: item.productVariantData.name, className: "w-full h-full object-cover", height: 200, width: 200 }) }),
|
|
17233
17236
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
17234
17237
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-['Poppins',sans-serif] font-medium text-[12px] text-[#2B4B7C] mb-1", children: item?.productVariantData?.name }),
|
|
17235
17238
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-['Poppins',sans-serif] text-[11px] text-[#676c80]", children: [
|
|
@@ -18411,7 +18414,7 @@ function AccountOrdersTab() {
|
|
|
18411
18414
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-12 h-12 rounded-lg bg-slate-100 shrink-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18412
18415
|
Image4__default.default,
|
|
18413
18416
|
{
|
|
18414
|
-
src: item?.productVariantData?.media?.[0]?.file ||
|
|
18417
|
+
src: item?.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
18415
18418
|
alt: item?.productVariantData?.name || "Product image",
|
|
18416
18419
|
fill: true,
|
|
18417
18420
|
className: "object-cover",
|
|
@@ -18967,7 +18970,7 @@ function OrderCard({ order, onDelete }) {
|
|
|
18967
18970
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-12 h-12 rounded-sm bg-gray-100 shrink-0 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18968
18971
|
Image4__default.default,
|
|
18969
18972
|
{
|
|
18970
|
-
src: item?.productVariantData?.media?.[0]?.file ||
|
|
18973
|
+
src: item?.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
18971
18974
|
alt: item?.productVariantData?.name || "Product image",
|
|
18972
18975
|
fill: true,
|
|
18973
18976
|
className: "object-cover",
|
|
@@ -20236,7 +20239,7 @@ function WishlistScreen() {
|
|
|
20236
20239
|
Image4__default.default,
|
|
20237
20240
|
{
|
|
20238
20241
|
fill: true,
|
|
20239
|
-
src: product.media?.[0]?.file ||
|
|
20242
|
+
src: product.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
20240
20243
|
alt: product.name || "Wishlist item",
|
|
20241
20244
|
className: "h-full w-full object-cover"
|
|
20242
20245
|
}
|
|
@@ -21682,7 +21685,7 @@ function OrderDetailScreen({ id }) {
|
|
|
21682
21685
|
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
|
|
21683
21686
|
Image4__default.default,
|
|
21684
21687
|
{
|
|
21685
|
-
src: item.productVariantData?.media?.[0]?.file ||
|
|
21688
|
+
src: item.productVariantData?.media?.[0]?.file || PLACEHOLDER_IMAGE_SRC,
|
|
21686
21689
|
alt: item.productVariantData?.name || "Item",
|
|
21687
21690
|
fill: true,
|
|
21688
21691
|
className: "object-cover",
|