@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,7 +1,8 @@
|
|
|
1
1
|
import 'react-phone-number-input/style.css';
|
|
2
2
|
import React, { useState, useContext, useMemo, useRef, useLayoutEffect, useCallback } from 'react';
|
|
3
3
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
4
|
-
import { TextField,
|
|
4
|
+
import { TextField, RadioGroup, RadioGroupItem, ProgressBar, Typography } from '@shopgate/engage/components';
|
|
5
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
5
6
|
import { i18n } from '@shopgate/engage/core/helpers';
|
|
6
7
|
import { useFormState } from "../../../core/hooks/useFormState";
|
|
7
8
|
import { FulfillmentContext } from "../../locations.context";
|
|
@@ -35,9 +36,6 @@ const useStyles = makeStyles()(theme => ({
|
|
|
35
36
|
paddingRight: 0
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
|
-
button: {
|
|
39
|
-
width: '100%'
|
|
40
|
-
},
|
|
41
39
|
progressBar: {
|
|
42
40
|
height: '4px',
|
|
43
41
|
position: 'relative'
|
|
@@ -239,10 +237,11 @@ function ReserveFormUnwrapped() {
|
|
|
239
237
|
className: classes.formField,
|
|
240
238
|
errorText: i18n.text(validationErrors.email2)
|
|
241
239
|
})]
|
|
242
|
-
}), /*#__PURE__*/_jsx(
|
|
243
|
-
type: "
|
|
240
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
241
|
+
type: "submit",
|
|
242
|
+
color: "primary",
|
|
243
|
+
fullWidth: true,
|
|
244
244
|
disabled: changed || valid === false || isSubmitting,
|
|
245
|
-
className: classes.button,
|
|
246
245
|
children: i18n.text('locations.place_reservation')
|
|
247
246
|
})]
|
|
248
247
|
})]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { historyPush } from '@shopgate/pwa-common/actions/router';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import {
|
|
4
|
+
import { ButtonBase } from '@shopgate/engage/components/v2';
|
|
5
5
|
import { generateGoogleMapsDirectionsUrl, i18n } from '@shopgate/engage/core';
|
|
6
6
|
import { useDispatch } from 'react-redux';
|
|
7
7
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
@@ -38,10 +38,8 @@ const GetDirectionsButton = ({
|
|
|
38
38
|
}));
|
|
39
39
|
};
|
|
40
40
|
return /*#__PURE__*/_jsx("div", {
|
|
41
|
-
children: /*#__PURE__*/_jsx(
|
|
41
|
+
children: /*#__PURE__*/_jsx(ButtonBase, {
|
|
42
42
|
onClick: handleClick,
|
|
43
|
-
role: "button",
|
|
44
|
-
type: "plain",
|
|
45
43
|
children: /*#__PURE__*/_jsx("span", {
|
|
46
44
|
className: classes.buttonText,
|
|
47
45
|
children: i18n.text('location.getDirections')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useContext, useMemo } from 'react';
|
|
2
|
-
import { LocationIcon,
|
|
2
|
+
import { LocationIcon, Link, ConditionalWrapper, Typography } from '@shopgate/engage/components';
|
|
3
|
+
import { Button, ButtonBase } from '@shopgate/engage/components/v2';
|
|
3
4
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
4
5
|
import { getWeekDaysOrder } from '@shopgate/engage/core';
|
|
5
6
|
import { i18n } from '@shopgate/engage/core/helpers';
|
|
@@ -53,9 +54,6 @@ const useStyles = makeStyles()(theme => ({
|
|
|
53
54
|
phoneNumber: {
|
|
54
55
|
textDecoration: 'underline'
|
|
55
56
|
},
|
|
56
|
-
makeMyStoreButton: {
|
|
57
|
-
color: theme.palette.primary.main
|
|
58
|
-
},
|
|
59
57
|
comingSoon: {
|
|
60
58
|
fontStyle: 'italic'
|
|
61
59
|
},
|
|
@@ -97,10 +95,8 @@ const StoreDetails = () => {
|
|
|
97
95
|
return /*#__PURE__*/_jsxs("div", {
|
|
98
96
|
children: [/*#__PURE__*/_jsx(ConditionalWrapper, {
|
|
99
97
|
condition: !isRouteLocationPreferred,
|
|
100
|
-
wrapper: children => /*#__PURE__*/_jsx(
|
|
98
|
+
wrapper: children => /*#__PURE__*/_jsx(ButtonBase, {
|
|
101
99
|
onClick: () => selectLocation(routeLocation, true),
|
|
102
|
-
role: "button",
|
|
103
|
-
type: "plain",
|
|
104
100
|
children: children
|
|
105
101
|
}),
|
|
106
102
|
children: /*#__PURE__*/_jsxs("div", {
|
|
@@ -144,10 +140,9 @@ const StoreDetails = () => {
|
|
|
144
140
|
children: [/*#__PURE__*/_jsx(GetDirectionsButton, {
|
|
145
141
|
address: address
|
|
146
142
|
}), !isComingSoon && !isRouteLocationPreferred && /*#__PURE__*/_jsx(Button, {
|
|
143
|
+
variant: "text",
|
|
144
|
+
color: "primary",
|
|
147
145
|
onClick: () => selectLocation(routeLocation, true),
|
|
148
|
-
role: "button",
|
|
149
|
-
type: "plain",
|
|
150
|
-
className: classes.makeMyStoreButton,
|
|
151
146
|
children: /*#__PURE__*/_jsx("span", {
|
|
152
147
|
children: i18n.text('location.makeMyStore')
|
|
153
148
|
})
|
|
@@ -2,7 +2,8 @@ import React, { useContext } from 'react';
|
|
|
2
2
|
import { useDispatch } from 'react-redux';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
5
|
-
import {
|
|
5
|
+
import { Typography } from '@shopgate/engage/components';
|
|
6
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
6
7
|
import { i18n } from '@shopgate/engage/core/helpers';
|
|
7
8
|
import { historyPush } from '@shopgate/engage/core';
|
|
8
9
|
import formatDistance from "../../../helpers/formatDistance";
|
|
@@ -10,9 +11,6 @@ import { STORE_DETAILS_PATH } from "../../../constants";
|
|
|
10
11
|
import { StoreDetailsContext } from "../../../providers/StoreDetailsContext";
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
13
|
const useStyles = makeStyles()(theme => ({
|
|
13
|
-
button: {
|
|
14
|
-
padding: '0px !important'
|
|
15
|
-
},
|
|
16
14
|
locationRow: {
|
|
17
15
|
borderBottom: `1px solid ${theme.components.border.light}`,
|
|
18
16
|
borderTop: `1px solid ${theme.components.border.light}`,
|
|
@@ -43,7 +41,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
43
41
|
textAlign: 'start'
|
|
44
42
|
},
|
|
45
43
|
cellContainer: {
|
|
46
|
-
padding:
|
|
44
|
+
padding: 6,
|
|
47
45
|
textAlign: 'end'
|
|
48
46
|
},
|
|
49
47
|
cell: {
|
|
@@ -51,7 +49,7 @@ const useStyles = makeStyles()(theme => ({
|
|
|
51
49
|
},
|
|
52
50
|
buttonContainer: {
|
|
53
51
|
display: 'flex',
|
|
54
|
-
gap: '
|
|
52
|
+
gap: '0 16px',
|
|
55
53
|
flexWrap: 'wrap',
|
|
56
54
|
justifyContent: 'flex-end'
|
|
57
55
|
}
|
|
@@ -121,13 +119,11 @@ const StoresNearbyListItem = ({
|
|
|
121
119
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
122
120
|
className: classes.makeMyStore,
|
|
123
121
|
children: [!isComingSoon && /*#__PURE__*/_jsx(Button, {
|
|
124
|
-
|
|
122
|
+
variant: "link",
|
|
123
|
+
color: "secondary",
|
|
124
|
+
size: "small",
|
|
125
125
|
onClick: () => selectLocation(location, true),
|
|
126
|
-
role: "button",
|
|
127
|
-
type: "primary",
|
|
128
|
-
flat: true,
|
|
129
126
|
disabled: isPreferredLocation,
|
|
130
|
-
wrapContent: false,
|
|
131
127
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
132
128
|
variant: "body2",
|
|
133
129
|
component: "span",
|
|
@@ -135,12 +131,10 @@ const StoresNearbyListItem = ({
|
|
|
135
131
|
children: `${i18n.text('location.makeMyStore')}`
|
|
136
132
|
})
|
|
137
133
|
}), isComingSoon && /*#__PURE__*/_jsx(Button, {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
flat: true,
|
|
134
|
+
variant: "link",
|
|
135
|
+
color: "secondary",
|
|
136
|
+
size: "small",
|
|
142
137
|
disabled: true,
|
|
143
|
-
wrapContent: false,
|
|
144
138
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
145
139
|
variant: "body2",
|
|
146
140
|
component: "span",
|
|
@@ -151,12 +145,10 @@ const StoresNearbyListItem = ({
|
|
|
151
145
|
}), /*#__PURE__*/_jsx("div", {
|
|
152
146
|
className: classes.storeInfo,
|
|
153
147
|
children: /*#__PURE__*/_jsx(Button, {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
flat: true,
|
|
148
|
+
variant: "link",
|
|
149
|
+
color: "secondary",
|
|
150
|
+
size: "small",
|
|
158
151
|
onClick: () => openStoreDetails(code),
|
|
159
|
-
wrapContent: false,
|
|
160
152
|
children: /*#__PURE__*/_jsx(Typography, {
|
|
161
153
|
variant: "body2",
|
|
162
154
|
component: "span",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useContext, useMemo } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
3
3
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
4
4
|
import { StoreContext } from "./Store.context";
|
|
5
5
|
import { i18n } from "../../../core/helpers";
|
|
@@ -8,14 +8,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
8
8
|
const useStyles = makeStyles()(theme => ({
|
|
9
9
|
selectLocationButtonWrapper: {
|
|
10
10
|
padding: theme.spacing(0, 2, 1, 2)
|
|
11
|
-
},
|
|
12
|
-
selectLocationButton: {
|
|
13
|
-
width: '100%',
|
|
14
|
-
fontSize: `${theme.typography.body2.fontSize} !important`,
|
|
15
|
-
':not(:disabled)': {
|
|
16
|
-
background: `${theme.palette.primary.main} !important`,
|
|
17
|
-
color: `${theme.palette.primary.contrastText} !important`
|
|
18
|
-
}
|
|
19
11
|
}
|
|
20
12
|
}));
|
|
21
13
|
|
|
@@ -41,9 +33,11 @@ export const StoreFinderSelectLocationButton = () => {
|
|
|
41
33
|
const isSelected = useMemo(() => selectedLocation?.code === store?.code, [selectedLocation, store]);
|
|
42
34
|
return /*#__PURE__*/_jsx("div", {
|
|
43
35
|
className: classes.selectLocationButtonWrapper,
|
|
44
|
-
children: /*#__PURE__*/_jsx(
|
|
36
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
37
|
+
color: "primary",
|
|
38
|
+
size: "small",
|
|
39
|
+
fullWidth: true,
|
|
45
40
|
onClick: handleClick,
|
|
46
|
-
className: classes.selectLocationButton,
|
|
47
41
|
disabled: isLoading || store?.isComingSoon || isSelected,
|
|
48
42
|
children: i18n.text(store?.isComingSoon ? 'location.comingSoon' : 'locations.select_location')
|
|
49
43
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useContext } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import {
|
|
3
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
4
4
|
import { historyPush } from '@shopgate/engage/core';
|
|
5
5
|
import { connect } from 'react-redux';
|
|
6
6
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
@@ -10,14 +10,6 @@ import { StoreFinderContext } from "../../locations.context";
|
|
|
10
10
|
import { STORE_DETAILS_PATH } from "../../constants";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
const useStyles = makeStyles()(theme => ({
|
|
13
|
-
showStoreInfoButton: {
|
|
14
|
-
width: '100%',
|
|
15
|
-
fontSize: `${theme.typography.body2.fontSize} !important`,
|
|
16
|
-
':not(:disabled)': {
|
|
17
|
-
background: `${theme.palette.primary.main} !important`,
|
|
18
|
-
color: `${theme.palette.primary.contrastText} !important`
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
13
|
showStoreInfoButtonWrapper: {
|
|
22
14
|
padding: theme.spacing(0, 2, 1, 2)
|
|
23
15
|
}
|
|
@@ -54,9 +46,11 @@ const StoreFinderStoreInfoButton = ({
|
|
|
54
46
|
}, [openStoreDetail, store]);
|
|
55
47
|
return /*#__PURE__*/_jsx("div", {
|
|
56
48
|
className: classes.showStoreInfoButtonWrapper,
|
|
57
|
-
children: /*#__PURE__*/_jsx(
|
|
49
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
50
|
+
color: "primary",
|
|
51
|
+
size: "small",
|
|
52
|
+
fullWidth: true,
|
|
58
53
|
onClick: handleClick,
|
|
59
|
-
className: classes.showStoreInfoButton,
|
|
60
54
|
disabled: isLoading,
|
|
61
55
|
children: i18n.text('locations.store_info')
|
|
62
56
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useContext, useCallback } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
5
5
|
import { isProductAvailable } from "../../helpers";
|
|
@@ -11,14 +11,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
const useStyles = makeStyles()(theme => ({
|
|
12
12
|
selectLocationButtonWrapper: {
|
|
13
13
|
padding: theme.spacing(0, 2, 1, 2)
|
|
14
|
-
},
|
|
15
|
-
selectLocationButton: {
|
|
16
|
-
width: '100%',
|
|
17
|
-
fontSize: `${theme.typography.body2.fontSize} !important`,
|
|
18
|
-
':not(:disabled)': {
|
|
19
|
-
background: theme.palette.primary.main,
|
|
20
|
-
color: theme.palette.primary.contrastText
|
|
21
|
-
}
|
|
22
14
|
}
|
|
23
15
|
}));
|
|
24
16
|
|
|
@@ -54,9 +46,11 @@ const StoreSelectLocationButton = ({
|
|
|
54
46
|
}, [isAvailable, noInventory, product, selectLocation, setPostalCode, setUserSearchZipLocationFromSelection, store]);
|
|
55
47
|
return /*#__PURE__*/_jsx("div", {
|
|
56
48
|
className: classes.selectLocationButtonWrapper,
|
|
57
|
-
children: /*#__PURE__*/_jsx(
|
|
49
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
50
|
+
color: "primary",
|
|
51
|
+
size: "small",
|
|
52
|
+
fullWidth: true,
|
|
58
53
|
onClick: handleClick,
|
|
59
|
-
className: classes.selectLocationButton,
|
|
60
54
|
disabled: isLoading || store?.isComingSoon || !noInventory && !isAvailable,
|
|
61
55
|
children: i18n.text(store?.isComingSoon ? 'location.comingSoon' : 'locations.select_location')
|
|
62
56
|
})
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { makeStyles, responsiveMediaQuery } from '@shopgate/engage/styles';
|
|
4
|
-
import {
|
|
4
|
+
import { I18n, ArrowIcon, Typography } from '@shopgate/engage/components';
|
|
5
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
5
6
|
import { StylePresets } from '@shopgate/engage/components/Form';
|
|
6
7
|
import TextField from '@shopgate/pwa-ui-shared/TextField';
|
|
7
8
|
import { i18n, EUSERNOTFOUND } from '@shopgate/engage/core';
|
|
@@ -41,9 +42,6 @@ const useStyles = makeStyles()(theme => ({
|
|
|
41
42
|
paddingTop: theme.spacing(4),
|
|
42
43
|
paddingBottom: theme.spacing(3)
|
|
43
44
|
},
|
|
44
|
-
button: {
|
|
45
|
-
width: '100%'
|
|
46
|
-
},
|
|
47
45
|
input: {
|
|
48
46
|
' .label': {
|
|
49
47
|
color: theme.palette.text.secondary
|
|
@@ -67,21 +65,11 @@ const useStyles = makeStyles()(theme => ({
|
|
|
67
65
|
goBackButtonContainer: {
|
|
68
66
|
padding: theme.spacing(2, 0)
|
|
69
67
|
},
|
|
70
|
-
goBackButton: {
|
|
71
|
-
fontSize: `${theme.typography.body2.fontSize} !important`,
|
|
72
|
-
padding: '0 !important',
|
|
73
|
-
' > div ': {
|
|
74
|
-
padding: 0,
|
|
75
|
-
display: 'flex'
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
68
|
goBackButtonIcon: {
|
|
79
69
|
display: 'inline-block',
|
|
80
|
-
fontSize:
|
|
70
|
+
fontSize: theme.components.icon.medium,
|
|
81
71
|
alignSelf: 'center',
|
|
82
|
-
marginRight: theme.spacing(0.5)
|
|
83
|
-
marginLeft: -3,
|
|
84
|
-
marginTop: -2
|
|
72
|
+
marginRight: theme.spacing(0.5)
|
|
85
73
|
}
|
|
86
74
|
}));
|
|
87
75
|
|
|
@@ -156,9 +144,10 @@ const ForgotPassword = ({
|
|
|
156
144
|
errorText: validationError
|
|
157
145
|
}), /*#__PURE__*/_jsx("div", {
|
|
158
146
|
className: classes.buttonContainer,
|
|
159
|
-
children: /*#__PURE__*/_jsx(
|
|
160
|
-
|
|
161
|
-
|
|
147
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
148
|
+
type: "submit",
|
|
149
|
+
color: "primary",
|
|
150
|
+
fullWidth: true,
|
|
162
151
|
disabled: loading,
|
|
163
152
|
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
164
153
|
string: "common.submit"
|
|
@@ -180,10 +169,9 @@ const ForgotPassword = ({
|
|
|
180
169
|
})
|
|
181
170
|
}), /*#__PURE__*/_jsx("div", {
|
|
182
171
|
className: classes.goBackButtonContainer,
|
|
183
|
-
children: /*#__PURE__*/_jsxs(
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
type: "secondary",
|
|
172
|
+
children: /*#__PURE__*/_jsxs(Button, {
|
|
173
|
+
variant: "text",
|
|
174
|
+
color: "primary",
|
|
187
175
|
onClick: handleBackToLogin,
|
|
188
176
|
children: [/*#__PURE__*/_jsx(ArrowIcon, {
|
|
189
177
|
className: classes.goBackButtonIcon
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useMemo, useCallback } from 'react';
|
|
2
2
|
import { makeStyles, responsiveMediaQuery } from '@shopgate/engage/styles';
|
|
3
|
-
import { FormBuilder, I18n, Link,
|
|
3
|
+
import { FormBuilder, I18n, Link, MessageBar, ResponsiveContainer } from '@shopgate/engage/components';
|
|
4
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
4
5
|
import { LOGIN_PATH, useRoute, i18n } from '@shopgate/engage/core';
|
|
5
6
|
import { StylePresets } from '@shopgate/engage/components/Form';
|
|
6
7
|
import generateFormConfig from "./OrderDetailsAuthenticateForm.config";
|
|
@@ -21,9 +22,6 @@ const useStyles = makeStyles()(theme => ({
|
|
|
21
22
|
form: {
|
|
22
23
|
...StylePresets.getOutlinedFormFields(theme)
|
|
23
24
|
},
|
|
24
|
-
submitButton: {
|
|
25
|
-
width: '100%'
|
|
26
|
-
},
|
|
27
25
|
loginLink: {
|
|
28
26
|
color: theme.palette.primary.main,
|
|
29
27
|
':hover': {
|
|
@@ -129,11 +127,11 @@ const OrderDetailsAuthenticate = () => {
|
|
|
129
127
|
handleUpdate: handleUpdate,
|
|
130
128
|
onSubmit: handleSubmit
|
|
131
129
|
}), /*#__PURE__*/_jsx("div", {
|
|
132
|
-
children: /*#__PURE__*/_jsx(
|
|
133
|
-
|
|
130
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
131
|
+
color: "primary",
|
|
132
|
+
fullWidth: true,
|
|
134
133
|
onClick: handleSubmit,
|
|
135
134
|
disabled: isLoading,
|
|
136
|
-
className: classes.submitButton,
|
|
137
135
|
children: i18n.text('common.submit')
|
|
138
136
|
})
|
|
139
137
|
})]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/engage",
|
|
3
|
-
"version": "7.32.0-beta.
|
|
3
|
+
"version": "7.32.0-beta.8",
|
|
4
4
|
"description": "Shopgate's ENGAGE library.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Shopgate <support@shopgate.com>",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@emotion/react": "^11.14.0",
|
|
20
20
|
"@shopgate/native-modules": "1.0.0-beta.34",
|
|
21
|
-
"@shopgate/pwa-common": "7.32.0-beta.
|
|
22
|
-
"@shopgate/pwa-common-commerce": "7.32.0-beta.
|
|
23
|
-
"@shopgate/pwa-core": "7.32.0-beta.
|
|
24
|
-
"@shopgate/pwa-ui-ios": "7.32.0-beta.
|
|
25
|
-
"@shopgate/pwa-ui-material": "7.32.0-beta.
|
|
26
|
-
"@shopgate/pwa-ui-shared": "7.32.0-beta.
|
|
21
|
+
"@shopgate/pwa-common": "7.32.0-beta.8",
|
|
22
|
+
"@shopgate/pwa-common-commerce": "7.32.0-beta.8",
|
|
23
|
+
"@shopgate/pwa-core": "7.32.0-beta.8",
|
|
24
|
+
"@shopgate/pwa-ui-ios": "7.32.0-beta.8",
|
|
25
|
+
"@shopgate/pwa-ui-material": "7.32.0-beta.8",
|
|
26
|
+
"@shopgate/pwa-ui-shared": "7.32.0-beta.8",
|
|
27
27
|
"@stripe/react-stripe-js": "^1.16.5",
|
|
28
28
|
"@stripe/stripe-js": "^1.44.1",
|
|
29
29
|
"@virtuous/conductor": "~2.5.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotFound.d.ts","sourceRoot":"","sources":["../../../page/components/NotFound.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NotFound.d.ts","sourceRoot":"","sources":["../../../page/components/NotFound.tsx"],"names":[],"mappings":"AA8BA;;;GAGG;AACH,QAAA,MAAM,QAAQ,mCA2Bb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
2
|
import { useDispatch } from 'react-redux';
|
|
3
|
-
import RippleButton from '@shopgate/pwa-ui-shared/RippleButton';
|
|
4
3
|
import { I18n, Typography } from '@shopgate/engage/components';
|
|
4
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
5
5
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
6
6
|
import { historyPop, historyResetTo } from '@shopgate/pwa-common/actions/router';
|
|
7
7
|
import { i18n, INDEX_PATH } from "../../core";
|
|
@@ -16,7 +16,6 @@ const useStyles = makeStyles()(theme => ({
|
|
|
16
16
|
paddingTop: theme.spacing(8)
|
|
17
17
|
},
|
|
18
18
|
button: {
|
|
19
|
-
width: '100%',
|
|
20
19
|
maxWidth: 250
|
|
21
20
|
},
|
|
22
21
|
buttonContainer: {
|
|
@@ -55,17 +54,19 @@ const NotFound = () => {
|
|
|
55
54
|
})
|
|
56
55
|
}), /*#__PURE__*/_jsxs("div", {
|
|
57
56
|
className: classes.buttonContainer,
|
|
58
|
-
children: [/*#__PURE__*/_jsx(
|
|
57
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
59
58
|
onClick: handleBack,
|
|
59
|
+
color: "primary",
|
|
60
|
+
fullWidth: true,
|
|
60
61
|
className: classes.button,
|
|
61
|
-
type: "secondary",
|
|
62
62
|
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
63
63
|
string: "common.back"
|
|
64
64
|
})
|
|
65
|
-
}), /*#__PURE__*/_jsx(
|
|
65
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
66
66
|
onClick: handleHome,
|
|
67
|
+
color: "primary",
|
|
68
|
+
fullWidth: true,
|
|
67
69
|
className: classes.button,
|
|
68
|
-
type: "secondary",
|
|
69
70
|
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
70
71
|
string: "navigation.back",
|
|
71
72
|
params: {
|
|
@@ -8,7 +8,7 @@ export type CustomResponsiveImageProps = {
|
|
|
8
8
|
/**
|
|
9
9
|
* The border radius to apply to the image.
|
|
10
10
|
*/
|
|
11
|
-
borderRadius?: number | undefined;
|
|
11
|
+
borderRadius?: string | number | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* The breakpoint from which on a higher resolution image should
|
|
14
14
|
* be loaded.
|
|
@@ -13,7 +13,7 @@ import { parseImageUrl } from "../../helpers";
|
|
|
13
13
|
/**
|
|
14
14
|
* @typedef {Object} CustomResponsiveImageProps
|
|
15
15
|
* @property {boolean} [enableParallax] Whether to enable the parallax effect.
|
|
16
|
-
* @property {number} [borderRadius] The border radius to apply to the image.
|
|
16
|
+
* @property {number|string} [borderRadius] The border radius to apply to the image.
|
|
17
17
|
* @property {Breakpoint} [breakpoint] The breakpoint from which on a higher resolution image should
|
|
18
18
|
* be loaded.
|
|
19
19
|
* @property {boolean} [isBanner] Whether the image is used as a banner (full width and height of
|
|
@@ -129,7 +129,7 @@ const ResponsiveWidgetImage = ({
|
|
|
129
129
|
[classes.container]: !isBanner
|
|
130
130
|
}),
|
|
131
131
|
style: {
|
|
132
|
-
borderRadius
|
|
132
|
+
borderRadius,
|
|
133
133
|
...(!isBanner && enableParallax ? {
|
|
134
134
|
aspectRatio: containerRatio
|
|
135
135
|
} : {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetVideo.d.ts","sourceRoot":"","sources":["../../../../page/components/WidgetVideo/WidgetVideo.tsx"],"names":[],"mappings":"AAsDA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"WidgetVideo.d.ts","sourceRoot":"","sources":["../../../../page/components/WidgetVideo/WidgetVideo.tsx"],"names":[],"mappings":"AAsDA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;GAEG;AACH,QAAA,MAAM,WAAW,GAAI,yEASlB,gBAAgB,uCAsFlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/page/helpers/index.d.ts
CHANGED
|
@@ -67,12 +67,15 @@ interface BorderRadiusParams {
|
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Retrieves the border radius based on the widget config.
|
|
70
|
+
*
|
|
71
|
+
* `default` follows the app wide corner style, so it is returned as a reference to the theme's
|
|
72
|
+
* shape variable rather than a resolved length.
|
|
70
73
|
* @param params The helper parameters.
|
|
71
74
|
* @param params.borderRadius The border radius option.
|
|
72
75
|
* @param params.borderRadiusCustom The custom border radius value.
|
|
73
|
-
* @returns The resolved border radius.
|
|
76
|
+
* @returns The resolved border radius as a CSS length.
|
|
74
77
|
*/
|
|
75
|
-
export declare const resolveBorderRadiusFromWidgetConfig: ({ borderRadius, borderRadiusCustom }: BorderRadiusParams) =>
|
|
78
|
+
export declare const resolveBorderRadiusFromWidgetConfig: ({ borderRadius, borderRadiusCustom }: BorderRadiusParams) => string;
|
|
76
79
|
/**
|
|
77
80
|
* Validator factory for regular expressions.
|
|
78
81
|
* @param regex The regular expression to match.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../page/helpers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,wDAAwD;IACvE;;OAEG;IACH,kBAAkB,EAAE,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,CAAC;IACvE;;;OAGG;IACH,mBAAmB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACxC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,6CAA6C,GACxD,WAAU,OAAO,CAAC,yBAAyB,CAAM,KAChD,wDAyBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,aAAa,OAAO,KAAG,MAQjE,CAAC;AAEF;;GAEG;AACH,UAAU,kBAAkB;IAC1B;;OAEG;IACH,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxD;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../page/helpers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B;;OAEG;IACH,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,wDAAwD;IACvE;;OAEG;IACH,kBAAkB,EAAE,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,CAAC;IACvE;;;OAGG;IACH,mBAAmB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACxC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,6CAA6C,GACxD,WAAU,OAAO,CAAC,yBAAyB,CAAM,KAChD,wDAyBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,EAAE,aAAa,OAAO,KAAG,MAQjE,CAAC;AAEF;;GAEG;AACH,UAAU,kBAAkB;IAC1B;;OAEG;IACH,YAAY,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxD;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,mCAAmC,GAC9C,sCAAsC,kBAAkB,KACvD,MAKF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,MAAM,KAAK,MAAM,KAAG,OAAkC,CAAC;AAEjG;;;;GAIG;AACH,eAAO,MAAM,UAAU,QAP8B,MAAM,KAAG,OAOgB,CAAC"}
|
package/page/helpers/index.js
CHANGED
|
@@ -51,19 +51,22 @@ export const parseImageUrl = (url, useHighRes) => {
|
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Retrieves the border radius based on the widget config.
|
|
54
|
+
*
|
|
55
|
+
* `default` follows the app wide corner style, so it is returned as a reference to the theme's
|
|
56
|
+
* shape variable rather than a resolved length.
|
|
54
57
|
* @param params The helper parameters.
|
|
55
58
|
* @param params.borderRadius The border radius option.
|
|
56
59
|
* @param params.borderRadiusCustom The custom border radius value.
|
|
57
|
-
* @returns The resolved border radius.
|
|
60
|
+
* @returns The resolved border radius as a CSS length.
|
|
58
61
|
*/
|
|
59
62
|
export const resolveBorderRadiusFromWidgetConfig = ({
|
|
60
63
|
borderRadius,
|
|
61
64
|
borderRadiusCustom
|
|
62
65
|
}) => {
|
|
63
|
-
if (borderRadius === 'none') return 0;
|
|
64
|
-
if (borderRadius === 'rounded') return
|
|
65
|
-
if (borderRadius === 'custom' && typeof borderRadiusCustom === 'number') return borderRadiusCustom
|
|
66
|
-
return
|
|
66
|
+
if (borderRadius === 'none') return '0';
|
|
67
|
+
if (borderRadius === 'rounded') return '16px';
|
|
68
|
+
if (borderRadius === 'custom' && typeof borderRadiusCustom === 'number') return `${borderRadiusCustom}px`;
|
|
69
|
+
return 'var(--sg-shape-borderRadius)';
|
|
67
70
|
};
|
|
68
71
|
|
|
69
72
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import { Button } from '@shopgate/engage/components';
|
|
2
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
3
3
|
import { useWidget } from '@shopgate/engage/page/hooks';
|
|
4
4
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
5
5
|
import { useNavigation } from '@shopgate/engage/core';
|
|
@@ -46,9 +46,8 @@ const ButtonWidget = () => {
|
|
|
46
46
|
return /*#__PURE__*/_jsx("div", {
|
|
47
47
|
className: classes.root,
|
|
48
48
|
children: /*#__PURE__*/_jsx(Button, {
|
|
49
|
-
|
|
49
|
+
color: "primary",
|
|
50
50
|
onClick: handleClick,
|
|
51
|
-
wrapContent: false,
|
|
52
51
|
children: /*#__PURE__*/_jsx("span", {
|
|
53
52
|
className: classes.text,
|
|
54
53
|
children: text
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
-
import { I18n
|
|
2
|
+
import { I18n } from '@shopgate/engage/components';
|
|
3
3
|
import { bin2hex } from '@shopgate/engage/core/helpers';
|
|
4
4
|
import { CATEGORY_PATH } from '@shopgate/engage/category';
|
|
5
5
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
6
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
6
7
|
import { useRoute, usePrevious, useLocalStorage } from '@shopgate/engage/core/hooks';
|
|
7
8
|
import { router } from '@virtuous/conductor';
|
|
8
9
|
import CategoryPicker from "./components/Picker";
|
|
@@ -16,10 +17,8 @@ const useStyles = makeStyles()(theme => ({
|
|
|
16
17
|
paddingBottom: theme.spacing(2)
|
|
17
18
|
},
|
|
18
19
|
buttonContainer: {
|
|
19
|
-
padding: theme.spacing(0, 2)
|
|
20
|
-
|
|
21
|
-
button: {
|
|
22
|
-
width: '100%'
|
|
20
|
+
padding: theme.spacing(0, 2),
|
|
21
|
+
margin: theme.spacing(1, 0)
|
|
23
22
|
}
|
|
24
23
|
}));
|
|
25
24
|
|
|
@@ -142,11 +141,12 @@ const NestedCategoryFilter = () => {
|
|
|
142
141
|
className: "widget__nested-category-filter__headline"
|
|
143
142
|
}) : null, categoryPickers, /*#__PURE__*/_jsx("div", {
|
|
144
143
|
className: cx(classes.buttonContainer, 'widget__nested-category-filter__button-container'),
|
|
145
|
-
children: /*#__PURE__*/_jsx(
|
|
146
|
-
className: cx(classes.button, 'widget__nested-category-filter__CTA-button'),
|
|
144
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
147
145
|
href: `${CATEGORY_PATH}/${bin2hex(state.buttonCategoryId)}`,
|
|
146
|
+
color: "primary",
|
|
147
|
+
fullWidth: true,
|
|
148
|
+
className: "widget__nested-category-filter__CTA-button",
|
|
148
149
|
disabled: !state.buttonCategoryId,
|
|
149
|
-
flat: false,
|
|
150
150
|
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
151
151
|
string: "common.show_products",
|
|
152
152
|
className: "widget__nested-category-filter__CTA-button__text"
|