@automattic/jetpack-components 0.64.2 → 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 CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
- ## [0.64.2] - 2024-12-10
5
+ ## [0.65.0] - 2024-12-16
6
+ ### Changed
7
+ - Fixes ThreatsDataViews defaultLayouts. [#40598]
8
+ - Updated package dependencies. [#40564] [#40598]
9
+
6
10
  ### Fixed
7
11
  - Fix ToggleControl's help text indent to align with label text. [#40510]
8
12
 
@@ -1247,7 +1251,7 @@
1247
1251
  ### Changed
1248
1252
  - Update node version requirement to 14.16.1
1249
1253
 
1250
- [0.64.2]: https://github.com/Automattic/jetpack-components/compare/0.64.1...0.64.2
1254
+ [0.65.0]: https://github.com/Automattic/jetpack-components/compare/0.64.1...0.65.0
1251
1255
  [0.64.1]: https://github.com/Automattic/jetpack-components/compare/0.64.0...0.64.1
1252
1256
  [0.64.0]: https://github.com/Automattic/jetpack-components/compare/0.63.0...0.64.0
1253
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 {Annotation[]} annotations - The periods to display in the tooltip.
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 {Period[]} periods - The periods to display in the tooltip.
10
- * @return {object} The uPlot plugin object with hooks.
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;
@@ -22,8 +22,8 @@ export const THREAT_TYPES = [
22
22
  ];
23
23
 
24
24
  export const THREAT_ICONS = {
25
- plugin: pluginIcon,
26
- theme: themeIcon,
25
+ plugins: pluginIcon,
26
+ themes: themeIcon,
27
27
  core: coreIcon,
28
28
  file: fileIcon,
29
29
  default: shieldIcon,
@@ -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
- THREAT_FIELD_SEVERITY,
106
- THREAT_FIELD_THREAT,
107
- THREAT_FIELD_TYPE,
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
- layout: {
131
- primaryField: THREAT_FIELD_TITLE,
132
- mediaField: THREAT_FIELD_ICON,
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: __( 'Title', 'jetpack-components' ),
210
+ label: __( 'Threat', 'jetpack-components' ),
226
211
  enableGlobalSearch: true,
227
212
  enableHiding: false,
228
213
  render: ( { item }: { item: Threat } ) => (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.64.2",
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.49",
19
- "@automattic/jetpack-scan": "^0.5.1",
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.13.0",
22
- "@wordpress/components": "28.13.0",
23
- "@wordpress/compose": "7.13.0",
24
- "@wordpress/data": "10.13.0",
25
- "@wordpress/dataviews": "4.9.0",
26
- "@wordpress/date": "5.13.0",
27
- "@wordpress/element": "6.13.0",
28
- "@wordpress/i18n": "5.13.0",
29
- "@wordpress/icons": "10.13.0",
30
- "@wordpress/notices": "5.13.0",
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.14",
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.38",
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",