@automattic/jetpack-components 0.70.0 → 0.71.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/build/components/admin-page/index.js +1 -1
  3. package/build/components/split-button/index.js +2 -2
  4. package/build/index.d.ts +1 -3
  5. package/build/index.js +1 -3
  6. package/components/admin-page/index.tsx +1 -1
  7. package/components/split-button/index.tsx +14 -12
  8. package/components/split-button/style.module.scss +5 -0
  9. package/index.ts +1 -3
  10. package/package.json +1 -3
  11. package/build/components/threat-fixer-button/index.d.ts +0 -17
  12. package/build/components/threat-fixer-button/index.js +0 -56
  13. package/build/components/threat-severity-badge/index.d.ts +0 -4
  14. package/build/components/threat-severity-badge/index.js +0 -13
  15. package/build/components/threats-data-views/constants.d.ts +0 -33
  16. package/build/components/threats-data-views/constants.js +0 -37
  17. package/build/components/threats-data-views/index.d.ts +0 -30
  18. package/build/components/threats-data-views/index.js +0 -413
  19. package/build/components/threats-data-views/threats-status-toggle-group-control.d.ts +0 -16
  20. package/build/components/threats-data-views/threats-status-toggle-group-control.js +0 -95
  21. package/components/threat-fixer-button/index.tsx +0 -101
  22. package/components/threat-fixer-button/styles.module.scss +0 -16
  23. package/components/threat-modal/fixer-state-notice.tsx +0 -63
  24. package/components/threat-modal/index.tsx +0 -109
  25. package/components/threat-modal/styles.module.scss +0 -81
  26. package/components/threat-modal/threat-actions.tsx +0 -93
  27. package/components/threat-modal/threat-fix-confirmation.tsx +0 -54
  28. package/components/threat-modal/threat-fix-details.tsx +0 -65
  29. package/components/threat-modal/threat-notice.tsx +0 -84
  30. package/components/threat-modal/threat-summary.tsx +0 -30
  31. package/components/threat-modal/threat-technical-details.tsx +0 -67
  32. package/components/threat-severity-badge/index.tsx +0 -26
  33. package/components/threat-severity-badge/styles.module.scss +0 -27
  34. package/components/threats-data-views/constants.ts +0 -49
  35. package/components/threats-data-views/index.tsx +0 -534
  36. package/components/threats-data-views/styles.module.scss +0 -40
  37. package/components/threats-data-views/threats-status-toggle-group-control.tsx +0 -158
package/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  ### This is a list detailing changes for the Jetpack RNA Components package releases.
4
4
 
5
+ ## [0.71.0] - 2025-03-26
6
+ ### Removed
7
+ - Removed threat components [#41654]
8
+
9
+ ### Fixed
10
+ - Split Button: Increase compatibility of components, preventing console warnings. [#42627]
11
+
12
+ ## [0.70.1] - 2025-03-24
13
+ ### Fixed
14
+ - Fix admin panel header component layout. [#42614]
15
+
5
16
  ## [0.70.0] - 2025-03-24
6
17
  ### Changed
7
18
  - Update component that renders the terms of service to have a text-only version. [#42600]
@@ -1322,6 +1333,8 @@
1322
1333
  ### Changed
1323
1334
  - Update node version requirement to 14.16.1
1324
1335
 
1336
+ [0.71.0]: https://github.com/Automattic/jetpack-components/compare/0.70.1...0.71.0
1337
+ [0.70.1]: https://github.com/Automattic/jetpack-components/compare/0.70.0...0.70.1
1325
1338
  [0.70.0]: https://github.com/Automattic/jetpack-components/compare/0.69.1...0.70.0
1326
1339
  [0.69.1]: https://github.com/Automattic/jetpack-components/compare/0.69.0...0.69.1
1327
1340
  [0.69.0]: https://github.com/Automattic/jetpack-components/compare/0.68.2...0.69.0
@@ -37,7 +37,7 @@ const AdminPage = ({ children, moduleName = __('Jetpack', 'jetpack-components'),
37
37
  __('There was an error testing Jetpack. Error: %s', 'jetpack-components'), error.message));
38
38
  }
39
39
  }, []);
40
- return (_jsxs("div", { className: rootClassName, children: [showHeader && (_jsx(Container, { horizontalSpacing: 5, children: _jsxs(Col, { className: styles['admin-page-header'], children: [header ? header : _jsx(JetpackLogo, {}), sandboxedDomain && (_jsx("code", { className: styles['sandbox-domain-badge'], onClick: testConnection, onKeyDown: testConnection,
40
+ return (_jsxs("div", { className: rootClassName, children: [showHeader && (_jsx(Container, { horizontalSpacing: 5, children: _jsxs(Col, { className: clsx(styles['admin-page-header'], 'jp-admin-page-header'), children: [header ? header : _jsx(JetpackLogo, {}), sandboxedDomain && (_jsx("code", { className: styles['sandbox-domain-badge'], onClick: testConnection, onKeyDown: testConnection,
41
41
  // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
42
42
  role: "button", tabIndex: 0, title: `Sandboxing via ${sandboxedDomain}. Click to test connection.`, children: "API Sandboxed" }))] }) })), _jsx(Container, { fluid: true, horizontalSpacing: 0, children: _jsx(Col, { children: children }) }), showFooter && (_jsx(Container, { horizontalSpacing: 5, children: _jsx(Col, { children: _jsx(JetpackFooter, { moduleName: moduleName, moduleNameHref: moduleNameHref, menu: optionalMenuItems, useInternalLinks: useInternalLinks }) }) }))] }));
43
43
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ButtonGroup, Button, DropdownMenu } from '@wordpress/components';
2
+ import { Button, Flex, DropdownMenu } from '@wordpress/components';
3
3
  import styles from './style.module.scss';
4
4
  const DownIcon = () => (_jsx("svg", { width: "15", height: "9", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "10 9 4 7", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "m18.004 10.555-6.005 5.459-6.004-5.459 1.009-1.11 4.995 4.542 4.996-4.542 1.009 1.11Z" }) }));
5
5
  const SplitButton = ({ variant, controls, popoverProps, toggleProps, label, ...buttonProps }) => {
6
- return (_jsxs(ButtonGroup, { className: styles['split-button'], children: [_jsx(Button, { variant: variant, ...buttonProps, className: styles.button }), _jsx(DropdownMenu, { toggleProps: { variant, className: styles.button, ...toggleProps }, popoverProps: { noArrow: false, ...popoverProps }, icon: _jsx(DownIcon, {}), disableOpenOnArrowDown: true, controls: controls, label: label })] }));
6
+ return (_jsx(Flex, { className: styles['split-button'], children: _jsxs("div", { role: "group", className: "components-button-group", children: [_jsx(Button, { variant: variant, ...buttonProps, className: styles.button }), _jsx(DropdownMenu, { toggleProps: { variant, className: styles.button, ...toggleProps }, popoverProps: { noArrow: false, ...popoverProps }, icon: _jsx(DownIcon, {}), disableOpenOnArrowDown: true, controls: controls, label: label })] }) }));
7
7
  };
8
8
  export default SplitButton;
package/build/index.d.ts CHANGED
@@ -28,9 +28,6 @@ export { default as CopyToClipboard } from './components/copy-to-clipboard/index
28
28
  export * from './components/icons/index.js';
29
29
  export { default as SplitButton } from './components/split-button/index.js';
30
30
  export { default as ThemeProvider } from './components/theme-provider/index.js';
31
- export { default as ThreatFixerButton } from './components/threat-fixer-button/index.js';
32
- export { default as ThreatSeverityBadge } from './components/threat-severity-badge/index.js';
33
- export { default as ThreatsDataViews } from './components/threats-data-views/index.js';
34
31
  export { default as Text, H2, H3, Title } from './components/text/index.js';
35
32
  export { default as ToggleControl } from './components/toggle-control/index.js';
36
33
  export { default as NumberControl } from './components/number-control/index.js';
@@ -40,6 +37,7 @@ export { default as Button } from './components/button/index.js';
40
37
  export type { ButtonProps } from './components/button/types.js';
41
38
  export { default as LoadingPlaceholder } from './components/loading-placeholder/index.js';
42
39
  export { default as TermsOfService } from './components/terms-of-service/index.js';
40
+ export { default as Badge } from './components/badge/index.js';
43
41
  export { default as Chip } from './components/chip/index.js';
44
42
  export { default as PricingTable, PricingTableColumn, PricingTableHeader, PricingTableItem, } from './components/pricing-table/index.js';
45
43
  export { default as BoostScoreBar } from './components/boost-score-bar/index.js';
package/build/index.js CHANGED
@@ -43,9 +43,6 @@ export { default as CopyToClipboard } from './components/copy-to-clipboard/index
43
43
  export * from './components/icons/index.js';
44
44
  export { default as SplitButton } from './components/split-button/index.js';
45
45
  export { default as ThemeProvider } from './components/theme-provider/index.js';
46
- export { default as ThreatFixerButton } from './components/threat-fixer-button/index.js';
47
- export { default as ThreatSeverityBadge } from './components/threat-severity-badge/index.js';
48
- export { default as ThreatsDataViews } from './components/threats-data-views/index.js';
49
46
  export { default as Text, H2, H3, Title } from './components/text/index.js';
50
47
  export { default as ToggleControl } from './components/toggle-control/index.js';
51
48
  export { default as NumberControl } from './components/number-control/index.js';
@@ -54,6 +51,7 @@ export { default as QRCode } from './components/qr-code/index.js';
54
51
  export { default as Button } from './components/button/index.js';
55
52
  export { default as LoadingPlaceholder } from './components/loading-placeholder/index.js';
56
53
  export { default as TermsOfService } from './components/terms-of-service/index.js';
54
+ export { default as Badge } from './components/badge/index.js';
57
55
  export { default as Chip } from './components/chip/index.js';
58
56
  export { default as PricingTable, PricingTableColumn, PricingTableHeader, PricingTableItem, } from './components/pricing-table/index.js';
59
57
  export { default as BoostScoreBar } from './components/boost-score-bar/index.js';
@@ -63,7 +63,7 @@ const AdminPage: React.FC< AdminPageProps > = ( {
63
63
  <div className={ rootClassName }>
64
64
  { showHeader && (
65
65
  <Container horizontalSpacing={ 5 }>
66
- <Col className={ styles[ 'admin-page-header' ] }>
66
+ <Col className={ clsx( styles[ 'admin-page-header' ], 'jp-admin-page-header' ) }>
67
67
  { header ? header : <JetpackLogo /> }
68
68
  { sandboxedDomain && (
69
69
  <code
@@ -1,4 +1,4 @@
1
- import { ButtonGroup, Button, DropdownMenu } from '@wordpress/components';
1
+ import { Button, Flex, DropdownMenu } from '@wordpress/components';
2
2
  import styles from './style.module.scss';
3
3
  import { SplitButtonProps } from './types.js';
4
4
  import type React from 'react';
@@ -22,17 +22,19 @@ const SplitButton: React.FC< SplitButtonProps > = ( {
22
22
  ...buttonProps
23
23
  } ) => {
24
24
  return (
25
- <ButtonGroup className={ styles[ 'split-button' ] }>
26
- <Button variant={ variant } { ...buttonProps } className={ styles.button } />
27
- <DropdownMenu
28
- toggleProps={ { variant, className: styles.button, ...toggleProps } }
29
- popoverProps={ { noArrow: false, ...popoverProps } }
30
- icon={ <DownIcon /> }
31
- disableOpenOnArrowDown={ true }
32
- controls={ controls }
33
- label={ label }
34
- />
35
- </ButtonGroup>
25
+ <Flex className={ styles[ 'split-button' ] }>
26
+ <div role="group" className="components-button-group">
27
+ <Button variant={ variant } { ...buttonProps } className={ styles.button } />
28
+ <DropdownMenu
29
+ toggleProps={ { variant, className: styles.button, ...toggleProps } }
30
+ popoverProps={ { noArrow: false, ...popoverProps } }
31
+ icon={ <DownIcon /> }
32
+ disableOpenOnArrowDown={ true }
33
+ controls={ controls }
34
+ label={ label }
35
+ />
36
+ </div>
37
+ </Flex>
36
38
  );
37
39
  };
38
40
 
@@ -4,6 +4,11 @@
4
4
  height: var(--actions-size);
5
5
  border-radius: var(--jp-border-radius);
6
6
 
7
+ :global(.components-button-group) {
8
+ display: flex;
9
+ height: 100%;
10
+ }
11
+
7
12
  & > .button:first-child {
8
13
  border-radius: var(--jp-border-radius) 0 0 var(--jp-border-radius);
9
14
  }
package/index.ts CHANGED
@@ -44,9 +44,6 @@ export { default as CopyToClipboard } from './components/copy-to-clipboard/index
44
44
  export * from './components/icons/index.js';
45
45
  export { default as SplitButton } from './components/split-button/index.js';
46
46
  export { default as ThemeProvider } from './components/theme-provider/index.js';
47
- export { default as ThreatFixerButton } from './components/threat-fixer-button/index.js';
48
- export { default as ThreatSeverityBadge } from './components/threat-severity-badge/index.js';
49
- export { default as ThreatsDataViews } from './components/threats-data-views/index.js';
50
47
  export { default as Text, H2, H3, Title } from './components/text/index.js';
51
48
  export { default as ToggleControl } from './components/toggle-control/index.js';
52
49
  export { default as NumberControl } from './components/number-control/index.js';
@@ -56,6 +53,7 @@ export { default as Button } from './components/button/index.js';
56
53
  export type { ButtonProps } from './components/button/types.js';
57
54
  export { default as LoadingPlaceholder } from './components/loading-placeholder/index.js';
58
55
  export { default as TermsOfService } from './components/terms-of-service/index.js';
56
+ export { default as Badge } from './components/badge/index.js';
59
57
  export { default as Chip } from './components/chip/index.js';
60
58
  export {
61
59
  default as PricingTable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/jetpack-components",
3
- "version": "0.70.0",
3
+ "version": "0.71.0",
4
4
  "description": "Jetpack Components Package",
5
5
  "author": "Automattic",
6
6
  "license": "GPL-2.0-or-later",
@@ -17,14 +17,12 @@
17
17
  "@automattic/format-currency": "1.0.1",
18
18
  "@automattic/jetpack-boost-score-api": "^0.1.60",
19
19
  "@automattic/jetpack-api": "^0.20.0",
20
- "@automattic/jetpack-scan": "^0.5.9",
21
20
  "@automattic/jetpack-script-data": "^0.3.0",
22
21
  "@babel/runtime": "^7",
23
22
  "@wordpress/browserslist-config": "6.19.0",
24
23
  "@wordpress/components": "29.5.0",
25
24
  "@wordpress/compose": "7.19.0",
26
25
  "@wordpress/data": "10.19.0",
27
- "@wordpress/dataviews": "4.15.0",
28
26
  "@wordpress/date": "5.19.0",
29
27
  "@wordpress/element": "6.19.0",
30
28
  "@wordpress/i18n": "5.19.0",
@@ -1,17 +0,0 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- import { type Threat } from '@automattic/jetpack-scan';
3
- /**
4
- * Threat Fixer Button component.
5
- *
6
- * @param {object} props - Component props.
7
- * @param {object} props.threat - The threat.
8
- * @param {Function} props.onClick - The onClick function.
9
- * @param {string} props.className - The className.
10
- *
11
- * @return {JSX.Element} The component.
12
- */
13
- export default function ThreatFixerButton({ threat, className, onClick, }: {
14
- threat: Threat;
15
- onClick: (items: Threat[]) => void;
16
- className?: string;
17
- }): JSX.Element;
@@ -1,56 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { getFixerState, getFixerAction, getFixerDescription, } from '@automattic/jetpack-scan';
3
- import { Tooltip } from '@wordpress/components';
4
- import { useCallback, useMemo } from '@wordpress/element';
5
- import { __ } from '@wordpress/i18n';
6
- import { Button } from '@automattic/jetpack-components';
7
- import styles from './styles.module.scss';
8
- /**
9
- * Threat Fixer Button component.
10
- *
11
- * @param {object} props - Component props.
12
- * @param {object} props.threat - The threat.
13
- * @param {Function} props.onClick - The onClick function.
14
- * @param {string} props.className - The className.
15
- *
16
- * @return {JSX.Element} The component.
17
- */
18
- export default function ThreatFixerButton({ threat, className, onClick, }) {
19
- const fixerState = useMemo(() => {
20
- return getFixerState(threat.fixer);
21
- }, [threat.fixer]);
22
- const tooltipText = useMemo(() => {
23
- if (!threat.fixable) {
24
- return null;
25
- }
26
- if (fixerState.error) {
27
- return __('An error occurred auto-fixing this threat.', 'jetpack-components');
28
- }
29
- if (fixerState.stale) {
30
- return __('The auto-fixer is taking longer than expected.', 'jetpack-components');
31
- }
32
- if (fixerState.inProgress) {
33
- return __('An auto-fixer is in progress.', 'jetpack-components');
34
- }
35
- return getFixerDescription(threat);
36
- }, [threat, fixerState]);
37
- const buttonText = useMemo(() => {
38
- if (!threat.fixable) {
39
- return null;
40
- }
41
- if (fixerState.error) {
42
- return __('Error', 'jetpack-components');
43
- }
44
- return getFixerAction(threat);
45
- }, [threat, fixerState.error]);
46
- const handleClick = useCallback((event) => {
47
- event.stopPropagation();
48
- onClick([threat]);
49
- }, [onClick, threat]);
50
- if (!threat.fixable) {
51
- return null;
52
- }
53
- return (_jsx("div", { children: _jsx(Tooltip, { className: styles.tooltip, text: tooltipText, children: _jsx(Button, { size: "small", weight: "regular", variant: "secondary", onClick: handleClick, children: buttonText, className: className, isLoading: fixerState.inProgress, isDestructive: (threat.fixable && threat.fixable.fixer === 'delete') ||
54
- fixerState.error ||
55
- fixerState.stale, style: { minWidth: '72px' } }) }) }));
56
- }
@@ -1,4 +0,0 @@
1
- declare const ThreatSeverityBadge: ({ severity }: {
2
- severity: any;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export default ThreatSeverityBadge;
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { _x } from '@wordpress/i18n';
3
- import Badge from '../badge/index.js';
4
- const ThreatSeverityBadge = ({ severity }) => {
5
- if (severity >= 5) {
6
- return (_jsx(Badge, { variant: "danger", children: _x('Critical', 'Severity label for issues rated 5 or higher.', 'jetpack-components') }));
7
- }
8
- if (severity >= 3 && severity < 5) {
9
- return (_jsx(Badge, { variant: "warning", children: _x('High', 'Severity label for issues rated between 3 and 5.', 'jetpack-components') }));
10
- }
11
- return (_jsx(Badge, { children: _x('Low', 'Severity label for issues rated below 3.', 'jetpack-components') }));
12
- };
13
- export default ThreatSeverityBadge;
@@ -1,33 +0,0 @@
1
- export declare const THREAT_STATUSES: {
2
- value: string;
3
- label: string;
4
- variant?: 'success' | 'warning';
5
- }[];
6
- export declare const THREAT_TYPES: {
7
- value: string;
8
- label: string;
9
- }[];
10
- export declare const THREAT_ICONS: {
11
- plugins: any;
12
- themes: any;
13
- core: any;
14
- file: any;
15
- default: any;
16
- };
17
- export declare const THREAT_FIELD_THREAT = "threat";
18
- export declare const THREAT_FIELD_TITLE = "title";
19
- export declare const THREAT_FIELD_DESCRIPTION = "description";
20
- export declare const THREAT_FIELD_ICON = "icon";
21
- export declare const THREAT_FIELD_STATUS = "status";
22
- export declare const THREAT_FIELD_TYPE = "type";
23
- export declare const THREAT_FIELD_EXTENSION = "extension";
24
- export declare const THREAT_FIELD_PLUGIN = "plugin";
25
- export declare const THREAT_FIELD_THEME = "theme";
26
- export declare const THREAT_FIELD_SEVERITY = "severity";
27
- export declare const THREAT_FIELD_SIGNATURE = "signature";
28
- export declare const THREAT_FIELD_FIRST_DETECTED = "first-detected";
29
- export declare const THREAT_FIELD_FIXED_ON = "fixed-on";
30
- export declare const THREAT_FIELD_AUTO_FIX = "auto-fix";
31
- export declare const THREAT_ACTION_FIX = "fix";
32
- export declare const THREAT_ACTION_IGNORE = "ignore";
33
- export declare const THREAT_ACTION_UNIGNORE = "unignore";
@@ -1,37 +0,0 @@
1
- import { __ } from '@wordpress/i18n';
2
- import { code as fileIcon, color as themeIcon, plugins as pluginIcon, shield as shieldIcon, wordpress as coreIcon, } from '@wordpress/icons';
3
- export const THREAT_STATUSES = [
4
- { value: 'current', label: __('Active', 'jetpack-components'), variant: 'warning' },
5
- { value: 'fixed', label: __('Fixed', 'jetpack-components'), variant: 'success' },
6
- { value: 'ignored', label: __('Ignored', 'jetpack-components') },
7
- ];
8
- export const THREAT_TYPES = [
9
- { value: 'plugins', label: __('Plugin', 'jetpack-components') },
10
- { value: 'themes', label: __('Theme', 'jetpack-components') },
11
- { value: 'core', label: __('WordPress', 'jetpack-components') },
12
- { value: 'file', label: __('File', 'jetpack-components') },
13
- ];
14
- export const THREAT_ICONS = {
15
- plugins: pluginIcon,
16
- themes: themeIcon,
17
- core: coreIcon,
18
- file: fileIcon,
19
- default: shieldIcon,
20
- };
21
- export const THREAT_FIELD_THREAT = 'threat';
22
- export const THREAT_FIELD_TITLE = 'title';
23
- export const THREAT_FIELD_DESCRIPTION = 'description';
24
- export const THREAT_FIELD_ICON = 'icon';
25
- export const THREAT_FIELD_STATUS = 'status';
26
- export const THREAT_FIELD_TYPE = 'type';
27
- export const THREAT_FIELD_EXTENSION = 'extension';
28
- export const THREAT_FIELD_PLUGIN = 'plugin';
29
- export const THREAT_FIELD_THEME = 'theme';
30
- export const THREAT_FIELD_SEVERITY = 'severity';
31
- export const THREAT_FIELD_SIGNATURE = 'signature';
32
- export const THREAT_FIELD_FIRST_DETECTED = 'first-detected';
33
- export const THREAT_FIELD_FIXED_ON = 'fixed-on';
34
- export const THREAT_FIELD_AUTO_FIX = 'auto-fix';
35
- export const THREAT_ACTION_FIX = 'fix';
36
- export const THREAT_ACTION_IGNORE = 'ignore';
37
- export const THREAT_ACTION_UNIGNORE = 'unignore';
@@ -1,30 +0,0 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- import { type Threat } from '@automattic/jetpack-scan';
3
- import { type ActionButton, type Filter } from '@wordpress/dataviews';
4
- /**
5
- * DataViews component for displaying security threats.
6
- *
7
- * @param {object} props - Component props.
8
- * @param {Array} props.data - Threats data.
9
- * @param {Array} props.filters - Initial DataView filters.
10
- * @param {Function} props.onChangeSelection - Callback function run when an item is selected.
11
- * @param {Function} props.onFixThreats - Threat fix action callback.
12
- * @param {Function} props.onIgnoreThreats - Threat ignore action callback.
13
- * @param {Function} props.onUnignoreThreats - Threat unignore action callback.
14
- * @param {Function} props.isThreatEligibleForFix - Function to determine if a threat is eligible for fixing.
15
- * @param {Function} props.isThreatEligibleForIgnore - Function to determine if a threat is eligible for ignoring.
16
- * @param {Function} props.isThreatEligibleForUnignore - Function to determine if a threat is eligible for unignoring.
17
- *
18
- * @return {JSX.Element} The ThreatsDataViews component.
19
- */
20
- export default function ThreatsDataViews({ data, filters, onChangeSelection, isThreatEligibleForFix, isThreatEligibleForIgnore, isThreatEligibleForUnignore, onFixThreats, onIgnoreThreats, onUnignoreThreats, }: {
21
- data: Threat[];
22
- filters?: Filter[];
23
- onChangeSelection?: (selectedItemIds: string[]) => void;
24
- isThreatEligibleForFix?: (threat: Threat) => boolean;
25
- isThreatEligibleForIgnore?: (threat: Threat) => boolean;
26
- isThreatEligibleForUnignore?: (threat: Threat) => boolean;
27
- onFixThreats?: (threats: Threat[]) => void;
28
- onIgnoreThreats?: ActionButton<Threat>['callback'];
29
- onUnignoreThreats?: ActionButton<Threat>['callback'];
30
- }): JSX.Element;