@automattic/jetpack-shared-extension-utils 2.0.22 → 2.0.23
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 +8 -0
- package/package.json +19 -19
- package/src/components/wpcom-support-link.jsx +5 -5
- package/src/get-jetpack-data.js +1 -1
- package/src/plan-utils.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.23] - 2026-09-18
|
|
9
|
+
### Changed
|
|
10
|
+
- Update package dependencies. [#52187]
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- WpcomSupportLink: Mark the `supportPostId` prop as optional in the type definition. [#52436]
|
|
14
|
+
|
|
8
15
|
## [2.0.22] - 2026-09-15
|
|
9
16
|
### Changed
|
|
10
17
|
- Update package dependencies. [#52297]
|
|
@@ -1068,6 +1075,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1068
1075
|
### Changed
|
|
1069
1076
|
- Core: prepare utility for release
|
|
1070
1077
|
|
|
1078
|
+
[2.0.23]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.22...2.0.23
|
|
1071
1079
|
[2.0.22]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.21...2.0.22
|
|
1072
1080
|
[2.0.21]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.20...2.0.21
|
|
1073
1081
|
[2.0.20]: https://github.com/Automattic/jetpack-shared-extension-utils/compare/2.0.19...2.0.20
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-shared-extension-utils",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.23",
|
|
4
4
|
"description": "Utility functions used by the block editor extensions",
|
|
5
5
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/shared-extension-utils/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -29,25 +29,25 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@automattic/color-studio": "4.1.0",
|
|
31
31
|
"@automattic/jetpack-analytics": "^1.0.16",
|
|
32
|
-
"@automattic/jetpack-base-styles": "^1.2.
|
|
33
|
-
"@automattic/jetpack-components": "^3.0
|
|
34
|
-
"@automattic/jetpack-connection": "^2.5.
|
|
35
|
-
"@automattic/jetpack-script-data": "^0.6.
|
|
36
|
-
"@automattic/jetpack-shared-stores": "^0.2.
|
|
32
|
+
"@automattic/jetpack-base-styles": "^1.2.13",
|
|
33
|
+
"@automattic/jetpack-components": "^3.1.0",
|
|
34
|
+
"@automattic/jetpack-connection": "^2.5.2",
|
|
35
|
+
"@automattic/jetpack-script-data": "^0.6.7",
|
|
36
|
+
"@automattic/jetpack-shared-stores": "^0.2.9",
|
|
37
37
|
"@types/jest": "30.0.0",
|
|
38
|
-
"@wordpress/api-fetch": "7.
|
|
39
|
-
"@wordpress/block-editor": "17.
|
|
40
|
-
"@wordpress/components": "40.
|
|
41
|
-
"@wordpress/compose": "8.
|
|
42
|
-
"@wordpress/data": "10.
|
|
43
|
-
"@wordpress/dom-ready": "4.
|
|
44
|
-
"@wordpress/element": "8.
|
|
45
|
-
"@wordpress/hooks": "4.
|
|
46
|
-
"@wordpress/i18n": "6.
|
|
47
|
-
"@wordpress/plugins": "7.
|
|
48
|
-
"@wordpress/primitives": "4.
|
|
49
|
-
"@wordpress/ui": "0.
|
|
50
|
-
"@wordpress/url": "4.
|
|
38
|
+
"@wordpress/api-fetch": "7.55.0",
|
|
39
|
+
"@wordpress/block-editor": "17.1.0",
|
|
40
|
+
"@wordpress/components": "40.1.0",
|
|
41
|
+
"@wordpress/compose": "8.8.0",
|
|
42
|
+
"@wordpress/data": "10.55.0",
|
|
43
|
+
"@wordpress/dom-ready": "4.55.0",
|
|
44
|
+
"@wordpress/element": "8.7.0",
|
|
45
|
+
"@wordpress/hooks": "4.55.0",
|
|
46
|
+
"@wordpress/i18n": "6.28.0",
|
|
47
|
+
"@wordpress/plugins": "7.55.0",
|
|
48
|
+
"@wordpress/primitives": "4.55.0",
|
|
49
|
+
"@wordpress/ui": "0.22.0",
|
|
50
|
+
"@wordpress/url": "4.55.0",
|
|
51
51
|
"clsx": "2.1.1",
|
|
52
52
|
"debug": "4.4.3",
|
|
53
53
|
"social-logos": "^3.3.19"
|
|
@@ -4,11 +4,11 @@ import { forwardRef } from 'react';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @typedef {object} WpcomSupportLinkProps
|
|
7
|
-
* @property {string} supportLink
|
|
8
|
-
* @property {number} supportPostId - Support post ID.
|
|
9
|
-
* @property {import('react').ReactNode} [children]
|
|
10
|
-
* @property {Function} [onClick]
|
|
11
|
-
* @property {object} [style]
|
|
7
|
+
* @property {string} supportLink - Support link URL.
|
|
8
|
+
* @property {number} [supportPostId] - Support post ID.
|
|
9
|
+
* @property {import('react').ReactNode} [children] - Support link content.
|
|
10
|
+
* @property {Function} [onClick] - Callback function to be called when the link is clicked.
|
|
11
|
+
* @property {object} [style] - CSS properties to be applied to the link.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
export const WpcomSupportLink = forwardRef(
|
package/src/get-jetpack-data.js
CHANGED
|
@@ -8,5 +8,5 @@ export const JETPACK_DATA_PATH = 'Jetpack_Editor_Initial_State';
|
|
|
8
8
|
* @return {object|null} The Jetpack Editor State.
|
|
9
9
|
*/
|
|
10
10
|
export default function getJetpackData() {
|
|
11
|
-
return 'object' === typeof window ? window?.[ JETPACK_DATA_PATH ] ?? null : null;
|
|
11
|
+
return 'object' === typeof window ? ( window?.[ JETPACK_DATA_PATH ] ?? null ) : null;
|
|
12
12
|
}
|
package/src/plan-utils.js
CHANGED
|
@@ -35,7 +35,7 @@ export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
|
|
|
35
35
|
plan_upgraded: 1,
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
|
|
38
|
+
}
|
|
39
39
|
: () => {
|
|
40
40
|
// The editor for CPTs has an `edit/` route fragment prefixed.
|
|
41
41
|
const postTypeEditorRoutePrefix = [ 'page', 'post' ].includes( postType ) ? '' : 'edit';
|
|
@@ -50,7 +50,7 @@ export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
|
|
|
50
50
|
{
|
|
51
51
|
plan_upgraded: 1,
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
)
|
|
54
54
|
: addQueryArgs(
|
|
55
55
|
window.location.protocol +
|
|
56
56
|
`//${ getSiteFragment().replace( '::', '/' ) }/wp-admin/post.php`,
|
|
@@ -59,8 +59,8 @@ export function getUpgradeUrl( { planSlug, plan, postId, postType } ) {
|
|
|
59
59
|
post: postId,
|
|
60
60
|
plan_upgraded: 1,
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
64
|
)();
|
|
65
65
|
|
|
66
66
|
// Redirect to calypso plans page for WoC sites.
|