@automattic/jetpack-components 0.64.1 → 0.65.0
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 +9 -0
- package/components/boost-score-graph/annotations-plugin.ts +3 -2
- package/components/boost-score-graph/tooltips-plugin.ts +3 -3
- package/components/threats-data-views/constants.ts +2 -2
- package/components/threats-data-views/index.tsx +8 -23
- package/components/toggle-control/styles.module.scss +6 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
### This is a list detailing changes for the Jetpack RNA Components package releases.
|
|
4
4
|
|
|
5
|
+
## [0.65.0] - 2024-12-16
|
|
6
|
+
### Changed
|
|
7
|
+
- Fixes ThreatsDataViews defaultLayouts. [#40598]
|
|
8
|
+
- Updated package dependencies. [#40564] [#40598]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fix ToggleControl's help text indent to align with label text. [#40510]
|
|
12
|
+
|
|
5
13
|
## [0.64.1] - 2024-12-09
|
|
6
14
|
### Removed
|
|
7
15
|
- Remove bulk action support from the ThreatsDataViews component. [#40483]
|
|
@@ -1243,6 +1251,7 @@
|
|
|
1243
1251
|
### Changed
|
|
1244
1252
|
- Update node version requirement to 14.16.1
|
|
1245
1253
|
|
|
1254
|
+
[0.65.0]: https://github.com/Automattic/jetpack-components/compare/0.64.1...0.65.0
|
|
1246
1255
|
[0.64.1]: https://github.com/Automattic/jetpack-components/compare/0.64.0...0.64.1
|
|
1247
1256
|
[0.64.0]: https://github.com/Automattic/jetpack-components/compare/0.63.0...0.64.0
|
|
1248
1257
|
[0.63.0]: https://github.com/Automattic/jetpack-components/compare/0.62.0...0.63.0
|
|
@@ -3,11 +3,12 @@ import { Annotation } from '.';
|
|
|
3
3
|
|
|
4
4
|
import './style-annotation.scss';
|
|
5
5
|
|
|
6
|
-
// eslint-disable-next-line jsdoc/require-returns
|
|
7
6
|
/**
|
|
8
7
|
* Custom tooltips plugin for uPlot.
|
|
9
8
|
*
|
|
10
|
-
* @param
|
|
9
|
+
* @param annotations - The periods to display in the tooltip.
|
|
10
|
+
*
|
|
11
|
+
* @return The plugin object.
|
|
11
12
|
*/
|
|
12
13
|
export function annotationsPlugin( annotations: Annotation[] ) {
|
|
13
14
|
let containerEl, annotationsContainer;
|
|
@@ -6,10 +6,10 @@ import { Period } from '.';
|
|
|
6
6
|
/**
|
|
7
7
|
* Custom tooltips plugin for uPlot.
|
|
8
8
|
*
|
|
9
|
-
* @param
|
|
10
|
-
* @return
|
|
9
|
+
* @param periods - The periods to display in the tooltip.
|
|
10
|
+
* @return The uPlot plugin object with hooks.
|
|
11
11
|
*/
|
|
12
|
-
export function tooltipsPlugin( periods ) {
|
|
12
|
+
export function tooltipsPlugin( periods: Period[] ) {
|
|
13
13
|
const reactRoot = document.createElement( 'div' );
|
|
14
14
|
const container = document.createElement( 'div' );
|
|
15
15
|
let reactDom;
|
|
@@ -33,7 +33,6 @@ import {
|
|
|
33
33
|
THREAT_FIELD_SIGNATURE,
|
|
34
34
|
THREAT_FIELD_STATUS,
|
|
35
35
|
THREAT_FIELD_THEME,
|
|
36
|
-
THREAT_FIELD_THREAT,
|
|
37
36
|
THREAT_FIELD_TITLE,
|
|
38
37
|
THREAT_FIELD_TYPE,
|
|
39
38
|
THREAT_ICONS,
|
|
@@ -101,23 +100,10 @@ export default function ThreatsDataViews( {
|
|
|
101
100
|
const defaultLayouts: SupportedLayouts = {
|
|
102
101
|
table: {
|
|
103
102
|
...baseView,
|
|
104
|
-
fields: [
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
THREAT_FIELD_AUTO_FIX,
|
|
109
|
-
],
|
|
110
|
-
layout: {
|
|
111
|
-
primaryField: THREAT_FIELD_SEVERITY,
|
|
112
|
-
combinedFields: [
|
|
113
|
-
{
|
|
114
|
-
id: THREAT_FIELD_THREAT,
|
|
115
|
-
label: __( 'Threat', 'jetpack-components' ),
|
|
116
|
-
children: [ THREAT_FIELD_TITLE, THREAT_FIELD_DESCRIPTION ],
|
|
117
|
-
direction: 'vertical',
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
|
-
},
|
|
103
|
+
fields: [ THREAT_FIELD_SEVERITY, THREAT_FIELD_TYPE, THREAT_FIELD_AUTO_FIX ],
|
|
104
|
+
titleField: THREAT_FIELD_TITLE,
|
|
105
|
+
descriptionField: THREAT_FIELD_DESCRIPTION,
|
|
106
|
+
showMedia: false,
|
|
121
107
|
},
|
|
122
108
|
list: {
|
|
123
109
|
...baseView,
|
|
@@ -127,10 +113,9 @@ export default function ThreatsDataViews( {
|
|
|
127
113
|
THREAT_FIELD_EXTENSION,
|
|
128
114
|
THREAT_FIELD_SIGNATURE,
|
|
129
115
|
],
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
},
|
|
116
|
+
titleField: THREAT_FIELD_TITLE,
|
|
117
|
+
mediaField: THREAT_FIELD_ICON,
|
|
118
|
+
showMedia: true,
|
|
134
119
|
},
|
|
135
120
|
};
|
|
136
121
|
|
|
@@ -222,7 +207,7 @@ export default function ThreatsDataViews( {
|
|
|
222
207
|
const result: Field< Threat >[] = [
|
|
223
208
|
{
|
|
224
209
|
id: THREAT_FIELD_TITLE,
|
|
225
|
-
label: __( '
|
|
210
|
+
label: __( 'Threat', 'jetpack-components' ),
|
|
226
211
|
enableGlobalSearch: true,
|
|
227
212
|
enableHiding: false,
|
|
228
213
|
render: ( { item }: { item: Threat } ) => (
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
/// @link https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/form-toggle
|
|
5
5
|
.toggle {
|
|
6
6
|
--base-width: 8px;
|
|
7
|
+
--track-width: calc( var(--base-width) * 6 );
|
|
7
8
|
|
|
8
9
|
&.is-small {
|
|
9
10
|
--base-width: 6px;
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
.components-form-toggle__track {
|
|
27
|
-
width:
|
|
28
|
+
width: var( --track-width );
|
|
28
29
|
height: calc( var(--base-width) * 3 );
|
|
29
30
|
border-radius: 12px;
|
|
30
31
|
border-width: 2px;
|
|
@@ -41,6 +42,10 @@
|
|
|
41
42
|
transform: translateX( calc( var(--base-width) * 3 ) );
|
|
42
43
|
}
|
|
43
44
|
}
|
|
45
|
+
|
|
46
|
+
.components-toggle-control__help {
|
|
47
|
+
margin-inline-start: calc( var( --track-width ) + var( --spacing-base ) );
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.0",
|
|
4
4
|
"description": "Jetpack Components Package",
|
|
5
5
|
"author": "Automattic",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -15,29 +15,29 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@automattic/format-currency": "1.0.1",
|
|
18
|
-
"@automattic/jetpack-boost-score-api": "^0.1.
|
|
19
|
-
"@automattic/jetpack-scan": "^0.5.
|
|
18
|
+
"@automattic/jetpack-boost-score-api": "^0.1.50",
|
|
19
|
+
"@automattic/jetpack-scan": "^0.5.2",
|
|
20
20
|
"@babel/runtime": "^7",
|
|
21
|
-
"@wordpress/browserslist-config": "6.
|
|
22
|
-
"@wordpress/components": "
|
|
23
|
-
"@wordpress/compose": "7.
|
|
24
|
-
"@wordpress/data": "10.
|
|
25
|
-
"@wordpress/dataviews": "4.
|
|
26
|
-
"@wordpress/date": "5.
|
|
27
|
-
"@wordpress/element": "6.
|
|
28
|
-
"@wordpress/i18n": "5.
|
|
29
|
-
"@wordpress/icons": "10.
|
|
30
|
-
"@wordpress/notices": "5.
|
|
21
|
+
"@wordpress/browserslist-config": "6.14.0",
|
|
22
|
+
"@wordpress/components": "29.0.0",
|
|
23
|
+
"@wordpress/compose": "7.14.0",
|
|
24
|
+
"@wordpress/data": "10.14.0",
|
|
25
|
+
"@wordpress/dataviews": "4.10.0",
|
|
26
|
+
"@wordpress/date": "5.14.0",
|
|
27
|
+
"@wordpress/element": "6.14.0",
|
|
28
|
+
"@wordpress/i18n": "5.14.0",
|
|
29
|
+
"@wordpress/icons": "10.14.0",
|
|
30
|
+
"@wordpress/notices": "5.14.0",
|
|
31
31
|
"clsx": "2.1.1",
|
|
32
32
|
"prop-types": "^15.7.2",
|
|
33
33
|
"qrcode.react": "3.1.0",
|
|
34
34
|
"react-slider": "2.0.5",
|
|
35
|
-
"social-logos": "^3.1.
|
|
35
|
+
"social-logos": "^3.1.15",
|
|
36
36
|
"uplot": "1.6.31",
|
|
37
37
|
"uplot-react": "1.1.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@automattic/jetpack-base-styles": "^0.6.
|
|
40
|
+
"@automattic/jetpack-base-styles": "^0.6.39",
|
|
41
41
|
"@babel/core": "7.26.0",
|
|
42
42
|
"@babel/preset-react": "7.25.9",
|
|
43
43
|
"@jest/globals": "29.4.3",
|