@jetshop/core 5.13.2 → 5.13.3-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/ChannelHandler/ChannelHandler.d.ts +2 -0
- package/ChannelHandler/ChannelHandler.js +9 -3
- package/ChannelHandler/ChannelHandler.js.map +1 -1
- package/ChannelHandler/PreserveRedirectRouteQuery.gql +1 -1
- package/ChannelHandler/channelUtils.d.ts +4 -0
- package/ChannelHandler/channelUtils.js +113 -7
- package/ChannelHandler/channelUtils.js.map +1 -1
- package/ChannelHandler/redirectUtils.test.js +24 -48
- package/ChannelHandler/redirectUtilsGroupedChannels.test.js +732 -0
- package/analytics/Analytics.js +1 -1
- package/analytics/Analytics.js.map +1 -1
- package/analytics/AnalyticsProvider.js +1 -1
- package/analytics/AnalyticsProvider.js.map +1 -1
- package/analytics/integrations/ga4.js +61 -62
- package/analytics/integrations/ga4.js.map +1 -1
- package/analytics/integrations/unslugify.js +0 -2
- package/analytics/integrations/unslugify.js.map +1 -1
- package/components/AuthContext/AuthProvider.js +2 -2
- package/components/AuthContext/AuthProvider.js.map +1 -1
- package/components/AuthContext/AuthProvider.test.js +2 -2
- package/components/ChannelContext/ChannelContext.d.ts +1 -0
- package/components/ChannelContext/ChannelContext.js.map +1 -1
- package/components/ChannelContext/ChannelProvider.js +4 -2
- package/components/ChannelContext/ChannelProvider.js.map +1 -1
- package/components/ChannelContext/useCountrySettings.js +2 -2
- package/components/ChannelContext/useCountrySettings.js.map +1 -1
- package/components/ConfigProvider.d.ts +0 -1
- package/components/ConfigProvider.js.map +1 -1
- package/components/Head.js +9 -4
- package/components/Head.js.map +1 -1
- package/components/OpenGraph/OpenGraph.test.js +2 -2
- package/components/OpenGraph/OpenGraphGeneralPageData.js +6 -6
- package/components/OpenGraph/OpenGraphGeneralPageData.js.map +1 -1
- package/components/OpenGraph/OpenGraphProductData.js +1 -1
- package/components/OpenGraph/OpenGraphProductData.js.map +1 -1
- package/components/Pagination/PaginationProvider.test.js +29 -29
- package/components/SortOrder/SortOrderContainer.js +1 -1
- package/components/SortOrder/SortOrderContainer.js.map +1 -1
- package/data/fragments/ChannelsFragment.gql +1 -0
- package/experiments/ExperimentsProvider.test.js +12 -12
- package/experiments/integration.test.js +6 -6
- package/experiments/useExperiment.test.js +10 -10
- package/hooks/Channels/useChannelSettings.js +1 -1
- package/hooks/Channels/useChannelSettings.js.map +1 -1
- package/hooks/Channels/useChannelSettings.test.js +1 -1
- package/hooks/usePrice.test.js +2 -2
- package/hooks/useShopConfig.d.ts +1 -1
- package/hooks/useShopConfig.js +1 -1
- package/hooks/useShopConfig.js.map +1 -1
- package/package.json +2 -2
- package/test-utils/ProviderPyramid.js +4 -4
- package/test-utils/variables.js +1234 -0
package/analytics/Analytics.js
CHANGED
@@ -32,7 +32,7 @@ function useTracker() {
|
|
32
32
|
}
|
33
33
|
// Please fix me
|
34
34
|
if (!config.trackingAllowed) {
|
35
|
-
payload === null || payload === void 0 ? void 0 : payload.callback();
|
35
|
+
(payload === null || payload === void 0 ? void 0 : payload.callback) && (payload === null || payload === void 0 ? void 0 : payload.callback());
|
36
36
|
return null;
|
37
37
|
}
|
38
38
|
const context = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Analytics.js","sourceRoot":"","sources":["Analytics.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,eAAe,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAe3C,SAAS,SAAS,CAAC,KAAqB;IACtC,MAAM,KAAK,GAAG,UAAU,EAAE,CAAC;IAE3B,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,KAAK,EAAE;YACf,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACpB;QAED,mBAAmB;QACnB,wEAAwE;QACxE,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AC;aACF,CAAC;YACF,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;SAClD;QAAC,OAAO,GAAG,EAAE;YACZ,eAAe,CAAC,IAAI,EAAE,uBAAuB,IAAI,UAAU,EAAE;gBAC3D,GAAG;gBACH,OAAO;aACR,CAAC,CAAC;SACJ;IACH,CAAC,EACD,CAAC,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC,CAC1C,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
@@ -100,7 +100,7 @@ const AnalyticsProvider = function AnalyticsProvider(props) {
|
|
100
100
|
inServer: __IN_SERVER__
|
101
101
|
}), [analyticsConfig]);
|
102
102
|
if (gtag === null || gtag === void 0 ? void 0 : gtag.trackingId) {
|
103
|
-
if (
|
103
|
+
if (gtag === null || gtag === void 0 ? void 0 : gtag.trackingId.startsWith('G-')) {
|
104
104
|
registry.add(ga4Tracker({
|
105
105
|
currency: selectedChannel.currency.format.code,
|
106
106
|
trackingId: gtag.trackingId,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AnalyticsProvider.js","sourceRoot":"","sources":["AnalyticsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAW,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,mBAAmB,EACnB,eAAe,EAEhB,MAAM,mB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C;IAE1C,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,KAAK,EAAE;QAChC,OAAO,KAAK,CAAC;KACd;IAED,qBAAqB;IACrB,IAAI,MAAM,CAAC,QAAQ,IAAI,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;QACpD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,2BAA2B,EAAE,CAAC;KACvD;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
@@ -1,20 +1,16 @@
|
|
1
1
|
import { injectScript } from '../utils/script';
|
2
|
-
import { unSlugify } from './unslugify';
|
3
2
|
import { getBrand } from '../../../core/components/OpenGraph/OpenGraphProductData';
|
4
3
|
const gtag = () => window.gtag;
|
5
|
-
function productToItem(product, selectedVariation, useArticleNumberAsId = false, brandCustomField) {
|
6
|
-
var _a, _b, _c, _d
|
4
|
+
function productToItem(product, selectedVariation, useArticleNumberAsId = false, brandCustomField, category) {
|
5
|
+
var _a, _b, _c, _d;
|
7
6
|
return {
|
8
7
|
item_name: product === null || product === void 0 ? void 0 : product.name,
|
9
8
|
item_id: useArticleNumberAsId
|
10
9
|
? product === null || product === void 0 ? void 0 : product.articleNumber
|
11
10
|
: (_a = product === null || product === void 0 ? void 0 : product.id) === null || _a === void 0 ? void 0 : _a.toString(),
|
12
11
|
price: ((_b = selectedVariation === null || selectedVariation === void 0 ? void 0 : selectedVariation.price) === null || _b === void 0 ? void 0 : _b.incVat) || ((_c = product === null || product === void 0 ? void 0 : product.price) === null || _c === void 0 ? void 0 : _c.incVat),
|
13
|
-
item_category:
|
14
|
-
|
15
|
-
item_category3: unSlugify((product === null || product === void 0 ? void 0 : product.categories) && ((_j = (_h = product === null || product === void 0 ? void 0 : product.categories[2]) === null || _h === void 0 ? void 0 : _h.primaryRoute) === null || _j === void 0 ? void 0 : _j.path)),
|
16
|
-
item_category4: unSlugify((product === null || product === void 0 ? void 0 : product.categories) && ((_l = (_k = product === null || product === void 0 ? void 0 : product.categories[3]) === null || _k === void 0 ? void 0 : _k.primaryRoute) === null || _l === void 0 ? void 0 : _l.path)),
|
17
|
-
item_variant: (_m = selectedVariation === null || selectedVariation === void 0 ? void 0 : selectedVariation.values) === null || _m === void 0 ? void 0 : _m.join('_'),
|
12
|
+
item_category: category,
|
13
|
+
item_variant: (_d = selectedVariation === null || selectedVariation === void 0 ? void 0 : selectedVariation.values) === null || _d === void 0 ? void 0 : _d.join('_'),
|
18
14
|
item_brand: getBrand(product, brandCustomField)
|
19
15
|
};
|
20
16
|
}
|
@@ -38,52 +34,50 @@ export function ga4Tracker({ trackingId, additionalGtagTrackingIds = [], currenc
|
|
38
34
|
w.dataLayer.push(arguments);
|
39
35
|
};
|
40
36
|
w.gtag('js', new Date());
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
});
|
45
|
-
additionalGtagTrackingIds.forEach((id) => {
|
46
|
-
gtag()('config', id, {
|
47
|
-
currency,
|
48
|
-
send_page_view: false
|
37
|
+
if (process.env.REACT_APP_DEBUG_MODE === 'true') {
|
38
|
+
gtag()('config', trackingId, {
|
39
|
+
debug_mode: true
|
49
40
|
});
|
41
|
+
}
|
42
|
+
else {
|
43
|
+
gtag()('config', trackingId);
|
44
|
+
}
|
45
|
+
additionalGtagTrackingIds.forEach((id) => {
|
46
|
+
gtag()('config', id);
|
50
47
|
});
|
51
48
|
injectScript({ src: script });
|
52
49
|
gtag();
|
53
50
|
},
|
54
|
-
trackProduct({ quantity, action, product, selectedVariation, list, listName, index }, context
|
55
|
-
const productItem = Object.assign(Object.assign({}, productToItem(product, selectedVariation, useArticleNumberAsId, brandCustomField)), { quantity, item_list_name: list || listName || context.list, index: index });
|
51
|
+
trackProduct({ quantity, action, product, selectedVariation, list, listName, index, category }, context) {
|
52
|
+
const productItem = Object.assign(Object.assign({}, productToItem(product, selectedVariation, useArticleNumberAsId, brandCustomField, category)), { quantity, item_list_name: list || listName || context.list, index: index });
|
56
53
|
switch (action) {
|
57
54
|
case 'click':
|
58
55
|
gtag()('event', 'select_item', {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
content_type: 'product',
|
57
|
+
currency,
|
58
|
+
value: product.price.incVat,
|
59
|
+
items: [productItem]
|
63
60
|
});
|
64
61
|
break;
|
65
62
|
case 'view':
|
66
63
|
gtag()('event', 'view_item', {
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
eventId
|
64
|
+
currency,
|
65
|
+
value: product.price.incVat,
|
66
|
+
items: [productItem]
|
71
67
|
});
|
72
68
|
break;
|
73
69
|
case 'add':
|
74
70
|
gtag()('event', 'add_to_cart', {
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
eventId
|
71
|
+
currency,
|
72
|
+
value: product.price.incVat,
|
73
|
+
items: [productItem]
|
79
74
|
});
|
80
75
|
break;
|
81
76
|
case 'remove':
|
82
77
|
gtag()('event', 'remove_from_cart', {
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
eventId
|
78
|
+
currency,
|
79
|
+
value: product.price.incVat,
|
80
|
+
items: [productItem]
|
87
81
|
});
|
88
82
|
break;
|
89
83
|
default:
|
@@ -91,54 +85,59 @@ export function ga4Tracker({ trackingId, additionalGtagTrackingIds = [], currenc
|
|
91
85
|
break;
|
92
86
|
}
|
93
87
|
},
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
88
|
+
// This event is disabled in GA4 so that the event fires on the Checkout Page instead using tag manager
|
89
|
+
// trackCartCheckout({ cart }, _context) {
|
90
|
+
// const items: GA4Item[] = cart.items.map((item) => ({
|
91
|
+
// ...productToItem(
|
92
|
+
// item.product as Product,
|
93
|
+
// item.variant,
|
94
|
+
// useArticleNumberAsId,
|
95
|
+
// brandCustomField
|
96
|
+
// ),
|
97
|
+
// quantity: item.quantity
|
98
|
+
// }));
|
99
|
+
// gtag()('event', 'begin_checkout', {
|
100
|
+
// currency: currency,
|
101
|
+
// value: cart.productTotal.incVat,
|
102
|
+
// items
|
103
|
+
// });
|
104
|
+
// },
|
105
|
+
trackPageView({ pathname, title }, _context) {
|
103
106
|
gtag()('event', 'page_view', {
|
104
107
|
currency,
|
105
108
|
page_path: pathname,
|
106
|
-
page_title: title
|
107
|
-
eventId
|
109
|
+
page_title: title
|
108
110
|
});
|
109
111
|
},
|
110
|
-
trackList({ listName, products }, _context
|
112
|
+
trackList({ listName, products, category }, _context) {
|
111
113
|
const items = products.map((product, i) => {
|
112
114
|
var _a;
|
113
115
|
return (Object.assign(Object.assign({}, productToItem(product, null, useArticleNumberAsId, brandCustomField)), { price: (_a = product.price) === null || _a === void 0 ? void 0 : _a.incVat, item_list_name: listName, index: i }));
|
114
116
|
});
|
115
117
|
gtag()('event', 'view_item_list', {
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
eventId
|
118
|
+
item_list_id: category,
|
119
|
+
item_list_name: listName,
|
120
|
+
items
|
120
121
|
});
|
121
122
|
},
|
122
|
-
trackExperiment({ id, variant }, _context
|
123
|
+
trackExperiment({ id, variant }, _context) {
|
123
124
|
gtag()('config', trackingId, {
|
124
|
-
experiments: [{ id, variant }]
|
125
|
-
eventId
|
125
|
+
experiments: [{ id, variant }]
|
126
126
|
});
|
127
127
|
},
|
128
|
-
trackUser({ userId }, _context
|
129
|
-
gtag()('event', 'authentication', { user_id: userId
|
128
|
+
trackUser({ userId }, _context) {
|
129
|
+
gtag()('event', 'authentication', { user_id: userId });
|
130
130
|
},
|
131
|
-
trackLogin(_props, _context
|
132
|
-
gtag()('event', 'login', { trackingId
|
131
|
+
trackLogin(_props, _context) {
|
132
|
+
gtag()('event', 'login', { trackingId });
|
133
133
|
},
|
134
|
-
trackRegister(_props, _context
|
135
|
-
gtag()('event', 'sign_up', { trackingId
|
134
|
+
trackRegister(_props, _context) {
|
135
|
+
gtag()('event', 'sign_up', { trackingId });
|
136
136
|
},
|
137
|
-
trackAddToWishList({ articleNumber, productName }, _context
|
137
|
+
trackAddToWishList({ articleNumber, productName }, _context) {
|
138
138
|
gtag()('event', 'add_to_wishlist', {
|
139
139
|
articleNumber,
|
140
|
-
productName
|
141
|
-
eventId
|
140
|
+
productName
|
142
141
|
});
|
143
142
|
}
|
144
143
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ga4.js","sourceRoot":"","sources":["ga4.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"ga4.js","sourceRoot":"","sources":["ga4.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AAEnF,MAAM,IAAI,GAAG,GAAG,EAAE,CAAE,MAAc,CAAC,IAAI,CAAC;AAkBxC,SAAS,aAAa,CACpB,OAAgB,EAChB,iBAAiC,EACjC,oBAAoB,GAAG,KAAK,EAC5B,gBAAyB,EACzB,QAAiB;;IAEjB,OAAO;QACL,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI;QACxB,OAAO,EAAE,oBAAoB;YAC3B,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa;YACxB,CAAC,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,EAAE,0CAAE,QAAQ,EAAE;QAC3B,KAAK,EAAE,CAAA,MAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,KAAK,0CAAE,MAAM,MAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,MAAM,CAAA;QACjE,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE,MAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM,0CAAE,IAAI,CAAC,GAAG,CAAC;QAClD,UA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AE,QAAQ;YACvC,IAAI,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE;gBAC3B,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;aAC/B,CAAC,CAAC;QACL,CAAC;QACD,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,QAAQ;YAC5B,IAAI,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QACzD,CAAC;QACD,UAAU,CAAC,MAAM,EAAE,QAAQ;YACzB,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,aAAa,CAAC,MAAM,EAAE,QAAQ;YAC5B,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QAC7C,CAAC;QACD,kBAAkB,CAAC,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,QAAQ;YACzD,IAAI,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE;gBACjC,aAAa;gBACb,WAAW;aACZ,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"unslugify.js","sourceRoot":"","sources":["unslugify.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"unslugify.js","sourceRoot":"","sources":["unslugify.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAC,IAAa;IACrC,IAAI,IAAI,EAAE;QACR,IAAI,GAAG,IAAI;aACR,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACZ,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CACjE;aACA,IAAI,CAAC,GAAG,CAAC,CAAC;QACb,IAAI;YACF,GAAG;gBACH,IAAI;qBACD,KAAK,CAAC,GAAG,CAAC;qBACV,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACZ,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CACjE;qBACA,IAAI,CAAC,GAAG,CAAC,CAAC;KAChB;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
@@ -3,7 +3,7 @@ import React, { useContext, useEffect } from 'react';
|
|
3
3
|
import AuthContext from './AuthContext';
|
4
4
|
import { withCookies } from 'react-cookie';
|
5
5
|
import { useLocation, useHistory } from 'react-router';
|
6
|
-
import ChannelContext from '
|
6
|
+
import ChannelContext from '@jetshop/core/components/ChannelContext';
|
7
7
|
import { useShopConfig } from '../../hooks/useShopConfig';
|
8
8
|
import { trackUserEvent } from '../../analytics/tracking';
|
9
9
|
import { useTracker } from '../../analytics/Analytics';
|
@@ -37,7 +37,7 @@ const AuthProvider = function AuthProvider(props) {
|
|
37
37
|
return;
|
38
38
|
if (loggedIn)
|
39
39
|
return;
|
40
|
-
const matches = pathsWithNoAuthRequired.filter(route => location.pathname.startsWith(route)).length > 0;
|
40
|
+
const matches = pathsWithNoAuthRequired.filter((route) => location.pathname.startsWith(route)).length > 0;
|
41
41
|
if (!matches) {
|
42
42
|
history.replace(loginPath);
|
43
43
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AuthProvider.js","sourceRoot":"","sources":["AuthProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,WAAW,MAAM,eAAe,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AS,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC,YAAY,CAAC,CAAC"}
|
@@ -4,8 +4,8 @@ import { ChannelHandler } from '../../ChannelHandler/ChannelHandler';
|
|
4
4
|
import { createSelectedChannel } from '../../ChannelHandler/channelUtils';
|
5
5
|
import renderWithRouter from '../../test-utils/renderWithRouter';
|
6
6
|
import { channels } from '../../test-utils/variables';
|
7
|
-
import { ChannelProvider } from '
|
8
|
-
import { ConfigProvider } from '
|
7
|
+
import { ChannelProvider } from '@jetshop/core/components/ChannelContext';
|
8
|
+
import { ConfigProvider } from '@jetshop/core/components/ConfigProvider';
|
9
9
|
import AuthProvider from './AuthProvider';
|
10
10
|
|
11
11
|
describe('AuthProvider', () => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChannelContext.js","sourceRoot":"","sources":["ChannelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"ChannelContext.js","sourceRoot":"","sources":["ChannelContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAoBtC,MAAM,cAAc,GAAG,aAAa,CAClC,SAAS,CACV,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -3,7 +3,7 @@ import ChannelContext from './ChannelContext';
|
|
3
3
|
import { useCookies } from 'react-cookie';
|
4
4
|
const ChannelProvider = ({ channelHandler, children, config }) => {
|
5
5
|
const [cookies] = useCookies(['culture']);
|
6
|
-
const { channels, selectedChannel, recommendedChannel } = channelHandler;
|
6
|
+
const { channels, selectedChannel, recommendedChannel, selectedChannelGroup } = channelHandler;
|
7
7
|
const value = useMemo(() => {
|
8
8
|
const updateChannelSingleDomain = (newChannel) => {
|
9
9
|
channelHandler.updateChannel({ config, newChannel });
|
@@ -27,6 +27,7 @@ const ChannelProvider = ({ channelHandler, children, config }) => {
|
|
27
27
|
channelsById,
|
28
28
|
setCultureForPreview,
|
29
29
|
restoreCultureForPreview,
|
30
|
+
selectedChannelGroup,
|
30
31
|
basename: channelHandler.getChannelBasename() // TODO This isn't used anywhere?
|
31
32
|
};
|
32
33
|
}, [
|
@@ -35,7 +36,8 @@ const ChannelProvider = ({ channelHandler, children, config }) => {
|
|
35
36
|
config,
|
36
37
|
cookies.culture,
|
37
38
|
recommendedChannel,
|
38
|
-
selectedChannel
|
39
|
+
selectedChannel,
|
40
|
+
selectedChannelGroup
|
39
41
|
]);
|
40
42
|
return (React.createElement(ChannelContext.Provider, { value: value }, children));
|
41
43
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChannelProvider.js","sourceRoot":"","sources":["ChannelProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAmC,MAAM,kBAAkB,CAAC;AAInE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C,MAAM,eAAe,GAAG,CAAC,EACvB,cAAc,EACd,QAAQ,EACR,MAAM,EACe,EAAE,EAAE;IACzB,MAAM,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1C,MAAM,
|
1
|
+
{"version":3,"file":"ChannelProvider.js","sourceRoot":"","sources":["ChannelProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,cAAmC,MAAM,kBAAkB,CAAC;AAInE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ1C,MAAM,eAAe,GAAG,CAAC,EACvB,cAAc,EACd,QAAQ,EACR,MAAM,EACe,EAAE,EAAE;IACzB,MAAM,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,CAAC,SAAS,CAAC,CA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AAC,CAAC;AACF,eAAe,eAAe,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useContext } from 'react';
|
2
|
-
import ChannelContext from '
|
2
|
+
import ChannelContext from '@jetshop/core/components/ChannelContext';
|
3
3
|
import { useQuery } from 'react-apollo';
|
4
4
|
import defaultCountrySettingsQuery from './CountrySettingsQuery.gql';
|
5
5
|
function useCountrySettings({ countrySettingsQuery } = {
|
@@ -11,7 +11,7 @@ function useCountrySettings({ countrySettingsQuery } = {
|
|
11
11
|
variables: { id: selectedChannel.id.toString() }
|
12
12
|
});
|
13
13
|
const { data, loading } = result;
|
14
|
-
const selectedCountrySettings = (_a = data === null || data === void 0 ? void 0 : data.channel) === null || _a === void 0 ? void 0 : _a.settings.countrySettings.find(countrySetting => {
|
14
|
+
const selectedCountrySettings = (_a = data === null || data === void 0 ? void 0 : data.channel) === null || _a === void 0 ? void 0 : _a.settings.countrySettings.find((countrySetting) => {
|
15
15
|
return countrySetting.countryCode === selectedChannel.country.code;
|
16
16
|
});
|
17
17
|
return {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useCountrySettings.js","sourceRoot":"","sources":["useCountrySettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,cAAc,MAAM,
|
1
|
+
{"version":3,"file":"useCountrySettings.js","sourceRoot":"","sources":["useCountrySettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,cAAc,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,2BAA2B,MAAM,4BAA4B,CAAC;AAGrE,SAAS,kBAAkB,CACzB,EAAE,oBAAoB,EAAE,GAAG;IACzB,oBAAoB,EAAE,2BAA2B;CAClD;;IAED,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IACvD,MAAM,MAAM,GAAG,QAAQ,CAAuB,oBAAoB,EAAE;QAClE,SAAS,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE;KACjD,CAAC,CAAC;IACH,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAEjC,MAAM,uBAAuB,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,0CAAE,QAAQ,CAAC,eAAe,CAAC,IAAI,CAC1E,CAAC,cAAc,EAAE,EAAE;QACjB,OAAO,cAAc,CAAC,WAAW,KAAK,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC;IACrE,CAAC,CACF,CAAC;IACF,OAAO;QACL,uBAAuB;QACvB,eAAe,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,0CAAE,QAAQ,CAAC,eAAe;QACxD,OAAO;KACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConfigProvider.js","sourceRoot":"","sources":["ConfigProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAgB,MAAM,OAAO,CAAC;AAM3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"ConfigProvider.js","sourceRoot":"","sources":["ConfigProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAgB,MAAM,OAAO,CAAC;AAM3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAqG5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC5C,SAAS,CACV,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,EAO9B;QAP8B,EAC7B,MAAM,EAAE,UAAU,EAClB,QAAQ,OAKT,EAJI,IAAI,cAHsB,sBAI9B,CADQ;IAKP,MAAM,MAAM,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC5C,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,kBAAC,KAAK,EAAE,MAAM,IAAM,IAAI,GAChD,QAAQ,CACkB,CAC9B,CAAC;AACJ,CAAC"}
|
package/components/Head.js
CHANGED
@@ -10,8 +10,12 @@ import { OpenGraphGeneralPageData } from '@jetshop/core/components/OpenGraph';
|
|
10
10
|
import { useShopConfig } from '@jetshop/core/hooks/useShopConfig';
|
11
11
|
import { getLanguageFromCulture } from '../ChannelHandler/channelUtils';
|
12
12
|
import { SiteLinksSearchStructuredData } from './StructuredData';
|
13
|
-
function renderAlternateRoutes(alternateRoute, channelsById) {
|
13
|
+
function renderAlternateRoutes(alternateRoute, channelsById, selectedChannelGroup = undefined) {
|
14
14
|
const channel = channelsById[alternateRoute.channelId];
|
15
|
+
// Only include alternate routes for this particular group if available
|
16
|
+
if (selectedChannelGroup && !selectedChannelGroup.includes(channel.id)) {
|
17
|
+
return null;
|
18
|
+
}
|
15
19
|
const url = channel.url;
|
16
20
|
const route = alternateRoute.route;
|
17
21
|
let languageBasename = '';
|
@@ -19,7 +23,7 @@ function renderAlternateRoutes(alternateRoute, channelsById) {
|
|
19
23
|
languageBasename = `/${getLanguageFromCulture(alternateRoute.culture)}`;
|
20
24
|
}
|
21
25
|
const href = `${url}${languageBasename}${route}`;
|
22
|
-
return (React.createElement("link", { key: href + alternateRoute.culture, rel: "alternate", href: href, hrefLang: alternateRoute.alias || alternateRoute.culture }));
|
26
|
+
return (React.createElement("link", Object.assign({ key: href + alternateRoute.culture, rel: "alternate", href: href, hrefLang: alternateRoute.alias || alternateRoute.culture }, (channel.groupName && { 'data-group': channel.groupName }))));
|
23
27
|
}
|
24
28
|
const queryParamsWhitelist = ['page'];
|
25
29
|
const Head = ({ data, route }) => {
|
@@ -32,7 +36,7 @@ const Head = ({ data, route }) => {
|
|
32
36
|
const whiteListedSearch = qs.stringify(queryStringObject, {
|
33
37
|
addQueryPrefix: true
|
34
38
|
});
|
35
|
-
const { selectedChannel, channelsById } = useContext(ChannelContext);
|
39
|
+
const { selectedChannel, channelsById, selectedChannelGroup } = useContext(ChannelContext);
|
36
40
|
const lang = selectedChannel.language.culture.split('-')[0];
|
37
41
|
const metaTags = ((_a = data === null || data === void 0 ? void 0 : data.head) === null || _a === void 0 ? void 0 : _a.metaTags) || [];
|
38
42
|
let languageBasename = '';
|
@@ -66,7 +70,8 @@ const Head = ({ data, route }) => {
|
|
66
70
|
route &&
|
67
71
|
isCurrentRouteCanonical &&
|
68
72
|
route.alternateRoutes &&
|
69
|
-
route.alternateRoutes.map((alternateRoute) => renderAlternateRoutes(alternateRoute, channelsById
|
73
|
+
route.alternateRoutes.map((alternateRoute) => renderAlternateRoutes(alternateRoute, channelsById, selectedChannelGroup &&
|
74
|
+
selectedChannelGroup.map((channel) => channel.id))),
|
70
75
|
href && React.createElement("link", { rel: "canonical", href: href })),
|
71
76
|
!disableOpenGraphGeneralData && (React.createElement(OpenGraphGeneralPageData, { route: route, data: data })),
|
72
77
|
(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,cAA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@jetshop/core/test-utils/variables';
|
|
4
4
|
import { HelmetProvider } from 'react-helmet-async';
|
5
5
|
|
6
6
|
import { OpenGraphProductData, OpenGraphGeneralPageData } from './';
|
7
|
-
import { ChannelProvider } from '
|
7
|
+
import { ChannelProvider } from '@jetshop/core/components/ChannelContext';
|
8
8
|
import { ChannelHandler } from '../../ChannelHandler/ChannelHandler';
|
9
|
-
import { ConfigProvider } from '
|
9
|
+
import { ConfigProvider } from '@jetshop/core/components/ConfigProvider';
|
10
10
|
import mockShopConfig from '../../test-utils/mockShopConfig';
|
11
11
|
|
12
12
|
function getMetaProperty(propertyName) {
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import ChannelContext from '
|
2
|
+
import ChannelContext from '@jetshop/core/components/ChannelContext';
|
3
3
|
import { Helmet } from 'react-helmet-async';
|
4
4
|
export const OpenGraphGeneralPageData = ({ data, route, optionalFields = [] }) => {
|
5
5
|
var _a, _b, _c, _d;
|
6
6
|
const { selectedChannel } = React.useContext(ChannelContext);
|
7
7
|
if (!data || data.__typename === 'Error')
|
8
8
|
return null;
|
9
|
-
const metaDescriptionTag = (_b = (_a = data.head) === null || _a === void 0 ? void 0 : _a.metaTags) === null || _b === void 0 ? void 0 : _b.filter(tag => tag.name === 'description')[0];
|
10
|
-
const overrides = optionalFields.map(tag => tag.property);
|
9
|
+
const metaDescriptionTag = (_b = (_a = data.head) === null || _a === void 0 ? void 0 : _a.metaTags) === null || _b === void 0 ? void 0 : _b.filter((tag) => tag.name === 'description')[0];
|
10
|
+
const overrides = optionalFields.map((tag) => tag.property);
|
11
11
|
const title = ((_c = data.head) === null || _c === void 0 ? void 0 : _c.title) ||
|
12
12
|
(data.__typename !== 'StartPage' && data.mainHeader) ||
|
13
13
|
data.name;
|
@@ -29,9 +29,9 @@ export const OpenGraphGeneralPageData = ({ data, route, optionalFields = [] }) =
|
|
29
29
|
? data.images[data.images.length - 1].url
|
30
30
|
: data.images[0].url)
|
31
31
|
}
|
32
|
-
].filter(tag => !overrides.includes(tag.property));
|
32
|
+
].filter((tag) => !overrides.includes(tag.property));
|
33
33
|
return (React.createElement(Helmet, null,
|
34
|
-
defaultTags.map(tag => tag.content && (React.createElement("meta", { key: `og-tag-${tag.property}`, property: tag.property, content: tag.content }))),
|
35
|
-
optionalFields.map(tag => (React.createElement("meta", { key: `og-tag-${tag.property}`, property: tag.property, content: tag.content })))));
|
34
|
+
defaultTags.map((tag) => tag.content && (React.createElement("meta", { key: `og-tag-${tag.property}`, property: tag.property, content: tag.content }))),
|
35
|
+
optionalFields.map((tag) => (React.createElement("meta", { key: `og-tag-${tag.property}`, property: tag.property, content: tag.content })))));
|
36
36
|
};
|
37
37
|
//# sourceMappingURL=OpenGraphGeneralPageData.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"OpenGraphGeneralPageData.js","sourceRoot":"","sources":["OpenGraphGeneralPageData.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,
|
1
|
+
{"version":3,"file":"OpenGraphGeneralPageData.js","sourceRoot":"","sources":["OpenGraphGeneralPageData.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AA4B5C,MAAM,CAAC,MAAM,wBAAwB,GACnC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,GAAG,EAAE,EAAE,EAAE,EAAE;;IACvC,MAAM,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IAE7D,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,KAAK,OAAO;QAAE,OAAO,IAAI,CAAC;IAEtD,MAAM,kBAAkB,GAAG,MAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,0CAAE,MAAM,CACpD,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CAAC,GAAG,CACd,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,OAAO,IAAI,CACb,8BACE,GAAG,EAAE,UAAU,GAAG,CAAC,QAAQ,EAAE,EAC7B,QAAQ,EAAE,GAAG,CAAC,QAAQ,EACtB,OAAO,EAAE,GAAG,CAAC,OAAO,GACpB,CACH,CACJ;QACA,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAC3B,8BACE,GAAG,EAAE,UAAU,GAAG,CAAC,QAAQ,EAAE,EAC7B,QAAQ,EAAE,GAAG,CAAC,QAAQ,EACtB,OAAO,EAAE,GAAG,CAAC,OAAO,GACpB,CACH,CAAC,CACK,CACV,CAAC;AACJ,CAAC,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { useProductVariants } from '../../hooks/useProductVariants';
|
3
3
|
import { useShopConfig } from '@jetshop/core/hooks/useShopConfig';
|
4
|
-
import ChannelContext from '
|
4
|
+
import ChannelContext from '@jetshop/core/components/ChannelContext';
|
5
5
|
import { Helmet } from 'react-helmet-async';
|
6
6
|
/**
|
7
7
|
* Get the brand field from a product's customFields.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"OpenGraphProductData.js","sourceRoot":"","sources":["OpenGraphProductData.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,cAAc,MAAM,
|
1
|
+
{"version":3,"file":"OpenGraphProductData.js","sourceRoot":"","sources":["OpenGraphProductData.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO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