@raxonltd/raxon-core 1.0.1 → 1.0.4
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/core/context/cart.context.d.ts +4 -9
- package/dist/core/context/cart.context.d.ts.map +1 -1
- package/dist/core/context/cart.context.js +18 -29
- package/dist/core/context/security.context.d.ts +4 -10
- package/dist/core/context/security.context.d.ts.map +1 -1
- package/dist/core/context/security.context.js +25 -32
- package/dist/core/feature/address/form/address-search-input.d.ts +1 -1
- package/dist/core/feature/address/hook/use.addres.d.ts +2 -2
- package/dist/core/feature/address/hook/use.addres.js +1 -1
- package/dist/core/feature/address/hook/use.address-autocomplete.d.ts +2 -2
- package/dist/core/feature/address/hook/use.address-autocomplete.js +1 -1
- package/dist/core/feature/address/util/parse-google-place.d.ts +2 -2
- package/dist/core/feature/article/hook/use.article.d.ts +2 -2
- package/dist/core/feature/article/hook/use.article.js +1 -1
- package/dist/core/feature/attribute/hook/use.attribute.d.ts +2 -2
- package/dist/core/feature/attribute/hook/use.attribute.js +1 -1
- package/dist/core/feature/auth/hook/use.auth.js +1 -1
- package/dist/core/feature/auth/modal/modal.auth.js +4 -4
- package/dist/core/feature/auth/view/view.login.js +1 -1
- package/dist/core/feature/auth/view/view.register.js +1 -1
- package/dist/core/feature/bank-account/hook/use.bank.account.d.ts +2 -2
- package/dist/core/feature/bank-account/hook/use.bank.account.js +1 -1
- package/dist/core/feature/cart/component/cart.order.summary.d.ts +1 -1
- package/dist/core/feature/cart/component/cart.order.summary.js +1 -1
- package/dist/core/feature/cart/component/cart.promo.code.section.js +5 -5
- package/dist/core/feature/cart/hook/use.cart.d.ts +7 -3
- package/dist/core/feature/cart/hook/use.cart.d.ts.map +1 -1
- package/dist/core/feature/cart/hook/use.cart.js +12 -3
- package/dist/core/feature/cart/util/basket-pay.response.js +1 -1
- package/dist/core/feature/cart/util/cart-optimistic.d.ts +1 -1
- package/dist/core/feature/cart/util/cart-optimistic.js +1 -1
- package/dist/core/feature/collection/hook/use.collection.d.ts +2 -2
- package/dist/core/feature/collection/hook/use.collection.js +1 -1
- package/dist/core/feature/delivery-method/hook/use.delivery.method.d.ts +1 -1
- package/dist/core/feature/delivery-method/hook/use.delivery.method.js +2 -2
- package/dist/core/feature/delivery-method/util/checkout.delivery.method.d.ts +1 -1
- package/dist/core/feature/faq/hook/use.faq.d.ts +2 -2
- package/dist/core/feature/faq/hook/use.faq.js +1 -1
- package/dist/core/feature/favorite/hook/use.favorite.d.ts +2 -2
- package/dist/core/feature/favorite/hook/use.favorite.js +1 -1
- package/dist/core/feature/form-submit/hook/use.form.submit.js +1 -1
- package/dist/core/feature/invoice/hook/use.invoice.d.ts +2 -2
- package/dist/core/feature/invoice/hook/use.invoice.js +1 -1
- package/dist/core/feature/newsletter/hook/use.newsletter.d.ts +1 -1
- package/dist/core/feature/newsletter/hook/use.newsletter.js +1 -1
- package/dist/core/feature/newsletter/modal/modal.newsletter.product.d.ts +1 -1
- package/dist/core/feature/newsletter/modal/modal.newsletter.product.js +3 -3
- package/dist/core/feature/order/hook/use.order.d.ts +2 -2
- package/dist/core/feature/order/hook/use.order.js +1 -1
- package/dist/core/feature/payment-method/checkout.payment.options.d.ts +1 -1
- package/dist/core/feature/payment-method/checkout.payment.options.js +1 -1
- package/dist/core/feature/payment-method/hook/use.payment.method.d.ts +2 -2
- package/dist/core/feature/payment-method/hook/use.payment.method.js +1 -1
- package/dist/core/feature/product/hook/use.product.d.ts +3 -3
- package/dist/core/feature/product/hook/use.product.js +2 -2
- package/dist/core/feature/profile/hook/use.profile.d.ts +1 -1
- package/dist/core/feature/profile/hook/use.profile.js +1 -1
- package/dist/core/feature/promo-code/hook/use.promo.code.d.ts +1 -1
- package/dist/core/feature/promo-code/hook/use.promo.code.js +1 -1
- package/dist/core/interface/inventory.interface.d.ts +1 -1
- package/dist/core/raxon.context.d.ts +13 -10
- package/dist/core/raxon.context.d.ts.map +1 -1
- package/dist/core/raxon.context.js +28 -21
- package/dist/core/util/garanti-payment.d.ts +1 -1
- package/dist/core/util/garanti-payment.js +1 -1
- package/dist/core/view/view.checkout.d.ts +2 -0
- package/dist/core/view/view.checkout.d.ts.map +1 -0
- package/dist/core/view/view.checkout.js +684 -0
- package/dist/hook.d.ts +19 -0
- package/dist/hook.d.ts.map +1 -0
- package/dist/hook.js +18 -0
- package/dist/index.d.ts +2 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -22
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/view.d.ts +2 -0
- package/dist/view.d.ts.map +1 -0
- package/dist/view.js +1 -0
- package/package.json +35 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IData } from "
|
|
2
|
-
import { Invoice } from "
|
|
1
|
+
import { IData } from "../../../interface/nexine.interface";
|
|
2
|
+
import { Invoice } from "../../../interface/prisma.interface";
|
|
3
3
|
export declare const useInvoice: () => {
|
|
4
4
|
fetch: () => import("@tanstack/react-query").UseQueryResult<NoInfer<IData<Invoice>>, Error>;
|
|
5
5
|
detail: (id: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<Invoice>, Error>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nexineAxios } from "
|
|
1
|
+
import { nexineAxios } from "../../../util/nexine.axios";
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
export const useInvoice = () => {
|
|
4
4
|
const queryClient = useQueryClient();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Newsletter } from '
|
|
1
|
+
import { Newsletter } from '../../../interface/prisma.interface';
|
|
2
2
|
export declare const useNewsletter: () => {
|
|
3
3
|
subscribe: import("@tanstack/react-query").UseMutationResult<Newsletter, Error, {
|
|
4
4
|
email: string;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useRaxon } from '../../../raxon.context';
|
|
3
3
|
import React, { useImperativeHandle, useRef, useState } from 'react';
|
|
4
4
|
import { Modal } from 'rizzui/modal';
|
|
5
5
|
import { Button } from 'rizzui/button';
|
|
6
6
|
import { Input } from 'rizzui/input';
|
|
7
|
-
import { useNewsletter } from '
|
|
7
|
+
import { useNewsletter } from '../../../feature/newsletter/hook/use.newsletter';
|
|
8
8
|
export const ModalNewsletterVariantProduct = React.forwardRef((props, ref) => {
|
|
9
9
|
const callbackRef = useRef(null);
|
|
10
10
|
const { mutate: subscribeByVariant } = useNewsletter().subscribeByVariant;
|
|
11
|
-
const { profile } =
|
|
11
|
+
const { profile } = useRaxon();
|
|
12
12
|
const [product, setProduct] = useState(null);
|
|
13
13
|
const [variant, setVariant] = useState(null);
|
|
14
14
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IData } from "
|
|
2
|
-
import { Order } from "
|
|
1
|
+
import { IData } from "../../../interface/nexine.interface";
|
|
2
|
+
import { Order } from "../../../interface/prisma.interface";
|
|
3
3
|
export declare const useOrder: () => {
|
|
4
4
|
fetch: () => import("@tanstack/react-query").UseQueryResult<NoInfer<IData<Order>>, Error>;
|
|
5
5
|
detail: (id: string) => import("@tanstack/react-query").UseQueryResult<NoInfer<Order>, Error>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaymentMethod } from '../../interface/prisma.interface';
|
|
2
|
-
import { PaymentUiType } from '
|
|
2
|
+
import { PaymentUiType } from '../../schema/checkout.schema';
|
|
3
3
|
export interface CheckoutPaymentOption {
|
|
4
4
|
key: PaymentUiType;
|
|
5
5
|
label: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaymentProvider } from '../../interface/prisma.interface';
|
|
2
|
-
import { getPaymentUiType } from '
|
|
2
|
+
import { getPaymentUiType } from '../../schema/checkout.schema';
|
|
3
3
|
export function findGarantiPaymentMethod(methods) {
|
|
4
4
|
return methods.find((m) => m.provider === PaymentProvider.GARANTI ||
|
|
5
5
|
/garanti/i.test(m.name) ||
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IData } from '
|
|
2
|
-
import { PaymentMethod } from '
|
|
1
|
+
import { IData } from '../../../interface/nexine.interface';
|
|
2
|
+
import { PaymentMethod } from '../../../interface/prisma.interface';
|
|
3
3
|
export declare const usePaymentMethod: () => {
|
|
4
4
|
fetch: (opts?: {
|
|
5
5
|
enabled?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IData } from "
|
|
2
|
-
import { Status } from "
|
|
3
|
-
import { Product as CustomProduct, ProductDetail } from "
|
|
1
|
+
import { IData } from "../../../interface/nexine.interface";
|
|
2
|
+
import { Status } from "../../../interface/prisma.interface";
|
|
3
|
+
import { Product as CustomProduct, ProductDetail } from "../../../interface/product.interface";
|
|
4
4
|
export declare const PRODUCT_PAGE_SIZE = 24;
|
|
5
5
|
export interface ProductListResponse {
|
|
6
6
|
data: CustomProduct[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { nexineAxios } from "
|
|
2
|
-
import { Status } from "
|
|
1
|
+
import { nexineAxios } from "../../../util/nexine.axios";
|
|
2
|
+
import { Status } from "../../../interface/prisma.interface";
|
|
3
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
4
|
const SEARCH_PAGE_SIZE = 12;
|
|
5
5
|
export const PRODUCT_PAGE_SIZE = 24;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { nexineAxios } from "
|
|
1
|
+
import { nexineAxios } from "../../../util/nexine.axios";
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
export const useProfile = () => {
|
|
4
4
|
const queryClient = useQueryClient();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProductContent, ProductType, SaleType, WeightType } from '
|
|
1
|
+
import { ProductContent, ProductType, SaleType, WeightType } from '../interface/prisma.interface';
|
|
2
2
|
export interface InventoryFetchResponse {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Article, BankAccount, Branch, Brand, Campaign, Category, Collection, DeliveryMethod, DynamicData, Faq, Feed, Holiday, Material, PaymentMethod, Review } from '
|
|
2
|
-
import { Product as CustomProduct } from '
|
|
3
|
-
import { ModalAuthRef } from '
|
|
4
|
-
import { ModalNewsletterVariantProductRef } from '
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Article, BankAccount, Branch, Brand, Campaign, Category, Collection, DeliveryMethod, DynamicData, Faq, Feed, Holiday, Material, PaymentMethod, Review, User } from './interface/prisma.interface';
|
|
2
|
+
import { Product as CustomProduct } from './interface/product.interface';
|
|
3
|
+
import { ModalAuthRef } from './feature/auth/modal/modal.auth';
|
|
4
|
+
import { ModalNewsletterVariantProductRef } from './feature/newsletter/modal/modal.newsletter.product';
|
|
5
|
+
import { CartState } from './context/cart.context';
|
|
6
|
+
export declare const RaxonContext: import("react").Context<RaxonContextType>;
|
|
7
|
+
interface RaxonBootstrapData {
|
|
7
8
|
campaign: Campaign[];
|
|
8
9
|
basketCampaign: Campaign[];
|
|
9
10
|
branch: Branch | null;
|
|
@@ -26,15 +27,17 @@ interface RaxonData {
|
|
|
26
27
|
paymentMethod: PaymentMethod[];
|
|
27
28
|
defaultDeliveryMethod: DeliveryMethod | null;
|
|
28
29
|
brand: Brand[];
|
|
29
|
-
isAuthenticated: boolean;
|
|
30
|
-
isGuest: boolean;
|
|
31
30
|
modalAuthRef: React.RefObject<ModalAuthRef | null>;
|
|
32
31
|
modalNewsletterVariantProductRef: React.RefObject<ModalNewsletterVariantProductRef | null>;
|
|
33
32
|
}
|
|
34
|
-
interface RaxonContextType extends
|
|
33
|
+
export interface RaxonContextType extends RaxonBootstrapData, CartState {
|
|
35
34
|
isLoading: boolean;
|
|
35
|
+
profile: User | null | undefined;
|
|
36
|
+
authLoading: boolean;
|
|
37
|
+
isAuthenticated: boolean;
|
|
38
|
+
isGuest: boolean;
|
|
36
39
|
}
|
|
37
|
-
export declare const RaxonProvider: ({ children, apiKey, apiUrl }: {
|
|
40
|
+
export declare const RaxonProvider: ({ children, apiKey, apiUrl, }: {
|
|
38
41
|
children: React.ReactNode;
|
|
39
42
|
apiKey: string;
|
|
40
43
|
apiUrl: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raxon.context.d.ts","sourceRoot":"","sources":["../../core/raxon.context.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"raxon.context.d.ts","sourceRoot":"","sources":["../../core/raxon.context.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,WAAW,EACX,MAAM,EACN,KAAK,EACL,QAAQ,EAER,QAAQ,EACR,UAAU,EACV,cAAc,EACd,WAAW,EACX,GAAG,EACH,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,aAAa,EACb,MAAM,EACN,IAAI,EACL,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAa,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAiC,gCAAgC,EAAE,MAAM,0DAA0D,CAAC;AAG3I,OAAO,EAAgB,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAEtE,eAAO,MAAM,YAAY,2CAAyD,CAAC;AAEnF,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,cAAc,EAAE,QAAQ,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,UAAU,EAAE,UAAU,EAAE,CAAC;IACzB,iBAAiB,EAAE,UAAU,EAAE,CAAC;IAChC,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,GAAG,EAAE,GAAG,EAAE,CAAC;IACX,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,cAAc,EAAE,cAAc,EAAE,CAAC;IACjC,aAAa,EAAE,aAAa,EAAE,CAAC;IAC/B,qBAAqB,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7C,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IACnD,gCAAgC,EAAE,KAAK,CAAC,SAAS,CAAC,gCAAgC,GAAG,IAAI,CAAC,CAAC;CAC5F;AAED,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB,EAAE,SAAS;IACrE,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CAClB;AAsGD,eAAO,MAAM,aAAa,GAAI,+BAI3B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,gCAUA,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,gBAM3B,CAAC"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { CampaignType } from '
|
|
3
|
+
import { CampaignType, } from './interface/prisma.interface';
|
|
4
4
|
import { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
-
import { nexineAxios } from '
|
|
6
|
-
import { ModalAuth } from '
|
|
7
|
-
import { ModalNewsletterVariantProduct } from '
|
|
5
|
+
import { nexineAxios } from './util/nexine.axios';
|
|
6
|
+
import { ModalAuth } from './feature/auth/modal/modal.auth';
|
|
7
|
+
import { ModalNewsletterVariantProduct } from './feature/newsletter/modal/modal.newsletter.product';
|
|
8
8
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { useSecurityState } from './context/security.context';
|
|
10
|
+
import { useCartState } from './context/cart.context';
|
|
11
11
|
export const RaxonContext = createContext(undefined);
|
|
12
|
-
|
|
12
|
+
const RaxonProviderInner = ({ children, apiKey, apiUrl, }) => {
|
|
13
13
|
const [raxon, setRaxon] = useState(null);
|
|
14
14
|
const [isLoading, setIsLoading] = useState(true);
|
|
15
15
|
const [hasFetched, setHasFetched] = useState(false);
|
|
16
|
-
const [queryClient] = useState(() => new QueryClient());
|
|
17
16
|
const modalAuthRef = useRef(null);
|
|
18
17
|
const modalNewsletterVariantProductRef = useRef(null);
|
|
19
|
-
|
|
18
|
+
const { profile, authLoading, isAuthenticated, isGuest } = useSecurityState();
|
|
19
|
+
const cartState = useCartState(isAuthenticated);
|
|
20
20
|
useEffect(() => {
|
|
21
21
|
if (typeof window !== 'undefined') {
|
|
22
22
|
window.__RAXON_API_KEY__ = apiKey;
|
|
@@ -25,7 +25,6 @@ export const RaxonProvider = ({ children, apiKey, apiUrl }) => {
|
|
|
25
25
|
nexineAxios.defaults.headers.common['x-api-key'] = apiKey;
|
|
26
26
|
}
|
|
27
27
|
}, [apiKey, apiUrl]);
|
|
28
|
-
// Fetch data once on mount
|
|
29
28
|
useEffect(() => {
|
|
30
29
|
if (hasFetched || !apiUrl)
|
|
31
30
|
return;
|
|
@@ -33,21 +32,21 @@ export const RaxonProvider = ({ children, apiKey, apiUrl }) => {
|
|
|
33
32
|
fetch(`${apiUrl}/customer/bootstrap`, {
|
|
34
33
|
headers: {
|
|
35
34
|
'x-api-key': apiKey,
|
|
36
|
-
}
|
|
35
|
+
},
|
|
37
36
|
})
|
|
38
|
-
.then(res => res.json())
|
|
39
|
-
.then(data => {
|
|
37
|
+
.then((res) => res.json())
|
|
38
|
+
.then((data) => {
|
|
40
39
|
setRaxon(data);
|
|
41
40
|
setIsLoading(false);
|
|
42
41
|
})
|
|
43
|
-
.catch(err => {
|
|
42
|
+
.catch((err) => {
|
|
44
43
|
console.error('[RAXON] ERROR:', err);
|
|
45
44
|
setIsLoading(false);
|
|
46
45
|
});
|
|
47
46
|
}, [hasFetched, apiUrl, apiKey]);
|
|
48
47
|
const flatCategory = useMemo(() => {
|
|
49
48
|
const flatten = (categories) => {
|
|
50
|
-
return categories.flatMap(cat => [cat, ...flatten(cat.children ?? [])]);
|
|
49
|
+
return categories.flatMap((cat) => [cat, ...flatten(cat.children ?? [])]);
|
|
51
50
|
};
|
|
52
51
|
return flatten(Array.isArray(raxon?.category) ? raxon.category : []);
|
|
53
52
|
}, [raxon?.category]);
|
|
@@ -59,13 +58,14 @@ export const RaxonProvider = ({ children, apiKey, apiUrl }) => {
|
|
|
59
58
|
subHeroCollection: raxon?.subHeroCollection ?? [],
|
|
60
59
|
banner: raxon?.collection?.filter((it) => it.tags.includes('banner')) ?? [],
|
|
61
60
|
category: Array.isArray(raxon?.category) ? raxon.category : [],
|
|
62
|
-
flatCategory
|
|
61
|
+
flatCategory,
|
|
63
62
|
faq: raxon?.faq ?? [],
|
|
64
63
|
product: raxon?.product ?? [],
|
|
65
64
|
bankAccount: raxon?.bankAccount ?? [],
|
|
66
65
|
material: raxon?.material ?? [],
|
|
66
|
+
holiday: raxon?.holiday ?? [],
|
|
67
67
|
bestSeller: raxon?.bestSeller ?? [],
|
|
68
|
-
isLoading
|
|
68
|
+
isLoading,
|
|
69
69
|
dynamicData: raxon?.dynamicData ?? [],
|
|
70
70
|
deliveryMethod: raxon?.deliveryMethod ?? [],
|
|
71
71
|
paymentMethod: raxon?.paymentMethod ?? [],
|
|
@@ -74,12 +74,19 @@ export const RaxonProvider = ({ children, apiKey, apiUrl }) => {
|
|
|
74
74
|
article: raxon?.article ?? [],
|
|
75
75
|
feed: raxon?.feed ?? [],
|
|
76
76
|
brand: raxon?.brand ?? [],
|
|
77
|
-
isAuthenticated: false,
|
|
78
|
-
isGuest: true,
|
|
79
77
|
modalAuthRef,
|
|
80
78
|
modalNewsletterVariantProductRef,
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
profile,
|
|
80
|
+
authLoading,
|
|
81
|
+
isAuthenticated,
|
|
82
|
+
isGuest,
|
|
83
|
+
...cartState,
|
|
84
|
+
}), [raxon, isLoading, flatCategory, profile, authLoading, isAuthenticated, isGuest, cartState]);
|
|
85
|
+
return (_jsxs(RaxonContext.Provider, { value: value, children: [children, _jsx(ModalAuth, { ref: modalAuthRef }), _jsx(ModalNewsletterVariantProduct, { ref: modalNewsletterVariantProductRef })] }));
|
|
86
|
+
};
|
|
87
|
+
export const RaxonProvider = ({ children, apiKey, apiUrl, }) => {
|
|
88
|
+
const [queryClient] = useState(() => new QueryClient());
|
|
89
|
+
return (_jsx(QueryClientProvider, { client: queryClient, children: _jsx(RaxonProviderInner, { apiKey: apiKey, apiUrl: apiUrl, children: children }) }));
|
|
83
90
|
};
|
|
84
91
|
export const useRaxon = () => {
|
|
85
92
|
const context = useContext(RaxonContext);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { storeGarantiPaymentHtml, consumeGarantiPaymentHtml, submitGarantiPaymentHtml, } from '
|
|
1
|
+
export { storeGarantiPaymentHtml, consumeGarantiPaymentHtml, submitGarantiPaymentHtml, } from '../feature/cart/util/garanti-payment';
|
|
2
2
|
//# sourceMappingURL=garanti-payment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { storeGarantiPaymentHtml, consumeGarantiPaymentHtml, submitGarantiPaymentHtml, } from '
|
|
1
|
+
export { storeGarantiPaymentHtml, consumeGarantiPaymentHtml, submitGarantiPaymentHtml, } from '../feature/cart/util/garanti-payment';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.checkout.d.ts","sourceRoot":"","sources":["../../../core/view/view.checkout.tsx"],"names":[],"mappings":"AAusCA,MAAM,CAAC,OAAO,UAAU,WAAW,gCA4KlC"}
|