@automattic/jetpack-connection 0.39.11 → 0.39.12
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 +11 -1
- package/components/connect-screen/required-plan/style.scss +1 -1
- package/components/disconnect-dialog/style.scss +1 -1
- package/components/in-place-connection/style.scss +1 -33
- package/components/manage-connection-dialog/style.scss +1 -1
- package/declarations.d.ts +9 -0
- package/hooks/use-product-checkout-workflow/index.jsx +11 -11
- package/package.json +4 -4
- package/types.ts +52 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
### This is a list detailing changes for the Jetpack RNA Connection Component releases.
|
|
4
4
|
|
|
5
|
+
## [0.39.12] - 2025-04-28
|
|
6
|
+
### Changed
|
|
7
|
+
- Mark external links with extra markup. [#43152]
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- Linting: Fix more Stylelint violations. [#43213]
|
|
11
|
+
- Linting: Remove outdated vendor prefixes in stylesheets. [#43219]
|
|
12
|
+
- My Jetpack: Fix TS type checking and the corresponding errors [#43205]
|
|
13
|
+
|
|
5
14
|
## [0.39.11] - 2025-04-14
|
|
6
15
|
### Fixed
|
|
7
16
|
- Linting: Update stylesheets to use WordPress rules for fonts and colors. [#42920] [#42928]
|
|
8
|
-
- Linting: Clean up various
|
|
17
|
+
- Linting: Clean up various Stylelint violations. [#43010]
|
|
9
18
|
- Linting: Use double colon notation for pseudo-element selectors. [#43019]
|
|
10
19
|
|
|
11
20
|
## [0.39.10] - 2025-04-07
|
|
@@ -1002,6 +1011,7 @@
|
|
|
1002
1011
|
- `Main` and `ConnectUser` components added.
|
|
1003
1012
|
- `JetpackRestApiClient` API client added.
|
|
1004
1013
|
|
|
1014
|
+
[0.39.12]: https://github.com/Automattic/jetpack-connection-js/compare/v0.39.11...v0.39.12
|
|
1005
1015
|
[0.39.11]: https://github.com/Automattic/jetpack-connection-js/compare/v0.39.10...v0.39.11
|
|
1006
1016
|
[0.39.10]: https://github.com/Automattic/jetpack-connection-js/compare/v0.39.9...v0.39.10
|
|
1007
1017
|
[0.39.9]: https://github.com/Automattic/jetpack-connection-js/compare/v0.39.8...v0.39.9
|
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.fade-in {
|
|
6
|
-
animation:
|
|
7
|
-
-webkit-animation: fadeIn ease 1.5s;
|
|
8
|
-
-moz-animation: fadeIn ease 1.5s;
|
|
9
|
-
-o-animation: fadeIn ease 1.5s;
|
|
10
|
-
-ms-animation: fadeIn ease 1.5s;
|
|
6
|
+
animation: fadein ease 1.5s;
|
|
11
7
|
}
|
|
12
8
|
|
|
13
9
|
@keyframes fadeIn {
|
|
@@ -16,31 +12,3 @@
|
|
|
16
12
|
|
|
17
13
|
100% {opacity:1;}
|
|
18
14
|
}
|
|
19
|
-
|
|
20
|
-
@-moz-keyframes fadeIn {
|
|
21
|
-
|
|
22
|
-
0% {opacity:0;}
|
|
23
|
-
|
|
24
|
-
100% {opacity:1;}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@-webkit-keyframes fadeIn {
|
|
28
|
-
|
|
29
|
-
0% {opacity:0;}
|
|
30
|
-
|
|
31
|
-
100% {opacity:1;}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@-o-keyframes fadeIn {
|
|
35
|
-
|
|
36
|
-
0% {opacity:0;}
|
|
37
|
-
|
|
38
|
-
100% {opacity:1;}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@-ms-keyframes fadeIn {
|
|
42
|
-
|
|
43
|
-
0% {opacity:0;}
|
|
44
|
-
|
|
45
|
-
100% {opacity:1;}
|
|
46
|
-
}
|
package/declarations.d.ts
CHANGED
|
@@ -6,3 +6,12 @@ declare module '@automattic/jetpack-script-data' {
|
|
|
6
6
|
connection: ConnectionScriptData;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
+
|
|
10
|
+
declare global {
|
|
11
|
+
interface Window {
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated In favor of getScriptData from @automattic/jetpack-script-data
|
|
14
|
+
*/
|
|
15
|
+
JP_CONNECTION_INITIAL_STATE: ConnectionScriptData;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -22,17 +22,17 @@ const defaultAdminUrl = () =>
|
|
|
22
22
|
* Custom hook that performs the needed steps
|
|
23
23
|
* to concrete the checkout workflow.
|
|
24
24
|
*
|
|
25
|
-
* @param {object} props
|
|
26
|
-
* @param {string} props.productSlug
|
|
27
|
-
* @param {string} props.redirectUrl
|
|
28
|
-
* @param {string} [props.siteSuffix]
|
|
29
|
-
* @param {string} [props.adminUrl]
|
|
30
|
-
* @param {boolean} props.connectAfterCheckout - Whether or not to conect after checkout if not connected (default false - connect before).
|
|
31
|
-
* @param {Function} props.siteProductAvailabilityHandler - The function used to check whether the site already has the requested product. This will be checked after registration and the checkout page will be skipped if the promise returned resloves true.
|
|
32
|
-
* @param {
|
|
33
|
-
* @param {number} [props.quantity]
|
|
34
|
-
* @param {boolean} [props.useBlogIdSuffix]
|
|
35
|
-
* @return {
|
|
25
|
+
* @param {object} props - The props passed to the hook.
|
|
26
|
+
* @param {string} props.productSlug - The WordPress product slug.
|
|
27
|
+
* @param {string} props.redirectUrl - The URI to redirect to after checkout.
|
|
28
|
+
* @param {string} [props.siteSuffix] - The site suffix.
|
|
29
|
+
* @param {string} [props.adminUrl] - The site wp-admin url.
|
|
30
|
+
* @param {boolean} [props.connectAfterCheckout] - Whether or not to conect after checkout if not connected (default false - connect before).
|
|
31
|
+
* @param {Function} [props.siteProductAvailabilityHandler] - The function used to check whether the site already has the requested product. This will be checked after registration and the checkout page will be skipped if the promise returned resloves true.
|
|
32
|
+
* @param {string} props.from - The plugin slug initiated the flow.
|
|
33
|
+
* @param {number} [props.quantity] - The quantity of the product to purchase.
|
|
34
|
+
* @param {boolean} [props.useBlogIdSuffix] - Use blog ID instead of site suffix in the checkout URL.
|
|
35
|
+
* @return {object} The useEffect hook.
|
|
36
36
|
*/
|
|
37
37
|
export default function useProductCheckoutWorkflow( {
|
|
38
38
|
productSlug,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-connection",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.12",
|
|
4
4
|
"description": "Jetpack Connection Component",
|
|
5
5
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/connection/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@automattic/jetpack-analytics": "^0.1.36",
|
|
18
18
|
"@automattic/jetpack-api": "^0.20.1",
|
|
19
|
-
"@automattic/jetpack-components": "^0.72.
|
|
19
|
+
"@automattic/jetpack-components": "^0.72.5",
|
|
20
20
|
"@automattic/jetpack-config": "^0.1.29",
|
|
21
|
-
"@automattic/jetpack-script-data": "^0.4.
|
|
21
|
+
"@automattic/jetpack-script-data": "^0.4.1",
|
|
22
22
|
"@wordpress/base-styles": "5.21.0",
|
|
23
23
|
"@wordpress/browserslist-config": "6.21.0",
|
|
24
24
|
"@wordpress/components": "29.7.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prop-types": "^15.7.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@automattic/jetpack-base-styles": "^0.7.
|
|
34
|
+
"@automattic/jetpack-base-styles": "^0.7.2",
|
|
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
CHANGED
|
@@ -1,3 +1,55 @@
|
|
|
1
1
|
export type ConnectionScriptData = {
|
|
2
|
+
apiRoot: string;
|
|
3
|
+
apiNonce: string;
|
|
4
|
+
registrationNonce: string;
|
|
2
5
|
calypsoEnv: string;
|
|
6
|
+
connectionStatus: {
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
isStaging: boolean;
|
|
9
|
+
isRegistered: boolean;
|
|
10
|
+
isUserConnected: boolean;
|
|
11
|
+
hasConnectedOwner: boolean;
|
|
12
|
+
offlineMode: {
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
constant: boolean;
|
|
15
|
+
url: boolean;
|
|
16
|
+
filter: boolean;
|
|
17
|
+
wpLocalConstant: boolean;
|
|
18
|
+
};
|
|
19
|
+
isPublic: boolean;
|
|
20
|
+
};
|
|
21
|
+
userConnectionData: {
|
|
22
|
+
currentUser: {
|
|
23
|
+
isConnected: boolean;
|
|
24
|
+
isMaster: boolean;
|
|
25
|
+
username: string;
|
|
26
|
+
id: number;
|
|
27
|
+
blogId: number;
|
|
28
|
+
wpcomUser: {
|
|
29
|
+
avatar: boolean;
|
|
30
|
+
display_name: string;
|
|
31
|
+
email: string;
|
|
32
|
+
};
|
|
33
|
+
gravatar: string;
|
|
34
|
+
permissions: {
|
|
35
|
+
admin_page?: boolean;
|
|
36
|
+
connect: boolean;
|
|
37
|
+
connect_user: boolean;
|
|
38
|
+
disconnect: boolean;
|
|
39
|
+
edit_posts?: boolean;
|
|
40
|
+
manage_modules?: boolean;
|
|
41
|
+
manage_options?: boolean;
|
|
42
|
+
manage_plugins?: boolean;
|
|
43
|
+
network_admin?: boolean;
|
|
44
|
+
network_sites_page?: boolean;
|
|
45
|
+
publish_posts?: boolean;
|
|
46
|
+
view_stats?: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
connectionOwner: null;
|
|
50
|
+
};
|
|
51
|
+
connectedPlugins: object;
|
|
52
|
+
wpVersion: string;
|
|
53
|
+
siteSuffix: string;
|
|
54
|
+
connectionErrors: Array< string | object >;
|
|
3
55
|
};
|