@shopgate/pwa-common 7.32.0-beta.1 → 7.32.0-beta.2
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/components/Icon/index.d.ts +1 -1
- package/components/Icon/index.d.ts.map +1 -1
- package/components/Modal/index.js +4 -4
- package/components/SurroundPortals/index.d.ts +1 -1
- package/components/SurroundPortals/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/providers/toast/index.js +12 -12
|
@@ -31,6 +31,6 @@ export interface IconProps {
|
|
|
31
31
|
* Provides basic styling via `currentColor` and supports size and color
|
|
32
32
|
* overrides through props while allowing external class-based overrides.
|
|
33
33
|
*/
|
|
34
|
-
declare const Icon: ({ content, className, color, viewBox, size, }: IconProps) => import("react
|
|
34
|
+
declare const Icon: ({ content, className, color, viewBox, size, }: IconProps) => import("react").JSX.Element;
|
|
35
35
|
export default Icon;
|
|
36
36
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Icon/index.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,GAAI,+CAMX,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Icon/index.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,GAAI,+CAMX,SAAS,gCAgBX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { createPortal } from 'react-dom';
|
|
|
4
4
|
import { useTrackModalState } from '@shopgate/engage/a11y/hooks';
|
|
5
5
|
import { makeStyles, responsiveMediaQuery } from '@shopgate/engage/styles';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const useStyles = makeStyles()({
|
|
7
|
+
const useStyles = makeStyles()(theme => ({
|
|
8
8
|
container: {
|
|
9
9
|
position: 'fixed',
|
|
10
10
|
top: 0,
|
|
@@ -25,8 +25,8 @@ const useStyles = makeStyles()({
|
|
|
25
25
|
position: 'relative',
|
|
26
26
|
maxWidth: '100vw',
|
|
27
27
|
maxHeight: '100vh',
|
|
28
|
-
paddingTop:
|
|
29
|
-
paddingBottom:
|
|
28
|
+
paddingTop: theme.layout.safeArea.top,
|
|
29
|
+
paddingBottom: theme.layout.safeArea.bottom,
|
|
30
30
|
overflowY: 'scroll',
|
|
31
31
|
[responsiveMediaQuery('>xs', {
|
|
32
32
|
webOnly: true
|
|
@@ -34,7 +34,7 @@ const useStyles = makeStyles()({
|
|
|
34
34
|
overflowY: 'initial'
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
});
|
|
37
|
+
}));
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* The Modal component.
|
|
@@ -19,6 +19,6 @@ export interface SurroundPortalsProps {
|
|
|
19
19
|
*
|
|
20
20
|
* @returns The SurroundPortals component.
|
|
21
21
|
*/
|
|
22
|
-
declare const SurroundPortals: ({ portalName, portalProps, children, }: SurroundPortalsProps) =>
|
|
22
|
+
declare const SurroundPortals: ({ portalName, portalProps, children, }: SurroundPortalsProps) => React.JSX.Element;
|
|
23
23
|
export default SurroundPortals;
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/SurroundPortals/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,eAAe,GAAI,wCAItB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/SurroundPortals/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,eAAe,GAAI,wCAItB,oBAAoB,sBAQtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/pwa-common",
|
|
3
|
-
"version": "7.32.0-beta.
|
|
3
|
+
"version": "7.32.0-beta.2",
|
|
4
4
|
"description": "Common library for the Shopgate Connect PWA.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Shopgate <support@shopgate.com>",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@redux-devtools/extension": "^3.3.0",
|
|
19
19
|
"@sentry/browser": "6.0.1",
|
|
20
|
-
"@shopgate/pwa-benchmark": "7.32.0-beta.
|
|
20
|
+
"@shopgate/pwa-benchmark": "7.32.0-beta.2",
|
|
21
21
|
"@virtuous/conductor": "~2.5.0",
|
|
22
22
|
"@virtuous/react-conductor": "~2.5.0",
|
|
23
23
|
"@virtuous/redux-persister": "1.1.0-beta.7",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"glamor": "^2.20.40",
|
|
27
27
|
"gsap": "^3.14.2",
|
|
28
28
|
"history": "^4.9.0",
|
|
29
|
-
"intl-messageformat": "^11.
|
|
29
|
+
"intl-messageformat": "^11.2.9",
|
|
30
30
|
"path-match": "^1.2.4",
|
|
31
31
|
"react-dotdotdot": "~1.3.1",
|
|
32
32
|
"react-helmet": "^6.1.0",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"redux-thunk": "^3.1.0",
|
|
38
38
|
"reselect": "^4.1.8",
|
|
39
39
|
"rxjs": "~5.5.12",
|
|
40
|
-
"swiper": "12.
|
|
40
|
+
"swiper": "12.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@shopgate/pwa-core": "7.32.0-beta.
|
|
43
|
+
"@shopgate/pwa-core": "7.32.0-beta.2",
|
|
44
44
|
"@types/lodash": "^4.17.24",
|
|
45
45
|
"@types/react-portal": "^3.0.9",
|
|
46
46
|
"lodash": "^4.17.23",
|
package/providers/toast/index.js
CHANGED
|
@@ -3,20 +3,20 @@ import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
|
|
|
3
3
|
import React, { Component } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { UIEvents } from '@shopgate/pwa-core';
|
|
6
|
-
import {
|
|
6
|
+
import { withTheme } from '@shopgate/engage/styles/theme/hocs/withTheme';
|
|
7
7
|
import ToastContext from "./context";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = {}
|
|
15
|
-
} = themeConfig;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {Object} ToastProviderProps
|
|
11
|
+
* @property {import('react').ReactNode} children
|
|
12
|
+
* @property {import('@shopgate/engage/styles').Theme} theme
|
|
13
|
+
*/
|
|
16
14
|
|
|
17
15
|
/**
|
|
18
16
|
* The ToastProvider component
|
|
17
|
+
* @augments {Component<ToastProviderProps>}
|
|
19
18
|
*/
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
let ToastProvider = /*#__PURE__*/function (_Component) {
|
|
21
21
|
/**
|
|
22
22
|
* @param {Object} props The component props.
|
|
@@ -47,7 +47,7 @@ let ToastProvider = /*#__PURE__*/function (_Component) {
|
|
|
47
47
|
found.actionLabel = toast.actionLabel;
|
|
48
48
|
found.message = toast.message;
|
|
49
49
|
found.messageParams = toast.messageParams;
|
|
50
|
-
found.duration = toast.duration || duration;
|
|
50
|
+
found.duration = toast.duration || _this.props.theme.transitions.duration.toast;
|
|
51
51
|
} else {
|
|
52
52
|
toasts.push({
|
|
53
53
|
id: toast.id,
|
|
@@ -55,7 +55,7 @@ let ToastProvider = /*#__PURE__*/function (_Component) {
|
|
|
55
55
|
actionLabel: toast.actionLabel,
|
|
56
56
|
message: toast.message,
|
|
57
57
|
messageParams: toast.messageParams,
|
|
58
|
-
duration: toast.duration || duration
|
|
58
|
+
duration: toast.duration || _this.props.theme.transitions.duration.toast
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
_this.setState({
|
|
@@ -117,4 +117,4 @@ let ToastProvider = /*#__PURE__*/function (_Component) {
|
|
|
117
117
|
}(Component);
|
|
118
118
|
ToastProvider.ADD = 'toast_add';
|
|
119
119
|
ToastProvider.FLUSH = 'toast_flush';
|
|
120
|
-
export default ToastProvider;
|
|
120
|
+
export default withTheme(ToastProvider);
|