@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.
- package/account/components/Profile/ProfileAddressBook.d.ts.map +1 -1
- package/account/components/Profile/ProfileAddressBook.js +13 -22
- package/account/components/Profile/ProfileAddressCard.d.ts.map +1 -1
- package/account/components/Profile/ProfileAddressCard.js +8 -18
- package/account/components/Profile/ProfileForm.d.ts.map +1 -1
- package/account/components/Profile/ProfileForm.js +15 -42
- package/account/components/ProfileContact/ProfileContact.js +13 -21
- package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts.map +1 -1
- package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.js +40 -6
- package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts +7 -0
- package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts.map +1 -1
- package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts +32 -0
- package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts.map +1 -0
- package/admin-preview/initialization/_internal/initialFrontendSettings.js +43 -0
- package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts +22 -0
- package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts.map +1 -0
- package/admin-preview/initialization/awaitInitialFrontendSettings.js +84 -0
- package/back-in-stock/components/BackInStockButton/index.js +5 -5
- package/cart/components/CartItem/CartItemProductLayout.js +1 -0
- package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +7 -14
- package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +6 -24
- package/cart/components/CartSummaryWide/CartSummaryWide.js +2 -2
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +9 -23
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +8 -30
- package/cart/components/PaymentBar/testUtils/mockFactories.js +4 -11
- package/category/components/CategoryImage/index.js +13 -2
- package/checkout/components/AddressBook/AddressList.js +14 -23
- package/checkout/components/Checkout/CheckoutActions.js +4 -3
- package/checkout/components/Checkout/CheckoutAddress.js +8 -0
- package/checkout/components/Checkout/CheckoutSection.js +6 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +6 -7
- package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +7 -17
- package/components/Card/Card.js +1 -1
- package/components/ChipLayout/index.js +2 -4
- package/components/NavigationHandler/connector.js +1 -1
- package/components/NavigationHandler/spec.js +10 -1
- package/components/Paper/Paper.d.ts +1 -2
- package/components/Paper/Paper.d.ts.map +1 -1
- package/components/Tabs/components/Tab.d.ts.map +1 -1
- package/components/Tabs/components/Tab.js +14 -16
- package/components/Typography/Typography.d.ts +1 -1
- package/components/v2/Button/Button.d.ts +24 -13
- package/components/v2/Button/Button.d.ts.map +1 -1
- package/components/v2/Button/Button.js +89 -37
- package/components/v2/ButtonBase/ButtonBase.d.ts +50 -10
- package/components/v2/ButtonBase/ButtonBase.d.ts.map +1 -1
- package/components/v2/ButtonBase/ButtonBase.js +153 -16
- package/components/v2/ButtonBase/hooks.d.ts +0 -1
- package/components/v2/ButtonBase/hooks.d.ts.map +1 -1
- package/components/v2/ButtonBase/hooks.js +36 -12
- package/components/v2/ButtonGroup/ButtonGroup.d.ts +11 -5
- package/components/v2/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/components/v2/ButtonGroup/ButtonGroup.js +30 -18
- package/components/v2/CircularProgress/CircularProgress.d.ts.map +1 -1
- package/components/v2/CircularProgress/CircularProgress.js +10 -5
- package/core/hooks/useNavigation.d.ts +10 -2
- package/core/hooks/useNavigation.d.ts.map +1 -1
- package/core/hooks/useNavigation.js +1 -2
- package/core/initialization/index.d.ts.map +1 -1
- package/core/initialization/index.js +24 -5
- package/core/router/conductor.d.ts +9 -0
- package/core/router/helpers.d.ts +28 -15
- package/core/router/helpers.d.ts.map +1 -1
- package/core/router/helpers.js +8 -8
- package/development/components/DevelopmentSettings/DevelopmentSettings.js +3 -3
- package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +7 -17
- package/favorites/components/List/List.d.ts.map +1 -1
- package/favorites/components/List/List.js +0 -1
- package/favorites/components/List/ListContent.js +4 -5
- package/favorites/components/Lists/Lists.js +4 -5
- package/filter/components/FilterPageContent/components/ApplyButton/index.js +8 -10
- package/filter/components/FilterPageContent/components/ResetButton/index.js +8 -6
- package/locations/components/ChangeLocationButton/ChangeLocationButton.js +10 -14
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +4 -8
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +1 -1
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +8 -13
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +10 -10
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +8 -14
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +9 -10
- package/locations/components/ReserveForm/ReserveForm.js +6 -7
- package/locations/components/StoreDetails/components/GetDirectionsButton.js +2 -4
- package/locations/components/StoreDetails/components/StoreDetails.js +5 -10
- package/locations/components/StoreDetails/components/StoresNearbyListItem.js +13 -21
- package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +5 -11
- package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +5 -11
- package/locations/components/StoreList/StoreSelectLocationButton.js +5 -11
- package/login/components/ForgotPassword/ForgotPassword.js +11 -23
- package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +5 -7
- package/package.json +7 -7
- package/page/components/NotFound.d.ts.map +1 -1
- package/page/components/NotFound.js +7 -6
- package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts +1 -1
- package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.js +2 -2
- package/page/components/WidgetVideo/WidgetVideo.d.ts +1 -1
- package/page/components/WidgetVideo/WidgetVideo.d.ts.map +1 -1
- package/page/helpers/index.d.ts +5 -2
- package/page/helpers/index.d.ts.map +1 -1
- package/page/helpers/index.js +8 -5
- package/page/widgets/Button/Button.js +2 -3
- package/page/widgets/NestedCategoryFilter/NestedCategoryFilter.js +8 -8
- package/page/widgets/ProductList/ProductList.js +18 -14
- package/page/widgets/Video/hooks.d.ts +2 -2
- package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +1 -11
- package/product/components/ProductGrid/components/Item/index.js +3 -2
- package/product/components/ProductImage/ProductImage.d.ts.map +1 -1
- package/product/components/ProductImage/ProductImage.js +7 -2
- package/product/components/ProductImage/ProductImagePlaceholder.js +3 -3
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.d.ts.map +1 -1
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +14 -33
- package/push-opt-in/components/PushOptInModal/index.js +4 -4
- package/registration/components/Registration/RegistrationFormActions.js +4 -4
- package/reviews/components/Reviews/components/AllReviewsLink/index.js +6 -6
- package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +4 -3
- package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +28 -22
- package/reviews/components/Reviews/spec.js +5 -6
- package/settings/reducers/appSettings.d.ts.map +1 -1
- package/settings/reducers/appSettings.js +9 -1
- package/settings/selectors/appSettings.d.ts +16 -0
- package/settings/selectors/appSettings.d.ts.map +1 -1
- package/settings/selectors/appSettings.js +11 -1
- package/settings/types/appSettings.d.ts +23 -2
- package/settings/types/appSettings.d.ts.map +1 -1
- package/styles/helpers/index.d.ts +1 -0
- package/styles/helpers/index.js +1 -0
- package/styles/helpers/loadFontCss.d.ts +22 -0
- package/styles/helpers/loadFontCss.d.ts.map +1 -0
- package/styles/helpers/loadFontCss.js +138 -0
- package/styles/helpers/loadThemeCss.d.ts.map +1 -1
- package/styles/helpers/loadThemeCss.js +11 -0
- package/styles/theme/createTheme/createComponents.types.d.ts +25 -0
- package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
- package/styles/theme/createTheme/createComponents.types.js +25 -0
- package/styles/theme/createTheme/createShape.d.ts +2 -3
- package/styles/theme/createTheme/createShape.d.ts.map +1 -1
- package/styles/theme/createTheme/createShape.js +1 -2
- package/styles/theme/createTheme/createThemeFromColorScheme.d.ts +3 -1
- package/styles/theme/createTheme/createThemeFromColorScheme.d.ts.map +1 -1
- package/styles/theme/createTheme/createThemeFromColorScheme.js +4 -2
- package/styles/theme/createTheme/createTypography.d.ts +2 -1
- package/styles/theme/createTheme/createTypography.js +58 -18
- package/styles/theme/createTheme/index.js +1 -1
- package/styles/theme/index.d.ts +1 -0
- package/styles/theme/index.d.ts.map +1 -1
- package/tracking/components/CookieConsentModal/index.js +3 -4
- package/tracking/components/PrivacySettings/index.js +3 -3
- package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +0 -6
- package/cart/components/PaymentBar/PaymentBarReserveButton.js +0 -71
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +0 -16
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +0 -52
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
|
-
import {
|
|
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
|
-
|
|
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,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);
|