@shopgate/engage 7.32.0-beta.7 → 7.32.0-beta.9
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/Profile.provider.d.ts +1 -1
- 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 +41 -7
- 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/CartItem/CartItemQuantityPicker.js +1 -0
- 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/Badge/spec.js +6 -29
- package/components/Card/Card.js +1 -1
- package/components/ChipLayout/index.js +2 -4
- package/components/NavigationHandler/connector.js +1 -1
- package/components/NavigationHandler/index.d.ts +2 -2
- 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/Paper/spec.js +5 -22
- 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 +139 -41
- 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 +192 -17
- 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 +49 -26
- 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/StoreListSearch.js +1 -0
- 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/ProductCard/index.js +7 -1
- package/product/components/ProductGrid/components/Item/components/ItemDetails/index.js +6 -1
- 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/ProductGrid/components/Layout/index.js +2 -1
- package/product/components/ProductGridPrice/index.js +0 -1
- 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/ProductSlider/index.js +1 -1
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.d.ts.map +1 -1
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +15 -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 +18 -2
- package/settings/selectors/appSettings.d.ts +37 -2
- package/settings/selectors/appSettings.d.ts.map +1 -1
- package/settings/selectors/appSettings.js +30 -1
- package/settings/types/appSettings.d.ts +42 -2
- package/settings/types/appSettings.d.ts.map +1 -1
- package/settings/types/appSettings.js +124 -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/index.d.ts +1 -1
- package/styles/index.d.ts.map +1 -1
- package/styles/theme/createDefaultThemeOptions/index.d.ts.map +1 -1
- package/styles/theme/createDefaultThemeOptions/index.js +94 -3
- 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 +28 -3
- 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.d.ts +2 -2
- package/styles/theme/createTheme/index.d.ts.map +1 -1
- package/styles/theme/createTheme/index.js +2 -2
- package/styles/theme/createTheme/types.d.ts +9 -2
- package/styles/theme/createTheme/types.d.ts.map +1 -1
- package/styles/theme/createTheme/types.js +6 -0
- package/styles/theme/hooks/useColorScheme.d.ts +2 -2
- package/styles/theme/hooks/useColorScheme.d.ts.map +1 -1
- package/styles/theme/hooks/useColorScheme.js +1 -1
- package/styles/theme/hooks/useMediaQuery.d.ts +7 -0
- package/styles/theme/hooks/useMediaQuery.d.ts.map +1 -1
- package/styles/theme/hooks/useMediaQuery.js +5 -5
- package/styles/theme/hooks/useTheme.js +1 -1
- package/styles/theme/index.d.ts +3 -1
- package/styles/theme/index.d.ts.map +1 -1
- package/styles/theme/providers/ColorSchemeContext.d.ts +30 -9
- package/styles/theme/providers/ColorSchemeContext.d.ts.map +1 -1
- package/styles/theme/providers/ColorSchemeContext.js +8 -0
- package/styles/theme/providers/ThemeContext.d.ts +3 -0
- package/styles/theme/providers/ThemeContext.d.ts.map +1 -0
- package/styles/theme/providers/ThemeContext.js +2 -0
- package/styles/theme/providers/ThemeProvider.d.ts +2 -2
- package/styles/theme/providers/ThemeProvider.d.ts.map +1 -1
- package/styles/theme/providers/ThemeProvider.js +58 -16
- package/styles/theme/utils/color.d.ts +12 -12
- package/styles/theme/utils/color.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
|
@@ -4,7 +4,8 @@ import { i18n, hasNewServices } from '@shopgate/engage/core/helpers';
|
|
|
4
4
|
import { UIEvents } from '@shopgate/engage/core';
|
|
5
5
|
import { useWidgetSettings } from '@shopgate/engage/core/hooks';
|
|
6
6
|
import { makeStyles, useTheme } from '@shopgate/engage/styles';
|
|
7
|
-
import {
|
|
7
|
+
import { QuantityInput } from '@shopgate/engage/components';
|
|
8
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
8
9
|
import { broadcastLiveMessage } from '@shopgate/engage/a11y/helpers';
|
|
9
10
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
11
|
const useStyles = makeStyles()((theme, {
|
|
@@ -60,6 +61,7 @@ const useStyles = makeStyles()((theme, {
|
|
|
60
61
|
fontWeight,
|
|
61
62
|
height: '100%',
|
|
62
63
|
width: '100%',
|
|
64
|
+
color: theme.contrastColor(inputBgColor || theme.components.input.background),
|
|
63
65
|
...(inputColor && {
|
|
64
66
|
color: `${inputColor}`
|
|
65
67
|
}),
|
|
@@ -76,10 +78,8 @@ const useStyles = makeStyles()((theme, {
|
|
|
76
78
|
},
|
|
77
79
|
button: {
|
|
78
80
|
width: sizeValue,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
padding: 0
|
|
82
|
-
},
|
|
81
|
+
minWidth: sizeValue,
|
|
82
|
+
padding: 0,
|
|
83
83
|
height: sizeValue,
|
|
84
84
|
fontSize: `${Math.floor(sizeValue / 28 * 100)}%`,
|
|
85
85
|
'&:not(:disabled)': {
|
|
@@ -91,25 +91,13 @@ const useStyles = makeStyles()((theme, {
|
|
|
91
91
|
})
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
|
-
buttonRipple: {
|
|
95
|
-
padding: 0
|
|
96
|
-
},
|
|
97
94
|
buttonNoRadiusLeft: {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
borderBottomLeftRadius: 0
|
|
101
|
-
}
|
|
95
|
+
borderTopLeftRadius: 0,
|
|
96
|
+
borderBottomLeftRadius: 0
|
|
102
97
|
},
|
|
103
98
|
buttonNoRadiusRight: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
borderBottomRightRadius: 0
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
disabled: {
|
|
110
|
-
' > div': {
|
|
111
|
-
padding: 0
|
|
112
|
-
}
|
|
99
|
+
borderTopRightRadius: 0,
|
|
100
|
+
borderBottomRightRadius: 0
|
|
113
101
|
}
|
|
114
102
|
};
|
|
115
103
|
});
|
|
@@ -251,13 +239,10 @@ const UnitQuantityPicker = ({
|
|
|
251
239
|
className: classes.backdrop
|
|
252
240
|
}), /*#__PURE__*/_jsxs("div", {
|
|
253
241
|
className: cx(classes.root, className),
|
|
254
|
-
children: [/*#__PURE__*/_jsx(
|
|
255
|
-
|
|
242
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
243
|
+
color: "primary",
|
|
256
244
|
disabled: !allowDecrement || disabled,
|
|
257
|
-
|
|
258
|
-
className: cx(classes.button, classes.buttonNoRadiusRight, {
|
|
259
|
-
[classes.disabled]: !allowDecrement || disabled
|
|
260
|
-
}),
|
|
245
|
+
className: cx(classes.button, classes.buttonNoRadiusRight),
|
|
261
246
|
onClick: handleDecrement,
|
|
262
247
|
"aria-label": i18n.text('product.decrease_quantity'),
|
|
263
248
|
children: "-"
|
|
@@ -282,13 +267,10 @@ const UnitQuantityPicker = ({
|
|
|
282
267
|
onKeyDown: handleKeyDown,
|
|
283
268
|
ref: inputRef
|
|
284
269
|
})]
|
|
285
|
-
}), /*#__PURE__*/_jsx(
|
|
286
|
-
|
|
270
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
271
|
+
color: "primary",
|
|
287
272
|
disabled: !allowIncrement || disabled,
|
|
288
|
-
|
|
289
|
-
className: cx(classes.button, classes.buttonNoRadiusLeft, {
|
|
290
|
-
[classes.disabled]: !allowIncrement || disabled
|
|
291
|
-
}),
|
|
273
|
+
className: cx(classes.button, classes.buttonNoRadiusLeft),
|
|
292
274
|
onClick: handleIncrement,
|
|
293
275
|
"aria-label": i18n.text('product.increase_quantity'),
|
|
294
276
|
children: "+"
|
|
@@ -2,7 +2,8 @@ import React, { useMemo, useEffect } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import throttle from 'lodash/throttle';
|
|
4
4
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
5
|
-
import { Grid, I18n,
|
|
5
|
+
import { Grid, I18n, Modal, Typography } from '@shopgate/engage/components';
|
|
6
|
+
import { Button, ButtonBase } from '@shopgate/engage/components/v2';
|
|
6
7
|
import { appConfig } from '@shopgate/engage';
|
|
7
8
|
import pushImage from "./push-opt-in.svg";
|
|
8
9
|
import connect from "./connector";
|
|
@@ -127,14 +128,13 @@ const PushOptInModal = ({
|
|
|
127
128
|
id: "pushOptInDialogMessage"
|
|
128
129
|
}), /*#__PURE__*/_jsx(Button, {
|
|
129
130
|
onClick: handleAllowPushOptIn,
|
|
130
|
-
|
|
131
|
+
color: "secondary",
|
|
131
132
|
className: cx(classes.button, 'push-opt-in-modal__button-allow'),
|
|
132
133
|
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
133
134
|
string: modalButtonAllow || 'pushOptInModal.buttonAllow'
|
|
134
135
|
})
|
|
135
|
-
}), /*#__PURE__*/_jsx(
|
|
136
|
+
}), /*#__PURE__*/_jsx(ButtonBase, {
|
|
136
137
|
onClick: handleDenyPushOptIn,
|
|
137
|
-
type: "plain",
|
|
138
138
|
className: cx(classes.button, 'push-opt-in-modal__button-deny'),
|
|
139
139
|
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
140
140
|
string: modalButtonDeny || 'pushOptInModal.buttonDeny',
|
|
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { i18n, isIOSTheme } from '@shopgate/engage/core';
|
|
4
4
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
5
|
-
import {
|
|
5
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
6
6
|
import { useRegistration } from "../../hooks";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const useStyles = makeStyles()(theme => ({
|
|
@@ -15,7 +15,6 @@ const useStyles = makeStyles()(theme => ({
|
|
|
15
15
|
} : null)
|
|
16
16
|
},
|
|
17
17
|
submitButton: {
|
|
18
|
-
width: '100%',
|
|
19
18
|
marginTop: 8
|
|
20
19
|
}
|
|
21
20
|
}));
|
|
@@ -48,8 +47,9 @@ const RegisterFormActions = ({
|
|
|
48
47
|
}, [guestRegistrationEditMode, isGuest, orderNeedsPayment]);
|
|
49
48
|
return /*#__PURE__*/_jsx("div", {
|
|
50
49
|
className: classes.submitButtonContainer,
|
|
51
|
-
children: /*#__PURE__*/_jsx(
|
|
52
|
-
|
|
50
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
51
|
+
color: "primary",
|
|
52
|
+
fullWidth: true,
|
|
53
53
|
onClick: handleSubmit,
|
|
54
54
|
disabled: isLocked,
|
|
55
55
|
className: classes.submitButton,
|
|
@@ -4,17 +4,15 @@ import { bin2hex } from '@shopgate/pwa-common/helpers/data';
|
|
|
4
4
|
import { I18n } from '@shopgate/engage/components';
|
|
5
5
|
import { ITEM_PATH } from '@shopgate/pwa-common-commerce/product/constants/index';
|
|
6
6
|
import { REVIEW_PREVIEW_COUNT } from '@shopgate/pwa-common-commerce/reviews/constants';
|
|
7
|
-
import
|
|
7
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
8
8
|
import { makeStyles } from '@shopgate/engage/styles';
|
|
9
9
|
import connect from "./connector";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
const useStyles = makeStyles()(
|
|
11
|
+
const useStyles = makeStyles()(() => ({
|
|
12
12
|
container: {
|
|
13
13
|
display: 'flex',
|
|
14
14
|
justifyContent: 'flex-end',
|
|
15
|
-
textAlign: 'right'
|
|
16
|
-
marginTop: theme.spacing(-1),
|
|
17
|
-
marginBottom: theme.spacing(-2)
|
|
15
|
+
textAlign: 'right'
|
|
18
16
|
}
|
|
19
17
|
}));
|
|
20
18
|
|
|
@@ -33,7 +31,9 @@ const AllReviewsLink = props => {
|
|
|
33
31
|
return /*#__PURE__*/_jsx("div", {
|
|
34
32
|
className: cx(classes.container, 'engage__reviews__all-reviews-link'),
|
|
35
33
|
"data-test-id": "showAllReviewsButton",
|
|
36
|
-
children: /*#__PURE__*/_jsx(
|
|
34
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
35
|
+
variant: "text",
|
|
36
|
+
color: "primary",
|
|
37
37
|
href: `${ITEM_PATH}/${bin2hex(props.productId)}/reviews`,
|
|
38
38
|
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
39
39
|
string: "reviews.button_all",
|
|
@@ -4,7 +4,7 @@ import { I18n } from '@shopgate/engage/components';
|
|
|
4
4
|
import { i18n } from '@shopgate/engage/core/helpers';
|
|
5
5
|
import { ITEM_PATH } from '@shopgate/pwa-common-commerce/product/constants';
|
|
6
6
|
import { bin2hex } from '@shopgate/pwa-common/helpers/data';
|
|
7
|
-
import
|
|
7
|
+
import { Button } from '@shopgate/engage/components/v2';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Link to add a review.
|
|
@@ -16,9 +16,10 @@ const WriteReviewLink = ({
|
|
|
16
16
|
}) => /*#__PURE__*/_jsx("div", {
|
|
17
17
|
"data-test-id": "writeReview",
|
|
18
18
|
className: "engage__reviews__write-review-link",
|
|
19
|
-
children: /*#__PURE__*/_jsx(
|
|
19
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
20
|
+
variant: "text",
|
|
21
|
+
color: "primary",
|
|
20
22
|
href: `${ITEM_PATH}/${bin2hex(productId)}/write_review`,
|
|
21
|
-
noGap: true,
|
|
22
23
|
"aria-label": i18n.text('reviews.button_add'),
|
|
23
24
|
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
24
25
|
string: "reviews.button_add"
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import { render, screen, fireEvent } from '@testing-library/react';
|
|
3
3
|
import WriteReviewLink from "./index";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const mockPush = jest.fn();
|
|
6
|
+
jest.mock('@shopgate/engage/core/hooks/useNavigation', () => ({
|
|
7
|
+
useNavigation: () => ({
|
|
8
|
+
push: mockPush,
|
|
9
|
+
replace: jest.fn()
|
|
10
|
+
})
|
|
11
|
+
}));
|
|
4
12
|
|
|
5
13
|
/* eslint-disable react/prop-types */
|
|
6
|
-
|
|
14
|
+
|
|
7
15
|
jest.mock('@shopgate/engage/components', () => ({
|
|
8
16
|
I18n: {
|
|
9
17
|
Text: ({
|
|
@@ -13,23 +21,6 @@ jest.mock('@shopgate/engage/components', () => ({
|
|
|
13
21
|
})
|
|
14
22
|
}
|
|
15
23
|
}));
|
|
16
|
-
jest.mock('@shopgate/pwa-ui-shared/ButtonLink', () => {
|
|
17
|
-
function ButtonLink(props) {
|
|
18
|
-
const {
|
|
19
|
-
children,
|
|
20
|
-
href,
|
|
21
|
-
noGap,
|
|
22
|
-
...rest
|
|
23
|
-
} = props;
|
|
24
|
-
return /*#__PURE__*/_jsx("a", {
|
|
25
|
-
href: href,
|
|
26
|
-
...rest,
|
|
27
|
-
"data-no-gap": String(noGap),
|
|
28
|
-
children: children
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
return ButtonLink;
|
|
32
|
-
});
|
|
33
24
|
|
|
34
25
|
/**
|
|
35
26
|
* Creates component.
|
|
@@ -39,13 +30,28 @@ const createComponent = () => render(/*#__PURE__*/_jsx(WriteReviewLink, {
|
|
|
39
30
|
productId: "foo"
|
|
40
31
|
}));
|
|
41
32
|
describe('<WriteReviewLink>', () => {
|
|
33
|
+
beforeEach(() => {
|
|
34
|
+
jest.clearAllMocks();
|
|
35
|
+
jest.useFakeTimers();
|
|
36
|
+
});
|
|
37
|
+
afterEach(() => {
|
|
38
|
+
jest.useRealTimers();
|
|
39
|
+
});
|
|
42
40
|
it('should render when current product is set', () => {
|
|
43
41
|
createComponent();
|
|
44
|
-
|
|
42
|
+
expect(screen.getByText('reviews.button_add')).toBeTruthy();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// The button renders as an anchor on web builds only, so the navigation itself is the contract.
|
|
46
|
+
it('should navigate to the write review route when pressed', () => {
|
|
47
|
+
createComponent();
|
|
48
|
+
fireEvent.click(screen.getByRole('button', {
|
|
45
49
|
name: 'reviews.button_add'
|
|
50
|
+
}));
|
|
51
|
+
jest.runAllTimers();
|
|
52
|
+
expect(mockPush).toHaveBeenCalledWith({
|
|
53
|
+
pathname: '/item/666f6f/write_review'
|
|
46
54
|
});
|
|
47
|
-
expect(link).toHaveAttribute('href', '/item/666f6f/write_review');
|
|
48
|
-
expect(screen.getByText('reviews.button_add')).toBeTruthy();
|
|
49
55
|
});
|
|
50
56
|
});
|
|
51
57
|
|
|
@@ -40,7 +40,6 @@ jest.mock('@shopgate/engage/components', () => ({
|
|
|
40
40
|
})
|
|
41
41
|
}
|
|
42
42
|
}));
|
|
43
|
-
jest.mock('@shopgate/pwa-ui-shared/ButtonLink', () => 'a');
|
|
44
43
|
|
|
45
44
|
// Mock the getter of the hasReviews key inside the app config, so that we can turn it off later
|
|
46
45
|
jest.resetModules();
|
|
@@ -66,7 +65,7 @@ describe('<Reviews />', () => {
|
|
|
66
65
|
expect(screen.getByTestId('reviews-header')).toBeTruthy();
|
|
67
66
|
expect(screen.getByTestId('reviews-list')).toBeTruthy();
|
|
68
67
|
expect(screen.getByTestId('reviews-info')).toBeTruthy();
|
|
69
|
-
expect(screen.queryByRole('
|
|
68
|
+
expect(screen.queryByRole('button', {
|
|
70
69
|
name: 'reviews.button_all'
|
|
71
70
|
})).toBeNull();
|
|
72
71
|
});
|
|
@@ -74,15 +73,15 @@ describe('<Reviews />', () => {
|
|
|
74
73
|
createComponent(mockedStateWithAll);
|
|
75
74
|
expect(screen.getByTestId('reviews-header')).toBeTruthy();
|
|
76
75
|
expect(screen.getByTestId('reviews-list')).toBeTruthy();
|
|
77
|
-
expect(screen.getByRole('
|
|
76
|
+
expect(screen.getByRole('button', {
|
|
78
77
|
name: 'reviews.button_all'
|
|
79
|
-
})).
|
|
78
|
+
})).toBeTruthy();
|
|
80
79
|
});
|
|
81
80
|
it('should render reviews, header, but no all reviews link', () => {
|
|
82
81
|
createComponent(mockedStateWithTwoReviews);
|
|
83
82
|
expect(screen.getByTestId('reviews-header')).toBeTruthy();
|
|
84
83
|
expect(screen.getByTestId('reviews-list')).toBeTruthy();
|
|
85
|
-
expect(screen.queryByRole('
|
|
84
|
+
expect(screen.queryByRole('button', {
|
|
86
85
|
name: 'reviews.button_all'
|
|
87
86
|
})).toBeNull();
|
|
88
87
|
});
|
|
@@ -94,7 +93,7 @@ describe('<Reviews />', () => {
|
|
|
94
93
|
expect(container.firstChild).toBeNull();
|
|
95
94
|
expect(screen.queryByTestId('reviews-header')).toBeNull();
|
|
96
95
|
expect(screen.queryByTestId('reviews-list')).toBeNull();
|
|
97
|
-
expect(screen.queryByRole('
|
|
96
|
+
expect(screen.queryByRole('button', {
|
|
98
97
|
name: 'reviews.button_all'
|
|
99
98
|
})).toBeNull();
|
|
100
99
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appSettings.d.ts","sourceRoot":"","sources":["../../../settings/reducers/appSettings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAa/E,KAAK,iBAAiB,GAAG,wBAAwB,GAAG,aAAa,CAAC;AAQlE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"appSettings.d.ts","sourceRoot":"","sources":["../../../settings/reducers/appSettings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAa/E,KAAK,iBAAiB,GAAG,wBAAwB,GAAG,aAAa,CAAC;AAQlE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,gBA+DlC,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,WAAW,EAAE,OAAO,CAAC,gBAAgB,EAAE,iBAAiB,CAuC7D,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -42,7 +42,7 @@ export const DEFAULT_APP_SETTINGS = {
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
rating: {
|
|
45
|
-
showEmptyStars:
|
|
45
|
+
showEmptyStars: true
|
|
46
46
|
},
|
|
47
47
|
card: {
|
|
48
48
|
productName: {
|
|
@@ -61,6 +61,12 @@ export const DEFAULT_APP_SETTINGS = {
|
|
|
61
61
|
size: 'medium'
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
+
typography: {
|
|
65
|
+
variants: {}
|
|
66
|
+
},
|
|
67
|
+
appearance: {
|
|
68
|
+
defaultColorSchemeMode: 'light'
|
|
69
|
+
},
|
|
64
70
|
images: {
|
|
65
71
|
quality: DEFAULT_IMAGE_QUALITY,
|
|
66
72
|
// Already in the image service's format, so the unhydrated path needs no conversion.
|
|
@@ -87,7 +93,9 @@ const appSettings = (state, action = {
|
|
|
87
93
|
}) => {
|
|
88
94
|
if (isReceiveAppSettingsAction(action)) {
|
|
89
95
|
const {
|
|
90
|
-
images
|
|
96
|
+
images,
|
|
97
|
+
typography,
|
|
98
|
+
appearance
|
|
91
99
|
} = action.settings ?? {};
|
|
92
100
|
|
|
93
101
|
// Merged over the defaults rather than over the current state, so a field an incoming payload
|
|
@@ -101,6 +109,14 @@ const appSettings = (state, action = {
|
|
|
101
109
|
images: images === null ? undefined : {
|
|
102
110
|
...images,
|
|
103
111
|
product: images?.product ?? undefined
|
|
112
|
+
},
|
|
113
|
+
typography: typography === null ? undefined : {
|
|
114
|
+
...typography,
|
|
115
|
+
variants: typography?.variants ?? undefined
|
|
116
|
+
},
|
|
117
|
+
appearance: appearance === null ? undefined : {
|
|
118
|
+
...appearance,
|
|
119
|
+
defaultColorSchemeMode: appearance?.defaultColorSchemeMode ?? undefined
|
|
104
120
|
}
|
|
105
121
|
}, {
|
|
106
122
|
isHydrated: true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AppSettingsSlice, AppSettingsState } from '../types/appSettings';
|
|
1
|
+
import type { AppSettingsSlice, AppSettingsState, ColorSchemeMode } from '../types/appSettings';
|
|
2
2
|
/**
|
|
3
3
|
* Retrieves the appSettings state from the store. Falls back to the built-in
|
|
4
4
|
* defaults when the slice is not present in the store yet.
|
|
@@ -114,7 +114,42 @@ export declare const getCardSettings: ((state: AppSettingsState) => import("../t
|
|
|
114
114
|
/**
|
|
115
115
|
* Selects the effective card shadow size. `none` unless the shadow style is selected.
|
|
116
116
|
*/
|
|
117
|
-
export declare const getCardShadowSize: ((state: AppSettingsState) => import("
|
|
117
|
+
export declare const getCardShadowSize: ((state: AppSettingsState) => import("../types/appSettings").ShadowSize) & import("reselect").OutputSelectorFields<(args_0: import("../types/appSettings").CardSettings) => import("../types/appSettings").ShadowSize, {
|
|
118
|
+
clearCache: () => void;
|
|
119
|
+
}> & {
|
|
120
|
+
clearCache: () => void;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Selects the color scheme mode that applies while the visitor has no own preference stored. A
|
|
124
|
+
* mode rather than a scheme name, since it can also ask to follow the operating system: a
|
|
125
|
+
* `selectable` setting starts there, so the theme layer only ever sees its own vocabulary.
|
|
126
|
+
*/
|
|
127
|
+
export declare const getDefaultColorSchemeMode: ((state: AppSettingsState) => ColorSchemeMode) & import("reselect").OutputSelectorFields<(args_0: import("../types/appSettings").DefaultColorSchemeMode) => ColorSchemeMode, {
|
|
128
|
+
clearCache: () => void;
|
|
129
|
+
}> & {
|
|
130
|
+
clearCache: () => void;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Selects whether visitors may pick a color scheme themselves. False while a binding `light` or
|
|
134
|
+
* `dark` is configured, in which case a stored pick of theirs does not apply.
|
|
135
|
+
*/
|
|
136
|
+
export declare const getCanSelectColorScheme: ((state: AppSettingsState) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("../types/appSettings").DefaultColorSchemeMode) => boolean, {
|
|
137
|
+
clearCache: () => void;
|
|
138
|
+
}> & {
|
|
139
|
+
clearCache: () => void;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Selects the typography settings.
|
|
143
|
+
*/
|
|
144
|
+
export declare const getTypographySettings: ((state: AppSettingsState) => import("../types/appSettings").TypographySettings) & import("reselect").OutputSelectorFields<(args_0: AppSettingsSlice) => import("../types/appSettings").TypographySettings, {
|
|
145
|
+
clearCache: () => void;
|
|
146
|
+
}> & {
|
|
147
|
+
clearCache: () => void;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Selects the font stylesheets to load, global file first and without duplicates.
|
|
151
|
+
*/
|
|
152
|
+
export declare const getTypographyFontCssUrls: ((state: AppSettingsState) => string[]) & import("reselect").OutputSelectorFields<(args_0: import("../types/appSettings").TypographySettings) => string[], {
|
|
118
153
|
clearCache: () => void;
|
|
119
154
|
}> & {
|
|
120
155
|
clearCache: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appSettings.d.ts","sourceRoot":"","sources":["../../../settings/selectors/appSettings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appSettings.d.ts","sourceRoot":"","sources":["../../../settings/selectors/appSettings.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGhG;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,gBAAgB,KAAG,gBACR,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;CAGrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;CAG7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAGjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;CAGzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;CAGnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;CAGnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;CAG5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;CAGtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;CAGtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;CAG3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;CAG7B,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;CAGnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAGjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;CAMpC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createSelector } from 'reselect';
|
|
2
|
+
import { COLOR_SCHEME_SELECTABLE } from "../types/appSettings";
|
|
2
3
|
import { DEFAULT_APP_SETTINGS } from "../reducers/appSettings";
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -65,4 +66,32 @@ export const getCardSettings = createSelector(getAppSettingsState, appSettings =
|
|
|
65
66
|
/**
|
|
66
67
|
* Selects the effective card shadow size. `none` unless the shadow style is selected.
|
|
67
68
|
*/
|
|
68
|
-
export const getCardShadowSize = createSelector(getCardSettings, cards => cards.style === 'shadow' ? cards.shadow.size : 'none');
|
|
69
|
+
export const getCardShadowSize = createSelector(getCardSettings, cards => cards.style === 'shadow' ? cards.shadow.size : 'none');
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Selects the raw appearance setting: a binding color scheme, or `selectable`.
|
|
73
|
+
*/
|
|
74
|
+
const getConfiguredColorSchemeMode = createSelector(getAppSettingsState, appSettings => appSettings.appearance?.defaultColorSchemeMode ?? DEFAULT_APP_SETTINGS.appearance.defaultColorSchemeMode);
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Selects the color scheme mode that applies while the visitor has no own preference stored. A
|
|
78
|
+
* mode rather than a scheme name, since it can also ask to follow the operating system: a
|
|
79
|
+
* `selectable` setting starts there, so the theme layer only ever sees its own vocabulary.
|
|
80
|
+
*/
|
|
81
|
+
export const getDefaultColorSchemeMode = createSelector(getConfiguredColorSchemeMode, configured => configured === COLOR_SCHEME_SELECTABLE ? 'system' : configured);
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Selects whether visitors may pick a color scheme themselves. False while a binding `light` or
|
|
85
|
+
* `dark` is configured, in which case a stored pick of theirs does not apply.
|
|
86
|
+
*/
|
|
87
|
+
export const getCanSelectColorScheme = createSelector(getConfiguredColorSchemeMode, configured => configured === COLOR_SCHEME_SELECTABLE);
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Selects the typography settings.
|
|
91
|
+
*/
|
|
92
|
+
export const getTypographySettings = createSelector(getAppSettingsState, appSettings => appSettings.typography);
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Selects the font stylesheets to load, global file first and without duplicates.
|
|
96
|
+
*/
|
|
97
|
+
export const getTypographyFontCssUrls = createSelector(getTypographySettings, typography => Array.from(new Set([typography.fontCssUrl].concat(Object.values(typography.variants).map(variant => variant?.fontCssUrl)).filter(url => typeof url === 'string' && url.length > 0))));
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import type { ShadowSize } from '@shopgate/engage/styles/theme';
|
|
2
|
-
export type { ShadowSize };
|
|
1
|
+
import type { ColorSchemeMode, ColorSchemeName, ShadowSize, TypographyVariant } from '@shopgate/engage/styles/theme';
|
|
2
|
+
export type { ColorSchemeMode, ColorSchemeName, ShadowSize, TypographyVariant, };
|
|
3
|
+
export declare const COLOR_SCHEME_SELECTABLE = "selectable";
|
|
4
|
+
/**
|
|
5
|
+
* What the app settings can configure: a color scheme that is binding, or `selectable` to let
|
|
6
|
+
* visitors pick one themselves. Distinct from the theme's `ColorSchemeMode`, which is what a
|
|
7
|
+
* visitor can pick - `selectable` is a permission rather than an appearance, and maps to the
|
|
8
|
+
* theme's `system` mode.
|
|
9
|
+
*/
|
|
10
|
+
export type DefaultColorSchemeMode = ColorSchemeName | typeof COLOR_SCHEME_SELECTABLE;
|
|
3
11
|
/**
|
|
4
12
|
* Recursively optional variant of `T`. The settings sources send only what a merchant configured,
|
|
5
13
|
* and the admin preview additionally prunes the fields its visibility conditions hide.
|
|
@@ -190,6 +198,16 @@ export interface ImageSettings {
|
|
|
190
198
|
*/
|
|
191
199
|
product: ProductImageSettings;
|
|
192
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Settings for the app's overall appearance.
|
|
203
|
+
*/
|
|
204
|
+
export interface AppearanceSettings {
|
|
205
|
+
/**
|
|
206
|
+
* The color scheme the app renders in. A binding `light` or `dark` always applies, while
|
|
207
|
+
* `selectable` starts from the operating system preference and lets the visitor pick another.
|
|
208
|
+
*/
|
|
209
|
+
defaultColorSchemeMode: DefaultColorSchemeMode;
|
|
210
|
+
}
|
|
193
211
|
export interface AppSettings {
|
|
194
212
|
navigation: {
|
|
195
213
|
tabBar: {
|
|
@@ -214,6 +232,28 @@ export interface AppSettings {
|
|
|
214
232
|
*/
|
|
215
233
|
images: ImageSettings;
|
|
216
234
|
cards: CardSettings;
|
|
235
|
+
typography: TypographySettings;
|
|
236
|
+
appearance: AppearanceSettings;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* A font stylesheet to load. The file carries the `@font-face` rules and points its target at the
|
|
240
|
+
* new family itself, e.g. `:root { --sg-typography-h1-fontFamily: 'Recoleta'; }`.
|
|
241
|
+
*/
|
|
242
|
+
export interface FontCssSettings {
|
|
243
|
+
/**
|
|
244
|
+
* Absolute url of the stylesheet.
|
|
245
|
+
*/
|
|
246
|
+
fontCssUrl?: string;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Typography settings. The top level file applies to everything, a variant entry only to that
|
|
250
|
+
* variant. Variant files are loaded after the global one, so they win at equal specificity.
|
|
251
|
+
*/
|
|
252
|
+
export interface TypographySettings extends FontCssSettings {
|
|
253
|
+
/**
|
|
254
|
+
* Per variant font stylesheets, keyed by typography variant.
|
|
255
|
+
*/
|
|
256
|
+
variants: Partial<Record<TypographyVariant, FontCssSettings>>;
|
|
217
257
|
}
|
|
218
258
|
/**
|
|
219
259
|
* What a settings source actually sends. Every field is optional, so the reducer fills the gaps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appSettings.d.ts","sourceRoot":"","sources":["../../../settings/types/appSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"appSettings.d.ts","sourceRoot":"","sources":["../../../settings/types/appSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,iBAAiB,EAChE,MAAM,+BAA+B,CAAC;AAKvC,YAAY,EACV,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,iBAAiB,GAChE,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAe,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG,OAAO,uBAAuB,CAAC;AAEtF;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE;QACR,WAAW,EAAE,gBAAgB,CAAC;KAC/B,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD;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