@automattic/jetpack-connection 0.33.10 → 0.33.11
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/CHANGELOG.md +5 -0
- package/components/connect-button/index.jsx +9 -8
- package/components/connect-screen/required-plan/index.jsx +4 -11
- package/components/connect-screen/required-plan/visual.jsx +5 -13
- package/components/connect-user/index.jsx +6 -6
- package/components/disconnect-dialog/index.jsx +3 -9
- package/components/in-place-connection/index.jsx +4 -11
- package/components/manage-connection-dialog/index.jsx +4 -11
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
### This is a list detailing changes for the Jetpack RNA Connection Component releases.
|
|
4
4
|
|
|
5
|
+
## [0.33.11] - 2024-05-20
|
|
6
|
+
### Changed
|
|
7
|
+
- Updated package dependencies. [#37379] [#37380] [#37382]
|
|
8
|
+
|
|
5
9
|
## [0.33.10] - 2024-05-08
|
|
6
10
|
### Changed
|
|
7
11
|
- Update dependencies.
|
|
@@ -761,6 +765,7 @@
|
|
|
761
765
|
- `Main` and `ConnectUser` components added.
|
|
762
766
|
- `JetpackRestApiClient` API client added.
|
|
763
767
|
|
|
768
|
+
[0.33.11]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.10...v0.33.11
|
|
764
769
|
[0.33.10]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.9...v0.33.10
|
|
765
770
|
[0.33.9]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.8...v0.33.9
|
|
766
771
|
[0.33.8]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.7...v0.33.8
|
|
@@ -11,8 +11,15 @@ import useConnection from '../use-connection';
|
|
|
11
11
|
* @returns {React.Component} The RNA connection component.
|
|
12
12
|
*/
|
|
13
13
|
const ConnectButton = props => {
|
|
14
|
-
const {
|
|
15
|
-
|
|
14
|
+
const {
|
|
15
|
+
apiRoot,
|
|
16
|
+
apiNonce,
|
|
17
|
+
connectLabel = __( 'Connect', 'jetpack' ),
|
|
18
|
+
registrationNonce,
|
|
19
|
+
redirectUri = null,
|
|
20
|
+
from,
|
|
21
|
+
autoTrigger = false,
|
|
22
|
+
} = props;
|
|
16
23
|
|
|
17
24
|
const {
|
|
18
25
|
handleRegisterSite,
|
|
@@ -61,10 +68,4 @@ ConnectButton.propTypes = {
|
|
|
61
68
|
autoTrigger: PropTypes.bool,
|
|
62
69
|
};
|
|
63
70
|
|
|
64
|
-
ConnectButton.defaultProps = {
|
|
65
|
-
connectLabel: __( 'Connect', 'jetpack' ),
|
|
66
|
-
redirectUri: null,
|
|
67
|
-
autoTrigger: false,
|
|
68
|
-
};
|
|
69
|
-
|
|
70
71
|
export default ConnectButton;
|
|
@@ -13,9 +13,9 @@ import ConnectScreenRequiredPlanVisual from './visual';
|
|
|
13
13
|
*/
|
|
14
14
|
const ConnectScreenRequiredPlan = props => {
|
|
15
15
|
const {
|
|
16
|
-
title,
|
|
17
|
-
autoTrigger,
|
|
18
|
-
buttonLabel,
|
|
16
|
+
title = __( 'Over 5 million WordPress sites are faster and more secure', 'jetpack' ),
|
|
17
|
+
autoTrigger = false,
|
|
18
|
+
buttonLabel = __( 'Set up Jetpack', 'jetpack' ),
|
|
19
19
|
apiRoot,
|
|
20
20
|
apiNonce,
|
|
21
21
|
registrationNonce,
|
|
@@ -26,7 +26,7 @@ const ConnectScreenRequiredPlan = props => {
|
|
|
26
26
|
priceAfter,
|
|
27
27
|
pricingIcon,
|
|
28
28
|
pricingTitle,
|
|
29
|
-
pricingCurrencyCode,
|
|
29
|
+
pricingCurrencyCode = 'USD',
|
|
30
30
|
wpcomProductSlug,
|
|
31
31
|
siteProductAvailabilityHandler,
|
|
32
32
|
logo,
|
|
@@ -117,11 +117,4 @@ ConnectScreenRequiredPlan.propTypes = {
|
|
|
117
117
|
logo: PropTypes.element,
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
ConnectScreenRequiredPlan.defaultProps = {
|
|
121
|
-
title: __( 'Over 5 million WordPress sites are faster and more secure', 'jetpack' ),
|
|
122
|
-
buttonLabel: __( 'Set up Jetpack', 'jetpack' ),
|
|
123
|
-
pricingCurrencyCode: 'USD',
|
|
124
|
-
autoTrigger: false,
|
|
125
|
-
};
|
|
126
|
-
|
|
127
120
|
export default ConnectScreenRequiredPlan;
|
|
@@ -30,11 +30,11 @@ const ConnectScreenRequiredPlanVisual = props => {
|
|
|
30
30
|
priceAfter,
|
|
31
31
|
pricingIcon,
|
|
32
32
|
pricingTitle,
|
|
33
|
-
pricingCurrencyCode,
|
|
34
|
-
isLoading,
|
|
35
|
-
handleButtonClick,
|
|
36
|
-
displayButtonError,
|
|
37
|
-
buttonIsLoading,
|
|
33
|
+
pricingCurrencyCode = 'USD',
|
|
34
|
+
isLoading = false,
|
|
35
|
+
handleButtonClick = () => {},
|
|
36
|
+
displayButtonError = false,
|
|
37
|
+
buttonIsLoading = false,
|
|
38
38
|
logo,
|
|
39
39
|
isOfflineMode,
|
|
40
40
|
rna = false,
|
|
@@ -140,12 +140,4 @@ ConnectScreenRequiredPlanVisual.propTypes = {
|
|
|
140
140
|
isOfflineMode: PropTypes.bool,
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
ConnectScreenRequiredPlanVisual.defaultProps = {
|
|
144
|
-
pricingCurrencyCode: 'USD',
|
|
145
|
-
isLoading: false,
|
|
146
|
-
buttonIsLoading: false,
|
|
147
|
-
displayButtonError: false,
|
|
148
|
-
handleButtonClick: () => {},
|
|
149
|
-
};
|
|
150
|
-
|
|
151
143
|
export default ConnectScreenRequiredPlanVisual;
|
|
@@ -13,7 +13,12 @@ import { useState, useEffect } from 'react';
|
|
|
13
13
|
* @returns {null} -- Nothing to return.
|
|
14
14
|
*/
|
|
15
15
|
const ConnectUser = props => {
|
|
16
|
-
const {
|
|
16
|
+
const {
|
|
17
|
+
redirectFunc = url => window.location.assign( url ),
|
|
18
|
+
connectUrl,
|
|
19
|
+
redirectUri = null,
|
|
20
|
+
from,
|
|
21
|
+
} = props;
|
|
17
22
|
|
|
18
23
|
const [ authorizationUrl, setAuthorizationUrl ] = useState( null );
|
|
19
24
|
|
|
@@ -56,9 +61,4 @@ ConnectUser.propTypes = {
|
|
|
56
61
|
redirectFunc: PropTypes.func,
|
|
57
62
|
};
|
|
58
63
|
|
|
59
|
-
ConnectUser.defaultProps = {
|
|
60
|
-
redirectFunc: url => window.location.assign( url ),
|
|
61
|
-
redirectUri: null,
|
|
62
|
-
};
|
|
63
|
-
|
|
64
64
|
export default ConnectUser;
|
|
@@ -29,13 +29,13 @@ const DisconnectDialog = props => {
|
|
|
29
29
|
apiRoot,
|
|
30
30
|
apiNonce,
|
|
31
31
|
connectedPlugins,
|
|
32
|
-
title,
|
|
32
|
+
title = __( 'Are you sure you want to disconnect?', 'jetpack' ),
|
|
33
33
|
pluginScreenDisconnectCallback,
|
|
34
34
|
onDisconnected,
|
|
35
35
|
onError,
|
|
36
36
|
disconnectStepComponent,
|
|
37
|
-
context,
|
|
38
|
-
connectedUser,
|
|
37
|
+
context = 'jetpack-dashboard',
|
|
38
|
+
connectedUser = {}, // Pass empty object to avoid undefined errors.
|
|
39
39
|
connectedSiteId,
|
|
40
40
|
isOpen,
|
|
41
41
|
onClose,
|
|
@@ -400,10 +400,4 @@ DisconnectDialog.propTypes = {
|
|
|
400
400
|
onClose: PropTypes.func,
|
|
401
401
|
};
|
|
402
402
|
|
|
403
|
-
DisconnectDialog.defaultProps = {
|
|
404
|
-
title: __( 'Are you sure you want to disconnect?', 'jetpack' ),
|
|
405
|
-
context: 'jetpack-dashboard',
|
|
406
|
-
connectedUser: {}, // Pass empty object to avoid undefined errors.
|
|
407
|
-
};
|
|
408
|
-
|
|
409
403
|
export default DisconnectDialog;
|
|
@@ -23,16 +23,16 @@ import './style.scss';
|
|
|
23
23
|
const InPlaceConnection = props => {
|
|
24
24
|
const {
|
|
25
25
|
title,
|
|
26
|
-
isLoading,
|
|
27
|
-
width,
|
|
26
|
+
isLoading = false,
|
|
27
|
+
width = '100%',
|
|
28
28
|
displayTOS,
|
|
29
|
-
scrollToIframe,
|
|
29
|
+
scrollToIframe = false,
|
|
30
30
|
connectUrl,
|
|
31
31
|
onComplete,
|
|
32
32
|
onThirdPartyCookiesBlocked,
|
|
33
33
|
location,
|
|
34
34
|
} = props;
|
|
35
|
-
let { height } = props;
|
|
35
|
+
let { height = '300' } = props;
|
|
36
36
|
|
|
37
37
|
const iframeWrapRef = useRef();
|
|
38
38
|
const iframeRef = useRef();
|
|
@@ -130,11 +130,4 @@ InPlaceConnection.propTypes = {
|
|
|
130
130
|
location: PropTypes.string,
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
InPlaceConnection.defaultProps = {
|
|
134
|
-
isLoading: false,
|
|
135
|
-
height: '300',
|
|
136
|
-
width: '100%',
|
|
137
|
-
scrollToIframe: false,
|
|
138
|
-
};
|
|
139
|
-
|
|
140
133
|
export default InPlaceConnection;
|
|
@@ -23,15 +23,15 @@ import './style.scss';
|
|
|
23
23
|
*/
|
|
24
24
|
const ManageConnectionDialog = props => {
|
|
25
25
|
const {
|
|
26
|
-
title,
|
|
26
|
+
title = __( 'Manage your Jetpack connection', 'jetpack' ),
|
|
27
27
|
apiRoot,
|
|
28
28
|
apiNonce,
|
|
29
29
|
connectedPlugins,
|
|
30
30
|
onDisconnected,
|
|
31
|
-
context,
|
|
32
|
-
connectedUser,
|
|
31
|
+
context = 'jetpack-dashboard',
|
|
32
|
+
connectedUser = {}, // Pass empty object to avoid undefined errors.
|
|
33
33
|
connectedSiteId,
|
|
34
|
-
isOpen,
|
|
34
|
+
isOpen = false,
|
|
35
35
|
onClose,
|
|
36
36
|
} = props;
|
|
37
37
|
|
|
@@ -209,11 +209,4 @@ ManageConnectionDialog.propTypes = {
|
|
|
209
209
|
onClose: PropTypes.func,
|
|
210
210
|
};
|
|
211
211
|
|
|
212
|
-
ManageConnectionDialog.defaultProps = {
|
|
213
|
-
title: __( 'Manage your Jetpack connection', 'jetpack' ),
|
|
214
|
-
isOpen: false,
|
|
215
|
-
context: 'jetpack-dashboard',
|
|
216
|
-
connectedUser: {}, // Pass empty object to avoid undefined errors.
|
|
217
|
-
};
|
|
218
|
-
|
|
219
212
|
export default ManageConnectionDialog;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-connection",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.11",
|
|
4
4
|
"description": "Jetpack Connection Component",
|
|
5
5
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/connection/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -15,34 +15,34 @@
|
|
|
15
15
|
"license": "GPL-2.0-or-later",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@automattic/jetpack-analytics": "^0.1.29",
|
|
18
|
-
"@automattic/jetpack-api": "^0.17.
|
|
19
|
-
"@automattic/jetpack-components": "^0.53.
|
|
18
|
+
"@automattic/jetpack-api": "^0.17.7",
|
|
19
|
+
"@automattic/jetpack-components": "^0.53.3",
|
|
20
20
|
"@automattic/jetpack-config": "^0.1.24",
|
|
21
|
-
"@wordpress/base-styles": "4.
|
|
22
|
-
"@wordpress/browserslist-config": "5.
|
|
23
|
-
"@wordpress/components": "27.
|
|
24
|
-
"@wordpress/data": "9.
|
|
25
|
-
"@wordpress/element": "5.
|
|
26
|
-
"@wordpress/i18n": "4.
|
|
27
|
-
"@wordpress/icons": "9.
|
|
21
|
+
"@wordpress/base-styles": "4.48.0",
|
|
22
|
+
"@wordpress/browserslist-config": "5.40.0",
|
|
23
|
+
"@wordpress/components": "27.5.0",
|
|
24
|
+
"@wordpress/data": "9.27.0",
|
|
25
|
+
"@wordpress/element": "5.34.0",
|
|
26
|
+
"@wordpress/i18n": "4.57.0",
|
|
27
|
+
"@wordpress/icons": "9.48.0",
|
|
28
28
|
"classnames": "2.3.2",
|
|
29
29
|
"debug": "4.3.4",
|
|
30
30
|
"prop-types": "^15.7.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@automattic/jetpack-base-styles": "^0.6.
|
|
33
|
+
"@automattic/jetpack-base-styles": "^0.6.25",
|
|
34
34
|
"@babel/core": "7.24.0",
|
|
35
35
|
"@babel/preset-react": "7.23.3",
|
|
36
36
|
"@storybook/addon-actions": "8.0.9",
|
|
37
|
-
"@testing-library/dom": "
|
|
38
|
-
"@testing-library/react": "
|
|
37
|
+
"@testing-library/dom": "10.1.0",
|
|
38
|
+
"@testing-library/react": "15.0.7",
|
|
39
39
|
"@testing-library/user-event": "14.5.2",
|
|
40
40
|
"@types/react": "18.3.1",
|
|
41
41
|
"jest": "29.7.0",
|
|
42
42
|
"jest-environment-jsdom": "29.7.0",
|
|
43
|
-
"react": "18.
|
|
44
|
-
"react-dom": "18.
|
|
45
|
-
"react-test-renderer": "18.
|
|
43
|
+
"react": "18.3.1",
|
|
44
|
+
"react-dom": "18.3.1",
|
|
45
|
+
"react-test-renderer": "18.3.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": "^18.0.0",
|