@shopgate/engage 7.32.0-beta.7 → 7.32.0-beta.8

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.
Files changed (149) hide show
  1. package/account/components/Profile/ProfileAddressBook.d.ts.map +1 -1
  2. package/account/components/Profile/ProfileAddressBook.js +13 -22
  3. package/account/components/Profile/ProfileAddressCard.d.ts.map +1 -1
  4. package/account/components/Profile/ProfileAddressCard.js +8 -18
  5. package/account/components/Profile/ProfileForm.d.ts.map +1 -1
  6. package/account/components/Profile/ProfileForm.js +15 -42
  7. package/account/components/ProfileContact/ProfileContact.js +13 -21
  8. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts.map +1 -1
  9. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.js +40 -6
  10. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts +7 -0
  11. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts.map +1 -1
  12. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts +32 -0
  13. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts.map +1 -0
  14. package/admin-preview/initialization/_internal/initialFrontendSettings.js +43 -0
  15. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts +22 -0
  16. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts.map +1 -0
  17. package/admin-preview/initialization/awaitInitialFrontendSettings.js +84 -0
  18. package/back-in-stock/components/BackInStockButton/index.js +5 -5
  19. package/cart/components/CartItem/CartItemProductLayout.js +1 -0
  20. package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +7 -14
  21. package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +6 -24
  22. package/cart/components/CartSummaryWide/CartSummaryWide.js +2 -2
  23. package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +9 -23
  24. package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +8 -30
  25. package/cart/components/PaymentBar/testUtils/mockFactories.js +4 -11
  26. package/category/components/CategoryImage/index.js +13 -2
  27. package/checkout/components/AddressBook/AddressList.js +14 -23
  28. package/checkout/components/Checkout/CheckoutActions.js +4 -3
  29. package/checkout/components/Checkout/CheckoutAddress.js +8 -0
  30. package/checkout/components/Checkout/CheckoutSection.js +6 -2
  31. package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +6 -7
  32. package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +7 -17
  33. package/components/Card/Card.js +1 -1
  34. package/components/ChipLayout/index.js +2 -4
  35. package/components/NavigationHandler/connector.js +1 -1
  36. package/components/NavigationHandler/spec.js +10 -1
  37. package/components/Paper/Paper.d.ts +1 -2
  38. package/components/Paper/Paper.d.ts.map +1 -1
  39. package/components/Tabs/components/Tab.d.ts.map +1 -1
  40. package/components/Tabs/components/Tab.js +14 -16
  41. package/components/Typography/Typography.d.ts +1 -1
  42. package/components/v2/Button/Button.d.ts +24 -13
  43. package/components/v2/Button/Button.d.ts.map +1 -1
  44. package/components/v2/Button/Button.js +89 -37
  45. package/components/v2/ButtonBase/ButtonBase.d.ts +50 -10
  46. package/components/v2/ButtonBase/ButtonBase.d.ts.map +1 -1
  47. package/components/v2/ButtonBase/ButtonBase.js +153 -16
  48. package/components/v2/ButtonBase/hooks.d.ts +0 -1
  49. package/components/v2/ButtonBase/hooks.d.ts.map +1 -1
  50. package/components/v2/ButtonBase/hooks.js +36 -12
  51. package/components/v2/ButtonGroup/ButtonGroup.d.ts +11 -5
  52. package/components/v2/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  53. package/components/v2/ButtonGroup/ButtonGroup.js +30 -18
  54. package/components/v2/CircularProgress/CircularProgress.d.ts.map +1 -1
  55. package/components/v2/CircularProgress/CircularProgress.js +10 -5
  56. package/core/hooks/useNavigation.d.ts +10 -2
  57. package/core/hooks/useNavigation.d.ts.map +1 -1
  58. package/core/hooks/useNavigation.js +1 -2
  59. package/core/initialization/index.d.ts.map +1 -1
  60. package/core/initialization/index.js +24 -5
  61. package/core/router/conductor.d.ts +9 -0
  62. package/core/router/helpers.d.ts +28 -15
  63. package/core/router/helpers.d.ts.map +1 -1
  64. package/core/router/helpers.js +8 -8
  65. package/development/components/DevelopmentSettings/DevelopmentSettings.js +3 -3
  66. package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +7 -17
  67. package/favorites/components/List/List.d.ts.map +1 -1
  68. package/favorites/components/List/List.js +0 -1
  69. package/favorites/components/List/ListContent.js +4 -5
  70. package/favorites/components/Lists/Lists.js +4 -5
  71. package/filter/components/FilterPageContent/components/ApplyButton/index.js +8 -10
  72. package/filter/components/FilterPageContent/components/ResetButton/index.js +8 -6
  73. package/locations/components/ChangeLocationButton/ChangeLocationButton.js +10 -14
  74. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +4 -8
  75. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +1 -1
  76. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +8 -13
  77. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +10 -10
  78. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +8 -14
  79. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +9 -10
  80. package/locations/components/ReserveForm/ReserveForm.js +6 -7
  81. package/locations/components/StoreDetails/components/GetDirectionsButton.js +2 -4
  82. package/locations/components/StoreDetails/components/StoreDetails.js +5 -10
  83. package/locations/components/StoreDetails/components/StoresNearbyListItem.js +13 -21
  84. package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +5 -11
  85. package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +5 -11
  86. package/locations/components/StoreList/StoreSelectLocationButton.js +5 -11
  87. package/login/components/ForgotPassword/ForgotPassword.js +11 -23
  88. package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +5 -7
  89. package/package.json +7 -7
  90. package/page/components/NotFound.d.ts.map +1 -1
  91. package/page/components/NotFound.js +7 -6
  92. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts +1 -1
  93. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.js +2 -2
  94. package/page/components/WidgetVideo/WidgetVideo.d.ts +1 -1
  95. package/page/components/WidgetVideo/WidgetVideo.d.ts.map +1 -1
  96. package/page/helpers/index.d.ts +5 -2
  97. package/page/helpers/index.d.ts.map +1 -1
  98. package/page/helpers/index.js +8 -5
  99. package/page/widgets/Button/Button.js +2 -3
  100. package/page/widgets/NestedCategoryFilter/NestedCategoryFilter.js +8 -8
  101. package/page/widgets/ProductList/ProductList.js +18 -14
  102. package/page/widgets/Video/hooks.d.ts +2 -2
  103. package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +1 -11
  104. package/product/components/ProductGrid/components/Item/index.js +3 -2
  105. package/product/components/ProductImage/ProductImage.d.ts.map +1 -1
  106. package/product/components/ProductImage/ProductImage.js +7 -2
  107. package/product/components/ProductImage/ProductImagePlaceholder.js +3 -3
  108. package/product/components/UnitQuantityPicker/UnitQuantityPicker.d.ts.map +1 -1
  109. package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +14 -33
  110. package/push-opt-in/components/PushOptInModal/index.js +4 -4
  111. package/registration/components/Registration/RegistrationFormActions.js +4 -4
  112. package/reviews/components/Reviews/components/AllReviewsLink/index.js +6 -6
  113. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +4 -3
  114. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +28 -22
  115. package/reviews/components/Reviews/spec.js +5 -6
  116. package/settings/reducers/appSettings.d.ts.map +1 -1
  117. package/settings/reducers/appSettings.js +9 -1
  118. package/settings/selectors/appSettings.d.ts +16 -0
  119. package/settings/selectors/appSettings.d.ts.map +1 -1
  120. package/settings/selectors/appSettings.js +11 -1
  121. package/settings/types/appSettings.d.ts +23 -2
  122. package/settings/types/appSettings.d.ts.map +1 -1
  123. package/styles/helpers/index.d.ts +1 -0
  124. package/styles/helpers/index.js +1 -0
  125. package/styles/helpers/loadFontCss.d.ts +22 -0
  126. package/styles/helpers/loadFontCss.d.ts.map +1 -0
  127. package/styles/helpers/loadFontCss.js +138 -0
  128. package/styles/helpers/loadThemeCss.d.ts.map +1 -1
  129. package/styles/helpers/loadThemeCss.js +11 -0
  130. package/styles/theme/createTheme/createComponents.types.d.ts +25 -0
  131. package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
  132. package/styles/theme/createTheme/createComponents.types.js +25 -0
  133. package/styles/theme/createTheme/createShape.d.ts +2 -3
  134. package/styles/theme/createTheme/createShape.d.ts.map +1 -1
  135. package/styles/theme/createTheme/createShape.js +1 -2
  136. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts +3 -1
  137. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts.map +1 -1
  138. package/styles/theme/createTheme/createThemeFromColorScheme.js +4 -2
  139. package/styles/theme/createTheme/createTypography.d.ts +2 -1
  140. package/styles/theme/createTheme/createTypography.js +58 -18
  141. package/styles/theme/createTheme/index.js +1 -1
  142. package/styles/theme/index.d.ts +1 -0
  143. package/styles/theme/index.d.ts.map +1 -1
  144. package/tracking/components/CookieConsentModal/index.js +3 -4
  145. package/tracking/components/PrivacySettings/index.js +3 -3
  146. package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +0 -6
  147. package/cart/components/PaymentBar/PaymentBarReserveButton.js +0 -71
  148. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +0 -16
  149. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +0 -52
@@ -1,5 +1,6 @@
1
1
  import React, { useCallback, useState } from 'react';
2
- import { Button, Grid, I18n, Link, Switch, ConditionalWrapper } from '@shopgate/engage/components';
2
+ import { Grid, I18n, Link, Switch, ConditionalWrapper } from '@shopgate/engage/components';
3
+ import { Button } from '@shopgate/engage/components/v2';
3
4
  import PropTypes from 'prop-types';
4
5
  import { makeStyles } from '@shopgate/engage/styles';
5
6
  import { appConfig } from '@shopgate/engage';
@@ -148,7 +149,7 @@ const PrivacySettings = ({
148
149
  className: classes.buttonWrapper,
149
150
  children: [/*#__PURE__*/_jsx(Button, {
150
151
  onClick: () => handleAcceptAllCookies(),
151
- type: "primary",
152
+ color: "secondary",
152
153
  className: cx(classes.button, 'privacy-settings__button-accept-all'),
153
154
  children: /*#__PURE__*/_jsx(I18n.Text, {
154
155
  string: "cookieConsentModal.buttonAcceptAll"
@@ -158,7 +159,6 @@ const PrivacySettings = ({
158
159
  comfortCookiesAccepted: areComfortCookiesSelected,
159
160
  statisticsCookiesAccepted: areStatisticsCookiesSelected
160
161
  }),
161
- type: "simple",
162
162
  className: cx(classes.button, 'privacy-settings__button-accept-selected'),
163
163
  children: /*#__PURE__*/_jsx(I18n.Text, {
164
164
  string: "cookieConsentModal.modalButtonConfirmSelected"
@@ -1,6 +0,0 @@
1
- import { connect } from 'react-redux';
2
- import { historyReset } from '@shopgate/pwa-common/actions/router';
3
- const mapDispatchToProps = {
4
- historyReset
5
- };
6
- export default connect(null, mapDispatchToProps);
@@ -1,71 +0,0 @@
1
- import "core-js/modules/es.regexp.flags.js";
2
- import React from 'react';
3
- import PropTypes from 'prop-types';
4
- import { I18n, SurroundPortals, RippleButton } from '@shopgate/engage/components';
5
- import { makeStyles } from '@shopgate/engage/styles';
6
- import { CART_CHECKOUT_BUTTON } from '@shopgate/pwa-common-commerce/cart/constants/Portals';
7
- import { FulfillmentSheet, STAGE_RESERVE_FORM } from "../../../locations";
8
- import { CartContext } from "../../cart.context";
9
- import connect from "./PaymentBarReserveButton.connector";
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- const useStyles = makeStyles()(theme => ({
12
- button: {
13
- width: '100%',
14
- background: theme.components.ctaButton.background,
15
- color: `${theme.contrastColor(theme.components.ctaButton.background)}!important`
16
- },
17
- disabledButton: {
18
- width: '100%',
19
- background: theme.palette.action.disabledBackground,
20
- color: `${theme.contrastColor(theme.palette.action.disabledBackground)}!important`
21
- }
22
- }));
23
-
24
- /**
25
- * The reserve button component.
26
- * @param {Object} props The component props.
27
- * @param {Function} props.historyReset The history reset function.
28
- * @return {JSX.Element} The rendered component.
29
- */
30
- const PaymentBarReserveButton = ({
31
- historyReset
32
- }) => {
33
- const {
34
- classes
35
- } = useStyles();
36
- const {
37
- flags: {
38
- orderable
39
- }
40
- } = React.useContext(CartContext);
41
-
42
- /**
43
- * Handles the click on the button.
44
- */
45
- const handleClick = React.useCallback(() => {
46
- FulfillmentSheet.open({
47
- stage: STAGE_RESERVE_FORM,
48
- callback: (_location, _product, orderSuccess) => {
49
- if (orderSuccess === true) {
50
- historyReset();
51
- }
52
- }
53
- });
54
- }, [historyReset]);
55
- return /*#__PURE__*/_jsx(SurroundPortals, {
56
- portalName: CART_CHECKOUT_BUTTON,
57
- portalProps: {
58
- isActive: orderable
59
- },
60
- children: /*#__PURE__*/_jsx(RippleButton, {
61
- onClick: handleClick,
62
- disabled: !orderable,
63
- type: "regular",
64
- className: orderable ? classes.button : classes.disabledButton,
65
- children: /*#__PURE__*/_jsx(I18n.Text, {
66
- string: "cart.reserve"
67
- })
68
- })
69
- });
70
- };
71
- export default connect(PaymentBarReserveButton);
@@ -1,16 +0,0 @@
1
- import { connect } from 'react-redux';
2
- import { historyPush } from '@shopgate/pwa-common/actions/router/historyPush';
3
-
4
- /**
5
- * @param {Function} dispatch The redux dispatch function.
6
- * @return {Object} The extended component props.
7
- */
8
- const mapDispatchToProps = dispatch => ({
9
- openMap: url => dispatch(historyPush({
10
- pathname: url,
11
- state: {
12
- target: '_blank'
13
- }
14
- }))
15
- });
16
- export default connect(null, mapDispatchToProps);
@@ -1,52 +0,0 @@
1
- import React, { useMemo, useCallback } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { i18n, generateGoogleMapsDirectionsUrl } from '@shopgate/engage/core';
4
- import { makeStyles } from '@shopgate/engage/styles';
5
- import { RippleButton } from '@shopgate/engage/components';
6
- import connect from "./StoreFinderGetDirectionsButton.connector";
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- const useStyles = makeStyles()(theme => ({
9
- container: {},
10
- button: {
11
- width: '100%',
12
- background: `${theme.palette.primary.main} !important`,
13
- color: `${theme.palette.primary.contrastText} !important`,
14
- fontSize: `${theme.typography.body2.fontSize} !important`
15
- }
16
- }));
17
-
18
- /**
19
- * @param {Object} props The component props
20
- * @returns {JSX}
21
- */
22
- const StoreFinderGetDirectionsButton = ({
23
- address,
24
- openMap,
25
- className
26
- }) => {
27
- const {
28
- classes,
29
- cx
30
- } = useStyles();
31
- const url = useMemo(() => address && generateGoogleMapsDirectionsUrl(address), [address]);
32
- const handleClick = useCallback(() => {
33
- openMap(url);
34
- }, [openMap, url]);
35
- if (!address) {
36
- return null;
37
- }
38
- return /*#__PURE__*/_jsx("div", {
39
- className: cx(classes.container, className),
40
- children: /*#__PURE__*/_jsx(RippleButton, {
41
- onClick: handleClick,
42
- className: classes.button,
43
- children: i18n.text('locations.get_directions')
44
- })
45
- });
46
- };
47
- StoreFinderGetDirectionsButton.defaultProps = {
48
- address: null,
49
- openMap: () => {},
50
- className: null
51
- };
52
- export default connect(StoreFinderGetDirectionsButton);