@lmnto/h-mall-shared 1.0.1

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.
Files changed (262) hide show
  1. package/app.css +457 -0
  2. package/bitbucket-pipelines.yml +223 -0
  3. package/package.json +43 -0
  4. package/public/gif/balloon.gif +0 -0
  5. package/public/gif/gift.gif +0 -0
  6. package/public/img/ai-dialog.png +0 -0
  7. package/public/img/ai-x1-banner.png +0 -0
  8. package/public/img/ai-x1.png +0 -0
  9. package/public/img/alert-Icon.png +0 -0
  10. package/public/img/aleta-payment-kyc-require.png +0 -0
  11. package/public/img/aleta-payment-pending.png +0 -0
  12. package/public/img/aleta-payment-rejected.png +0 -0
  13. package/public/img/aleta-payment-subscription-required.png +0 -0
  14. package/public/img/boost-banner-bg.png +0 -0
  15. package/public/img/boost-banner-right.png +0 -0
  16. package/public/img/boost-banner.png +0 -0
  17. package/public/img/boost-dialog-bg.png +0 -0
  18. package/public/img/boostPower.png +0 -0
  19. package/public/img/boostTooltip.png +0 -0
  20. package/public/img/brand-icon.svg +23 -0
  21. package/public/img/brand-text.svg +11 -0
  22. package/public/img/card-icon.png +0 -0
  23. package/public/img/cashback-Icon.png +0 -0
  24. package/public/img/crown.svg +9 -0
  25. package/public/img/empty-box.png +0 -0
  26. package/public/img/gen3-dialog.png +0 -0
  27. package/public/img/gen3-home-banner-bg.png +0 -0
  28. package/public/img/gen3-image.png +0 -0
  29. package/public/img/gift.png +0 -0
  30. package/public/img/img-placeholder-illustration.svg +6 -0
  31. package/public/img/logo.svg +31 -0
  32. package/public/img/offerBanner.png +0 -0
  33. package/public/img/pagenotfound.png +0 -0
  34. package/public/img/partial-pay-payment-successful.png +0 -0
  35. package/public/img/phoneShippingBG.png +0 -0
  36. package/public/img/placeholder-image.jpg +0 -0
  37. package/public/img/powerIcon.png +0 -0
  38. package/public/img/product-01.png +0 -0
  39. package/public/img/product-02.jpg +0 -0
  40. package/public/img/product-03.jpg +0 -0
  41. package/public/img/product-04.jpg +0 -0
  42. package/public/img/product-05.png +0 -0
  43. package/public/img/product-06.png +0 -0
  44. package/public/img/profile-avatar.svg +12 -0
  45. package/public/img/promotion-icon.png +0 -0
  46. package/public/img/session-expired.png +0 -0
  47. package/public/img/shipping-alert-icon.png +0 -0
  48. package/public/img/shippingIcon.png +0 -0
  49. package/public/img/smart-pay-banner-how.png +0 -0
  50. package/public/img/smart-pay-banner-own.png +0 -0
  51. package/public/img/smart-pay-chose.png +0 -0
  52. package/public/img/smart-pay-easy.png +0 -0
  53. package/public/img/smart-pay-payment.png +0 -0
  54. package/public/img/smart-plan-fire.gif +0 -0
  55. package/public/img/smart-plan-sparkle.gif +0 -0
  56. package/public/img/special.png +0 -0
  57. package/public/img/specialOfferBg.png +0 -0
  58. package/public/img/stop-shipping-banner.png +0 -0
  59. package/public/img/subscriptionBanner.png +0 -0
  60. package/public/img/subscriptionIcon.png +0 -0
  61. package/public/img/successIcon.png +0 -0
  62. package/public/img/wallet-icon.png +0 -0
  63. package/public/img/world-wide-shipping.png +0 -0
  64. package/public/next.svg +1 -0
  65. package/public/vercel.svg +1 -0
  66. package/shared/components/AddressFormComponent.tsx +215 -0
  67. package/shared/components/AddressShippingFormComponent.tsx +223 -0
  68. package/shared/components/AiPaymentDialog.tsx +95 -0
  69. package/shared/components/AppLoadingComponent.tsx +15 -0
  70. package/shared/components/AppLoadingComponentV2.tsx +18 -0
  71. package/shared/components/Button.tsx +48 -0
  72. package/shared/components/BuySubscriptionDialog.tsx +75 -0
  73. package/shared/components/CartDrawerComponent.tsx +324 -0
  74. package/shared/components/CashbackComponent.tsx +48 -0
  75. package/shared/components/CashbackMigrationComponent.tsx +41 -0
  76. package/shared/components/CommissionNonEligibleComponent.tsx +27 -0
  77. package/shared/components/CustomNextImage.tsx +50 -0
  78. package/shared/components/CustomNextLink.tsx +46 -0
  79. package/shared/components/EditAddressFormComponent.tsx +254 -0
  80. package/shared/components/EmptyCartMessageComponent.tsx +25 -0
  81. package/shared/components/EmptyCartMessageForCartPage.tsx +61 -0
  82. package/shared/components/EmptyLegacyOrderMessageForOrdersPage.tsx +52 -0
  83. package/shared/components/EmptyOrderMessageForOrdersPage.tsx +62 -0
  84. package/shared/components/EmptyOrderMessageForShippingOrdersPage.tsx +62 -0
  85. package/shared/components/Footer.tsx +71 -0
  86. package/shared/components/GreetingDialog.tsx +96 -0
  87. package/shared/components/Header.tsx +106 -0
  88. package/shared/components/HoldShippingDialog.tsx +165 -0
  89. package/shared/components/HomeBanners.tsx +298 -0
  90. package/shared/components/InactiveCartDialog.tsx +69 -0
  91. package/shared/components/InputCartQuantity.tsx +342 -0
  92. package/shared/components/Inputfield.tsx +110 -0
  93. package/shared/components/ListItemComponent.tsx +82 -0
  94. package/shared/components/LoadingIconComponent.tsx +284 -0
  95. package/shared/components/OrderNotFoundComponent.tsx +56 -0
  96. package/shared/components/PageHeader.tsx +42 -0
  97. package/shared/components/PhoneNumberCountries.tsx +133 -0
  98. package/shared/components/PhoneShippingDialog.tsx +77 -0
  99. package/shared/components/PickupDialog.tsx +92 -0
  100. package/shared/components/ProductNotFoundComponent.tsx +56 -0
  101. package/shared/components/ProductPriceComponent.tsx +32 -0
  102. package/shared/components/ProfileMenu.tsx +120 -0
  103. package/shared/components/RequestCreditNoteInvoiceDialog.tsx +214 -0
  104. package/shared/components/RequestInvoiceDialog.tsx +194 -0
  105. package/shared/components/SelectCities.tsx +133 -0
  106. package/shared/components/SelectComponent.tsx +334 -0
  107. package/shared/components/SelectCountries.tsx +179 -0
  108. package/shared/components/SelectPickUpStore.tsx +131 -0
  109. package/shared/components/SelectStates.tsx +144 -0
  110. package/shared/components/ServerTime.tsx +68 -0
  111. package/shared/components/SessionDialogComponent.tsx +60 -0
  112. package/shared/components/ShippingAddressFormDialogComponent.tsx +51 -0
  113. package/shared/components/Sidebar.tsx +281 -0
  114. package/shared/components/SpecialOfferDialog.tsx +193 -0
  115. package/shared/components/StatusComponents.tsx +25 -0
  116. package/shared/components/StepperComponent.tsx +79 -0
  117. package/shared/components/StepperSmartPayComponent.tsx +97 -0
  118. package/shared/components/SubscriptionPurchaseDialogComponent.tsx +81 -0
  119. package/shared/components/TableComponent.tsx +144 -0
  120. package/shared/components/TablePaginationComponent.tsx +151 -0
  121. package/shared/components/aleta/AletaManagerComponent.tsx +52 -0
  122. package/shared/components/aleta/KycPendingStatus.tsx +33 -0
  123. package/shared/components/aleta/KycRejectedStatus.tsx +53 -0
  124. package/shared/components/aleta/KycRequiredStatus.tsx +53 -0
  125. package/shared/components/aleta/SubscriptionRequiredStatus.tsx +45 -0
  126. package/shared/components/icons/AletaWalletIcon.tsx +21 -0
  127. package/shared/components/icons/BrandIcon.tsx +97 -0
  128. package/shared/components/icons/BrandText.tsx +47 -0
  129. package/shared/components/icons/CartIcon.tsx +21 -0
  130. package/shared/components/icons/DoneIcon.tsx +27 -0
  131. package/shared/components/icons/HomnifiIcon.tsx +23 -0
  132. package/shared/components/icons/InfoIcon.tsx +16 -0
  133. package/shared/components/icons/SmartPayProductIcon.tsx +31 -0
  134. package/shared/components/payments/DisclaimerAlertDialog.tsx +205 -0
  135. package/shared/components/payments/EmptyAssets.tsx +23 -0
  136. package/shared/components/payments/PaybyWalletItemComponent.tsx +116 -0
  137. package/shared/components/payments/PaymentAssetItemComponent.tsx +101 -0
  138. package/shared/components/payments/RequestProcessingDialog.tsx +123 -0
  139. package/shared/components/payments/WalletSectionManager.tsx +82 -0
  140. package/shared/components/payments/WalletSliderComponent.tsx +326 -0
  141. package/shared/components/payments/WalletTermsAndConditionComponent.tsx +88 -0
  142. package/shared/constants/address-shipping.schema.ts +56 -0
  143. package/shared/constants/address.schema.ts +56 -0
  144. package/shared/constants/app.ts +323 -0
  145. package/shared/constants/environment.ts +23 -0
  146. package/shared/constants/feature-flags.ts +15 -0
  147. package/shared/constants/query-keys.ts +106 -0
  148. package/shared/constants/routes.ts +41 -0
  149. package/shared/constants/socket.ts +15 -0
  150. package/shared/contexts/HomeProductsContext.tsx +51 -0
  151. package/shared/contexts/MainWrapperContext.tsx +289 -0
  152. package/shared/contexts/WebSocketContext.tsx +155 -0
  153. package/shared/hooks/useAddressForm.ts +169 -0
  154. package/shared/hooks/useAddresses.ts +28 -0
  155. package/shared/hooks/useAppForm.ts +39 -0
  156. package/shared/hooks/useCart.ts +207 -0
  157. package/shared/hooks/useCopy.ts +45 -0
  158. package/shared/hooks/useCountries.ts +27 -0
  159. package/shared/hooks/useCustomRouter.ts +51 -0
  160. package/shared/hooks/useDebounce.ts +21 -0
  161. package/shared/hooks/useInvoice.ts +41 -0
  162. package/shared/hooks/useOnlineUser.ts +38 -0
  163. package/shared/hooks/usePayments.ts +101 -0
  164. package/shared/hooks/useShippingAddressForm.ts +70 -0
  165. package/shared/hooks/useShippingAddresses.ts +33 -0
  166. package/shared/hooks/useStores.ts +29 -0
  167. package/shared/hooks/useUserActivity.ts +43 -0
  168. package/shared/i18n/client.ts +27 -0
  169. package/shared/i18n/locales/en.ts +383 -0
  170. package/shared/i18n/locales/it.ts +373 -0
  171. package/shared/i18n/server.ts +7 -0
  172. package/shared/services/addresses.service.ts +27 -0
  173. package/shared/services/api/core/ApiError.ts +29 -0
  174. package/shared/services/api/core/ApiRequestOptions.ts +25 -0
  175. package/shared/services/api/core/ApiResult.ts +11 -0
  176. package/shared/services/api/core/CancelablePromise.ts +130 -0
  177. package/shared/services/api/core/OpenAPI.ts +37 -0
  178. package/shared/services/api/core/request.ts +376 -0
  179. package/shared/services/api/index.ts +64 -0
  180. package/shared/services/api/models/AddAllProductToShippingCartDto.ts +7 -0
  181. package/shared/services/api/models/AddProductToCartDto.ts +8 -0
  182. package/shared/services/api/models/AddProductToShippingCartDto.ts +8 -0
  183. package/shared/services/api/models/AdminPlaceOrderDto.ts +16 -0
  184. package/shared/services/api/models/AssignPickupSerialNumberDto.ts +10 -0
  185. package/shared/services/api/models/CreateUserAddressDto.ts +19 -0
  186. package/shared/services/api/models/DeletCartProductsArrayDto.ts +7 -0
  187. package/shared/services/api/models/GenerateInvoiceDto.ts +7 -0
  188. package/shared/services/api/models/OrderConfirmationEmailDto.ts +8 -0
  189. package/shared/services/api/models/PlaceOrderDto.ts +9 -0
  190. package/shared/services/api/models/PlaceShipmentOrderDto.ts +8 -0
  191. package/shared/services/api/models/ProductBoostDto.ts +18 -0
  192. package/shared/services/api/models/RemoveAssignedSerialNumberDto.ts +9 -0
  193. package/shared/services/api/models/RemoveProductToCartDto.ts +8 -0
  194. package/shared/services/api/models/ShipmentItem.ts +8 -0
  195. package/shared/services/api/models/ShippingCartUpdateBillingAddressesDto.ts +7 -0
  196. package/shared/services/api/models/ShippingCartUpdateShippingMethodDto.ts +7 -0
  197. package/shared/services/api/models/UnfreezeWalletDto.ts +8 -0
  198. package/shared/services/api/models/UpdateCartBillingAddressesDto.ts +7 -0
  199. package/shared/services/api/models/UpdateCartPaymentMethodDto.ts +9 -0
  200. package/shared/services/api/models/UpdateCartShippingMethodDto.ts +7 -0
  201. package/shared/services/api/models/UpdateCartStoreDto.ts +7 -0
  202. package/shared/services/api/models/UpdateProductDto.ts +11 -0
  203. package/shared/services/api/models/UpdateShipmentItemStatusDto.ts +24 -0
  204. package/shared/services/api/models/UpdateShippingCartPaymentMethodDto.ts +9 -0
  205. package/shared/services/api/models/UpdateUserAddressDto.ts +19 -0
  206. package/shared/services/api/models/ValidateAuthCodeDto.ts +8 -0
  207. package/shared/services/api/models/WithdrawOrderWalletDto.ts +8 -0
  208. package/shared/services/api/services/AddressesService.ts +160 -0
  209. package/shared/services/api/services/AdminsDevicesService.ts +28 -0
  210. package/shared/services/api/services/AdminsOrdersService.ts +117 -0
  211. package/shared/services/api/services/AdminsPickupsService.ts +57 -0
  212. package/shared/services/api/services/AdminsProductsService.ts +86 -0
  213. package/shared/services/api/services/CartsService.ts +190 -0
  214. package/shared/services/api/services/CashBackQueueService.ts +39 -0
  215. package/shared/services/api/services/CategoriesService.ts +65 -0
  216. package/shared/services/api/services/DefaultService.ts +19 -0
  217. package/shared/services/api/services/FeaturesFlagsService.ts +20 -0
  218. package/shared/services/api/services/IossQueueService.ts +39 -0
  219. package/shared/services/api/services/OrderCallbackService.ts +67 -0
  220. package/shared/services/api/services/OrderEmailsService.ts +40 -0
  221. package/shared/services/api/services/OrderImportService.ts +228 -0
  222. package/shared/services/api/services/OrdersService.ts +183 -0
  223. package/shared/services/api/services/PaymentGatewayService.ts +19 -0
  224. package/shared/services/api/services/PaymentsService.ts +88 -0
  225. package/shared/services/api/services/ProductsService.ts +67 -0
  226. package/shared/services/api/services/ShipmentOrderCallbackService.ts +67 -0
  227. package/shared/services/api/services/ShipmentOrdersService.ts +88 -0
  228. package/shared/services/api/services/ShipmentsService.ts +30 -0
  229. package/shared/services/api/services/ShippingCartService.ts +247 -0
  230. package/shared/services/api/services/ShippingMethodsService.ts +20 -0
  231. package/shared/services/api/services/StoresService.ts +25 -0
  232. package/shared/services/api/services/SyncServiceQueueService.ts +39 -0
  233. package/shared/services/api/services/UpgradeOrdersService.ts +26 -0
  234. package/shared/services/api/services/UsersAuthService.ts +45 -0
  235. package/shared/services/api/services/UsersService.ts +53 -0
  236. package/shared/services/api/services/XeraQueueService.ts +39 -0
  237. package/shared/services/index.ts +0 -0
  238. package/shared/services/payment-method.service.ts +29 -0
  239. package/shared/stores/cartStore.ts +108 -0
  240. package/shared/stores/countriesStore.ts +62 -0
  241. package/shared/stores/formStore.ts +19 -0
  242. package/shared/stores/loadingStore.ts +12 -0
  243. package/shared/stores/userStore.ts +32 -0
  244. package/shared/types/SelectComponent.types.ts +31 -0
  245. package/shared/types/addressForm.ts +27 -0
  246. package/shared/types/cart.ts +208 -0
  247. package/shared/types/category.ts +6 -0
  248. package/shared/types/creditNote.ts +0 -0
  249. package/shared/types/feature-flags.ts +5 -0
  250. package/shared/types/icon.ts +5 -0
  251. package/shared/types/index.d.ts +84 -0
  252. package/shared/types/order.ts +332 -0
  253. package/shared/types/pagination.ts +5 -0
  254. package/shared/types/payments.ts +68 -0
  255. package/shared/types/product.ts +54 -0
  256. package/shared/types/shoppingCart.ts +219 -0
  257. package/shared/types/upgradeCart.ts +226 -0
  258. package/shared/types/user.ts +36 -0
  259. package/shared/utils/app.util.ts +261 -0
  260. package/shared/utils/notifications.util.ts +39 -0
  261. package/shared/utils/user-session.util.ts +171 -0
  262. package/tailwind.config.ts +234 -0
@@ -0,0 +1,106 @@
1
+ "use client";
2
+
3
+ import {
4
+ Badge,
5
+ IconButton,
6
+ Navbar,
7
+ Typography,
8
+ } from "@material-tailwind/react";
9
+ import { FaBarsStaggered } from "react-icons/fa6";
10
+ import { HiOutlineShoppingCart } from "react-icons/hi";
11
+
12
+ import { _useScopedI18n } from "../i18n/client";
13
+ import { IUserProfile } from "../types/user";
14
+ import { BrandIcon } from "./icons/BrandIcon";
15
+ import ProfileMenu from "./ProfileMenu";
16
+ import ServerTime from "./ServerTime";
17
+
18
+ export type HeaderProps = {
19
+ onMenuClick: () => void;
20
+ openCartDrawer: () => void;
21
+ logout: () => void;
22
+ user: IUserProfile;
23
+ cartProductsCount: number;
24
+ };
25
+
26
+ export function Header({
27
+ user,
28
+ logout,
29
+ onMenuClick,
30
+ openCartDrawer,
31
+ cartProductsCount,
32
+ }: HeaderProps) {
33
+ //
34
+ const scopeT = _useScopedI18n("sharedComponents.headerComponent");
35
+
36
+ return (
37
+ <>
38
+ <Navbar className="rounded-none px-2 py-3 md:p-3 w-full shadow-none border-b-slate-50 max-w-full">
39
+ <div className="flex relative items-center justify-start gap-5 md:justify-between text-blue-gray-900">
40
+ <div className="flex-1">
41
+ <div className="hidden lg:block">
42
+ <Typography className="text-base font-semibold text-black-500 mb-[0.3rem]">
43
+ {scopeT("title")}, {user?.userName}
44
+ </Typography>
45
+ {/*
46
+ <Typography className="text-xs font-normal text-black-300">
47
+ lorem Ipsum text lorem Ipsum text text
48
+ </Typography>
49
+ */}
50
+ </div>
51
+
52
+ <a href="/products" className="lg:hidden">
53
+ <div className="w-36 brandIcon">
54
+ <BrandIcon width={150} height={34} />
55
+ </div>
56
+ </a>
57
+ </div>
58
+
59
+ <div className="flex justify-between items-center gap-5">
60
+ <ServerTime className="hidden md:flex" />
61
+
62
+ <div className="flex items-center">
63
+ {(() => {
64
+ const button = (
65
+ <IconButton
66
+ onClick={openCartDrawer}
67
+ className="bg-gray-50 rounded-full h-10 w-10 !max-h-10 !max-w-10 shadow-none border border-slate-50"
68
+ >
69
+ <HiOutlineShoppingCart className="h-5 w-5 text-black-500" />
70
+ </IconButton>
71
+ );
72
+
73
+ return cartProductsCount !== 0 ? (
74
+ <Badge
75
+ content={cartProductsCount}
76
+ className="min-w-5 min-h-fit text-[0.625rem] py-0.5 px-1.5 top-1 right-1 rounded-xl leading-normal bg-blue-300 text-white"
77
+ >
78
+ {button}
79
+ </Badge>
80
+ ) : (
81
+ button
82
+ );
83
+ })()}
84
+ </div>
85
+
86
+ <ProfileMenu
87
+ bidNumber={user?.bid}
88
+ userName={user?.userName}
89
+ // profileImage={user?.picture}
90
+ logout={logout}
91
+ />
92
+ </div>
93
+
94
+ <div className="lg:hidden">
95
+ <IconButton
96
+ onClick={onMenuClick}
97
+ className="bg-gray-50 h-10 w-10 !max-h-10 !max-w-10 shadow-none border border-slate-50 "
98
+ >
99
+ <FaBarsStaggered className="h-5 w-6 text-black-500 bg-white" />
100
+ </IconButton>
101
+ </div>
102
+ </div>
103
+ </Navbar>
104
+ </>
105
+ );
106
+ }
@@ -0,0 +1,165 @@
1
+ import {
2
+ Dialog,
3
+ DialogBody,
4
+ DialogHeader,
5
+ IconButton,
6
+ Typography,
7
+ } from "@material-tailwind/react";
8
+ import React from "react";
9
+ import { IoIosCloseCircleOutline } from "react-icons/io";
10
+
11
+ import stopShippingImage from "../../public/img/stop-shipping-banner.png";
12
+ import {
13
+ GREETING_DIALOG_STATUS,
14
+ GREETING_DIALOG_STATUS_KEY,
15
+ } from "../../shared/constants/app";
16
+ import { FeatureCodes } from "../constants/feature-flags";
17
+ import { useMainContext } from "../contexts/MainWrapperContext";
18
+ import CustomNextImage from "./CustomNextImage";
19
+
20
+ export function HoldShippingDialog({ handleOpen, open }) {
21
+ const { featureFlags } = useMainContext();
22
+ return (
23
+ <>
24
+ <Dialog
25
+ size="sm"
26
+ open={open}
27
+ handler={handleOpen}
28
+ className=" px-3 xl:px-5 py-4 boostDialogBg"
29
+ dismiss={{
30
+ outsidePress: false,
31
+ escapeKey: false,
32
+ }}
33
+ >
34
+ <DialogHeader className="justify-center">
35
+ <IconButton
36
+ size="sm"
37
+ variant="text"
38
+ className="!absolute right-3 top-3 outline-none"
39
+ onClick={async () => {
40
+ await localStorage.setItem(
41
+ GREETING_DIALOG_STATUS_KEY,
42
+ GREETING_DIALOG_STATUS.seen,
43
+ );
44
+ handleOpen(false);
45
+ }}
46
+ >
47
+ <IoIosCloseCircleOutline className="w-6 h-6 text-gray-500 cursor-pointer" />
48
+ </IconButton>
49
+ </DialogHeader>
50
+ <DialogBody className="max-h-[600px] overflow-y-auto">
51
+ <div className="flex flex-wrap-reverse justify-center xl:justify-between items-center gap-3 mb-4">
52
+ <div>
53
+ <Typography
54
+ variant="paragraph"
55
+ className="text-lg md:text-4xl font-bold text-[#9451A0] uppercase"
56
+ >
57
+ Service Notice
58
+ </Typography>
59
+ <Typography
60
+ variant="paragraph"
61
+ className="text-base md:text-3xl text-black-900 mb-2 uppercase font-normal max-w-[330px]"
62
+ >
63
+ Shipping & Pickup Update
64
+ </Typography>
65
+ <Typography
66
+ variant="paragraph"
67
+ className="text-sm md:text-lg text-[#E27500] max-w-[200px] font-normal"
68
+ >
69
+ Effective July 17, 2025{" "}
70
+ </Typography>
71
+ </div>
72
+ <div>
73
+ <CustomNextImage
74
+ src={stopShippingImage.src}
75
+ alt={"boost image"}
76
+ width={164}
77
+ height={163}
78
+ />
79
+ </div>
80
+ </div>
81
+ <Typography
82
+ variant="paragraph"
83
+ className="text-base font-bold text-black-900 mb-4"
84
+ >
85
+ Please note the following{" "}
86
+ <span className="text-[#9451A0]"> important update </span> regarding
87
+ logistics services.
88
+ </Typography>
89
+ <div className="mb-4">
90
+ <Typography
91
+ variant="paragraph"
92
+ className="text-sm text-black-900 mb-1 font-semibold"
93
+ >
94
+ 🚫 Suspension of Shipping & Pickup
95
+ </Typography>
96
+ <Typography
97
+ variant="paragraph"
98
+ className="text-sm text-black-900 font-normal"
99
+ >
100
+ All shipping and pickup services are temporarily unavailable for:
101
+ </Typography>
102
+ <ul className="list-disc ml-6">
103
+ <li className="decoration-slice">
104
+ <Typography
105
+ variant="paragraph"
106
+ className="text-sm text-black-900 font-normal"
107
+ >
108
+ GEN 1 Device Upgrades
109
+ </Typography>
110
+ </li>
111
+ <li>
112
+ <Typography
113
+ variant="paragraph"
114
+ className="text-sm text-black-900 font-normal"
115
+ >
116
+ GEN 2 Device Orders
117
+ </Typography>
118
+ </li>
119
+ </ul>
120
+ </div>
121
+ {featureFlags?.[FeatureCodes?.SMART_PAY_PLAN]?.isActive && (
122
+ <div className="mb-4">
123
+ <Typography
124
+ variant="paragraph"
125
+ className="text-sm text-black-900 mb-1 font-semibold"
126
+ >
127
+ ✅ SmartPay Machines
128
+ </Typography>
129
+ <Typography
130
+ variant="paragraph"
131
+ className="text-sm text-black-900 font-normal"
132
+ >
133
+ Shipping and pickup remain available for SmartPay device orders.
134
+ </Typography>
135
+ </div>
136
+ )}
137
+
138
+ <div className="mb-8">
139
+ <Typography
140
+ variant="paragraph"
141
+ className="text-sm text-black-900 mb-1 font-semibold"
142
+ >
143
+ 📌 Next Steps
144
+ </Typography>
145
+ <Typography
146
+ variant="paragraph"
147
+ className="text-sm text-black-900 font-normal"
148
+ >
149
+ Further details will be communicated shortly.
150
+ </Typography>
151
+ </div>
152
+
153
+ <Typography
154
+ variant="paragraph"
155
+ className="text-base text-[#E27500] font-semibold"
156
+ >
157
+ Please monitor the platform for upcoming updates.
158
+ </Typography>
159
+ </DialogBody>
160
+ {/* <DialogFooter className="justify-center">
161
+ </DialogFooter> */}
162
+ </Dialog>
163
+ </>
164
+ );
165
+ }
@@ -0,0 +1,298 @@
1
+ "use client";
2
+
3
+ import { Carousel, Typography } from "@material-tailwind/react";
4
+
5
+ import SubscriptionBanner from "@/app/[locale]/(dashboard)/products/components/SubscriptionBanner";
6
+
7
+ import aiX1BannerImage from "../../public/img/ai-x1-banner.png";
8
+ import gen3BannerImage from "../../public/img/gen3-image.png";
9
+ import smartPayChoseIcon from "../../public/img/smart-pay-chose.png";
10
+ import smartPayEasyIcon from "../../public/img/smart-pay-easy.png";
11
+ import smartPayPaymentIcon from "../../public/img/smart-pay-payment.png";
12
+ import { FeatureCodes } from "../constants/feature-flags";
13
+ import { useMainContext } from "../contexts/MainWrapperContext";
14
+ import CustomNextImage from "./CustomNextImage";
15
+
16
+ export type HomeBannersProps = {
17
+ isSubscriptionActive: boolean;
18
+ onCategoryChange: (categoryCode: string) => void;
19
+ };
20
+
21
+ export default function HomeBanners({
22
+ isSubscriptionActive,
23
+ onCategoryChange,
24
+ }) {
25
+ const { featureFlags } = useMainContext();
26
+
27
+ const renderNote = () => {
28
+ return (
29
+ <Typography variant="small" className="text-white text-xs">
30
+ * Check the terms and conditions for details about the offer and timing
31
+ to keep it active.
32
+ </Typography>
33
+ );
34
+ };
35
+ const renderNoteGen3 = () => {
36
+ return (
37
+ <Typography variant="small" className="text-white text-xs">
38
+ *Complete your order within the activation period to keep your rewards
39
+ active.
40
+ </Typography>
41
+ );
42
+ };
43
+
44
+ return (
45
+ <div className="relative mb-5">
46
+ <Carousel
47
+ autoplay={true}
48
+ nextArrow={() => {}}
49
+ prevArrow={() => {}}
50
+ loop={true}
51
+ className="rounded-xl"
52
+ navigation={({ setActiveIndex, activeIndex, length }) => (
53
+ <div className="absolute bottom-4 left-2/4 z-50 flex -translate-x-2/4 gap-2">
54
+ {new Array(length).fill("").map((_, i) => (
55
+ <span
56
+ key={i}
57
+ className={`block h-1 cursor-pointer rounded-2xl transition-all content-[''] ${
58
+ activeIndex === i ? "w-8 bg-white" : "w-4 bg-white/50"
59
+ }`}
60
+ onClick={() => setActiveIndex(i)}
61
+ />
62
+ ))}
63
+ </div>
64
+ )}
65
+ >
66
+ {featureFlags?.[FeatureCodes?.GEN_3_EXTENSION_HOME_DIALOG]
67
+ ?.isActive && (
68
+ <div className="rounded-xl h-[270px] sm:h-[200px] gen3Banner px-4 md:px-8 flex flex-wrap gap-2 md:flex-nowrap justify-center md:justify-between">
69
+ <div className="flex flex-col justify-center text-center xl:text-start h-full">
70
+ <Typography
71
+ variant="paragraph"
72
+ className="mb-2 text-white text-lg xl:text-2xl uppercase"
73
+ >
74
+ <span className="font-bold">The Wait Is Over -</span>{" "}
75
+ <span className="font-semibold">
76
+ {" "}
77
+ Get Your AiX1 Home Station!
78
+ </span>
79
+ </Typography>
80
+ <Typography
81
+ variant="small"
82
+ className="text-white text-xs md:text-sm font-bold"
83
+ >
84
+ Step into the new era of decentralized performance.
85
+ </Typography>
86
+ <Typography
87
+ variant="small"
88
+ className="text-white text-xs md:text-sm"
89
+ >
90
+ Order your AiX1 Home Station today and enhance your
91
+ participation —
92
+ </Typography>
93
+ <Typography
94
+ variant="small"
95
+ className="text-white text-xs md:text-sm"
96
+ >
97
+ boosting your ecosystem rewards by up to 20%.
98
+ </Typography>
99
+ <Typography
100
+ variant="small"
101
+ className="text-white font-bold text-xs md:text-sm"
102
+ >
103
+ Connect. Power. Elevate.
104
+ </Typography>
105
+ <div className="md:hidden mt-2 text-center">
106
+ <div className="flex justify-center ">
107
+ <CustomNextImage
108
+ src={gen3BannerImage.src}
109
+ alt={"gen3BannerImage"}
110
+ width={100}
111
+ height={40}
112
+ />
113
+ </div>
114
+
115
+ {renderNoteGen3()}
116
+ </div>
117
+ </div>
118
+ <div className="h-full hidden md:flex md:flex-col md:justify-center md:text-center">
119
+ <CustomNextImage
120
+ src={gen3BannerImage.src}
121
+ alt={"gen3BannerImage"}
122
+ />
123
+ {renderNoteGen3()}
124
+ </div>
125
+ </div>
126
+ )}
127
+
128
+ {featureFlags?.[FeatureCodes?.AI_CATEGORY]?.isActive && (
129
+ <div className="rounded-xl h-[270px] sm:h-[200px] aiX1Banner px-4 md:px-8 flex flex-wrap gap-2 md:flex-nowrap justify-between">
130
+ <div className="flex flex-col justify-center text-center xl:text-start h-full">
131
+ <Typography
132
+ variant="paragraph"
133
+ className="mb-2 text-white text-lg xl:text-4xl uppercase"
134
+ >
135
+ <span className="font-bold">Activate the Future</span> with AiX1
136
+ </Typography>
137
+ <Typography
138
+ variant="small"
139
+ className="text-white xl:w-[60%] text-xs md:text-sm"
140
+ >
141
+ Step into the next era of decentralized AI computing.
142
+ </Typography>
143
+ <Typography
144
+ variant="small"
145
+ className="text-white xl:w-[60%] text-xs md:text-sm"
146
+ >
147
+ Buy your AiX1 Server and connect* your AiX1 Home Station to
148
+ unlock the full ecosystem, rewards, and unstoppable innovation.
149
+ </Typography>
150
+ <Typography
151
+ variant="small"
152
+ className="text-white font-bold xl:w-[60%] text-xs md:text-sm"
153
+ >
154
+ One Server. One Station. One Power.
155
+ </Typography>
156
+ <div className="md:hidden mt-2 text-center">
157
+ <div className="flex justify-center ">
158
+ <CustomNextImage
159
+ src={aiX1BannerImage.src}
160
+ alt={"aiX1BannerImage"}
161
+ width={120}
162
+ height={50}
163
+ />
164
+ </div>
165
+
166
+ {renderNote()}
167
+ </div>
168
+ </div>
169
+ <div className="h-full hidden md:flex md:flex-col md:justify-center md:text-center">
170
+ <CustomNextImage
171
+ src={aiX1BannerImage.src}
172
+ alt={"aiX1BannerImage"}
173
+ />
174
+ {renderNote()}
175
+ </div>
176
+ </div>
177
+ )}
178
+
179
+ {featureFlags?.[FeatureCodes?.SMART_PAY_PLAN]?.isActive && (
180
+ <div className="rounded-xl h-[270px] sm:h-[200px] smartPayBanner px-4 md:px-8 flex flex-col justify-center text-center md:text-start">
181
+ <Typography
182
+ variant="paragraph"
183
+ className="mb-2 text-white text-lg md:text-4xl uppercase"
184
+ >
185
+ <span className="font-bold">Own the Future</span> with SmartPay
186
+ </Typography>
187
+ <Typography
188
+ variant="small"
189
+ className="text-white md:w-[40%] text-xs md:text-sm"
190
+ >
191
+ tart Today with Just 20% — No Delays, No Complexity Get instant
192
+ access to your Homnifi device.
193
+ </Typography>
194
+ <Typography
195
+ variant="small"
196
+ className="text-white font-bold md:w-[60%] text-xs md:text-sm"
197
+ >
198
+ SmartPay makes it simple—no hassle, just seamless participation.
199
+ </Typography>
200
+ </div>
201
+ )}
202
+ {featureFlags?.[FeatureCodes?.SMART_PAY_PLAN]?.isActive && (
203
+ <div className="rounded-xl h-[270px] sm:h-[200px] smartPayBannerHow flex flex-wrap justify-between gap-1 px-[5%] py-[2%] xl:items-start ">
204
+ <div className="flex-col justify-center align-middle text-center md:text-start md:flex-1 my-auto">
205
+ <Typography
206
+ variant="paragraph"
207
+ className="mb-2 text-white text-lg font-bold md:text-2xl"
208
+ >
209
+ How Smart Plan Pay Works
210
+ </Typography>
211
+ <Typography
212
+ variant="small"
213
+ className="text-white md:w-[80%] text-xs md:text-sm"
214
+ >
215
+ Our Innovative payment plans makes premium machines accessible
216
+ with minimal upfront cost.
217
+ </Typography>
218
+ </div>
219
+ <div className="px-0 sm:px-2 flex flex-col justify-center text-center items-center md:flex-2">
220
+ <CustomNextImage
221
+ className="mb-2 "
222
+ width={30}
223
+ height={30}
224
+ src={smartPayChoseIcon.src}
225
+ alt="smart pay chose Icon"
226
+ />
227
+ <Typography
228
+ variant="paragraph"
229
+ className="text-white text-[10px] font-bold md:text-sm mb-[1px]"
230
+ >
231
+ Choose Machine
232
+ </Typography>
233
+ <Typography
234
+ variant="paragraph"
235
+ className="text-white hidden xl:block font-normal text-sm max-w-[200px]"
236
+ >
237
+ Browse our selection of SmartPay eligible machines with reduced
238
+ upfront pricing and premium features
239
+ </Typography>
240
+ </div>
241
+ <div className="px-0 sm:px-2 flex flex-col justify-center text-center items-center md:flex-2">
242
+ <CustomNextImage
243
+ className="mb-2 glassEffect"
244
+ width={30}
245
+ height={30}
246
+ src={smartPayPaymentIcon.src}
247
+ alt="smart pay chose Icon"
248
+ />
249
+ <Typography
250
+ variant="paragraph"
251
+ className="text-white text-[10px] font-bold md:text-sm"
252
+ >
253
+ Initial Payment
254
+ </Typography>
255
+ <Typography
256
+ variant="paragraph"
257
+ className="text-white hidden xl:block font-normal text-sm max-w-[200px]"
258
+ >
259
+ Pay just 20% of the machine price plus utility token. Get
260
+ instant access to bonus LYK airdrops.
261
+ </Typography>
262
+ </div>
263
+ <div className="px-0 sm:px-2 flex flex-col justify-center text-center items-center md:flex-2">
264
+ <CustomNextImage
265
+ className="mb-2 glassEffect"
266
+ width={30}
267
+ height={30}
268
+ src={smartPayEasyIcon.src}
269
+ alt="smart pay chose Icon"
270
+ />
271
+ <Typography
272
+ variant="paragraph"
273
+ className="text-white text-[10px] font-bold md:text-sm"
274
+ >
275
+ Easy Repayment
276
+ </Typography>
277
+ <Typography
278
+ variant="paragraph"
279
+ className="text-white hidden xl:block font-normal text-sm max-w-[220px]"
280
+ >
281
+ The remaining balance is automatically deducted from your future
282
+ daily rewards of purchased machine, making repayments
283
+ effortless.
284
+ </Typography>
285
+ </div>
286
+ </div>
287
+ )}
288
+
289
+ <SubscriptionBanner
290
+ callback={() => {
291
+ onCategoryChange("license");
292
+ }}
293
+ isSubscriptionActive={isSubscriptionActive}
294
+ />
295
+ </Carousel>
296
+ </div>
297
+ );
298
+ }
@@ -0,0 +1,69 @@
1
+ import {
2
+ Dialog,
3
+ DialogBody,
4
+ DialogFooter,
5
+ DialogHeader,
6
+ Typography,
7
+ } from "@material-tailwind/react";
8
+ import React from "react";
9
+
10
+ import { ROUTES } from "../constants/routes";
11
+ import { useCart } from "../hooks/useCart";
12
+ import useCustomRouter from "../hooks/useCustomRouter";
13
+ import { _useScopedI18n } from "../i18n/client";
14
+ import { useCartStore } from "../stores/cartStore";
15
+ import ButtonCustom from "./Button";
16
+
17
+ export function InactiveCartDialog({ handleOpen, open }) {
18
+ const { refreshCart } = useCart();
19
+ const { loading } = useCartStore();
20
+ const { push } = useCustomRouter();
21
+ const scopeT = _useScopedI18n("cart");
22
+
23
+ return (
24
+ <>
25
+ <Dialog
26
+ className="md:!w-[27rem] md:!max-w-[27rem] md:!min-w-[27rem]"
27
+ open={open}
28
+ handler={() => handleOpen(false)}
29
+ size="xs"
30
+ dismiss={{
31
+ outsidePress: false,
32
+ }}
33
+ >
34
+ <DialogHeader className="p-5 md:p-8 md:pb-0 flex items-center justify-center">
35
+ <Typography
36
+ variant="h2"
37
+ className="text-xl font-semibold text-black-500"
38
+ >
39
+ {scopeT("cartInactive")}
40
+ </Typography>
41
+ </DialogHeader>
42
+ <DialogBody className="p-5 md:p-8 flex justify-center">
43
+ <Typography
44
+ variant="paragraph"
45
+ className="text-sm font-medium text-gray-500 text-center"
46
+ >
47
+ {scopeT("cartInactiveSummery")}
48
+ </Typography>
49
+ </DialogBody>
50
+ <DialogFooter className="gap-4 justify-center p-5 md:p-8 md:pt-0">
51
+ <ButtonCustom
52
+ className="text-sm"
53
+ icon={undefined}
54
+ loading={loading}
55
+ onClick={async () => {
56
+ const result = await refreshCart.mutateAsync("validate");
57
+ if (result) {
58
+ handleOpen(false);
59
+ push(`${ROUTES.dashboard.cart}?state=refresh`);
60
+ }
61
+ }}
62
+ >
63
+ {scopeT("cartInactiveAction")}
64
+ </ButtonCustom>
65
+ </DialogFooter>
66
+ </Dialog>
67
+ </>
68
+ );
69
+ }