@jetshop/core 5.11.1 → 5.11.2
Sign up to get free protection for your applications and to get access to all the features.
- package/analytics/integrations/ga4.js +1 -1
- package/analytics/integrations/ga4.js.map +1 -1
- package/analytics/integrations/gtag/gtag.d.ts +0 -1
- package/analytics/integrations/gtag/gtag.js +39 -28
- package/analytics/integrations/gtag/gtag.js.map +1 -1
- package/analytics/integrations/gtm/index.d.ts +0 -1
- package/analytics/integrations/gtm/index.js +37 -24
- package/analytics/integrations/gtm/index.js.map +1 -1
- package/analytics/integrations/unslugify.d.ts +1 -0
- package/analytics/integrations/unslugify.js +16 -0
- package/analytics/integrations/unslugify.js.map +1 -0
- package/analytics/trackerRegistry.d.ts +2 -0
- package/analytics/trackerRegistry.js.map +1 -1
- package/analytics/utils/breadcrumbsWithoutProduct.d.ts +1 -0
- package/analytics/utils/breadcrumbsWithoutProduct.js +9 -0
- package/analytics/utils/breadcrumbsWithoutProduct.js.map +1 -0
- package/cart/AddToCartFormik.d.ts +2 -2
- package/cart/AddToCartFormik.js +11 -11
- package/cart/AddToCartFormik.js.map +1 -1
- package/components/ChannelContext/ChannelProvider.test.js +3 -1
- package/components/DynamicRoute/ProductRoute.js +12 -4
- package/components/DynamicRoute/ProductRoute.js.map +1 -1
- package/components/Head.js +4 -4
- package/components/Head.js.map +1 -1
- package/components/Mutation/AddToCart/addToCartUtils.d.ts +1 -1
- package/components/Mutation/AddToCart/addToCartUtils.js +7 -1
- package/components/Mutation/AddToCart/addToCartUtils.js.map +1 -1
- package/components/Mutation/RemoveFromCart.js +10 -1
- package/components/Mutation/RemoveFromCart.js.map +1 -1
- package/components/Mutation/useDecrementQuantity.js +8 -3
- package/components/Mutation/useDecrementQuantity.js.map +1 -1
- package/components/Mutation/useIncrementQuantity.js +8 -3
- package/components/Mutation/useIncrementQuantity.js.map +1 -1
- package/components/Mutation/useRemoveFromCart.js +10 -1
- package/components/Mutation/useRemoveFromCart.js.map +1 -1
- package/components/StructuredData/StructuredBreadcrumbData.d.ts +8 -3
- package/components/StructuredData/StructuredBreadcrumbData.js +42 -24
- package/components/StructuredData/StructuredBreadcrumbData.js.map +1 -1
- package/components/StructuredData/StructuredProductData.js +2 -2
- package/components/StructuredData/StructuredProductData.js.map +1 -1
- package/data/fragments/RouteMetaFragment.gql +18 -0
- package/helpers/isRelativeUrl.d.ts +1 -0
- package/helpers/isRelativeUrl.js +5 -0
- package/helpers/isRelativeUrl.js.map +1 -0
- package/hooks/PackageProducts/usePackageProductItem.d.ts +2 -2
- package/hooks/useAddMultipleToCart.js +11 -5
- package/hooks/useAddMultipleToCart.js.map +1 -1
- package/hooks/useProductVariants/useProductVariants.d.ts +1 -2
- package/hooks/useProductVariants/useProductVariants.js +1 -1
- package/hooks/useProductVariants/useProductVariants.js.map +1 -1
- package/package.json +1 -1
- package/server/tracking/types.d.ts +1 -1
package/components/Head.js
CHANGED
@@ -28,7 +28,7 @@ const Head = ({ data, route }) => {
|
|
28
28
|
var _a;
|
29
29
|
const { search } = useLocation();
|
30
30
|
const queryStringObject = qs.parse(search, { ignoreQueryPrefix: true });
|
31
|
-
Object.keys(queryStringObject).forEach(key => {
|
31
|
+
Object.keys(queryStringObject).forEach((key) => {
|
32
32
|
!queryParamsWhitelist.includes(key) && delete queryStringObject[key];
|
33
33
|
});
|
34
34
|
const whiteListedSearch = qs.stringify(queryStringObject, {
|
@@ -39,7 +39,7 @@ const Head = ({ data, route }) => {
|
|
39
39
|
const metaTags = ((_a = data === null || data === void 0 ? void 0 : data.head) === null || _a === void 0 ? void 0 : _a.metaTags) || [];
|
40
40
|
const href = (route === null || route === void 0 ? void 0 : route.canonicalPath) &&
|
41
41
|
`${selectedChannel.url}${route.canonicalPath}${whiteListedSearch}`;
|
42
|
-
useWarningInDev(route && !route.alternateRoutes, `You must include the
|
42
|
+
useWarningInDev(route && !route.alternateRoutes, `You must include the RouteMetaFragment in your RouteQuery.gql
|
43
43
|
Please see https://gitlab.jetshop.se/jetshop/flight/blob/master/packages/template-trend/src/components/RouteQuery.gql for an example
|
44
44
|
`);
|
45
45
|
const { openGraph } = useShopConfig();
|
@@ -58,10 +58,10 @@ const Head = ({ data, route }) => {
|
|
58
58
|
React.createElement(Helmet, null,
|
59
59
|
React.createElement("html", { lang: lang }),
|
60
60
|
(data === null || data === void 0 ? void 0 : data.head) && React.createElement("title", null, data.head.title),
|
61
|
-
metaTags.map(tag => (React.createElement("meta", { name: tag.name, content: tag.content, key: tag.name }))),
|
61
|
+
metaTags.map((tag) => (React.createElement("meta", { name: tag.name, content: tag.content, key: tag.name }))),
|
62
62
|
route &&
|
63
63
|
route.alternateRoutes &&
|
64
|
-
route.alternateRoutes.map(alternateRoute => renderAlternateRoutes(alternateRoute, channelsById)),
|
64
|
+
route.alternateRoutes.map((alternateRoute) => renderAlternateRoutes(alternateRoute, channelsById)),
|
65
65
|
href && React.createElement("link", { rel: "canonical", href: href })),
|
66
66
|
!disableOpenGraphGeneralData && (React.createElement(OpenGraphGeneralPageData, { route: route, data: data })),
|
67
67
|
(route === null || route === void 0 ? void 0 : route.canonicalPath) === '/' && React.createElement(SiteLinksSearchStructuredData, null)));
|
package/components/Head.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Head.js","sourceRoot":"","sources":["Head.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAWlE,OAAO,KAAK,EAAE,EAAM,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAA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C,WAAW,EAAC,IAAI,EAAE,IAAI,GAAI,CACtC;QACR,CAAC,2BAA2B,IAAI,CAC/B,oBAAC,wBAAwB,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,CACvD;QACA,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,aAAa,MAAK,GAAG,IAAI,oBAAC,6BAA6B,OAAG,CACjE,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Product, ProductVariant } from '../../../types';
|
2
2
|
import { AddToCartFormikValues, AddToCartFormProps, AddToCartCallbackOptions } from '../AddToCartFormik';
|
3
3
|
export declare function getArticleNumber(product: Product, selectedVariation: ProductVariant): string;
|
4
|
-
export declare function useTrackProductAdd(selectedVariation: ProductVariant): (product:
|
4
|
+
export declare function useTrackProductAdd(selectedVariation: ProductVariant): (product: Product, quantity: number) => void;
|
5
5
|
export declare function getCommentsFromFormikValues(values: AddToCartFormikValues): {
|
6
6
|
name: string;
|
7
7
|
value: string;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { useTracker } from '@jetshop/core/analytics/Analytics';
|
2
2
|
import { useCallback } from 'react';
|
3
3
|
import { trackProductEvent } from '@jetshop/core/analytics/tracking';
|
4
|
+
import { unSlugify } from '@jetshop/core/analytics/integrations/unslugify';
|
5
|
+
import { breadcrumbsWithoutProduct } from '@jetshop/core/analytics/utils/breadcrumbsWithoutProduct';
|
4
6
|
export function getArticleNumber(product, selectedVariation) {
|
5
7
|
var _a, _b;
|
6
8
|
return ((_b = (_a = product === null || product === void 0 ? void 0 : product.variants) === null || _a === void 0 ? void 0 : _a.values) === null || _b === void 0 ? void 0 : _b.length) > 0
|
@@ -10,11 +12,15 @@ export function getArticleNumber(product, selectedVariation) {
|
|
10
12
|
export function useTrackProductAdd(selectedVariation) {
|
11
13
|
const track = useTracker();
|
12
14
|
return useCallback(function trackProductVariant(product, quantity) {
|
15
|
+
var _a, _b, _c;
|
13
16
|
track(trackProductEvent({
|
14
17
|
action: 'add',
|
15
18
|
product,
|
16
19
|
quantity,
|
17
|
-
selectedVariation
|
20
|
+
selectedVariation,
|
21
|
+
category: breadcrumbsWithoutProduct((_a = product.primaryRoute) === null || _a === void 0 ? void 0 : _a.breadcrumbs) ||
|
22
|
+
unSlugify((_c = (_b = product.canonicalCategory) === null || _b === void 0 ? void 0 : _b.primaryRoute) === null || _c === void 0 ? void 0 : _c.path) ||
|
23
|
+
''
|
18
24
|
}));
|
19
25
|
}, [selectedVariation, track]);
|
20
26
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"addToCartUtils.js","sourceRoot":"","sources":["addToCartUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;
|
1
|
+
{"version":3,"file":"addToCartUtils.js","sourceRoot":"","sources":["addToCartUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAMrE,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AAEpG,MAAM,UAAU,gBAAgB,CAC9B,OAAgB,EAChB,iBAAiC;;IAEjC,OAAO,CAAA,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,MAAM,0CAAE,MAAM,IAAG,CAAC;QAC1C,CAAC,CAAC,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,aAAa;QAClC,CAAC,CAAC,OAAO,aA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;AACJ,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAC7B,gBAAgB,EAChB,eAAe,EAIhB;IACC,OAAO,CAAC,KAAU,EAAE,EAAE;QACpB,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QAC3C,IAAI,CAAC,gBAAgB,EAAE;YACrB,MAAM,KAAK,CAAC;SACb;QACD,gBAAgB,iCAAM,eAAe,KAAE,KAAK,IAAG,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC"}
|
@@ -6,6 +6,8 @@ import { Mutation } from 'react-apollo';
|
|
6
6
|
import { getRemoveFromCartOptimisticResponse } from './cartMutationUtils';
|
7
7
|
import { CartIdContext } from '../Cart/CartIdContext';
|
8
8
|
import throwErrorInDev from '../../helpers/throwErrorInDev';
|
9
|
+
import { unSlugify } from '@jetshop/core/analytics/integrations/unslugify';
|
10
|
+
import { breadcrumbsWithoutProduct } from '@jetshop/core/analytics/utils/breadcrumbsWithoutProduct';
|
9
11
|
const RemoveFromCart = function RemoveFromCart({ cartQuery, children }) {
|
10
12
|
throwErrorInDev(!cartQuery, `You forgot to pass 'cartQuery' to RemoveFromCart`);
|
11
13
|
const { cartId, setCartId } = useContext(CartIdContext);
|
@@ -15,7 +17,14 @@ const RemoveFromCart = function RemoveFromCart({ cartQuery, children }) {
|
|
15
17
|
}
|
16
18
|
}, mutation: removeFromCart }, (mutate, { client }) => {
|
17
19
|
return children((itemId, product) => {
|
18
|
-
|
20
|
+
var _a, _b, _c;
|
21
|
+
track(trackProductEvent({
|
22
|
+
action: 'remove',
|
23
|
+
product,
|
24
|
+
category: breadcrumbsWithoutProduct((_a = product.primaryRoute) === null || _a === void 0 ? void 0 : _a.breadcrumbs) ||
|
25
|
+
unSlugify((_c = (_b = product.canonicalCategory) === null || _b === void 0 ? void 0 : _b.primaryRoute) === null || _c === void 0 ? void 0 : _c.path) ||
|
26
|
+
''
|
27
|
+
}));
|
19
28
|
return mutate({
|
20
29
|
variables: {
|
21
30
|
input: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoveFromCart.js","sourceRoot":"","sources":["RemoveFromCart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAEhF,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAoC,MAAM,cAAc,CAAC;AAC1E,OAAO,EAEL,mCAAmC,EACpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;
|
1
|
+
{"version":3,"file":"RemoveFromCart.js","sourceRoot":"","sources":["RemoveFromCart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAEhF,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAoC,MAAM,cAAc,CAAC;AAC1E,OAAO,EAEL,mCAAmC,EACpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,eAAe,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AAIpG,MAAM,cAAc,GAAG,SAAS,cAAc,CAAC,EAC7C,SAAS,EACT,QAAQ,EACY;IACpB,eAAe,CACb,CAAC,SAAS,EACV,kDAAkD,CACnD,CAAC;IAEF,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,UAAU,EAAE,CAAC;IAE3B,OAAO,CACL,oBAAC,QAAQ,IACP,WAAW,EAAE,CAAC,IAA6C,EAAE,EAAE;YAC7D,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;aAChD;QACH,CAAC,EACD,QAAQ,EAAE,cAAc,IAEvB,CAAC,MAAwB,EAAE,EAAE,MAAM,EAAkB,EAAE,EAAE;QACxD,OAAO,QAAQ,CAAC,CAAC,MAAc,EAAE,OAAgB,EAAE,EAAE;;YACnD,KAAK,CACH,iBAAiB,CAAC;gBAChB,MAAM,EAAE,QAAQ;gBAChB,OAAO;gBACP,QAAQ,EACN,yBAAyB,CAAC,MAAA,OAAO,CAAC,YAAY,0CAAE,WAAW,CAAC;oBAC5D,SAAS,CAAC,MAAA,MAAA,OAAO,CAAC,iBAAiB,0CAAE,YAAY,0CAAE,IAAI,CAAC;oBACxD,EAAE;aACL,CAAC,CACH,CAAC;YACF,OAAO,MAAM,CAAC;gBACZ,SAAS,EAAE;oBACT,KAAK,EAAE;wBACL,MAAM;wBACN,MAAM;qBACP;iBACF;gBACD,kBAAkB,EAAE;oBAClB,cAAc,EAAE;wBACd,IAAI,EAAE,mCAAmC,CAAC;4BACxC,MAAM;4BACN,MAAM;4BACN,MAAM;4BACN,SAAS;4BACT,SAAS;yBACV,CAAC;wBACF,UAAU,EAAE,cAAc;qBAC3B;iBACF;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CACQ,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -6,6 +6,8 @@ import throwErrorInDev from '../../helpers/throwErrorInDev';
|
|
6
6
|
import { useTracker } from '../../analytics/Analytics';
|
7
7
|
import { trackProductEvent } from '../../analytics/tracking';
|
8
8
|
import { useCart } from '../Query/CartProvider';
|
9
|
+
import { unSlugify } from '@jetshop/core/analytics/integrations/unslugify';
|
10
|
+
import { breadcrumbsWithoutProduct } from '@jetshop/core/analytics/utils/breadcrumbsWithoutProduct';
|
9
11
|
export default function useDecrementQuantity({ decrementQuantityMutation, cartQuery }) {
|
10
12
|
throwErrorInDev(!cartQuery, `You forgot to pass 'cartQuery' to useDecrementQuantity`);
|
11
13
|
const track = useTracker();
|
@@ -16,13 +18,16 @@ export default function useDecrementQuantity({ decrementQuantityMutation, cartQu
|
|
16
18
|
onCompleted: () => localStorage.setItem('cartChange', '1')
|
17
19
|
});
|
18
20
|
function decrementQuantity({ itemId }) {
|
19
|
-
var _a;
|
20
|
-
const { product, variant: selectedVariation } = (_a = cart === null || cart === void 0 ? void 0 : cart.items) === null || _a === void 0 ? void 0 : _a.find(item => item.id === itemId);
|
21
|
+
var _a, _b, _c, _d;
|
22
|
+
const { product, variant: selectedVariation } = (_a = cart === null || cart === void 0 ? void 0 : cart.items) === null || _a === void 0 ? void 0 : _a.find((item) => item.id === itemId);
|
21
23
|
track(trackProductEvent({
|
22
24
|
action: 'remove',
|
23
25
|
product,
|
24
26
|
quantity: 1,
|
25
|
-
selectedVariation
|
27
|
+
selectedVariation,
|
28
|
+
category: breadcrumbsWithoutProduct((_b = product.primaryRoute) === null || _b === void 0 ? void 0 : _b.breadcrumbs) ||
|
29
|
+
unSlugify((_d = (_c = product.canonicalCategory) === null || _c === void 0 ? void 0 : _c.primaryRoute) === null || _d === void 0 ? void 0 : _d.path) ||
|
30
|
+
''
|
26
31
|
}));
|
27
32
|
return decrementQuantityMutationFn({
|
28
33
|
variables: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDecrementQuantity.js","sourceRoot":"","sources":["useDecrementQuantity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,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{ trackProductEvent } from '../../analytics/tracking';
|
8
8
|
import { useCart } from '../Query/CartProvider';
|
9
|
+
import { unSlugify } from '@jetshop/core/analytics/integrations/unslugify';
|
10
|
+
import { breadcrumbsWithoutProduct } from '@jetshop/core/analytics/utils/breadcrumbsWithoutProduct';
|
9
11
|
export default function useIncrementQuantity({ incrementQuantityMutation, cartQuery }) {
|
10
12
|
throwErrorInDev(!cartQuery, `You forgot to pass 'cartQuery' to useIncrementQuantity`);
|
11
13
|
const track = useTracker();
|
@@ -16,13 +18,16 @@ export default function useIncrementQuantity({ incrementQuantityMutation, cartQu
|
|
16
18
|
onCompleted: () => localStorage.setItem('cartChange', '1')
|
17
19
|
});
|
18
20
|
function incrementQuantity({ itemId }) {
|
19
|
-
var _a;
|
20
|
-
const { product, variant: selectedVariation } = (_a = cart === null || cart === void 0 ? void 0 : cart.items) === null || _a === void 0 ? void 0 : _a.find(item => item.id === itemId);
|
21
|
+
var _a, _b, _c, _d;
|
22
|
+
const { product, variant: selectedVariation } = (_a = cart === null || cart === void 0 ? void 0 : cart.items) === null || _a === void 0 ? void 0 : _a.find((item) => item.id === itemId);
|
21
23
|
track(trackProductEvent({
|
22
24
|
action: 'add',
|
23
25
|
product,
|
24
26
|
quantity: 1,
|
25
|
-
selectedVariation
|
27
|
+
selectedVariation,
|
28
|
+
category: breadcrumbsWithoutProduct((_b = product.primaryRoute) === null || _b === void 0 ? void 0 : _b.breadcrumbs) ||
|
29
|
+
unSlugify((_d = (_c = product.canonicalCategory) === null || _c === void 0 ? void 0 : _c.primaryRoute) === null || _d === void 0 ? void 0 : _d.path) ||
|
30
|
+
''
|
26
31
|
}));
|
27
32
|
return incrementQuantityMutationFn({
|
28
33
|
variables: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useIncrementQuantity.js","sourceRoot":"","sources":["useIncrementQuantity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEnE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,aAAa,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IACjC,MAAM,CAAC,2BAA2B,CAAC,GAAG,WAAW,CAAC,yBAAyB,EAAE;QAC3E,WAAW,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC;KAC3D,CAAC,CAAC;IACH,SAAS,iBAAiB,CAAC,EAAE,MAAM,EAAsB;;QACvD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,0CAAE,IAAI,CAC/D,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,MAAM,CAC7B,CAAC;QACF,KAAK,CACH,iBAAiB,CAAC;YAChB,MAAM,EAAE,KAAK;YACb,OAAO;YACP,QAAQ,EAAE,CAAC;YACX,iBAAiB;YACjB,QAAQ,EACN,yBAAyB,CAAC,MAAA,OAAO,CAAC,YAAY,0CAAE,WAAW,CAAC;gBAC5D,SAAS,CAAC,MAAA,MAAA,OAAO,CAAC,iBAAiB,0CAAE,YAAY,0CAAE,IAAI,CAAC;gBACxD,EAAE;SACL,CAAC,CACH,CAAC;QACF,OAAO,2BAA2B,CAAC;YACjC,SAAS,EAAE;gBACT,KAAK,EAAE;oBACL,MAAM;oBACN,MAAM;iBACP;aACF;YACD,kBAAkB,EAAE;gBAClB,qBAAqB,EAAE;oBACrB,IAAI,EAAE,sCAAsC,CAAC;wBAC3C,MAAM;wBACN,MAAM;wBACN,MAAM;wBACN,SAAS;qBACV,CAAC;oBACF,UAAU,EAAE,cAAc;iBAC3B;aACF;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC/B,CAAC"}
|
@@ -5,6 +5,8 @@ import { useContext } from 'react';
|
|
5
5
|
import { useTracker } from '../../analytics/Analytics';
|
6
6
|
import { trackProductEvent } from '../../analytics/tracking';
|
7
7
|
import throwErrorInDev from '../../helpers/throwErrorInDev';
|
8
|
+
import { unSlugify } from '@jetshop/core/analytics/integrations/unslugify';
|
9
|
+
import { breadcrumbsWithoutProduct } from '@jetshop/core/analytics/utils/breadcrumbsWithoutProduct';
|
8
10
|
export default function useRemoveFromCart({ removeFromCartMutation, cartQuery }) {
|
9
11
|
throwErrorInDev(!cartQuery, `You forgot to pass 'cartQuery' to useRemoveFromCart`);
|
10
12
|
const { cartId, setCartId } = useContext(CartIdContext);
|
@@ -14,7 +16,14 @@ export default function useRemoveFromCart({ removeFromCartMutation, cartQuery })
|
|
14
16
|
onCompleted: () => localStorage.setItem('cartChange', '1')
|
15
17
|
});
|
16
18
|
function removeFromCart({ itemId, product }) {
|
17
|
-
|
19
|
+
var _a, _b, _c;
|
20
|
+
track(trackProductEvent({
|
21
|
+
action: 'remove',
|
22
|
+
product,
|
23
|
+
category: breadcrumbsWithoutProduct((_a = product.primaryRoute) === null || _a === void 0 ? void 0 : _a.breadcrumbs) ||
|
24
|
+
unSlugify((_c = (_b = product.canonicalCategory) === null || _b === void 0 ? void 0 : _b.primaryRoute) === null || _c === void 0 ? void 0 : _c.path) ||
|
25
|
+
''
|
26
|
+
}));
|
18
27
|
return removeFromCartMutationFn({
|
19
28
|
variables: {
|
20
29
|
input: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useRemoveFromCart.js","sourceRoot":"","sources":["useRemoveFromCart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0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AC,YAAY,0CAAE,WAAW,CAAC;gBAC5D,SAAS,CAAC,MAAA,MAAA,OAAO,CAAC,iBAAiB,0CAAE,YAAY,0CAAE,IAAI,CAAC;gBACxD,EAAE;SACL,CAAC,CACH,CAAC;QACF,OAAO,wBAAwB,CAAC;YAC9B,SAAS,EAAE;gBACT,KAAK,EAAE;oBACL,MAAM;oBACN,MAAM;iBACP;aACF;YACD,kBAAkB,EAAE;gBAClB,cAAc,EAAE;oBACd,IAAI,EAAE,mCAAmC,CAAC;wBACxC,MAAM;wBACN,MAAM;wBACN,MAAM;wBACN,SAAS;wBACT,SAAS;qBACV,CAAC;oBACF,UAAU,EAAE,cAAc;iBAC3B;aACF;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,cAAc,EAAE,CAAC;AAC5B,CAAC"}
|
@@ -1,7 +1,12 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Route } from '../../types';
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
interface Crumb {
|
4
|
+
text: string;
|
5
|
+
path: string | null;
|
6
|
+
}
|
7
|
+
declare function StructuredBreadcrumbData({ parents, breadcrumbText, breadcrumbs }: {
|
8
|
+
breadcrumbs?: Crumb[];
|
9
|
+
parents?: Route[];
|
10
|
+
breadcrumbText?: string;
|
6
11
|
}): JSX.Element;
|
7
12
|
export { StructuredBreadcrumbData };
|
@@ -1,37 +1,55 @@
|
|
1
1
|
import React, { useContext } from 'react';
|
2
2
|
import ChannelContext from '../ChannelContext';
|
3
3
|
import { StructuredData } from './StructuredData';
|
4
|
-
function StructuredBreadcrumbData({ parents, breadcrumbText }) {
|
4
|
+
function StructuredBreadcrumbData({ parents, breadcrumbText, breadcrumbs }) {
|
5
5
|
const { selectedChannel } = useContext(ChannelContext);
|
6
|
-
|
7
|
-
if (parents && parents.length > 0) {
|
8
|
-
mappedParents = parents
|
9
|
-
.filter((parent) => { var _a; return (_a = parent.object) === null || _a === void 0 ? void 0 : _a.breadcrumbText; })
|
10
|
-
.map((parent, index) => {
|
11
|
-
return {
|
12
|
-
'@type': 'ListItem',
|
13
|
-
position: parents.length - index,
|
14
|
-
name: parent.object.breadcrumbText.toString(),
|
15
|
-
item: `${selectedChannel.url}${parent.path}`
|
16
|
-
};
|
17
|
-
});
|
18
|
-
mappedParents.reverse();
|
6
|
+
if (breadcrumbs) {
|
19
7
|
const data = {
|
20
8
|
'@context': 'https://schema.org',
|
21
9
|
'@type': 'BreadcrumbList',
|
22
|
-
itemListElement:
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
29
|
-
|
10
|
+
itemListElement: breadcrumbs
|
11
|
+
.filter((crumb) => crumb.text)
|
12
|
+
.map((crumb, index) => ({
|
13
|
+
'@type': 'ListItem',
|
14
|
+
position: index + 1,
|
15
|
+
name: crumb.text,
|
16
|
+
item: crumb.path ? `${selectedChannel.url}${crumb.path}` : undefined
|
17
|
+
}))
|
30
18
|
};
|
31
19
|
return React.createElement(StructuredData, { json: data });
|
32
20
|
}
|
33
|
-
else
|
34
|
-
|
21
|
+
else {
|
22
|
+
// Deprecated, remove in next major
|
23
|
+
let mappedParents = [];
|
24
|
+
if (parents && parents.length > 0) {
|
25
|
+
mappedParents = parents
|
26
|
+
.filter((parent) => { var _a; return (_a = parent.object) === null || _a === void 0 ? void 0 : _a.breadcrumbText; })
|
27
|
+
.map((parent, index) => {
|
28
|
+
return {
|
29
|
+
'@type': 'ListItem',
|
30
|
+
position: parents.length - index,
|
31
|
+
name: parent.object.breadcrumbText.toString(),
|
32
|
+
item: `${selectedChannel.url}${parent.path}`
|
33
|
+
};
|
34
|
+
});
|
35
|
+
mappedParents.reverse();
|
36
|
+
const data = {
|
37
|
+
'@context': 'https://schema.org',
|
38
|
+
'@type': 'BreadcrumbList',
|
39
|
+
itemListElement: [
|
40
|
+
...mappedParents,
|
41
|
+
{
|
42
|
+
'@type': 'ListItem',
|
43
|
+
position: parents.length + 1,
|
44
|
+
name: breadcrumbText.toString()
|
45
|
+
}
|
46
|
+
]
|
47
|
+
};
|
48
|
+
return React.createElement(StructuredData, { json: data });
|
49
|
+
}
|
50
|
+
else
|
51
|
+
return null;
|
52
|
+
}
|
35
53
|
}
|
36
54
|
export { StructuredBreadcrumbData };
|
37
55
|
//# sourceMappingURL=StructuredBreadcrumbData.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StructuredBreadcrumbData.js","sourceRoot":"","sources":["StructuredBreadcrumbData.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
1
|
+
{"version":3,"file":"StructuredBreadcrumbData.js","sourceRoot":"","sources":["StructuredBreadcrumbData.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOlD,SAAS,wBAAwB,CAAC,EAChC,OAAO,EACP,cAAc,EACd,WAAW,EAKZ;IACC,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAEvD,IAAI,WAAW,EAAE;QACf,MAAM,IAAI,GAAgC;YACxC,UAAU,EAAE,oBAAoB;YAChC,OAAO,EAAE,gBAAgB;YACzB,eAAe,EAAE,WAAW;iBACzB,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;iBAC7B,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;gBACtB,OAAO,EAAE,UAAU;gBACnB,QAAQ,EAAE,KAAK,GAAG,CAAC;gBACnB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,IAAI,EAA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CAAC"}
|
@@ -14,7 +14,7 @@ const StructuredProductData = ({ product, initialVariant, extraFields = {} }) =>
|
|
14
14
|
'@type': 'Product',
|
15
15
|
name: product.name,
|
16
16
|
description: (product === null || product === void 0 ? void 0 : product.description) || (product === null || product === void 0 ? void 0 : product.shortDescription),
|
17
|
-
image: product.images.map(image => image.url),
|
17
|
+
image: (product.images || []).map((image) => image.url),
|
18
18
|
mpn: (product === null || product === void 0 ? void 0 : product.barcode) || product.articleNumber,
|
19
19
|
sku: product.articleNumber,
|
20
20
|
productID: product.articleNumber,
|
@@ -31,7 +31,7 @@ const StructuredProductData = ({ product, initialVariant, extraFields = {} }) =>
|
|
31
31
|
};
|
32
32
|
if (variant) {
|
33
33
|
baseProductData = Object.assign(Object.assign({}, baseProductData), { image: (variant === null || variant === void 0 ? void 0 : variant.images.length)
|
34
|
-
? variant.images.map(image => image.url)
|
34
|
+
? variant.images.map((image) => image.url)
|
35
35
|
: baseProductData.image, sku: (variant === null || variant === void 0 ? void 0 : variant.articleNumber) || baseProductData.sku, mpn: (variant === null || variant === void 0 ? void 0 : variant.barcode) || (variant === null || variant === void 0 ? void 0 : variant.articleNumber), offers: Object.assign(Object.assign({}, baseProductData.offers), { price: (_e = variant === null || variant === void 0 ? void 0 : variant.price) === null || _e === void 0 ? void 0 : _e.incVat, availability: (((_f = variant.stockStatus) === null || _f === void 0 ? void 0 : _f.buyable)
|
36
36
|
? 'http://schema.org/InStock'
|
37
37
|
: 'http://schema.org/OutOfStock') }) });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StructuredProductData.js","sourceRoot":"","sources":["StructuredProductData.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAepE,6DAA6D;AAC7D,MAA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A,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,KAAI,eAAe,CAAC,GAAG,EAClD,GAAG,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAA,EAC/C,MAAM,kCACA,eAAe,CAAC,MAAgB,KACpC,KAAK,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,MAAM,EAC7B,YAAY,EAAE,CAAC,CAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,OAAO;oBACzC,CAAC,CAAC,2BAA2B;oBAC7B,CAAC,CAAC,8BAA8B,CAA0C,MAE/E,CAAC;KACH;IAED,MAAM,uBAAuB,mCACxB,eAAe,GACd,WAAuB,CAC5B,CAAC;IAEF,OAAO,oBAAC,cAAc,IAAC,IAAI,EAAE,uBAAuB,GAAI,CAAC;AAC3D,CAAC,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function isRelativeUrl(url?: string): boolean;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"isRelativeUrl.js","sourceRoot":"","sources":["isRelativeUrl.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC1E,CAAC"}
|
@@ -6,10 +6,10 @@ export declare function usePackageProductItem(item: PackageItem, updateItem: Upd
|
|
6
6
|
stockStatus: import("@jetshop/ui/Stock/StockStatusContainer").StockStatusContainerRender;
|
7
7
|
variantHandler: {
|
8
8
|
selectedVariant: import("../../types").ProductVariant;
|
9
|
-
validation: "
|
9
|
+
validation: import("../useProductVariants/useProductVariants").VariantValidation;
|
10
10
|
getSelectedValue: (option: import("../../types").ProductVariantOption) => string;
|
11
11
|
selectValue: (value: string, option: import("../../types").ProductVariantOption) => void;
|
12
|
-
validateSelection: (value: string, option: import("../../types").ProductVariantOption) => "
|
12
|
+
validateSelection: (value: string, option: import("../../types").ProductVariantOption) => import("../useProductVariants/useProductVariants").VariantValidation;
|
13
13
|
getVariantForSelection: (value: string, option: import("../../types").ProductVariantOption) => import("../../types").ProductVariant;
|
14
14
|
missingOptions: import("../../types").ProductVariantOption[];
|
15
15
|
getMissingOptions: () => import("../../types").ProductVariantOption[];
|
@@ -4,6 +4,8 @@ import { useContext, useState } from 'react';
|
|
4
4
|
import throwErrorInDev from '../helpers/throwErrorInDev';
|
5
5
|
import { useTracker } from '../analytics/Analytics';
|
6
6
|
import { trackProductEvent } from '../analytics/tracking';
|
7
|
+
import { unSlugify } from '../analytics/integrations/unslugify';
|
8
|
+
import { breadcrumbsWithoutProduct } from '../analytics/utils/breadcrumbsWithoutProduct';
|
7
9
|
export function useAddMultipleToCart(items, hookQueries, hookCallbacks) {
|
8
10
|
const track = useTracker();
|
9
11
|
const client = useApolloClient();
|
@@ -30,11 +32,15 @@ export function useAddMultipleToCart(items, hookQueries, hookCallbacks) {
|
|
30
32
|
if (!queries || !queries.addMultipleToCartMutation || !queries.cartQuery) {
|
31
33
|
return Promise.reject(`You must pass cartQuery and addMultipleToCartMutation to useAddMultipletoCart or to the addMultiple fn`);
|
32
34
|
}
|
33
|
-
items.forEach(item => {
|
35
|
+
items.forEach((item) => {
|
36
|
+
var _a, _b, _c;
|
34
37
|
track(trackProductEvent({
|
35
38
|
action: 'add',
|
36
39
|
product: item,
|
37
|
-
quantity: item.quantity
|
40
|
+
quantity: item.quantity,
|
41
|
+
category: breadcrumbsWithoutProduct((_a = item.primaryRoute) === null || _a === void 0 ? void 0 : _a.breadcrumbs) ||
|
42
|
+
unSlugify((_c = (_b = item.canonicalCategory) === null || _b === void 0 ? void 0 : _b.primaryRoute) === null || _c === void 0 ? void 0 : _c.path) ||
|
43
|
+
''
|
38
44
|
}));
|
39
45
|
});
|
40
46
|
setStatus('loading');
|
@@ -52,13 +58,13 @@ export function useAddMultipleToCart(items, hookQueries, hookCallbacks) {
|
|
52
58
|
preOrderDate
|
53
59
|
}))
|
54
60
|
},
|
55
|
-
refetchQueries: resp => {
|
61
|
+
refetchQueries: (resp) => {
|
56
62
|
// When errors are present, the cart does not get automatically
|
57
63
|
// updated. We have to use refetchQueries in that case.
|
58
64
|
return (resp.errors && [{ query: queries.cartQuery, variables: { cartId } }]);
|
59
65
|
}
|
60
66
|
})
|
61
|
-
.then(resp => {
|
67
|
+
.then((resp) => {
|
62
68
|
setData(resp);
|
63
69
|
(callbacks === null || callbacks === void 0 ? void 0 : callbacks.onCompleted) && callbacks.onCompleted(resp);
|
64
70
|
// Update the cart context
|
@@ -72,7 +78,7 @@ export function useAddMultipleToCart(items, hookQueries, hookCallbacks) {
|
|
72
78
|
}
|
73
79
|
return resp;
|
74
80
|
})
|
75
|
-
.catch(err => {
|
81
|
+
.catch((err) => {
|
76
82
|
console.log('error!', err);
|
77
83
|
setStatus('error');
|
78
84
|
(callbacks === null || callbacks === void 0 ? void 0 : callbacks.onError) && callbacks.onError(err);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useAddMultipleToCart.js","sourceRoot":"","sources":["useAddMultipleToCart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAO7C,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
1
|
+
{"version":3,"file":"useAddMultipleToCart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,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAEhD,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SAC9C;KACF;IACD,8BAA8B;IAE9B,sDAAsD;IACtD,OAAO;QACL,WAAW;QACX;YACE,OAAO,EAAE,MAAM,KAAK,SAAS;YAC7B,MAAM,EAAE,MAAM,KAAK,MAAM;YACzB,KAAK,EAAE,MAAM,KAAK,OAAO;YACzB,IAAI;YACJ,WAAW;SACZ;KACF,CAAC;AACJ,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Product, ProductVariant, ProductVariantOption } from '../../types';
|
2
|
-
declare type VariantValidation = 'outOfStock' | 'valid' | 'incomplete' | 'invalid';
|
2
|
+
export declare type VariantValidation = 'outOfStock' | 'valid' | 'incomplete' | 'invalid';
|
3
3
|
/**
|
4
4
|
* Given a product, this hook provides methods for getting and setting variants on that product,
|
5
5
|
* as well as methods to validate the current and proposed combination of values.
|
@@ -17,4 +17,3 @@ export declare function useProductVariants(product: Product, { initialVariant, p
|
|
17
17
|
missingOptions: ProductVariantOption[];
|
18
18
|
getMissingOptions: () => ProductVariantOption[];
|
19
19
|
};
|
20
|
-
export {};
|
@@ -68,7 +68,7 @@ export function useProductVariants(product, { initialVariant, preselectCheapest
|
|
68
68
|
return;
|
69
69
|
const validation = validateSelection(value, option);
|
70
70
|
if (validation !== 'invalid') {
|
71
|
-
selectValues(state => {
|
71
|
+
selectValues((state) => {
|
72
72
|
const newState = [...state];
|
73
73
|
newState[selectedIndex] = value;
|
74
74
|
return newState;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useProductVariants.js","sourceRoot":"","sources":["useProductVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"useProductVariants.js","sourceRoot":"","sources":["use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