@jetshop/core 5.15.0-alpha.015c7260 → 5.15.0-alpha.6caa50c3
Sign up to get free protection for your applications and to get access to all the features.
- package/ChannelHandler/ChannelHandler.js +1 -0
- package/ChannelHandler/ChannelHandler.js.map +1 -1
- package/ChannelHandler/channelUtils.js +0 -6
- package/ChannelHandler/channelUtils.js.map +1 -1
- package/ChannelHandler/redirectUtils.test.js +54 -105
- package/analytics/AnalyticsProvider.d.ts +5 -0
- package/analytics/AnalyticsProvider.js +31 -11
- package/analytics/AnalyticsProvider.js.map +1 -1
- package/analytics/integrations/ga4.js +62 -22
- package/analytics/integrations/ga4.js.map +1 -1
- package/analytics/integrations/gtag/gtag.js +35 -3
- package/analytics/integrations/gtag/gtag.js.map +1 -1
- package/analytics/integrations/gtm/gtm.d.ts +12 -0
- package/analytics/integrations/gtm/gtm.js +236 -0
- package/analytics/integrations/gtm/gtm.js.map +1 -0
- package/analytics/integrations/gtm/index.d.ts +1 -12
- package/analytics/integrations/gtm/index.js +1 -200
- package/analytics/integrations/gtm/index.js.map +1 -1
- package/analytics/trackerRegistry.d.ts +12 -0
- package/analytics/trackerRegistry.js +3 -1
- package/analytics/trackerRegistry.js.map +1 -1
- package/boot/SharedTree.js +1 -1
- package/boot/SharedTree.js.map +1 -1
- package/boot/apollo.js +2 -2
- package/boot/apollo.js.map +1 -1
- package/boot/client/startClient.js +2 -6
- package/boot/client/startClient.js.map +1 -1
- package/boot/server/createRenderer.js +7 -4
- package/boot/server/createRenderer.js.map +1 -1
- package/components/ChannelContext/ChannelContext.d.ts +1 -1
- package/components/ChannelContext/ChannelContext.js.map +1 -1
- package/components/ConfigProvider.d.ts +1 -0
- package/components/ConfigProvider.js.map +1 -1
- package/components/DynamicRoute/ProductRoute.js +9 -2
- package/components/DynamicRoute/ProductRoute.js.map +1 -1
- package/components/DynamicRoute/RouteResolver.d.ts +1 -1
- package/components/Head.js +6 -2
- package/components/Head.js.map +1 -1
- package/components/SortOrder/SortOrderContainer.js +7 -1
- package/components/SortOrder/SortOrderContainer.js.map +1 -1
- package/hooks/ProductList/list-transforms.d.ts +2 -0
- package/hooks/useChannels.d.ts +1 -0
- package/hooks/useChannels.js +10 -0
- package/hooks/useChannels.js.map +1 -0
- package/hooks/useCustomerOrders.test.js +5 -5
- package/package.json +2 -2
- package/test-utils/variables.js +1761 -188
- package/types.d.ts +71 -3
package/types.d.ts
CHANGED
@@ -241,6 +241,12 @@ export type Category = Document & {
|
|
241
241
|
* asking for this will result in a separate API call in the backend.
|
242
242
|
*/
|
243
243
|
data?: Maybe<Content>;
|
244
|
+
/**
|
245
|
+
* When set to false, the category will be excluded from sitemap. The frontend
|
246
|
+
* implementation should use this value to set meta tags to exclude the category
|
247
|
+
* from being indexed by crawlers. Defaults to true.
|
248
|
+
*/
|
249
|
+
allowWebIndexing?: Maybe<Scalars['Boolean']>;
|
244
250
|
};
|
245
251
|
|
246
252
|
|
@@ -759,10 +765,40 @@ export type Discount = {
|
|
759
765
|
externalId?: Maybe<Scalars['ID']>;
|
760
766
|
name?: Maybe<Scalars['String']>;
|
761
767
|
value?: Maybe<Price>;
|
768
|
+
type?: Maybe<DiscountType>;
|
762
769
|
description?: Maybe<Scalars['String']>;
|
763
770
|
campaign?: Maybe<Category>;
|
764
771
|
};
|
765
772
|
|
773
|
+
export enum DiscountType {
|
774
|
+
/** No discount defined */
|
775
|
+
Undefined = 'UNDEFINED',
|
776
|
+
/** Discount drops price of the order total by defined amount */
|
777
|
+
FixedAmount = 'FIXED_AMOUNT',
|
778
|
+
/** Discount drops price of the product by X % */
|
779
|
+
Percent = 'PERCENT',
|
780
|
+
/** Discount will get the amount of the cheapest product and use this as a discount */
|
781
|
+
Items = 'ITEMS',
|
782
|
+
/** Discount drops total price of the product if there is at least X of them in cart */
|
783
|
+
ItemsPercentageLimit = 'ITEMS_PERCENTAGE_LIMIT',
|
784
|
+
/** Only a collection of products */
|
785
|
+
OnlyUseLandingPage = 'ONLY_USE_LANDING_PAGE',
|
786
|
+
/** Discount drops price of the least expensive product in cart */
|
787
|
+
PercentOnLeastExpensiveItem = 'PERCENT_ON_LEAST_EXPENSIVE_ITEM',
|
788
|
+
/** Discount drops price of the most expensive product in cart */
|
789
|
+
PercentOnMostExpensiveItem = 'PERCENT_ON_MOST_EXPENSIVE_ITEM',
|
790
|
+
/** Discount allows to get a free gift when the product is added */
|
791
|
+
FreeProduct = 'FREE_PRODUCT',
|
792
|
+
/** Discount allows to get free shipping option for the product */
|
793
|
+
FreeShipping = 'FREE_SHIPPING',
|
794
|
+
/** Discount drops price for the package when all products in the package is added to cart */
|
795
|
+
PackageDiscount = 'PACKAGE_DISCOUNT',
|
796
|
+
/** Discount on the order total from a voucher */
|
797
|
+
BonusVoucherDiscount = 'BONUS_VOUCHER_DISCOUNT',
|
798
|
+
/** Discount allows to buy amount of X of the article, but pay only for amount of Y */
|
799
|
+
BuyXArticlesPayYAmount = 'BUY_X_ARTICLES_PAY_Y_AMOUNT'
|
800
|
+
}
|
801
|
+
|
766
802
|
export type Document = {
|
767
803
|
head?: Maybe<HtmlHead>;
|
768
804
|
primaryRoute?: Maybe<Route>;
|
@@ -1219,11 +1255,13 @@ export type MutationLoginExternalCustomerArgs = {
|
|
1219
1255
|
|
1220
1256
|
|
1221
1257
|
export type MutationLoginArgs = {
|
1222
|
-
password
|
1258
|
+
password?: Maybe<Scalars['String']>;
|
1223
1259
|
email?: Maybe<Scalars['String']>;
|
1224
1260
|
pid?: Maybe<Scalars['String']>;
|
1225
1261
|
externalId?: Maybe<Scalars['String']>;
|
1226
1262
|
memberNumber?: Maybe<Scalars['String']>;
|
1263
|
+
externalHashId?: Maybe<Scalars['String']>;
|
1264
|
+
timeStamp?: Maybe<Scalars['String']>;
|
1227
1265
|
};
|
1228
1266
|
|
1229
1267
|
|
@@ -1585,6 +1623,12 @@ export type Page = Document & {
|
|
1585
1623
|
* returned if they are hidden. The `includeHidden` flag has no effect on this.
|
1586
1624
|
*/
|
1587
1625
|
subPages?: Maybe<Array<Page>>;
|
1626
|
+
/**
|
1627
|
+
* When set to false, the page will be excluded from sitemap. The frontend
|
1628
|
+
* implementation should use this value to set meta tags to exclude the page from
|
1629
|
+
* being indexed by crawlers. Defaults to true.
|
1630
|
+
*/
|
1631
|
+
allowWebIndexing?: Maybe<Scalars['Boolean']>;
|
1588
1632
|
};
|
1589
1633
|
|
1590
1634
|
|
@@ -1705,7 +1749,12 @@ export type Product = Document & {
|
|
1705
1749
|
relatedProducts?: Maybe<Array<Maybe<Product>>>;
|
1706
1750
|
/** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
|
1707
1751
|
badges?: Maybe<Array<Maybe<ProductBadge>>>;
|
1708
|
-
/**
|
1752
|
+
/**
|
1753
|
+
* The current price.
|
1754
|
+
* - Will be a Customer specific price if that Customer has a separate price list.
|
1755
|
+
* - Will be the member price if Customer is logged in and `Product.hasMemberPrice` is true.
|
1756
|
+
* - Will be the non-member price if Customer is not logged in and `Product.hasMemberPrice` is true.
|
1757
|
+
*/
|
1709
1758
|
price?: Maybe<Price>;
|
1710
1759
|
hidePrice?: Maybe<Scalars['Boolean']>;
|
1711
1760
|
/**
|
@@ -1725,6 +1774,14 @@ export type Product = Document & {
|
|
1725
1774
|
* time interval will be that of the variant which price is shown on the product.
|
1726
1775
|
*/
|
1727
1776
|
priceDateSpan?: Maybe<ProductPriceDateSpan>;
|
1777
|
+
/** Indicates if this product and its variants has member prices. */
|
1778
|
+
hasMemberPrice?: Maybe<Scalars['Boolean']>;
|
1779
|
+
/**
|
1780
|
+
* The price a Customer would get if member prices are active and the Customer is logged in.
|
1781
|
+
* - Will be null if `Product.hasMemberPrice` is false.
|
1782
|
+
* - Will be set if `Product.hasMemberPrice` is true.
|
1783
|
+
*/
|
1784
|
+
memberPrice?: Maybe<Price>;
|
1728
1785
|
/**
|
1729
1786
|
* Specifies input field(s) for the Customer to populate on the Product that will then carry through to the Order.
|
1730
1787
|
* If 'required' is true the Product should not be purchasable until the field is populated.
|
@@ -1986,7 +2043,12 @@ export type ProductVariant = {
|
|
1986
2043
|
articleNumber: Scalars['String'];
|
1987
2044
|
/** Variant values (combination of option values) */
|
1988
2045
|
values: Array<Maybe<Scalars['String']>>;
|
1989
|
-
/**
|
2046
|
+
/**
|
2047
|
+
* The current price.
|
2048
|
+
* - Will be a Customer specific price if that Customer has a separate price list.
|
2049
|
+
* - Will be the member price if Customer is logged in and `Product.hasMemberPrice` is true.
|
2050
|
+
* - Will be the non-member price if Customer is not logged in and `Product.hasMemberPrice` is true.
|
2051
|
+
*/
|
1990
2052
|
price?: Maybe<Price>;
|
1991
2053
|
/**
|
1992
2054
|
* The previous price (i.e. this will be higher than `price` if the product is
|
@@ -2002,6 +2064,12 @@ export type ProductVariant = {
|
|
2002
2064
|
recommendedPrice?: Maybe<Price>;
|
2003
2065
|
/** The time interval of the discounted price. */
|
2004
2066
|
priceDateSpan?: Maybe<ProductPriceDateSpan>;
|
2067
|
+
/**
|
2068
|
+
* The price a Customer would get if member prices are active and the Customer is logged in.
|
2069
|
+
* - Will be null if `Product.hasMemberPrice` is false.
|
2070
|
+
* - Will be set if `Product.hasMemberPrice` is true.
|
2071
|
+
*/
|
2072
|
+
memberPrice?: Maybe<Price>;
|
2005
2073
|
/** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
|
2006
2074
|
stockStatus?: Maybe<StockStatus>;
|
2007
2075
|
/** NB: Carries a performance cost, as asking for this will result in a separate API call in the backend. */
|