@raxonltd/raxon-core 1.1.7 → 1.1.8
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/core/component/general.image.tsx +86 -0
- package/core/context/cart.context.tsx +446 -0
- package/core/context/security.context.tsx +151 -0
- package/core/feature/address/api/places.api.ts +76 -0
- package/core/feature/address/form/address-search-input.tsx +125 -0
- package/core/feature/address/hook/use.addres.tsx +63 -0
- package/core/feature/address/hook/use.address-autocomplete.ts +116 -0
- package/core/feature/address/util/address.types.ts +38 -0
- package/core/feature/address/util/parse-google-place.ts +66 -0
- package/core/feature/analytic-event/analytic.event.api.ts +27 -0
- package/core/feature/analytic-event/analytic.event.context.tsx +180 -0
- package/core/feature/analytic-event/analytic.event.util.ts +42 -0
- package/core/feature/analytic-event/use.analytic.auto.tsx +114 -0
- package/core/feature/article/hook/use.article.tsx +33 -0
- package/core/feature/attribute/hook/use.attribute.tsx +24 -0
- package/core/feature/auth/hook/use.auth.tsx +141 -0
- package/core/feature/auth/modal/modal.auth.tsx +80 -0
- package/core/feature/auth/view/view.login.tsx +199 -0
- package/core/feature/auth/view/view.register.tsx +333 -0
- package/core/feature/bank-account/hook/use.bank.account.tsx +47 -0
- package/core/feature/brand/hook/use.brand.tsx +24 -0
- package/core/feature/cart/component/cart.order.summary.tsx +89 -0
- package/core/feature/cart/component/cart.promo.code.section.tsx +208 -0
- package/core/feature/cart/hook/use.cart.tsx +267 -0
- package/core/feature/cart/util/basket-pay.response.ts +67 -0
- package/core/feature/cart/util/cart-optimistic.ts +425 -0
- package/core/feature/cart/util/garanti-payment.ts +27 -0
- package/core/feature/collection/hook/use.collection.tsx +32 -0
- package/core/feature/delivery-method/hook/use.delivery.method.tsx +40 -0
- package/core/feature/delivery-method/util/checkout.delivery.method.ts +11 -0
- package/core/feature/faq/hook/use.faq.tsx +23 -0
- package/core/feature/favorite/hook/use.favorite.tsx +48 -0
- package/core/feature/form-submit/form/form.contact.tsx +118 -0
- package/core/feature/form-submit/hook/use.form.submit.tsx +16 -0
- package/core/feature/invoice/hook/use.invoice.tsx +51 -0
- package/core/feature/newsletter/hook/use.newsletter.tsx +124 -0
- package/core/feature/newsletter/modal/modal.newsletter.product.tsx +163 -0
- package/core/feature/order/hook/use.order.tsx +31 -0
- package/core/feature/payment-method/checkout.payment.options.ts +117 -0
- package/core/feature/payment-method/hook/use.payment.method.tsx +44 -0
- package/core/feature/product/hook/use.product.tsx +122 -0
- package/core/feature/profile/hook/use.profile.tsx +126 -0
- package/core/feature/promo-code/hook/use.promo.code.tsx +27 -0
- package/core/interface/basket.interface.ts +360 -0
- package/core/interface/bootstrap.interface.ts +39 -0
- package/core/interface/context.interface.ts +9 -0
- package/core/interface/inventory.interface.ts +88 -0
- package/core/interface/nexine.interface.ts +4 -0
- package/core/interface/prisma.interface.ts +8844 -0
- package/core/interface/product.interface.ts +111 -0
- package/core/raxon.context.tsx +256 -0
- package/core/schema/checkout.schema.ts +103 -0
- package/core/util/basket.item.display.ts +19 -0
- package/core/util/category.nav.ts +46 -0
- package/core/util/client-ip.ts +35 -0
- package/core/util/collection.util.ts +433 -0
- package/core/util/fetch.bootstrap.ts +21 -0
- package/core/util/garanti-payment.ts +5 -0
- package/core/util/nexine.axios.tsx +104 -0
- package/core/util/no-cache.ts +6 -0
- package/core/util/util.ts +191 -0
- package/core/view/view.checkout.tsx +1964 -0
- package/dist/core/view/view.checkout.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -3
- package/tailwind.css +11 -0
|
@@ -910,7 +910,7 @@ function CheckoutMainView() {
|
|
|
910
910
|
window.addEventListener(LOGIN_SUCCESS_EVENT, handleLoginSuccess);
|
|
911
911
|
return () => window.removeEventListener(LOGIN_SUCCESS_EVENT, handleLoginSuccess);
|
|
912
912
|
}, []);
|
|
913
|
-
return (_jsxs("div", { className: "min-h-screen overflow-x-hidden bg-gray-50", children: [_jsx("header", { className: "border-b border-gray-100 bg-white", children: _jsxs("div", { className: "mx-auto flex max-w-7xl items-center justify-between px-4 py-5 sm:px-6 lg:px-8", children: [_jsx(Link, { href: "/", className: "flex flex-col items-start gap-1", children: _jsx(GeneralImage, { quality: 85, src: branch?.logoMedia?.relativePath ? `${process.env.NEXT_PUBLIC_STORAGE_URL}/${branch.logoMedia.relativePath}` : '', alt: branch?.tradingName ?? 'Logo', width: 120, height: 36, className: "h-7 w-auto object-contain" }) }), _jsx(Link, { href: "/sepet", className: "text-xs font-black uppercase tracking-widest text-gray-900 transition-colors hover:text-[#CF0A2C]", children: "Sepete d\u00F6n" })] }) }), _jsx("div", { className: "mx-auto max-w-7xl px-4 py-10 sm:px-6 sm:py-14 lg:px-8", children: _jsxs("div", { className: "
|
|
913
|
+
return (_jsxs("div", { className: "min-h-screen overflow-x-hidden bg-gray-50", children: [_jsx("header", { className: "border-b border-gray-100 bg-white", children: _jsxs("div", { className: "mx-auto flex max-w-7xl items-center justify-between px-4 py-5 sm:px-6 lg:px-8", children: [_jsx(Link, { href: "/", className: "flex flex-col items-start gap-1", children: _jsx(GeneralImage, { quality: 85, src: branch?.logoMedia?.relativePath ? `${process.env.NEXT_PUBLIC_STORAGE_URL}/${branch.logoMedia.relativePath}` : '', alt: branch?.tradingName ?? 'Logo', width: 120, height: 36, className: "h-7 w-auto object-contain" }) }), _jsx(Link, { href: "/sepet", className: "text-xs font-black uppercase tracking-widest text-gray-900 transition-colors hover:text-[#CF0A2C]", children: "Sepete d\u00F6n" })] }) }), _jsx("div", { className: "mx-auto max-w-7xl px-4 py-10 sm:px-6 sm:py-14 lg:px-8", children: _jsxs("div", { className: "flex flex-col gap-10 md:flex-row md:items-start md:gap-10 lg:gap-14", children: [_jsxs("div", { className: "min-w-0 flex-1 rounded-2xl border border-gray-100 bg-white p-6 shadow-sm sm:p-8", children: [_jsx("nav", { className: "mb-8 flex flex-wrap gap-2", "aria-label": "\u00D6deme ad\u0131mlar\u0131", children: ['contact', 'address', 'checkout'].map((step, index) => {
|
|
914
914
|
const stepOrder = ['contact', 'address', 'checkout'].indexOf(checkoutStep);
|
|
915
915
|
const isActive = checkoutStep === step;
|
|
916
916
|
const isDone = index < stepOrder;
|
|
@@ -922,7 +922,7 @@ function CheckoutMainView() {
|
|
|
922
922
|
}) }), checkoutStep === 'contact' && (_jsx(ViewStep1, { onContinue: email => {
|
|
923
923
|
setConfirmedContactEmail(email);
|
|
924
924
|
setCheckoutStep('address');
|
|
925
|
-
} })), checkoutStep === 'address' && (_jsx(ViewStep2, { onComplete: () => setCheckoutStep('checkout'), onBack: () => setCheckoutStep('contact') })), checkoutStep === 'checkout' && _jsx(ViewStepCheckout, { onBack: () => setCheckoutStep('address') })] }), _jsx("
|
|
925
|
+
} })), checkoutStep === 'address' && (_jsx(ViewStep2, { onComplete: () => setCheckoutStep('checkout'), onBack: () => setCheckoutStep('contact') })), checkoutStep === 'checkout' && _jsx(ViewStepCheckout, { onBack: () => setCheckoutStep('address') })] }), _jsx("aside", { className: "w-full shrink-0 md:w-96 md:sticky md:top-24 md:self-start", children: _jsxs("div", { className: "rounded-2xl border border-gray-100 bg-white p-6 shadow-sm lg:p-8", children: [_jsx("span", { className: "text-sm font-black text-[#CF0A2C] uppercase tracking-widest", children: "\u00D6zet" }), _jsx("h2", { className: "mt-2 text-xl font-black text-gray-900 uppercase tracking-tighter", children: "Sipari\u015F \u00F6zeti" }), _jsx("div", { className: "my-6 space-y-5", children: cart?.items?.map(item => {
|
|
926
926
|
const linePay = item.linePay ?? 0;
|
|
927
927
|
const listGross = (item.lineTotal ?? 0) + (item.lineTax ?? 0);
|
|
928
928
|
const showListStrike = listGross - linePay > 0.01;
|