@raxonltd/raxon-core 1.0.1 → 1.0.3

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 (79) hide show
  1. package/dist/core/context/cart.context.d.ts +4 -9
  2. package/dist/core/context/cart.context.d.ts.map +1 -1
  3. package/dist/core/context/cart.context.js +18 -29
  4. package/dist/core/context/security.context.d.ts +4 -10
  5. package/dist/core/context/security.context.d.ts.map +1 -1
  6. package/dist/core/context/security.context.js +25 -32
  7. package/dist/core/feature/address/form/address-search-input.d.ts +1 -1
  8. package/dist/core/feature/address/hook/use.addres.d.ts +2 -2
  9. package/dist/core/feature/address/hook/use.addres.js +1 -1
  10. package/dist/core/feature/address/hook/use.address-autocomplete.d.ts +2 -2
  11. package/dist/core/feature/address/hook/use.address-autocomplete.js +1 -1
  12. package/dist/core/feature/address/util/parse-google-place.d.ts +2 -2
  13. package/dist/core/feature/article/hook/use.article.d.ts +2 -2
  14. package/dist/core/feature/article/hook/use.article.js +1 -1
  15. package/dist/core/feature/attribute/hook/use.attribute.d.ts +2 -2
  16. package/dist/core/feature/attribute/hook/use.attribute.js +1 -1
  17. package/dist/core/feature/auth/hook/use.auth.js +1 -1
  18. package/dist/core/feature/auth/modal/modal.auth.js +4 -4
  19. package/dist/core/feature/auth/view/view.login.js +1 -1
  20. package/dist/core/feature/auth/view/view.register.js +1 -1
  21. package/dist/core/feature/bank-account/hook/use.bank.account.d.ts +2 -2
  22. package/dist/core/feature/bank-account/hook/use.bank.account.js +1 -1
  23. package/dist/core/feature/cart/component/cart.order.summary.d.ts +1 -1
  24. package/dist/core/feature/cart/component/cart.order.summary.js +1 -1
  25. package/dist/core/feature/cart/component/cart.promo.code.section.js +5 -5
  26. package/dist/core/feature/cart/hook/use.cart.d.ts +7 -3
  27. package/dist/core/feature/cart/hook/use.cart.d.ts.map +1 -1
  28. package/dist/core/feature/cart/hook/use.cart.js +12 -3
  29. package/dist/core/feature/cart/util/basket-pay.response.js +1 -1
  30. package/dist/core/feature/cart/util/cart-optimistic.d.ts +1 -1
  31. package/dist/core/feature/cart/util/cart-optimistic.js +1 -1
  32. package/dist/core/feature/collection/hook/use.collection.d.ts +2 -2
  33. package/dist/core/feature/collection/hook/use.collection.js +1 -1
  34. package/dist/core/feature/delivery-method/hook/use.delivery.method.d.ts +1 -1
  35. package/dist/core/feature/delivery-method/hook/use.delivery.method.js +2 -2
  36. package/dist/core/feature/delivery-method/util/checkout.delivery.method.d.ts +1 -1
  37. package/dist/core/feature/faq/hook/use.faq.d.ts +2 -2
  38. package/dist/core/feature/faq/hook/use.faq.js +1 -1
  39. package/dist/core/feature/favorite/hook/use.favorite.d.ts +2 -2
  40. package/dist/core/feature/favorite/hook/use.favorite.js +1 -1
  41. package/dist/core/feature/form-submit/hook/use.form.submit.js +1 -1
  42. package/dist/core/feature/invoice/hook/use.invoice.d.ts +2 -2
  43. package/dist/core/feature/invoice/hook/use.invoice.js +1 -1
  44. package/dist/core/feature/newsletter/hook/use.newsletter.d.ts +1 -1
  45. package/dist/core/feature/newsletter/hook/use.newsletter.js +1 -1
  46. package/dist/core/feature/newsletter/modal/modal.newsletter.product.d.ts +1 -1
  47. package/dist/core/feature/newsletter/modal/modal.newsletter.product.js +3 -3
  48. package/dist/core/feature/order/hook/use.order.d.ts +2 -2
  49. package/dist/core/feature/order/hook/use.order.js +1 -1
  50. package/dist/core/feature/payment-method/checkout.payment.options.d.ts +1 -1
  51. package/dist/core/feature/payment-method/checkout.payment.options.js +1 -1
  52. package/dist/core/feature/payment-method/hook/use.payment.method.d.ts +2 -2
  53. package/dist/core/feature/payment-method/hook/use.payment.method.js +1 -1
  54. package/dist/core/feature/product/hook/use.product.d.ts +3 -3
  55. package/dist/core/feature/product/hook/use.product.js +2 -2
  56. package/dist/core/feature/profile/hook/use.profile.d.ts +1 -1
  57. package/dist/core/feature/profile/hook/use.profile.js +1 -1
  58. package/dist/core/feature/promo-code/hook/use.promo.code.d.ts +1 -1
  59. package/dist/core/feature/promo-code/hook/use.promo.code.js +1 -1
  60. package/dist/core/interface/inventory.interface.d.ts +1 -1
  61. package/dist/core/raxon.context.d.ts +13 -10
  62. package/dist/core/raxon.context.d.ts.map +1 -1
  63. package/dist/core/raxon.context.js +28 -21
  64. package/dist/core/util/garanti-payment.d.ts +1 -1
  65. package/dist/core/util/garanti-payment.js +1 -1
  66. package/dist/core/view/view.checkout.d.ts +2 -0
  67. package/dist/core/view/view.checkout.d.ts.map +1 -0
  68. package/dist/core/view/view.checkout.js +684 -0
  69. package/dist/hook.d.ts +19 -0
  70. package/dist/hook.d.ts.map +1 -0
  71. package/dist/hook.js +18 -0
  72. package/dist/index.d.ts +2 -22
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +2 -22
  75. package/dist/tsconfig.tsbuildinfo +1 -1
  76. package/dist/view.d.ts +2 -0
  77. package/dist/view.d.ts.map +1 -0
  78. package/dist/view.js +1 -0
  79. package/package.json +35 -13
@@ -1,6 +1,6 @@
1
- import { BasketSummaryInterface } from '@/core/interface/basket.interface';
2
- import { PromoCode } from '@/core/interface/prisma.interface';
3
- interface CartContextType {
1
+ import { BasketSummaryInterface } from '../interface/basket.interface';
2
+ import { PromoCode } from '../interface/prisma.interface';
3
+ export interface CartState {
4
4
  cart: BasketSummaryInterface | null;
5
5
  cartLoading: boolean;
6
6
  isAddingToCart: boolean;
@@ -16,10 +16,5 @@ interface CartContextType {
16
16
  promoCode: PromoCode | null;
17
17
  setPromoCode: (promoCode: PromoCode | null) => void;
18
18
  }
19
- export declare const CartContext: import("react").Context<CartContextType>;
20
- export declare const CartProvider: ({ children }: {
21
- children: React.ReactNode;
22
- }) => import("react").JSX.Element;
23
- export declare const useCartContext: () => CartContextType;
24
- export {};
19
+ export declare const useCartState: (isAuthenticated: boolean) => CartState;
25
20
  //# sourceMappingURL=cart.context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cart.context.d.ts","sourceRoot":"","sources":["../../../core/context/cart.context.tsx"],"names":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AAE,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;CACrD;AAED,eAAO,MAAM,YAAY,GAAI,iBAAiB,OAAO,KAAG,SAsYvD,CAAC"}
@@ -1,14 +1,10 @@
1
1
  'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
2
+ import { useEffect, useMemo, useRef, useState } from 'react';
4
3
  import { useQueryClient } from '@tanstack/react-query';
5
- import { useCart } from '@/core/feature/cart/hook/use.cart';
6
- import { useSecurity } from '@/core/context/security.context';
4
+ import { useCart } from '../feature/cart/hook/use.cart';
7
5
  import toast from 'react-hot-toast';
8
- import { applyPendingAdds, applyPendingQuantities, cartLineKey, CART_QUANTITY_DEBOUNCE_MS, createEmptyOptimisticCart, extractBasketFromInsertResponse, extractInsertCartItem, findCartLine, applyBasketInsertResponse, mergeInsertItemIntoCart, patchCartCache, patchCartItemQuantity, readCartCache, removeCartLineByKey, } from '@/core/feature/cart/util/cart-optimistic';
9
- export const CartContext = createContext(undefined);
10
- export const CartProvider = ({ children }) => {
11
- const { isAuthenticated } = useSecurity();
6
+ import { applyPendingAdds, applyPendingQuantities, cartLineKey, CART_QUANTITY_DEBOUNCE_MS, createEmptyOptimisticCart, extractBasketFromInsertResponse, extractInsertCartItem, findCartLine, applyBasketInsertResponse, mergeInsertItemIntoCart, patchCartCache, patchCartItemQuantity, readCartCache, removeCartLineByKey, } from '../feature/cart/util/cart-optimistic';
7
+ export const useCartState = (isAuthenticated) => {
12
8
  const queryClient = useQueryClient();
13
9
  const [promoCode, setPromoCode] = useState(null);
14
10
  const [pendingQuantities, setPendingQuantities] = useState({});
@@ -315,25 +311,18 @@ export const CartProvider = ({ children }) => {
315
311
  },
316
312
  });
317
313
  };
318
- return (_jsx(CartContext.Provider, { value: {
319
- cart: displayCart,
320
- cartLoading,
321
- isAddingToCart,
322
- isUpdatingCart,
323
- isProductAdding,
324
- addToCart,
325
- updateQuantity,
326
- changeQuantity,
327
- removeItem,
328
- cartTotal: displayCart?.info?.payPrice?.pay || 0,
329
- promoCode,
330
- setPromoCode,
331
- }, children: children }));
332
- };
333
- export const useCartContext = () => {
334
- const context = useContext(CartContext);
335
- if (context === undefined) {
336
- throw new Error('useCartContext must be used within an CartProvider');
337
- }
338
- return context;
314
+ return {
315
+ cart: displayCart,
316
+ cartLoading,
317
+ isAddingToCart,
318
+ isUpdatingCart,
319
+ isProductAdding,
320
+ addToCart,
321
+ updateQuantity,
322
+ changeQuantity,
323
+ removeItem,
324
+ cartTotal: displayCart?.info?.payPrice?.pay || 0,
325
+ promoCode,
326
+ setPromoCode,
327
+ };
339
328
  };
@@ -1,15 +1,9 @@
1
- import React from 'react';
2
- import { User } from '@/core/interface/prisma.interface';
3
- interface SecurityContextType {
1
+ import { User } from '../interface/prisma.interface';
2
+ export interface SecurityState {
4
3
  profile: User | null | undefined;
5
- isLoading: boolean;
4
+ authLoading: boolean;
6
5
  isAuthenticated: boolean;
7
6
  isGuest: boolean;
8
7
  }
9
- interface SecurityProviderProps {
10
- children: React.ReactNode;
11
- }
12
- export declare const SecurityProvider: React.FC<SecurityProviderProps>;
13
- export declare const useSecurity: () => SecurityContextType;
14
- export {};
8
+ export declare const useSecurityState: () => SecurityState;
15
9
  //# sourceMappingURL=security.context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"security.context.d.ts","sourceRoot":"","sources":["../../../core/context/security.context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+E,MAAM,OAAO,CAAC;AAEpG,OAAO,EAAa,IAAI,EAAE,MAAM,mCAAmC,CAAC;AAIpE,UAAU,mBAAmB;IAC3B,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CAClB;AAID,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA6I5D,CAAC;AAEF,eAAO,MAAM,WAAW,QAAO,mBAM9B,CAAC"}
1
+ {"version":3,"file":"security.context.d.ts","sourceRoot":"","sources":["../../../core/context/security.context.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,IAAI,EAAE,MAAM,mCAAmC,CAAC;AAIpE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,QAAO,aAuInC,CAAC"}
@@ -1,12 +1,10 @@
1
1
  'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { createContext, useContext, useEffect, useState, useCallback, useMemo } from 'react';
2
+ import { useCallback, useEffect, useMemo, useState } from 'react';
4
3
  import { useRouter, usePathname } from 'next/navigation';
5
- import { LoginType } from '@/core/interface/prisma.interface';
6
- import { useAuth } from '@/core/feature/auth/hook/use.auth';
7
- import { useProfile } from '@/core/feature/profile/hook/use.profile';
8
- const SecurityContext = createContext(undefined);
9
- export const SecurityProvider = ({ children }) => {
4
+ import { LoginType } from '../interface/prisma.interface';
5
+ import { useAuth } from '../feature/auth/hook/use.auth';
6
+ import { useProfile } from '../feature/profile/hook/use.profile';
7
+ export const useSecurityState = () => {
10
8
  const router = useRouter();
11
9
  const pathname = usePathname();
12
10
  const [authLoading, setAuthLoading] = useState(true);
@@ -24,7 +22,6 @@ export const SecurityProvider = ({ children }) => {
24
22
  return status === 401 || status === 403;
25
23
  };
26
24
  const isServerAccessError = (error) => {
27
- // axios: response yoksa çoğunlukla network/cors/offline; 5xx ise sunucu erişim sorunu
28
25
  const status = error?.response?.status;
29
26
  return !error?.response || (typeof status === 'number' && status >= 500);
30
27
  };
@@ -45,7 +42,7 @@ export const SecurityProvider = ({ children }) => {
45
42
  const checkToken = useCallback(() => {
46
43
  if (typeof window !== 'undefined') {
47
44
  const token = localStorage.getItem('koksal-token');
48
- if (token && token.trim() !== "" && token.length > 3) {
45
+ if (token && token.trim() !== '' && token.length > 3) {
49
46
  setAuthLoading(true);
50
47
  tokenCheck(undefined, {
51
48
  onSuccess: () => {
@@ -54,22 +51,19 @@ export const SecurityProvider = ({ children }) => {
54
51
  setAuthLoading(false);
55
52
  },
56
53
  onError: (error) => {
57
- // Sunucu erişim sorunu varsa token silme
58
54
  if (isServerAccessError(error)) {
59
55
  setIsAuthEstablished(true);
60
56
  setIsAuthenticated(true);
61
57
  setAuthLoading(false);
62
58
  return;
63
59
  }
64
- // Token geçersizse misafir girişe düş
65
60
  if (isInvalidTokenError(error)) {
66
61
  localStorage.removeItem('koksal-token');
67
62
  ensureGuestLogin();
68
63
  return;
69
64
  }
70
- // Diğer hatalarda da token silmeden misafir girişe düş
71
65
  ensureGuestLogin();
72
- }
66
+ },
73
67
  });
74
68
  }
75
69
  else {
@@ -88,12 +82,10 @@ export const SecurityProvider = ({ children }) => {
88
82
  checkToken();
89
83
  }
90
84
  };
91
- // localStorage değişikliklerini dinle
92
- window.addEventListener('storage', handleStorageChange);
93
- // Aynı tab içindeki localStorage değişikliklerini dinlemek için custom event
94
85
  const handleCustomStorageChange = () => {
95
86
  checkToken();
96
87
  };
88
+ window.addEventListener('storage', handleStorageChange);
97
89
  window.addEventListener('koksal-token-changed', handleCustomStorageChange);
98
90
  return () => {
99
91
  window.removeEventListener('storage', handleStorageChange);
@@ -102,7 +94,6 @@ export const SecurityProvider = ({ children }) => {
102
94
  }
103
95
  }, [checkToken]);
104
96
  useEffect(() => {
105
- // Loading durumunda yönlendirme yapma
106
97
  const isLoading = authLoading || (isAuthEstablished && (profileQuery.isLoading || profileQuery.isFetching));
107
98
  if (isLoading)
108
99
  return;
@@ -112,19 +103,21 @@ export const SecurityProvider = ({ children }) => {
112
103
  if (pathname.startsWith('/hesabim') && (!isAuthenticated || profile?.loginType === LoginType.GUEST)) {
113
104
  router.push('/guvenlik/giris-yap');
114
105
  }
115
- }, [pathname, isAuthenticated, authLoading, isAuthEstablished, profileQuery.isLoading, profileQuery.isFetching, router]);
116
- const isLoading = authLoading || (isAuthEstablished && (profileQuery.isLoading || profileQuery.isFetching));
117
- return (_jsx(SecurityContext.Provider, { value: {
118
- profile,
119
- isLoading,
120
- isAuthenticated,
121
- isGuest,
122
- }, children: children }));
123
- };
124
- export const useSecurity = () => {
125
- const context = useContext(SecurityContext);
126
- if (context === undefined) {
127
- throw new Error('useSecurity must be used within an SecurityProvider');
128
- }
129
- return context;
106
+ }, [
107
+ pathname,
108
+ isAuthenticated,
109
+ authLoading,
110
+ isAuthEstablished,
111
+ profileQuery.isLoading,
112
+ profileQuery.isFetching,
113
+ router,
114
+ profile?.loginType,
115
+ ]);
116
+ const resolvedAuthLoading = authLoading || (isAuthEstablished && (profileQuery.isLoading || profileQuery.isFetching));
117
+ return {
118
+ profile,
119
+ authLoading: resolvedAuthLoading,
120
+ isAuthenticated,
121
+ isGuest,
122
+ };
130
123
  };
@@ -1,4 +1,4 @@
1
- import { GooglePlacePrediction } from '@/core/feature/address/util/address.types';
1
+ import { GooglePlacePrediction } from '../../../feature/address/util/address.types';
2
2
  interface AddressSearchInputProps {
3
3
  query: string;
4
4
  onQueryChange: (value: string) => void;
@@ -1,5 +1,5 @@
1
- import { IData } from "@/core/interface/nexine.interface";
2
- import { Address } from "@/core/interface/prisma.interface";
1
+ import { IData } from "../../../interface/nexine.interface";
2
+ import { Address } from "../../../interface/prisma.interface";
3
3
  export declare const useAddress: () => {
4
4
  fetch: () => import("@tanstack/react-query").UseQueryResult<NoInfer<IData<Address>>, Error>;
5
5
  create: () => import("@tanstack/react-query").UseMutationResult<any, Error, any, unknown>;
@@ -1,4 +1,4 @@
1
- import { nexineAxios } from "@/core/util/nexine.axios";
1
+ import { nexineAxios } from "../../../util/nexine.axios";
2
2
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  export const useAddress = () => {
4
4
  const queryClient = useQueryClient();
@@ -1,4 +1,4 @@
1
- import { GooglePlacePrediction } from '@/core/feature/address/util/address.types';
1
+ import { GooglePlacePrediction } from '../../../feature/address/util/address.types';
2
2
  export declare function useAddressAutocomplete(): {
3
3
  query: string;
4
4
  setQuery: (value: string) => void;
@@ -7,7 +7,7 @@ export declare function useAddressAutocomplete(): {
7
7
  isSearching: boolean;
8
8
  showResults: boolean;
9
9
  setShowResults: import("react").Dispatch<import("react").SetStateAction<boolean>>;
10
- selectPlace: (prediction: GooglePlacePrediction) => Promise<import("@/core/feature/address/util/address.types").ParsedAddressData>;
10
+ selectPlace: (prediction: GooglePlacePrediction) => Promise<import("../../../feature/address/util/address.types").ParsedAddressData>;
11
11
  resetSearch: () => void;
12
12
  };
13
13
  //# sourceMappingURL=use.address-autocomplete.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useRef, useState } from 'react';
2
- import { parseGooglePlaceResult } from '@/core/feature/address/util/parse-google-place';
2
+ import { parseGooglePlaceResult } from '../../../feature/address/util/parse-google-place';
3
3
  const DEBOUNCE_MS = 400;
4
4
  const MIN_QUERY_LENGTH = 3;
5
5
  export function useAddressAutocomplete() {
@@ -1,5 +1,5 @@
1
- import { Address } from '@/core/interface/prisma.interface';
2
- import { GooglePlaceDetails, ParsedAddressData } from '@/core/feature/address/util/address.types';
1
+ import { Address } from '../../../interface/prisma.interface';
2
+ import { GooglePlaceDetails, ParsedAddressData } from '../../../feature/address/util/address.types';
3
3
  export declare function parseGooglePlaceResult(placeDetails: GooglePlaceDetails): ParsedAddressData;
4
4
  export declare function formatAddressSummary(data: Partial<Address> | ParsedAddressData): string;
5
5
  export declare function parsedAddressToFormFields(parsed: ParsedAddressData): {
@@ -1,5 +1,5 @@
1
- import { IData } from "@/core/interface/nexine.interface";
2
- import { Article } from "@/core/interface/prisma.interface";
1
+ import { IData } from "../../../interface/nexine.interface";
2
+ import { Article } from "../../../interface/prisma.interface";
3
3
  export declare const useArticle: () => {
4
4
  fetch: (params?: any) => import("@tanstack/react-query").UseQueryResult<NoInfer<IData<Article>>, Error>;
5
5
  detail: (id: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<Article>, Error>;
@@ -1,4 +1,4 @@
1
- import { nexineAxios } from "@/core/util/nexine.axios";
1
+ import { nexineAxios } from "../../../util/nexine.axios";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  export const useArticle = () => {
4
4
  const queryClient = useQueryClient();
@@ -1,5 +1,5 @@
1
- import { IData } from '@/core/interface/nexine.interface';
2
- import { Attribute } from '@/core/interface/prisma.interface';
1
+ import { IData } from '../../../interface/nexine.interface';
2
+ import { Attribute } from '../../../interface/prisma.interface';
3
3
  export declare const useAttribute: () => {
4
4
  fetch: (params: {
5
5
  categoryId?: string;
@@ -1,4 +1,4 @@
1
- import { nexineAxios } from '@/core/util/nexine.axios';
1
+ import { nexineAxios } from '../../../util/nexine.axios';
2
2
  import { useQuery } from '@tanstack/react-query';
3
3
  export const useAttribute = () => {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { nexineAxios } from "@/core/util/nexine.axios";
1
+ import { nexineAxios } from "../../../util/nexine.axios";
2
2
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  // Auth event'leri için custom eventler
4
4
  export const LOGOUT_EVENT = 'intermarkt-logout';
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useImperativeHandle, useMemo, useState } from 'react';
3
3
  import { Modal } from 'rizzui';
4
4
  import { X } from 'lucide-react';
5
- import ViewLogin from '@/core/feature/auth/view/view.login';
6
- import ViewRegister from '@/core/feature/auth/view/view.register';
7
- import { useRaxon } from '@/core/raxon.context';
8
- import { GeneralImage } from '@/core/component/general.image';
5
+ import ViewLogin from '../../../feature/auth/view/view.login';
6
+ import ViewRegister from '../../../feature/auth/view/view.register';
7
+ import { useRaxon } from '../../../raxon.context';
8
+ import { GeneralImage } from '../../../component/general.image';
9
9
  import { usePathname } from 'next/navigation';
10
10
  import queryString from 'query-string';
11
11
  export const ModalAuth = React.forwardRef((props, ref) => {
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from 'react';
4
4
  import { Eye, EyeOff } from 'lucide-react';
5
- import { useAuth } from '@/core/feature/auth/hook/use.auth';
5
+ import { useAuth } from '../../../feature/auth/hook/use.auth';
6
6
  import { useForm } from 'react-hook-form';
7
7
  import toast from 'react-hot-toast';
8
8
  export default function ViewLogin({ onClose, returnUrl }) {
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from 'react';
4
4
  import { Eye, EyeOff, Lock, Mail, User, Phone, ArrowRight } from 'lucide-react';
5
- import { useAuth } from '@/core/feature/auth/hook/use.auth';
5
+ import { useAuth } from '../../../feature/auth/hook/use.auth';
6
6
  import { useRouter } from 'next/navigation';
7
7
  import { useForm } from 'react-hook-form';
8
8
  import { zodResolver } from '@hookform/resolvers/zod';
@@ -1,5 +1,5 @@
1
- import { IData } from '@/core/interface/nexine.interface';
2
- import { BankAccount, BankTransferCode } from '@/core/interface/prisma.interface';
1
+ import { IData } from '../../../interface/nexine.interface';
2
+ import { BankAccount, BankTransferCode } from '../../../interface/prisma.interface';
3
3
  export declare const useBankAccount: () => {
4
4
  fetch: (opts?: {
5
5
  enabled?: boolean;
@@ -1,4 +1,4 @@
1
- import { nexineAxios } from '@/core/util/nexine.axios';
1
+ import { nexineAxios } from '../../../util/nexine.axios';
2
2
  import { useMutation, useQuery } from '@tanstack/react-query';
3
3
  async function fetchBankAccounts() {
4
4
  const withTags = await nexineAxios.get('/customer/bank-account', {
@@ -1,4 +1,4 @@
1
- import type { BasketSummaryInterface } from '@/core/interface/basket.interface';
1
+ import type { BasketSummaryInterface } from '../../../interface/basket.interface';
2
2
  type CartOrderSummaryProps = {
3
3
  cart: BasketSummaryInterface | null;
4
4
  itemCount: number;
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import Link from 'next/link';
4
- import { CartPromoCodeSection } from '@/core/feature/cart/component/cart.promo.code.section';
4
+ import { CartPromoCodeSection } from '../../../feature/cart/component/cart.promo.code.section';
5
5
  const ShieldCheck = (props) => (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [_jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), _jsx("polyline", { points: "9 12 11 14 15 10" })] }));
6
6
  export function CartOrderSummary({ cart, itemCount }) {
7
7
  return (_jsx("aside", { className: "lg:col-span-4 lg:sticky lg:top-28 self-start w-full", children: _jsxs("div", { className: "p-4 bg-white border border-gray-100 rounded-2xl space-y-4", children: [_jsxs("div", { className: "pb-1", children: [_jsx("h2", { className: "text-sm font-medium text-gray-900 uppercase tracking-[0.1em]", children: "Sipari\u015F \u00D6zeti" }), _jsxs("p", { className: "text-[10px] font-bold text-gray-400 uppercase tracking-widest mt-0.5", children: [itemCount, " \u00DCr\u00FCn"] })] }), _jsxs("div", { className: "space-y-2.5", children: [_jsxs("div", { className: "flex justify-between items-center text-sm", children: [_jsx("span", { className: "text-gray-500", children: "Ara Toplam" }), _jsxs("span", { className: "font-bold text-gray-900", children: ["\u20BA", (Number(cart?.info?.payPrice?.total) || 0).toLocaleString('tr-TR', { minimumFractionDigits: 2 })] })] }), Number(cart?.info?.discount?.pay || 0) > 0 && (_jsxs("div", { className: "flex justify-between items-center text-sm", children: [_jsx("span", { className: "text-gray-500", children: "\u0130ndirim" }), _jsxs("span", { className: "font-bold text-green-600", children: ["-\u20BA", Number(cart?.info?.discount?.pay || 0).toLocaleString('tr-TR', { minimumFractionDigits: 2 })] })] })), Number(cart?.info?.promotion?.pay || 0) > 0 && (_jsxs("div", { className: "flex justify-between items-center text-sm", children: [_jsx("span", { className: "text-gray-500", children: "Promosyon" }), _jsxs("span", { className: "font-bold text-green-600", children: ["-\u20BA", Number(cart?.info?.promotion?.pay || 0).toLocaleString('tr-TR', { minimumFractionDigits: 2 })] })] })), _jsxs("div", { className: "flex justify-between items-center text-sm", children: [_jsx("span", { className: "text-gray-500", children: "KDV Dahil" }), _jsxs("span", { className: "font-bold text-gray-900", children: ["\u20BA", (Number(cart?.info?.payPrice?.tax) || 0).toLocaleString('tr-TR', { minimumFractionDigits: 2 })] })] })] }), _jsx("div", { className: "pt-3 border-t border-gray-100", children: _jsx(CartPromoCodeSection, { variant: "cart" }) }), _jsxs("div", { className: "pt-3 border-t border-gray-100 space-y-4", children: [_jsxs("div", { className: "flex justify-between items-end gap-3", children: [_jsx("span", { className: "text-sm font-bold text-gray-900", children: "Toplam" }), _jsxs("span", { className: "text-xl font-light text-gray-900", children: ["\u20BA", (Number(cart?.info?.payPrice?.pay) || 0).toLocaleString('tr-TR', { minimumFractionDigits: 2 })] })] }), _jsx(Link, { href: "/odeme", className: "block w-full bg-black text-white py-4 rounded-full text-center text-[11px] font-black uppercase tracking-[0.2em] hover:bg-[#CF0A2C] transition-all duration-300", children: "\u00D6demeye Ge\u00E7" }), _jsxs("div", { className: "flex items-center justify-center gap-2 text-[9px] font-bold text-gray-400 uppercase tracking-widest", children: [_jsx(ShieldCheck, { className: "w-3.5 h-3.5 shrink-0" }), "G\u00FCvenli \u00D6deme"] })] })] }) }));
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useCallback, useEffect, useState } from 'react';
4
- import { useCartContext } from '@/core/context/cart.context';
5
- import { useCart } from '@/core/feature/cart/hook/use.cart';
6
- import { usePromoCode } from '@/core/feature/promo-code/hook/use.promo.code';
7
- import { Status } from '@/core/interface/prisma.interface';
4
+ import { useRaxon } from '../../../raxon.context';
5
+ import { useCart } from '../../../feature/cart/hook/use.cart';
6
+ import { usePromoCode } from '../../../feature/promo-code/hook/use.promo.code';
7
+ import { Status } from '../../../interface/prisma.interface';
8
8
  const CheckCircle2 = (props) => (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [_jsx("path", { d: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z" }), _jsx("polyline", { points: "9 11 12 14 22 4" })] }));
9
9
  const Loader2 = (props) => (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: _jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }));
10
10
  const X = (props) => (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [_jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), _jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }));
@@ -12,7 +12,7 @@ function formatTRY(amount) {
12
12
  return new Intl.NumberFormat('tr-TR', { style: 'currency', currency: 'TRY', maximumFractionDigits: 0 }).format(amount);
13
13
  }
14
14
  export function CartPromoCodeSection({ variant = 'cart' }) {
15
- const { cart, promoCode, setPromoCode } = useCartContext();
15
+ const { cart, promoCode, setPromoCode } = useRaxon();
16
16
  const { mutate: updateCart, isPending: isUpdatingCart } = useCart().update();
17
17
  const { mutate: findPromoCode, isPending: isFindingPromoCode } = usePromoCode().findByCode();
18
18
  const [isOpen, setIsOpen] = useState(false);
@@ -1,6 +1,6 @@
1
- import { CartItem } from '@/core/interface/prisma.interface';
2
- import { BasketSummaryInterface } from '@/core/interface/basket.interface';
3
- import { IData } from '@/core/interface/nexine.interface';
1
+ import { BankTransferCode, CartItem } from '../../../interface/prisma.interface';
2
+ import { BasketSummaryInterface } from '../../../interface/basket.interface';
3
+ import { IData } from '../../../interface/nexine.interface';
4
4
  export type BasketItemBulkInsertInput = {
5
5
  id?: string;
6
6
  productId?: string;
@@ -43,6 +43,10 @@ export declare const useCart: () => {
43
43
  platform?: string;
44
44
  webReturnUrl?: string;
45
45
  }, unknown>;
46
+ createTransferCode: () => import("@tanstack/react-query").UseMutationResult<BankTransferCode, any, {
47
+ amount: number;
48
+ bankAccountId: string;
49
+ }, unknown>;
46
50
  bulkInsert: () => import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<IData<CartItem[]>, any, {}>, any, BasketItemBulkInsertInput[], unknown>;
47
51
  remove: () => import("@tanstack/react-query").UseMutationResult<import("axios").AxiosResponse<CartItem, any, {}>, Error, string, any>;
48
52
  update: () => import("@tanstack/react-query").UseMutationResult<BasketSummaryInterface, any, {
@@ -1 +1 @@
1
- {"version":3,"file":"use.cart.d.ts","sourceRoot":"","sources":["../../../../../core/feature/cart/hook/use.cart.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAGnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,KAAK,CAAC;CAC1C,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,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gB,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE;;;;;;mBAiFlE,MAAM;uBAAiB,MAAM;;;gBAajC,MAAM;uBAAiB,MAAM;;;;;YA+E1D,MAAM;gBACF,MAAM;2BACK,MAAM,GAAG,IAAI;4BACZ,MAAM,GAAG,IAAI;2BACd,MAAM,GAAG,IAAI;0BACd,MAAM,GAAG,IAAI;sBACjB,MAAM,GAAG,IAAI;qBACd,MAAM,GAAG,IAAI;0BACR,kBAAkB;yBACnB,kBAAkB;6BACd,MAAM,GAAG,IAAI;;;YAcL,MAAM;kBAAY,MAAM;oBAAc,MAAM;;CAqBlF,CAAC"}
@@ -1,7 +1,7 @@
1
- import { nexineAxios } from '@/core/util/nexine.axios';
1
+ import { nexineAxios } from '../../../util/nexine.axios';
2
2
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
3
- import { globalEmitter, GLOBAL_EVENTS } from '@/core/util/util';
4
- import { mergeCartWithOptimisticExtras, applyBasketInsertResponse, readCartCache, patchCartCache, CART_QUERY_KEY } from '@/core/feature/cart/util/cart-optimistic';
3
+ import { globalEmitter, GLOBAL_EVENTS } from '../../../util/util';
4
+ import { mergeCartWithOptimisticExtras, applyBasketInsertResponse, readCartCache, patchCartCache, CART_QUERY_KEY } from '../../../feature/cart/util/cart-optimistic';
5
5
  export const useCart = () => {
6
6
  const queryClient = useQueryClient();
7
7
  const handleUnauthorizedError = (error) => {
@@ -97,6 +97,15 @@ export const useCart = () => {
97
97
  onError: handleUnauthorizedError,
98
98
  });
99
99
  },
100
+ createTransferCode: () => {
101
+ return useMutation({
102
+ mutationFn: async (data) => {
103
+ const response = await nexineAxios.post('/customer/payment/bank-transfer', data);
104
+ return response.data.bankTransferCode;
105
+ },
106
+ onError: handleUnauthorizedError,
107
+ });
108
+ },
100
109
  bulkInsert: () => {
101
110
  return useMutation({
102
111
  mutationFn: (data) => {
@@ -1,4 +1,4 @@
1
- import { PaymentProvider } from '@/core/interface/prisma.interface';
1
+ import { PaymentProvider } from '../../../interface/prisma.interface';
2
2
  function readString(source, ...keys) {
3
3
  if (!source)
4
4
  return null;
@@ -1,4 +1,4 @@
1
- import { BasketItemSummaryInterface, BasketSummaryInterface } from '@/core/interface/basket.interface';
1
+ import { BasketItemSummaryInterface, BasketSummaryInterface } from '../../../interface/basket.interface';
2
2
  import type { QueryClient } from '@tanstack/react-query';
3
3
  export declare const CART_QUERY_KEY: readonly ["organization", "cart"];
4
4
  export declare const CART_QUANTITY_DEBOUNCE_MS = 400;
@@ -1,4 +1,4 @@
1
- import { SaleType } from '@/core/interface/prisma.interface';
1
+ import { SaleType } from '../../../interface/prisma.interface';
2
2
  export const CART_QUERY_KEY = ['organization', 'cart'];
3
3
  export const CART_QUANTITY_DEBOUNCE_MS = 400;
4
4
  export function createEmptyOptimisticCart() {
@@ -1,5 +1,5 @@
1
- import { IData } from "@/core/interface/nexine.interface";
2
- import { Collection } from "@/core/interface/prisma.interface";
1
+ import { IData } from "../../../interface/nexine.interface";
2
+ import { Collection } from "../../../interface/prisma.interface";
3
3
  export declare const useCollection: () => {
4
4
  fetch: (params?: any) => import("@tanstack/react-query").UseQueryResult<NoInfer<IData<Collection>>, Error>;
5
5
  detail: (id: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<Collection>, Error>;
@@ -1,4 +1,4 @@
1
- import { nexineAxios } from "@/core/util/nexine.axios";
1
+ import { nexineAxios } from "../../../util/nexine.axios";
2
2
  import { useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  export const useCollection = () => {
4
4
  const queryClient = useQueryClient();
@@ -1,4 +1,4 @@
1
- import { DeliveryMethod } from '@/core/interface/prisma.interface';
1
+ import { DeliveryMethod } from '../../../interface/prisma.interface';
2
2
  export declare const useDeliveryMethod: () => {
3
3
  fetch: (opts?: {
4
4
  enabled?: boolean;
@@ -1,6 +1,6 @@
1
- import { nexineAxios } from '@/core/util/nexine.axios';
1
+ import { nexineAxios } from '../../../util/nexine.axios';
2
2
  import { useQuery } from '@tanstack/react-query';
3
- import { getCheckoutDeliveryMethods } from '@/core/feature/delivery-method/util/checkout.delivery.method';
3
+ import { getCheckoutDeliveryMethods } from '../../../feature/delivery-method/util/checkout.delivery.method';
4
4
  async function fetchDeliveryMethods() {
5
5
  const withTags = await nexineAxios.get('/customer/delivery/method', {
6
6
  params: {
@@ -1,4 +1,4 @@
1
- import { DeliveryMethod } from '@/core/interface/prisma.interface';
1
+ import { DeliveryMethod } from '../../../interface/prisma.interface';
2
2
  export declare function isCashDeskDeliveryMethod(method: Pick<DeliveryMethod, 'name'>): boolean;
3
3
  /** Web checkout'ta gösterilecek kargo yöntemleri (kasadan satış hariç). */
4
4
  export declare function getCheckoutDeliveryMethods(methods: DeliveryMethod[]): DeliveryMethod[];
@@ -1,5 +1,5 @@
1
- import { IData } from "@/core/interface/nexine.interface";
2
- import { Faq } from "@/core/interface/prisma.interface";
1
+ import { IData } from "../../../interface/nexine.interface";
2
+ import { Faq } from "../../../interface/prisma.interface";
3
3
  export declare const useFaq: () => {
4
4
  fetch: (params: {
5
5
  page: number;
@@ -1,4 +1,4 @@
1
- import { nexineAxios } from "@/core/util/nexine.axios";
1
+ import { nexineAxios } from "../../../util/nexine.axios";
2
2
  import { useQuery } from "@tanstack/react-query";
3
3
  export const useFaq = () => {
4
4
  return {
@@ -1,5 +1,5 @@
1
- import { IData } from "@/core/interface/nexine.interface";
2
- import { Favorite } from "@/core/interface/prisma.interface";
1
+ import { IData } from "../../../interface/nexine.interface";
2
+ import { Favorite } from "../../../interface/prisma.interface";
3
3
  import { UseQueryOptions } from "@tanstack/react-query";
4
4
  export interface FavoriteListResponse extends IData<Favorite> {
5
5
  info?: {
@@ -1,4 +1,4 @@
1
- import { nexineAxios } from "@/core/util/nexine.axios";
1
+ import { nexineAxios } from "../../../util/nexine.axios";
2
2
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
3
3
  import toast from "react-hot-toast";
4
4
  export const useFavorite = () => {
@@ -1,4 +1,4 @@
1
- import { nexineAxios } from "@/core/util/nexine.axios";
1
+ import { nexineAxios } from "../../../util/nexine.axios";
2
2
  import { useMutation } from "@tanstack/react-query";
3
3
  export const useFormSubmit = () => {
4
4
  return {