@automattic/jetpack-connection 1.4.63 → 1.4.65

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 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
+ ## [1.4.65] - 2026-06-25
6
+ ### Fixed
7
+ - Connect screen: Accept React synthetic events on the connect button click handler to satisfy the `@wordpress/ui` 0.15 Button `onClick` type. [#49795]
8
+
9
+ ## [1.4.64] - 2026-06-24
10
+ ### Changed
11
+ - Internal updates.
12
+
5
13
  ## [1.4.63] - 2026-06-23
6
14
  ### Changed
7
15
  - Update dependencies.
@@ -1393,6 +1401,8 @@
1393
1401
  - `Main` and `ConnectUser` components added.
1394
1402
  - `JetpackRestApiClient` API client added.
1395
1403
 
1404
+ [1.4.65]: https://github.com/Automattic/jetpack-connection-js/compare/v1.4.64...v1.4.65
1405
+ [1.4.64]: https://github.com/Automattic/jetpack-connection-js/compare/v1.4.63...v1.4.64
1396
1406
  [1.4.63]: https://github.com/Automattic/jetpack-connection-js/compare/v1.4.62...v1.4.63
1397
1407
  [1.4.62]: https://github.com/Automattic/jetpack-connection-js/compare/v1.4.61...v1.4.62
1398
1408
  [1.4.61]: https://github.com/Automattic/jetpack-connection-js/compare/v1.4.60...v1.4.61
@@ -5,7 +5,7 @@ import { Button } from '@wordpress/ui';
5
5
  import ConnectScreenLayout from '../layout';
6
6
  import type { Props as ConnectScreenProps } from '../basic';
7
7
  import type { WithRequired } from '../types';
8
- import type { FC } from 'react';
8
+ import type { FC, SyntheticEvent } from 'react';
9
9
  import './style.scss';
10
10
 
11
11
  type SharedProps = Pick<
@@ -23,7 +23,7 @@ type OwnProps = {
23
23
  // Whether the connection status is still loading
24
24
  isLoading?: boolean;
25
25
  // Callback to be called on button click
26
- handleButtonClick?: ( e: MouseEvent ) => void;
26
+ handleButtonClick?: ( e?: Event | SyntheticEvent ) => void;
27
27
  // Whether the error message appears or not
28
28
  displayButtonError?: boolean;
29
29
  // The connection error code
@@ -149,7 +149,6 @@
149
149
  margin-right: calc(var(--spacing-base) * 2); // 16px
150
150
  }
151
151
 
152
- :global(.jp-components-spinner),
153
152
  :global(.components-spinner) {
154
153
  margin-right: calc(var(--spacing-base) * 2); // 16px
155
154
  }
@@ -9,6 +9,7 @@ import type {
9
9
  UseConnectionProps,
10
10
  UseConnectionReturn,
11
11
  } from './types.ts';
12
+ import type { SyntheticEvent } from 'react';
12
13
 
13
14
  type StoreSelector = ( storeId: string ) => Record< string, ( ...args: unknown[] ) => unknown >;
14
15
 
@@ -96,7 +97,7 @@ export default function useConnection( {
96
97
  * @param {Event} [e] - Event that dispatched handleRegisterSite
97
98
  * @return Promise when running the site connection process. Otherwise, nothing.
98
99
  */
99
- const handleRegisterSite = ( e?: Event ): Promise< unknown > => {
100
+ const handleRegisterSite = ( e?: Event | SyntheticEvent ): Promise< unknown > => {
100
101
  e && e.preventDefault();
101
102
 
102
103
  if ( isRegistered ) {
@@ -1,3 +1,5 @@
1
+ import type { SyntheticEvent } from 'react';
2
+
1
3
  export interface UseConnectionProps {
2
4
  /**
3
5
  * The registration nonce.
@@ -61,7 +63,7 @@ export interface RegistrationError {
61
63
  }
62
64
 
63
65
  export interface UseConnectionReturn {
64
- handleRegisterSite: ( e?: Event ) => Promise< unknown >;
66
+ handleRegisterSite: ( e?: Event | SyntheticEvent ) => Promise< unknown >;
65
67
  handleConnectUser: () => Promise< unknown >;
66
68
  refreshConnectedPlugins: () => Promise< unknown >;
67
69
  isRegistered: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-connection",
3
- "version": "1.4.63",
3
+ "version": "1.4.65",
4
4
  "description": "Jetpack Connection Component",
5
5
  "homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/connection/#readme",
6
6
  "bugs": {
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@automattic/jetpack-analytics": "^1.0.15",
34
34
  "@automattic/jetpack-api": "^1.0.30",
35
- "@automattic/jetpack-components": "^1.12.10",
35
+ "@automattic/jetpack-components": "^1.12.12",
36
36
  "@automattic/jetpack-config": "^1.0.13",
37
37
  "@automattic/jetpack-script-data": "^0.6.4",
38
38
  "@wordpress/base-styles": "10.0.1",