@automattic/jetpack-connection 0.39.7 → 0.39.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/CHANGELOG.md +10 -0
- package/components/use-connection/index.jsx +17 -3
- package/declarations.d.ts +8 -0
- package/index.jsx +3 -0
- package/package.json +11 -11
- package/types.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
### This is a list detailing changes for the Jetpack RNA Connection Component releases.
|
|
4
4
|
|
|
5
|
+
## [0.39.9] - 2025-04-01
|
|
6
|
+
### Changed
|
|
7
|
+
- Update package dependencies. [#42809]
|
|
8
|
+
|
|
9
|
+
## [0.39.8] - 2025-04-01
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fix Typescript configuration [#42762]
|
|
12
|
+
|
|
5
13
|
## [0.39.7] - 2025-03-31
|
|
6
14
|
### Changed
|
|
7
15
|
- Update dependencies.
|
|
@@ -984,6 +992,8 @@
|
|
|
984
992
|
- `Main` and `ConnectUser` components added.
|
|
985
993
|
- `JetpackRestApiClient` API client added.
|
|
986
994
|
|
|
995
|
+
[0.39.9]: https://github.com/Automattic/jetpack-connection-js/compare/v0.39.8...v0.39.9
|
|
996
|
+
[0.39.8]: https://github.com/Automattic/jetpack-connection-js/compare/v0.39.7...v0.39.8
|
|
987
997
|
[0.39.7]: https://github.com/Automattic/jetpack-connection-js/compare/v0.39.6...v0.39.7
|
|
988
998
|
[0.39.6]: https://github.com/Automattic/jetpack-connection-js/compare/v0.39.5...v0.39.6
|
|
989
999
|
[0.39.5]: https://github.com/Automattic/jetpack-connection-js/compare/v0.39.4...v0.39.5
|
|
@@ -6,7 +6,21 @@ import { STORE_ID } from '../../state/store';
|
|
|
6
6
|
|
|
7
7
|
const initialState = window?.JP_CONNECTION_INITIAL_STATE || getScriptData()?.connection || {};
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Hook to handle the connection process.
|
|
11
|
+
*
|
|
12
|
+
* @param {object} [props] - The props.
|
|
13
|
+
* @param {string} [props.registrationNonce] - The registration nonce.
|
|
14
|
+
* @param {string} [props.apiRoot] - The API root URL.
|
|
15
|
+
* @param {string} [props.apiNonce] - The API nonce.
|
|
16
|
+
* @param {string} [props.redirectUri] - The redirect URI.
|
|
17
|
+
* @param {boolean} [props.autoTrigger] - Whether to auto-trigger the connection process.
|
|
18
|
+
* @param {string} [props.from] - Value that represents the redirect origin.
|
|
19
|
+
* @param {boolean} [props.skipUserConnection] - Whether to skip user connection.
|
|
20
|
+
* @param {boolean} [props.skipPricingPage] - Whether to skip the pricing page.
|
|
21
|
+
* @return {object} The connection state and handlers.
|
|
22
|
+
*/
|
|
23
|
+
export default function useConnection( {
|
|
10
24
|
registrationNonce = initialState.registrationNonce,
|
|
11
25
|
apiRoot = initialState.apiRoot,
|
|
12
26
|
apiNonce = initialState.apiNonce,
|
|
@@ -15,7 +29,7 @@ export default ( {
|
|
|
15
29
|
from,
|
|
16
30
|
skipUserConnection,
|
|
17
31
|
skipPricingPage,
|
|
18
|
-
} = {} )
|
|
32
|
+
} = {} ) {
|
|
19
33
|
const { registerSite, connectUser, refreshConnectedPlugins } = useDispatch( STORE_ID );
|
|
20
34
|
|
|
21
35
|
const registrationError = useSelect( select => select( STORE_ID ).getRegistrationError() );
|
|
@@ -111,4 +125,4 @@ export default ( {
|
|
|
111
125
|
connectionErrors,
|
|
112
126
|
isOfflineMode,
|
|
113
127
|
};
|
|
114
|
-
}
|
|
128
|
+
}
|
package/index.jsx
CHANGED
|
@@ -14,6 +14,9 @@ along with this program; if not, write to the Free Software
|
|
|
14
14
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
// Ensure that module augmentation is applied
|
|
18
|
+
export {} from './declarations.d.ts';
|
|
19
|
+
|
|
17
20
|
/**
|
|
18
21
|
* Components.
|
|
19
22
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-connection",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.9",
|
|
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,23 +15,23 @@
|
|
|
15
15
|
"license": "GPL-2.0-or-later",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@automattic/jetpack-analytics": "^0.1.36",
|
|
18
|
-
"@automattic/jetpack-api": "^0.20.
|
|
19
|
-
"@automattic/jetpack-components": "^0.72.
|
|
18
|
+
"@automattic/jetpack-api": "^0.20.1",
|
|
19
|
+
"@automattic/jetpack-components": "^0.72.2",
|
|
20
20
|
"@automattic/jetpack-config": "^0.1.29",
|
|
21
21
|
"@automattic/jetpack-script-data": "^0.3.0",
|
|
22
|
-
"@wordpress/base-styles": "5.
|
|
23
|
-
"@wordpress/browserslist-config": "6.
|
|
24
|
-
"@wordpress/components": "29.
|
|
25
|
-
"@wordpress/data": "10.
|
|
26
|
-
"@wordpress/element": "6.
|
|
27
|
-
"@wordpress/i18n": "5.
|
|
28
|
-
"@wordpress/icons": "10.
|
|
22
|
+
"@wordpress/base-styles": "5.21.0",
|
|
23
|
+
"@wordpress/browserslist-config": "6.21.0",
|
|
24
|
+
"@wordpress/components": "29.7.0",
|
|
25
|
+
"@wordpress/data": "10.21.0",
|
|
26
|
+
"@wordpress/element": "6.21.0",
|
|
27
|
+
"@wordpress/i18n": "5.21.0",
|
|
28
|
+
"@wordpress/icons": "10.21.0",
|
|
29
29
|
"clsx": "2.1.1",
|
|
30
30
|
"debug": "4.4.0",
|
|
31
31
|
"prop-types": "^15.7.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@automattic/jetpack-base-styles": "^0.6.
|
|
34
|
+
"@automattic/jetpack-base-styles": "^0.6.45",
|
|
35
35
|
"@babel/core": "7.26.10",
|
|
36
36
|
"@babel/preset-react": "7.26.3",
|
|
37
37
|
"@storybook/addon-actions": "8.6.7",
|
package/types.ts
ADDED