@sentecacommerce-theme/lib 0.12.59 → 0.12.63
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/cjs/api/myCartApi/index.js +2 -1
- package/dist/cjs/api/myCartApi/index.js.map +1 -1
- package/dist/cjs/basket/api/index.js +12 -0
- package/dist/cjs/basket/api/index.js.map +1 -0
- package/dist/cjs/basket/api/mutations/index.js +12 -0
- package/dist/cjs/basket/api/mutations/index.js.map +1 -0
- package/dist/cjs/basket/api/mutations/useReplaceBasketMutation.js +42 -0
- package/dist/cjs/basket/api/mutations/useReplaceBasketMutation.js.map +1 -0
- package/dist/cjs/basket/hooks/index.js +20 -0
- package/dist/cjs/basket/hooks/index.js.map +1 -0
- package/dist/cjs/basket/hooks/useBasketCrossSaleItems.js +57 -0
- package/dist/cjs/basket/hooks/useBasketCrossSaleItems.js.map +1 -0
- package/dist/cjs/basket/hooks/useReplaceBasket.js +8 -0
- package/dist/cjs/basket/hooks/useReplaceBasket.js.map +1 -0
- package/dist/cjs/basket/index.js +12 -0
- package/dist/cjs/basket/index.js.map +1 -0
- package/dist/cjs/contexts/CheckoutForm/index.js +1 -1
- package/dist/cjs/contexts/CheckoutForm/index.js.map +1 -1
- package/dist/cjs/hooks/useProduct/index.js +29 -1
- package/dist/cjs/hooks/useProduct/index.js.map +1 -1
- package/dist/cjs/hooks/useProduct/utils/index.js +21 -4
- package/dist/cjs/hooks/useProduct/utils/index.js.map +1 -1
- package/dist/cjs/index.js +132 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/listing/utils/buildCategoryQuery.js +10 -4
- package/dist/cjs/listing/utils/buildCategoryQuery.js.map +1 -1
- package/dist/cjs/order/api/mutations/index.js +8 -0
- package/dist/cjs/order/api/mutations/index.js.map +1 -1
- package/dist/cjs/order/api/mutations/useUpdateCustomLineItemMutation.js.map +1 -1
- package/dist/cjs/order/api/mutations/useUpdateOrderCustomFieldMutation.js +20 -0
- package/dist/cjs/order/api/mutations/useUpdateOrderCustomFieldMutation.js.map +1 -0
- package/dist/cjs/order/hooks/index.js +8 -0
- package/dist/cjs/order/hooks/index.js.map +1 -1
- package/dist/cjs/order/hooks/useUpdateCustomLineItem.js.map +1 -1
- package/dist/cjs/order/hooks/useUpdateOrderCustomField.js +13 -0
- package/dist/cjs/order/hooks/useUpdateOrderCustomField.js.map +1 -0
- package/dist/cjs/user/api/queries/index.js +8 -0
- package/dist/cjs/user/api/queries/index.js.map +1 -1
- package/dist/cjs/user/api/queries/useGetMyLoyaltyCardQuery.js +24 -0
- package/dist/cjs/user/api/queries/useGetMyLoyaltyCardQuery.js.map +1 -0
- package/dist/cjs/user/api/utils/getUserToken.js +19 -0
- package/dist/cjs/user/api/utils/getUserToken.js.map +1 -0
- package/dist/cjs/user/api/utils/index.js +8 -0
- package/dist/cjs/user/api/utils/index.js.map +1 -1
- package/dist/cjs/user/hooks/index.js +16 -0
- package/dist/cjs/user/hooks/index.js.map +1 -1
- package/dist/cjs/user/hooks/useGetMyLoyaltyCard.js +13 -0
- package/dist/cjs/user/hooks/useGetMyLoyaltyCard.js.map +1 -0
- package/dist/cjs/user/hooks/useGetUserToken.js +13 -0
- package/dist/cjs/user/hooks/useGetUserToken.js.map +1 -0
- package/dist/esm/api/myCartApi/index.js +2 -1
- package/dist/esm/api/myCartApi/index.js.map +1 -1
- package/dist/esm/basket/api/index.js +2 -0
- package/dist/esm/basket/api/index.js.map +1 -0
- package/dist/esm/basket/api/mutations/index.js +2 -0
- package/dist/esm/basket/api/mutations/index.js.map +1 -0
- package/dist/esm/basket/api/mutations/useReplaceBasketMutation.js +17 -0
- package/dist/esm/basket/api/mutations/useReplaceBasketMutation.js.map +1 -0
- package/dist/esm/basket/hooks/index.js +3 -0
- package/dist/esm/basket/hooks/index.js.map +1 -0
- package/dist/esm/basket/hooks/useBasketCrossSaleItems.js +25 -0
- package/dist/esm/basket/hooks/useBasketCrossSaleItems.js.map +1 -0
- package/dist/esm/basket/hooks/useReplaceBasket.js +3 -0
- package/dist/esm/basket/hooks/useReplaceBasket.js.map +1 -0
- package/dist/esm/basket/index.js +2 -0
- package/dist/esm/basket/index.js.map +1 -0
- package/dist/esm/contexts/CheckoutForm/index.js +1 -1
- package/dist/esm/contexts/CheckoutForm/index.js.map +1 -1
- package/dist/esm/hooks/useProduct/index.js +26 -2
- package/dist/esm/hooks/useProduct/index.js.map +1 -1
- package/dist/esm/hooks/useProduct/utils/index.js +16 -2
- package/dist/esm/hooks/useProduct/utils/index.js.map +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/listing/utils/buildCategoryQuery.js +10 -4
- package/dist/esm/listing/utils/buildCategoryQuery.js.map +1 -1
- package/dist/esm/order/api/mutations/index.js +1 -0
- package/dist/esm/order/api/mutations/index.js.map +1 -1
- package/dist/esm/order/api/mutations/useUpdateCustomLineItemMutation.js.map +1 -1
- package/dist/esm/order/api/mutations/useUpdateOrderCustomFieldMutation.js +9 -0
- package/dist/esm/order/api/mutations/useUpdateOrderCustomFieldMutation.js.map +1 -0
- package/dist/esm/order/hooks/index.js +1 -0
- package/dist/esm/order/hooks/index.js.map +1 -1
- package/dist/esm/order/hooks/useUpdateCustomLineItem.js.map +1 -1
- package/dist/esm/order/hooks/useUpdateOrderCustomField.js +5 -0
- package/dist/esm/order/hooks/useUpdateOrderCustomField.js.map +1 -0
- package/dist/esm/user/api/queries/index.js +1 -0
- package/dist/esm/user/api/queries/index.js.map +1 -1
- package/dist/esm/user/api/queries/useGetMyLoyaltyCardQuery.js +11 -0
- package/dist/esm/user/api/queries/useGetMyLoyaltyCardQuery.js.map +1 -0
- package/dist/esm/user/api/utils/getUserToken.js +8 -0
- package/dist/esm/user/api/utils/getUserToken.js.map +1 -0
- package/dist/esm/user/api/utils/index.js +1 -0
- package/dist/esm/user/api/utils/index.js.map +1 -1
- package/dist/esm/user/hooks/index.js +2 -0
- package/dist/esm/user/hooks/index.js.map +1 -1
- package/dist/esm/user/hooks/useGetMyLoyaltyCard.js +5 -0
- package/dist/esm/user/hooks/useGetMyLoyaltyCard.js.map +1 -0
- package/dist/esm/user/hooks/useGetUserToken.js +3 -0
- package/dist/esm/user/hooks/useGetUserToken.js.map +1 -0
- package/dist/types/api/myCartApi/index.d.ts +1 -0
- package/dist/types/basket/api/index.d.ts +1 -0
- package/dist/types/basket/api/mutations/index.d.ts +1 -0
- package/dist/types/basket/api/mutations/useReplaceBasketMutation.d.ts +2 -0
- package/dist/types/basket/hooks/index.d.ts +2 -0
- package/dist/types/basket/hooks/useBasketCrossSaleItems.d.ts +9 -0
- package/dist/types/basket/hooks/useReplaceBasket.d.ts +2 -0
- package/dist/types/basket/index.d.ts +1 -0
- package/dist/types/hooks/useProduct/utils/index.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/order/api/mutations/index.d.ts +1 -0
- package/dist/types/order/api/mutations/useUpdateCustomLineItemMutation.d.ts +2 -5
- package/dist/types/order/api/mutations/useUpdateOrderCustomFieldMutation.d.ts +9 -0
- package/dist/types/order/hooks/index.d.ts +1 -0
- package/dist/types/order/hooks/useUpdateCustomLineItem.d.ts +2 -2
- package/dist/types/order/hooks/useUpdateOrderCustomField.d.ts +2 -0
- package/dist/types/user/api/queries/index.d.ts +1 -0
- package/dist/types/user/api/queries/useGetMyLoyaltyCardQuery.d.ts +5 -0
- package/dist/types/user/api/utils/getUserToken.d.ts +1 -0
- package/dist/types/user/api/utils/index.d.ts +1 -0
- package/dist/types/user/hooks/index.d.ts +2 -0
- package/dist/types/user/hooks/useGetMyLoyaltyCard.d.ts +2 -0
- package/dist/types/user/hooks/useGetUserToken.d.ts +1 -0
- package/package.json +3 -3
package/dist/esm/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAd,C,CAEA;AACA;;AACA,cAAc,mBAAd;AACA,cAAc,gBAAd;AACA,cAAc,gBAAd;AACA,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AACA,cAAc,2BAAd;AACA,cAAc,wBAAd;AAEA,cAAc,oBAAd;AACA,cAAc,wBAAd;AAEA,cAAc,uBAAd;AACA,cAAc,yBAAd;AACA,cAAc,yBAAd;AACA,cAAc,6BAAd;AACA,cAAc,2BAAd;AACA,cAAc,wBAAd;AACA,cAAc,6BAAd;AACA,cAAc,wBAAd,C,CAEA;;AACA,cAAc,SAAd;AACA,cAAc,SAAd,C,CAEA;;AACA,cAAc,OAAd,C,CAEA;;AACA,cAAc,8BAAd;AACA,cAAc,yBAAd;AAEA,cAAc,oBAAd;AACA,cAAc,mBAAd,C,CAEA;;AACA,cAAc,WAAd,C,CAEA;;AACA,cAAc,sBAAd,C,CAEA;;AACA,cAAc,OAAd,C,CAEA;;AACA,cAAc,UAAd;AACA,cAAc,eAAd;AAEA,cAAc,oBAAd;AAEA,cAAc,QAAd;AACA,cAAc,WAAd;AACA,cAAc,UAAd;AACA,cAAc,cAAd;AACA,cAAc,QAAd,C,CAEA;;AACA,cAAc,QAAd,C,CAEA;;AACA,cAAc,UAAd,C,CAEA;;AACA,cAAc,MAAd;AAEA,cAAc,YAAd,C,CAEA;;AACA,cAAc,SAAd,C,CAEA;;AACA,cAAc,SAAd,C,CAEA;;AACA,cAAc,WAAd,C,CAEA;;AACA,cAAc,YAAd,C,CAEA;;AACA,cAAc,WAAd","sourcesContent":["import Cookie from 'js-cookie'\nexport { Cookie }\n\nexport * from './dto'\n\n// API\n// export * from './api/myCart'\nexport * from './api/productsApi'\nexport * from './api/pagesApi'\nexport * from './api/usersApi'\nexport * from './api/profileApi'\nexport * from './api/wishlistApi'\nexport * from './api/addressesApi'\nexport * from './api/consentsApi'\nexport * from './api/catalogApi'\nexport * from './api/categoriesApi'\nexport * from './api/brandsApi'\nexport * from './api/viewsApi'\nexport * from './api/notificationsApi'\nexport * from './api/companiesApi'\nexport * from './api/vouchersApi'\nexport * from './api/myCartApi'\nexport * from './api/myShippingsSpeedyApi'\nexport * from './api/myOrdersApi'\nexport * from './api/myShippingsEcontApi'\nexport * from './api/myShippingsEvropatApi'\nexport * from './api/citiesApi'\nexport * from './api/searchHistoryApi'\n\nexport * from './api/walletApi'\nexport * from './api/myShippingsPickupFromStoreAPI'\n\nexport * from './api/myPaymentsBoricaApi'\n// Components\n\n// Contexts\nexport * from './contexts/Strings'\nexport * from './contexts/CheckoutForm'\nexport * from './contexts/CheckoutForm/utils'\nexport * from './contexts/CheckoutForm/Components/BoricaRedirect'\nexport * from './contexts/CustomProductProvider'\n\n// Components\nexport * from './components'\n\n// Hooks\nexport * from './hooks/useCarousel'\nexport * from './hooks/useZoom'\nexport * from './hooks/useProduct'\nexport * from './hooks/useCatalogResult'\nexport * from './hooks/useCopyToClipboard'\nexport * from './hooks/useVouchers'\nexport * from './hooks/usePromoCode'\nexport * from './hooks/useCheckoutDelivery'\nexport * from './hooks/useCheckoutPayment'\nexport * from './hooks/useCheckoutShippingAddress'\nexport * from './hooks/useCheckoutBillingAddress'\nexport * from './hooks/useCheckoutSubmit'\nexport * from './hooks/useCheckoutDiscountCode'\nexport * from './hooks/wishlist-hooks/useWishlist'\nexport * from './hooks/useCheckoutSummary'\nexport * from './hooks/usePrice'\nexport * from './hooks/wishlist-hooks'\nexport * from './hooks/labels'\nexport * from './hooks/checkout-hooks'\n\nexport * from './hooks/basket-hooks/useBasketTotalCount'\nexport * from './hooks/useIsBasketWithFixedShippingPrice'\nexport * from './hooks/useProductCarousel'\nexport * from './hooks/useSearchbar'\nexport * from './hooks/useSEOAggregateResult'\nexport * from './hooks/useCatalogPredicates'\nexport * from './hooks/useAggregateResult'\nexport * from './hooks/useSelectedFilters'\nexport * from './hooks/useAllSelectedFilters'\nexport * from './hooks/useClearAllFilters'\nexport * from './hooks/useCheckoutPickupFromStore'\nexport * from './hooks/useCheckoutShippingModule'\nexport * from './hooks/useLoyaltyProgram'\nexport * from './hooks/useCategoryTree'\nexport * from './hooks/useWallet'\nexport * from './hooks/useSizesReducer'\nexport * from './hooks/useAvailability'\n\nexport * from './hooks/cities-hooks'\n\nexport * from './hooks/useLineItem'\nexport * from './hooks/usePrefetchProduct'\nexport * from './hooks/ui-hooks'\nexport * from './hooks/order-hooks'\nexport * from './hooks/basket-hooks'\nexport * from './hooks/useAddressList'\n// export * from './hooks/third-party'\n\nexport * from './hooks/useConfig'\nexport * from './hooks/useShippingAddress'\nexport * from './hooks/useBillingAddress'\nexport * from './hooks/useContactForm'\n\nexport * from './hooks/user-hooks'\nexport * from './hooks/error-handling'\n\nexport * from './hooks/profile-hooks'\nexport * from './hooks/addresses-hooks'\nexport * from './hooks/companies-hooks'\nexport * from './hooks/subscriptions-hooks'\nexport * from './hooks/useRouterRedirect'\nexport * from './hooks/useProgressBar'\nexport * from './hooks/useCatalogDiscounts'\nexport * from './hooks/useLocalRating'\n\n// Utils\nexport * from './utils'\nexport * from './types'\n\n// SEO\nexport * from './seo'\n\n// Analytics\nexport * from './analytics/initiateCheckout'\nexport * from './analytics/viewContent'\n\nexport * from './analytics/Releva'\nexport * from './analytics/Pixel'\n\n// WebView\nexport * from './webview'\n\n// Carousel\nexport * from 'embla-carousel/react'\n\n// CMS\nexport * from './cms'\n\n// API v2\nexport * from './config'\nexport * from './api.v2/core'\n\nexport * from './api.v2/core/misc'\n\nexport * from './ssr/'\nexport * from './listing'\nexport * from './brands'\nexport * from './navigation'\nexport * from './GDPR'\n\n// User\nexport * from './user'\n\n// Basket\nexport * from './basket'\n\n// UI Components and hooks\nexport * from './ui'\n\nexport * from './wishlist'\n\n// Build Scripts\nexport * from './build'\n\n// Order\nexport * from './order'\n\n// Product\nexport * from './product'\n\n// Checkout\nexport * from './checkout'\n\n// PostCSS and related configuration\nexport * from './postcss'\n"],"file":"index.js"}
|
@@ -38,10 +38,16 @@ export var buildCategoryQuery = (_ref) => {
|
|
38
38
|
break;
|
39
39
|
|
40
40
|
case ListingTypesEnum.Category:
|
41
|
-
if (router.query.cat)
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
if (router.query.cat) {
|
42
|
+
filter += extendFilter({
|
43
|
+
slug,
|
44
|
+
filterExtension: listingConfig == null ? void 0 : listingConfig.filterExtension
|
45
|
+
});
|
46
|
+
} else {
|
47
|
+
var _listingConfig$filter;
|
48
|
+
|
49
|
+
filter += (_listingConfig$filter = listingConfig == null ? void 0 : listingConfig.filterExtension) != null ? _listingConfig$filter : '';
|
50
|
+
}
|
45
51
|
|
46
52
|
if (postFilter) {
|
47
53
|
if (router.query.cat) filter += '&';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/listing/utils/buildCategoryQuery.ts"],"names":["ListingTypesEnum","extendFilter","buildCategoryQuery","aggregates","predicate","postFilter","pageType","config","router","slug","type","aggregationType","term","aggregationDefinition","aggValue","getAggValue","id","_id","listingConfig","listing","getFilters","filter","Brand","applyBrandsPostFilter","query","cat","filterExtension","Category","AttrPage","Search","searchQuery","q","search","Collection","collapseMode","filtersArr","split","filters","reduce","res","val","i","includes"],"mappings":";AACA,SAASA,gBAAT,QAA2D,UAA3D;AACA,SAASC,YAAT,QAA6B,gBAA7B;AAEA,OAAO,IAAMC,kBAAkB,GAAG,UAgB5B;AAAA;;AAAA,MAhB6B;AACjCC,IAAAA,UADiC;AAEjCC,IAAAA,SAFiC;AAGjCC,IAAAA,UAHiC;AAIjCC,IAAAA,QAJiC;AAKjCC,IAAAA,MALiC;AAMjCC,IAAAA,MANiC;AAOjCC,IAAAA;AAPiC,GAgB7B;AACJ,MAAMC,IAAI,GAAGP,UAAH,oCAAGA,UAAU,CAAG,CAAH,CAAb,qBAAG,aAAiBQ,eAA9B;AACA,MAAMC,IAAI,GAAGT,UAAH,qCAAGA,UAAU,CAAG,CAAH,CAAb,qBAAG,cAAiBU,qBAA9B;AAEA,MAAMC,QAAQ,GAAGC,WAAW,CAAC;AAAEC,IAAAA,EAAE,EAAEZ,SAAF,oBAAEA,SAAS,CAAEa,GAAjB;AAAsBL,IAAAA;AAAtB,GAAD,CAA5B;AAEA,MAAMM,aAAa,GAAGX,MAAH,oBAAGA,MAAM,CAAEY,OAA9B;;AAEA,MAAMC,UAAU,GAAG,MAAM;AAAA;;AACvB,QAAIC,MAAM,GAAG,EAAb;;AACA,YAAQf,QAAR;AACE,WAAKN,gBAAgB,CAACsB,KAAtB;AACED,QAAAA,MAAM,qBAAiBjB,SAAjB,oBAAiBA,SAAS,CAAEa,GAA5B,WAAmCM,qBAAqB,CAAC;AAC7DlB,UAAAA;AAD6D,SAAD,CAA9D;AAIA,YAAIG,MAAM,CAACgB,KAAP,CAAaC,GAAjB,EACEJ,MAAM,IAAIpB,YAAY,CAAC;AACrBQ,UAAAA,IADqB;AAErBiB,UAAAA,eAAe,EAAER,aAAF,oBAAEA,aAAa,CAAEQ;AAFX,SAAD,CAAtB;AAIF;;AAEF,WAAK1B,gBAAgB,CAAC2B,QAAtB;AACE,YAAInB,MAAM,CAACgB,KAAP,CAAaC,GAAjB,
|
1
|
+
{"version":3,"sources":["../../../../src/listing/utils/buildCategoryQuery.ts"],"names":["ListingTypesEnum","extendFilter","buildCategoryQuery","aggregates","predicate","postFilter","pageType","config","router","slug","type","aggregationType","term","aggregationDefinition","aggValue","getAggValue","id","_id","listingConfig","listing","getFilters","filter","Brand","applyBrandsPostFilter","query","cat","filterExtension","Category","AttrPage","Search","searchQuery","q","search","Collection","collapseMode","filtersArr","split","filters","reduce","res","val","i","includes"],"mappings":";AACA,SAASA,gBAAT,QAA2D,UAA3D;AACA,SAASC,YAAT,QAA6B,gBAA7B;AAEA,OAAO,IAAMC,kBAAkB,GAAG,UAgB5B;AAAA;;AAAA,MAhB6B;AACjCC,IAAAA,UADiC;AAEjCC,IAAAA,SAFiC;AAGjCC,IAAAA,UAHiC;AAIjCC,IAAAA,QAJiC;AAKjCC,IAAAA,MALiC;AAMjCC,IAAAA,MANiC;AAOjCC,IAAAA;AAPiC,GAgB7B;AACJ,MAAMC,IAAI,GAAGP,UAAH,oCAAGA,UAAU,CAAG,CAAH,CAAb,qBAAG,aAAiBQ,eAA9B;A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,UAAJ,EAAgB;AACd,QAAM8B,UAAU,GAAG9B,UAAU,CAAC+B,KAAX,CAAiB,GAAjB,CAAnB;AAEA,QAAMC,OAAO,GAAGF,UAAU,CAACG,MAAX,CAAkB,CAACC,GAAD,EAAMC,GAAN,EAAWC,CAAX,KAAiB;AACjD,UAAID,GAAG,CAACE,QAAJ,CAAa,UAAb,CAAJ,EAA8B,OAAOH,GAAP;AAE9B,aAAQA,GAAG,UAAQC,GAAnB;AACD,KAJe,EAIb,EAJa,CAAhB;AAMA,gBAAUH,OAAV;AACD;;AAED,SAAO,EAAP;AACD,CAdD","sourcesContent":["import { NextRouter } from 'next/router'\nimport { ListingTypesEnum, Aggregate, PredicateType } from '../index'\nimport { extendFilter } from './extendFilter'\n\nexport const buildCategoryQuery = ({\n aggregates,\n predicate,\n postFilter,\n pageType,\n config,\n router,\n slug,\n}: {\n pageType: ListingTypesEnum\n aggregates: Aggregate[]\n router: NextRouter\n postFilter?: string\n predicate?: PredicateType\n slug: string\n config?: any\n}) => {\n const type = aggregates?.[0]?.aggregationType\n const term = aggregates?.[0]?.aggregationDefinition\n\n const aggValue = getAggValue({ id: predicate?._id, term })\n\n const listingConfig = config?.listing\n\n const getFilters = () => {\n let filter = ''\n switch (pageType) {\n case ListingTypesEnum.Brand:\n filter += `brand;eq;\"${predicate?._id}\"${applyBrandsPostFilter({\n postFilter,\n })}`\n\n if (router.query.cat)\n filter += extendFilter({\n slug,\n filterExtension: listingConfig?.filterExtension,\n })\n break\n\n case ListingTypesEnum.Category:\n if (router.query.cat) {\n filter += extendFilter({\n slug,\n filterExtension: listingConfig?.filterExtension,\n })\n } else {\n filter += listingConfig?.filterExtension ?? ''\n }\n\n if (postFilter) {\n if (router.query.cat) filter += '&'\n filter += postFilter\n }\n\n break\n\n case ListingTypesEnum.AttrPage:\n filter += extendFilter({\n slug,\n filterExtension: listingConfig?.filterExtension,\n })\n\n if (postFilter) filter += `&${postFilter}`\n\n break\n\n case ListingTypesEnum.Search:\n const searchQuery = router.query.q ?? router.query.search\n filter += `text;eq;\"${searchQuery}\"`\n if (postFilter) filter += `&${postFilter}`\n\n break\n\n default:\n return `${listingConfig?.filterExtension + `${postFilter ?? ''}`}`\n }\n\n return filter\n }\n let query = {\n [type]: aggValue,\n filter: getFilters(),\n }\n\n if (pageType === ListingTypesEnum.Collection) {\n const collapseMode = listingConfig?.collapseMode\n query = { ...query, collapseMode }\n }\n\n return query\n}\n\nconst getAggValue = ({ id, term }: { id?: string; term: string }) => {\n return id && term !== 'categories' ? `${term}:${id}` : term\n}\n\nconst applyBrandsPostFilter = ({ postFilter }: { postFilter?: string }) => {\n if (postFilter) {\n const filtersArr = postFilter.split('&')\n\n const filters = filtersArr.reduce((res, val, i) => {\n if (val.includes('category')) return res\n\n return (res += `&${val}`)\n }, '')\n\n return `${filters}`\n }\n\n return ''\n}\n"],"file":"buildCategoryQuery.js"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../src/order/api/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAd","sourcesContent":["export * from './useUpdateCustomLineItemMutation'\n"],"file":"index.js"}
|
1
|
+
{"version":3,"sources":["../../../../../src/order/api/mutations/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAd;AACA,cAAc,qCAAd","sourcesContent":["export * from './useUpdateCustomLineItemMutation'\nexport * from './useUpdateOrderCustomFieldMutation'\n"],"file":"index.js"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../src/order/api/mutations/useUpdateCustomLineItemMutation.tsx"],"names":["MyOrdersUpdateCustomLineItem","useMutation","useUpdateCustomLineItemMutation","onSuccess","onError","values","id","customLineItemId","dto"],"mappings":"AAAA,SACEA,4BADF,QAGO,sBAHP;AAIA,SAASC,WAAT,QAA4B,aAA5B;
|
1
|
+
{"version":3,"sources":["../../../../../src/order/api/mutations/useUpdateCustomLineItemMutation.tsx"],"names":["MyOrdersUpdateCustomLineItem","useMutation","useUpdateCustomLineItemMutation","onSuccess","onError","values","id","customLineItemId","dto"],"mappings":"AAAA,SACEA,4BADF,QAGO,sBAHP;AAIA,SAASC,WAAT,QAA4B,aAA5B;AASA,OAAO,IAAMC,+BAA+B,GAAG,UAG1B;AAAA,MAH2B;AAC9CC,IAAAA,SAD8C;AAE9CC,IAAAA;AAF8C,GAG3B;AACnB,SAAOH,WAAW,CACfI,MAAD,IACEL,4BAA4B,CAC1BK,MAAM,CAACC,EADmB,EAE1BD,MAAM,CAACE,gBAFmB,EAG1BF,MAAM,CAACG,GAHmB,CAFd,EAOhB;AACEL,IAAAA,SADF;AAEEC,IAAAA;AAFF,GAPgB,CAAlB;AAYD,CAhBM","sourcesContent":["import {\n MyOrdersUpdateCustomLineItem,\n CustomLineItemDraftDTO,\n} from '@sentecacommerce/sdk'\nimport { useMutation } from 'react-query'\nimport { CallbackProps } from '../index'\n\nexport interface UpdateCustomLineItemProps {\n id: string\n customLineItemId: string\n dto: CustomLineItemDraftDTO\n}\n\nexport const useUpdateCustomLineItemMutation = ({\n onSuccess,\n onError,\n}: CallbackProps) => {\n return useMutation(\n (values: UpdateCustomLineItemProps) =>\n MyOrdersUpdateCustomLineItem(\n values.id,\n values.customLineItemId,\n values.dto\n ),\n {\n onSuccess,\n onError,\n }\n )\n}\n"],"file":"useUpdateCustomLineItemMutation.js"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { MyCartSetCartCustomField } from '@sentecacommerce/sdk';
|
2
|
+
import { useMutation } from 'react-query';
|
3
|
+
export var useUpdateOrderCustomFieldMutation = callback => {
|
4
|
+
return useMutation(values => MyCartSetCartCustomField(values.customFields), {
|
5
|
+
onSuccess: callback == null ? void 0 : callback.onSuccess,
|
6
|
+
onError: callback == null ? void 0 : callback.onError
|
7
|
+
});
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=useUpdateOrderCustomFieldMutation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../../src/order/api/mutations/useUpdateOrderCustomFieldMutation.tsx"],"names":["MyCartSetCartCustomField","useMutation","useUpdateOrderCustomFieldMutation","callback","values","customFields","onSuccess","onError"],"mappings":"AAAA,SACEA,wBADF,QAGO,sBAHP;AAIA,SAASC,WAAT,QAA4B,aAA5B;AAWA,OAAO,IAAMC,iCAAiC,GAAIC,QAAD,IAA8B;AAC7E,SAAOF,WAAW,CACfG,MAAD,IACEJ,wBAAwB,CAACI,MAAM,CAACC,YAAR,CAFV,EAGhB;AACEC,IAAAA,SAAS,EAAEH,QAAF,oBAAEA,QAAQ,CAAEG,SADvB;AAEEC,IAAAA,OAAO,EAAEJ,QAAF,oBAAEA,QAAQ,CAAEI;AAFrB,GAHgB,CAAlB;AAQD,CATM","sourcesContent":["import {\n MyCartSetCartCustomField,\n SetCustomFieldDTO,\n} from '@sentecacommerce/sdk'\nimport { useMutation } from 'react-query'\n\nexport interface CallbackProps {\n onSuccess?: () => void\n onError?: () => void\n}\n\nexport interface SetCustomFieldProps {\n customFields: SetCustomFieldDTO[]\n}\n\nexport const useUpdateOrderCustomFieldMutation = (callback?: CallbackProps) => {\n return useMutation(\n (values: SetCustomFieldProps) =>\n MyCartSetCartCustomField(values.customFields),\n {\n onSuccess: callback?.onSuccess,\n onError: callback?.onError,\n }\n )\n}\n"],"file":"useUpdateOrderCustomFieldMutation.js"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/order/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAAd","sourcesContent":["export * from './useUpdateCustomLineItem'\n"],"file":"index.js"}
|
1
|
+
{"version":3,"sources":["../../../../src/order/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAAd;AACA,cAAc,6BAAd","sourcesContent":["export * from './useUpdateCustomLineItem'\nexport * from './useUpdateOrderCustomField'\n"],"file":"index.js"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/order/hooks/useUpdateCustomLineItem.tsx"],"names":["useUpdateCustomLineItemMutation","useUpdateCustomLineItem","props"],"mappings":"AAAA,
|
1
|
+
{"version":3,"sources":["../../../../src/order/hooks/useUpdateCustomLineItem.tsx"],"names":["useUpdateCustomLineItemMutation","useUpdateCustomLineItem","props"],"mappings":"AAAA,SAASA,+BAAT,QAA+D,QAA/D;AAEA,OAAO,IAAMC,uBAAuB,GAAIC,KAAD,IAA0B;AAC/D,SAAOF,+BAA+B,CAACE,KAAD,CAAtC;AACD,CAFM","sourcesContent":["import { useUpdateCustomLineItemMutation, CallbackProps } from '../api'\n\nexport const useUpdateCustomLineItem = (props: CallbackProps) => {\n return useUpdateCustomLineItemMutation(props)\n}\n"],"file":"useUpdateCustomLineItem.js"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/order/hooks/useUpdateOrderCustomField.tsx"],"names":["useUpdateOrderCustomFieldMutation","useUpdateOrderCustomField","props"],"mappings":"AAAA,SAASA,iCAAT,QAAiE,QAAjE;AAEA,OAAO,IAAMC,yBAAyB,GAAIC,KAAD,IAA0B;AACjE,SAAOF,iCAAiC,CAACE,KAAD,CAAxC;AACD,CAFM","sourcesContent":["import { useUpdateOrderCustomFieldMutation, CallbackProps } from '../api'\n\nexport const useUpdateOrderCustomField = (props: CallbackProps) => {\n return useUpdateOrderCustomFieldMutation(props)\n}\n"],"file":"useUpdateOrderCustomField.js"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../src/user/api/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAAd","sourcesContent":["export * from './useIsAuthenticatedQuery'\n"],"file":"index.js"}
|
1
|
+
{"version":3,"sources":["../../../../../src/user/api/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAAd;AACA,cAAc,4BAAd","sourcesContent":["export * from './useIsAuthenticatedQuery'\nexport * from './useGetMyLoyaltyCardQuery'\n"],"file":"index.js"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { MyWalletGetByType } from '@sentecacommerce/sdk';
|
2
|
+
import { useQuery } from 'react-query';
|
3
|
+
export var useGetMyLoyaltyCardQuery = callback => {
|
4
|
+
return useQuery('get-loyalty-card-key', () => {
|
5
|
+
return MyWalletGetByType('loyalty-program');
|
6
|
+
}, {
|
7
|
+
onSuccess: () => callback == null ? void 0 : callback.onSuccess == null ? void 0 : callback.onSuccess(),
|
8
|
+
onError: err => callback == null ? void 0 : callback.onError == null ? void 0 : callback.onError(err)
|
9
|
+
});
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=useGetMyLoyaltyCardQuery.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../../src/user/api/queries/useGetMyLoyaltyCardQuery.ts"],"names":["MyWalletGetByType","useQuery","useGetMyLoyaltyCardQuery","callback","onSuccess","onError","err"],"mappings":"AAAA,SAASA,iBAAT,QAAkC,sBAAlC;AACA,SAASC,QAAT,QAAyB,aAAzB;AAMA,OAAO,IAAMC,wBAAwB,GAAIC,QAAD,IAA6B;AACnE,SAAOF,QAAQ,CACb,sBADa,EAEb,MAAM;AACJ,WAAOD,iBAAiB,CAAC,iBAAD,CAAxB;AACD,GAJY,EAKb;AACEI,IAAAA,SAAS,EAAE,MAAMD,QAAN,oBAAMA,QAAQ,CAAEC,SAAhB,oBAAMD,QAAQ,CAAEC,SAAV,EADnB;AAEEC,IAAAA,OAAO,EAAGC,GAAD,IAASH,QAAT,oBAASA,QAAQ,CAAEE,OAAnB,oBAASF,QAAQ,CAAEE,OAAV,CAAoBC,GAApB;AAFpB,GALa,CAAf;AAUD,CAXM","sourcesContent":["import { MyWalletGetByType } from '@sentecacommerce/sdk'\nimport { useQuery } from 'react-query'\n\nexport type CallbackType = {\n onSuccess?: () => void\n onError?: (err: unknown) => void\n}\nexport const useGetMyLoyaltyCardQuery = (callback?: CallbackType) => {\n return useQuery(\n 'get-loyalty-card-key',\n () => {\n return MyWalletGetByType('loyalty-program')\n },\n {\n onSuccess: () => callback?.onSuccess?.(),\n onError: (err) => callback?.onError?.(err),\n }\n )\n}\n"],"file":"useGetMyLoyaltyCardQuery.js"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import Cookie from 'js-cookie';
|
2
|
+
import { AUTH_TOKEN_KEY, ANONYMOUS_TOKEN_KEY } from '../../../index';
|
3
|
+
export var getUserToken = () => {
|
4
|
+
var _Cookie$get;
|
5
|
+
|
6
|
+
return (_Cookie$get = Cookie.get(AUTH_TOKEN_KEY)) != null ? _Cookie$get : Cookie.get(ANONYMOUS_TOKEN_KEY);
|
7
|
+
};
|
8
|
+
//# sourceMappingURL=getUserToken.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../../src/user/api/utils/getUserToken.ts"],"names":["Cookie","AUTH_TOKEN_KEY","ANONYMOUS_TOKEN_KEY","getUserToken","get"],"mappings":"AAAA,OAAOA,MAAP,MAAmB,WAAnB;AACA,SAASC,cAAT,EAAyBC,mBAAzB,QAAoD,gBAApD;AAEA,OAAO,IAAMC,YAAY,GAAG;AAAA;;AAAA,wBAC1BH,MAAM,CAACI,GAAP,CAAWH,cAAX,CAD0B,0BACID,MAAM,CAACI,GAAP,CAAWF,mBAAX,CADJ;AAAA,CAArB","sourcesContent":["import Cookie from 'js-cookie'\nimport { AUTH_TOKEN_KEY, ANONYMOUS_TOKEN_KEY } from '../../../index'\n\nexport const getUserToken = () =>\n Cookie.get(AUTH_TOKEN_KEY) ?? Cookie.get(ANONYMOUS_TOKEN_KEY)\n"],"file":"getUserToken.js"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../../src/user/api/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAd;AACA,cAAc,uBAAd;AACA,cAAc,qBAAd;AACA,cAAc,0BAAd","sourcesContent":["export * from './processLogin'\nexport * from './processLoginPayload'\nexport * from './invalidateQueries'\nexport * from './generateAnonymousToken'\n"],"file":"index.js"}
|
1
|
+
{"version":3,"sources":["../../../../../src/user/api/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAd;AACA,cAAc,uBAAd;AACA,cAAc,qBAAd;AACA,cAAc,0BAAd;AACA,cAAc,gBAAd","sourcesContent":["export * from './processLogin'\nexport * from './processLoginPayload'\nexport * from './invalidateQueries'\nexport * from './generateAnonymousToken'\nexport * from './getUserToken'\n"],"file":"index.js"}
|
@@ -13,4 +13,6 @@ export * from './useResetPassword';
|
|
13
13
|
export * from './useVerifyChangeEmail';
|
14
14
|
export * from './useChangeEmail';
|
15
15
|
export * from './useRequestEmailConfirmation';
|
16
|
+
export * from './useGetUserToken';
|
17
|
+
export * from './useGetMyLoyaltyCard';
|
16
18
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/user/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAd;AACA,cAAc,kBAAd;AACA,cAAc,mBAAd;AACA,cAAc,sBAAd;AACA,cAAc,YAAd;AACA,cAAc,iBAAd;AACA,cAAc,oBAAd;AACA,cAAc,kBAAd;AACA,cAAc,aAAd;AACA,cAAc,eAAd;AACA,cAAc,gCAAd;AACA,cAAc,oBAAd;AACA,cAAc,wBAAd;AACA,cAAc,kBAAd;AACA,cAAc,+BAAd","sourcesContent":["export * from './useAuthGuard'\nexport * from './useRequestAnon'\nexport * from './useConfirmEmail'\nexport * from './useIsAuthenticated'\nexport * from './useLogin'\nexport * from './useLoginApple'\nexport * from './useLoginFacebook'\nexport * from './useLoginGoogle'\nexport * from './useLogout'\nexport * from './useRegister'\nexport * from './useRequestResetPasswordToken'\nexport * from './useResetPassword'\nexport * from './useVerifyChangeEmail'\nexport * from './useChangeEmail'\nexport * from './useRequestEmailConfirmation'\n"],"file":"index.js"}
|
1
|
+
{"version":3,"sources":["../../../../src/user/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAd;AACA,cAAc,kBAAd;AACA,cAAc,mBAAd;AACA,cAAc,sBAAd;AACA,cAAc,YAAd;AACA,cAAc,iBAAd;AACA,cAAc,oBAAd;AACA,cAAc,kBAAd;AACA,cAAc,aAAd;AACA,cAAc,eAAd;AACA,cAAc,gCAAd;AACA,cAAc,oBAAd;AACA,cAAc,wBAAd;AACA,cAAc,kBAAd;AACA,cAAc,+BAAd;AACA,cAAc,mBAAd;AACA,cAAc,uBAAd","sourcesContent":["export * from './useAuthGuard'\nexport * from './useRequestAnon'\nexport * from './useConfirmEmail'\nexport * from './useIsAuthenticated'\nexport * from './useLogin'\nexport * from './useLoginApple'\nexport * from './useLoginFacebook'\nexport * from './useLoginGoogle'\nexport * from './useLogout'\nexport * from './useRegister'\nexport * from './useRequestResetPasswordToken'\nexport * from './useResetPassword'\nexport * from './useVerifyChangeEmail'\nexport * from './useChangeEmail'\nexport * from './useRequestEmailConfirmation'\nexport * from './useGetUserToken'\nexport * from './useGetMyLoyaltyCard'\n"],"file":"index.js"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/user/hooks/useGetMyLoyaltyCard.ts"],"names":["useGetMyLoyaltyCardQuery","useGetMyLoyaltyCard","callback"],"mappings":"AAAA,SAASA,wBAAT,QAAuD,QAAvD;AAEA,OAAO,IAAMC,mBAAmB,GAAIC,QAAD,IAA6B;AAC9D,SAAOF,wBAAwB,CAACE,QAAD,CAA/B;AACD,CAFM","sourcesContent":["import { useGetMyLoyaltyCardQuery, CallbackType } from '../api'\n\nexport const useGetMyLoyaltyCard = (callback?: CallbackType) => {\n return useGetMyLoyaltyCardQuery(callback)\n}\n"],"file":"useGetMyLoyaltyCard.js"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../../src/user/hooks/useGetUserToken.ts"],"names":["getUserToken","useGetUserToken"],"mappings":"AACA,SAASA,YAAT,QAA6B,QAA7B;AAEA,OAAO,IAAMC,eAAe,GAAG,MAAMD,YAAY,EAA1C","sourcesContent":["import React from 'react'\nimport { getUserToken } from '../api'\n\nexport const useGetUserToken = () => getUserToken()\n"],"file":"useGetUserToken.js"}
|
@@ -8,6 +8,7 @@ export declare const myCartCacheKeys: {
|
|
8
8
|
useGetAllShippingMethods: string;
|
9
9
|
useGetPaymentMethods: string;
|
10
10
|
useIsExisting: string;
|
11
|
+
useGetCrossSaleItems: string;
|
11
12
|
};
|
12
13
|
declare type myCartApiType = {
|
13
14
|
readonly useGetWithCookies: (queryCache: QueryCache, cookies: any) => Promise<OrderDTO>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './mutations';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './useReplaceBasketMutation';
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export declare const useBasketCrossSaleItems: () => {
|
2
|
+
name: string;
|
3
|
+
description: string;
|
4
|
+
slug: string;
|
5
|
+
attributeRules: import("@sentecacommerce/sdk").AttributeRuleDTO[] | undefined;
|
6
|
+
attributes: import("@sentecacommerce/sdk").ProductAttributeDTO[] | undefined;
|
7
|
+
_id: string | undefined;
|
8
|
+
variants: import("@sentecacommerce/sdk").ProductVariantDTO[] | undefined;
|
9
|
+
}[] | undefined;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './hooks';
|
@@ -11,6 +11,7 @@ export declare const createProductContent: (data: any) => {
|
|
11
11
|
name: string;
|
12
12
|
content: string;
|
13
13
|
};
|
14
|
+
export declare const createCollapseKeyImagesMap: (product?: ProductDTO | undefined) => {} | undefined;
|
14
15
|
export declare const createAttributeRulesMap: (product?: ProductDTO | undefined) => any;
|
15
16
|
export declare const createMappedOptions: (options?: OptionDefinitionDTO[] | undefined) => OptionsType[];
|
16
17
|
export declare type SelectedOptionType = {
|
package/dist/types/index.d.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import Cookie from 'js-cookie';
|
2
|
+
export { Cookie };
|
1
3
|
export * from './dto';
|
2
4
|
export * from './api/productsApi';
|
3
5
|
export * from './api/pagesApi';
|
@@ -105,6 +107,7 @@ export * from './brands';
|
|
105
107
|
export * from './navigation';
|
106
108
|
export * from './GDPR';
|
107
109
|
export * from './user';
|
110
|
+
export * from './basket';
|
108
111
|
export * from './ui';
|
109
112
|
export * from './wishlist';
|
110
113
|
export * from './build';
|
@@ -1,11 +1,8 @@
|
|
1
1
|
import { CustomLineItemDraftDTO } from '@sentecacommerce/sdk';
|
2
|
-
|
3
|
-
onSuccess?: () => void;
|
4
|
-
onError?: () => void;
|
5
|
-
}
|
2
|
+
import { CallbackProps } from '../index';
|
6
3
|
export interface UpdateCustomLineItemProps {
|
7
4
|
id: string;
|
8
5
|
customLineItemId: string;
|
9
6
|
dto: CustomLineItemDraftDTO;
|
10
7
|
}
|
11
|
-
export declare const useUpdateCustomLineItemMutation: ({ onSuccess, onError, }:
|
8
|
+
export declare const useUpdateCustomLineItemMutation: ({ onSuccess, onError, }: CallbackProps) => import("react-query").MutationResultPair<import("@sentecacommerce/sdk").OrderDTO, unknown, UpdateCustomLineItemProps, unknown>;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { SetCustomFieldDTO } from '@sentecacommerce/sdk';
|
2
|
+
export interface CallbackProps {
|
3
|
+
onSuccess?: () => void;
|
4
|
+
onError?: () => void;
|
5
|
+
}
|
6
|
+
export interface SetCustomFieldProps {
|
7
|
+
customFields: SetCustomFieldDTO[];
|
8
|
+
}
|
9
|
+
export declare const useUpdateOrderCustomFieldMutation: (callback?: CallbackProps | undefined) => import("react-query").MutationResultPair<import("@sentecacommerce/sdk").OrderDTO, unknown, SetCustomFieldProps, unknown>;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export declare const useUpdateCustomLineItem: (props:
|
1
|
+
import { CallbackProps } from '../api';
|
2
|
+
export declare const useUpdateCustomLineItem: (props: CallbackProps) => import("react-query").MutationResultPair<import("@sentecacommerce/sdk").OrderDTO, unknown, import("../api").UpdateCustomLineItemProps, unknown>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export declare type CallbackType = {
|
2
|
+
onSuccess?: () => void;
|
3
|
+
onError?: (err: unknown) => void;
|
4
|
+
};
|
5
|
+
export declare const useGetMyLoyaltyCardQuery: (callback?: CallbackType | undefined) => import("react-query").QueryResult<import("@sentecacommerce/sdk").WalletDTO, unknown>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const getUserToken: () => string | undefined;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useGetUserToken: () => string | undefined;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sentecacommerce-theme/lib",
|
3
3
|
"sideEffects": false,
|
4
|
-
"version": "0.12.
|
4
|
+
"version": "0.12.63",
|
5
5
|
"main": "dist/cjs/index.js",
|
6
6
|
"module": "dist/esm/index.js",
|
7
7
|
"types": "dist/types/index.d.ts",
|
@@ -28,9 +28,9 @@
|
|
28
28
|
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
|
29
29
|
"dev": "yarn build:esm --watch"
|
30
30
|
},
|
31
|
-
"gitHead": "
|
31
|
+
"gitHead": "23b0e6c849dede416af70244dcb41af8310e90f6",
|
32
32
|
"dependencies": {
|
33
|
-
"@sentecacommerce-theme/base": "^0.12.
|
33
|
+
"@sentecacommerce-theme/base": "^0.12.63",
|
34
34
|
"@sentecacommerce/sdk": "2.0.133",
|
35
35
|
"body-scroll-lock": "^3.1.5",
|
36
36
|
"copy-to-clipboard": "^3.3.1",
|