@automattic/jetpack-components 0.64.0 → 0.64.1

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,13 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [0.64.1] - 2024-12-09
6
+ ### Removed
7
+ - Remove bulk action support from the ThreatsDataViews component. [#40483]
8
+
9
+ ### Fixed
10
+ - Fixed threat type values and labels. [#40467]
11
+
5
12
  ## [0.64.0] - 2024-12-04
6
13
  ### Changed
7
14
  - Changed text domain from 'jetpack' to 'jetpack-components'. [#40368]
@@ -1236,6 +1243,7 @@
1236
1243
  ### Changed
1237
1244
  - Update node version requirement to 14.16.1
1238
1245
 
1246
+ [0.64.1]: https://github.com/Automattic/jetpack-components/compare/0.64.0...0.64.1
1239
1247
  [0.64.0]: https://github.com/Automattic/jetpack-components/compare/0.63.0...0.64.0
1240
1248
  [0.63.0]: https://github.com/Automattic/jetpack-components/compare/0.62.0...0.63.0
1241
1249
  [0.62.0]: https://github.com/Automattic/jetpack-components/compare/0.61.0...0.62.0
@@ -17,10 +17,9 @@ export function tooltipsPlugin( periods ) {
17
17
  /**
18
18
  * Initializes the tooltips plugin.
19
19
  *
20
- * @param {uPlot} u - The uPlot instance.
21
- * @param {object} _opts - Options for the uPlot instance.
20
+ * @param {uPlot} u - The uPlot instance.
22
21
  */
23
- function init( u: uPlot, _opts: object ) {
22
+ function init( u: uPlot ) {
24
23
  container.classList.add( 'jb-score-tooltips-container' );
25
24
  if ( ! reactDom ) {
26
25
  reactDom = ReactDOM.createRoot( reactRoot );
@@ -68,7 +68,7 @@ const NumberSlider: React.FC< NumberSliderProps > = ( {
68
68
  min={ minValue }
69
69
  step={ step }
70
70
  renderThumb={ renderThumbCallback } // eslint-disable-line react/jsx-no-bind
71
- onChange={ onChange } // eslint-disable-line react/jsx-no-bind
71
+ onChange={ onChange }
72
72
  onBeforeChange={ onBeforeChangeCallback } // eslint-disable-line react/jsx-no-bind
73
73
  onAfterChange={ onAfterChangeCallback } // eslint-disable-line react/jsx-no-bind
74
74
  />
@@ -1,15 +1,15 @@
1
1
  import { __, sprintf } from '@wordpress/i18n';
2
2
  import { Icon, check, closeSmall } from '@wordpress/icons';
3
3
  import clsx from 'clsx';
4
- import {
4
+ import React, {
5
5
  createContext,
6
6
  useContext,
7
7
  Children,
8
8
  cloneElement,
9
9
  PropsWithChildren,
10
10
  ReactElement,
11
+ CSSProperties,
11
12
  } from 'react';
12
- import React, { CSSProperties } from 'react';
13
13
  import IconTooltip from '../icon-tooltip';
14
14
  import useBreakpointMatch from '../layout/use-breakpoint-match';
15
15
  import TermsOfService from '../terms-of-service';
@@ -15,8 +15,8 @@ export const THREAT_STATUSES: { value: string; label: string; variant?: 'success
15
15
  ];
16
16
 
17
17
  export const THREAT_TYPES = [
18
- { value: 'plugin', label: __( 'Plugin', 'jetpack-components' ) },
19
- { value: 'theme', label: __( 'Theme', 'jetpack-components' ) },
18
+ { value: 'plugins', label: __( 'Plugin', 'jetpack-components' ) },
19
+ { value: 'themes', label: __( 'Theme', 'jetpack-components' ) },
20
20
  { value: 'core', label: __( 'WordPress', 'jetpack-components' ) },
21
21
  { value: 'file', label: __( 'File', 'jetpack-components' ) },
22
22
  ];
@@ -168,12 +168,12 @@ export default function ThreatsDataViews( {
168
168
  // Extensions (Themes and Plugins)
169
169
  if ( threat.extension ) {
170
170
  switch ( threat.extension.type ) {
171
- case 'theme':
171
+ case 'themes':
172
172
  if ( ! acc.themes.find( ( { value } ) => value === threat.extension.slug ) ) {
173
173
  acc.themes.push( { value: threat.extension.slug, label: threat.extension.name } );
174
174
  }
175
175
  break;
176
- case 'plugin':
176
+ case 'plugins':
177
177
  if ( ! acc.plugins.find( ( { value } ) => value === threat.extension.slug ) ) {
178
178
  acc.plugins.push( { value: threat.extension.slug, label: threat.extension.name } );
179
179
  }
@@ -280,7 +280,18 @@ export default function ThreatsDataViews( {
280
280
  label: __( 'Type', 'jetpack-components' ),
281
281
  elements: THREAT_TYPES,
282
282
  getValue( { item }: { item: Threat } ) {
283
- return getThreatType( item ) ?? '';
283
+ switch ( getThreatType( item ) ) {
284
+ case 'core':
285
+ return __( 'WordPress', 'jetpack-components' );
286
+ case 'plugins':
287
+ return __( 'Plugin', 'jetpack-components' );
288
+ case 'themes':
289
+ return __( 'Theme', 'jetpack-components' );
290
+ case 'file':
291
+ return __( 'File', 'jetpack-components' );
292
+ default:
293
+ return __( 'Unknown', 'jetpack-components' );
294
+ }
284
295
  },
285
296
  },
286
297
  {
@@ -428,7 +439,6 @@ export default function ThreatsDataViews( {
428
439
  id: THREAT_ACTION_FIX,
429
440
  label: __( 'Auto-fix', 'jetpack-components' ),
430
441
  isPrimary: true,
431
- supportsBulk: true,
432
442
  callback: onFixThreats,
433
443
  isEligible( item ) {
434
444
  if ( ! onFixThreats ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.64.0",
3
+ "version": "0.64.1",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@automattic/format-currency": "1.0.1",
18
- "@automattic/jetpack-boost-score-api": "^0.1.48",
19
- "@automattic/jetpack-scan": "^0.5.0",
18
+ "@automattic/jetpack-boost-score-api": "^0.1.49",
19
+ "@automattic/jetpack-scan": "^0.5.1",
20
20
  "@babel/runtime": "^7",
21
21
  "@wordpress/browserslist-config": "6.13.0",
22
22
  "@wordpress/components": "28.13.0",
@@ -32,7 +32,7 @@
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.13",
35
+ "social-logos": "^3.1.14",
36
36
  "uplot": "1.6.31",
37
37
  "uplot-react": "1.1.4"
38
38
  },