@elementor/editor-audits 4.4.0-1075 → 4.4.0-1076
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/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +162 -136
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +125 -99
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/audits/privacy-policy.ts +1 -0
- package/src/components/violation-cta-button.tsx +22 -0
- package/src/components/violation-row.tsx +13 -1
- package/src/types.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-audits",
|
|
3
|
-
"version": "4.4.0-
|
|
3
|
+
"version": "4.4.0-1076",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor": "4.4.0-
|
|
43
|
-
"@elementor/editor-mcp": "4.4.0-
|
|
44
|
-
"@elementor/editor-app-bar": "4.4.0-
|
|
45
|
-
"@elementor/editor-elements": "4.4.0-
|
|
46
|
-
"@elementor/editor-floating-panels": "4.4.0-
|
|
47
|
-
"@elementor/editor-notifications": "4.4.0-
|
|
48
|
-
"@elementor/editor-v1-adapters": "4.4.0-
|
|
49
|
-
"@elementor/events": "4.4.0-
|
|
50
|
-
"@elementor/http-client": "4.4.0-
|
|
42
|
+
"@elementor/editor": "4.4.0-1076",
|
|
43
|
+
"@elementor/editor-mcp": "4.4.0-1076",
|
|
44
|
+
"@elementor/editor-app-bar": "4.4.0-1076",
|
|
45
|
+
"@elementor/editor-elements": "4.4.0-1076",
|
|
46
|
+
"@elementor/editor-floating-panels": "4.4.0-1076",
|
|
47
|
+
"@elementor/editor-notifications": "4.4.0-1076",
|
|
48
|
+
"@elementor/editor-v1-adapters": "4.4.0-1076",
|
|
49
|
+
"@elementor/events": "4.4.0-1076",
|
|
50
|
+
"@elementor/http-client": "4.4.0-1076",
|
|
51
51
|
"@elementor/icons": "~1.77.0",
|
|
52
|
-
"@elementor/locations": "4.4.0-
|
|
53
|
-
"@elementor/session": "4.4.0-
|
|
54
|
-
"@elementor/store": "4.4.0-
|
|
52
|
+
"@elementor/locations": "4.4.0-1076",
|
|
53
|
+
"@elementor/session": "4.4.0-1076",
|
|
54
|
+
"@elementor/store": "4.4.0-1076",
|
|
55
55
|
"@elementor/ui": "1.37.5"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Button } from '@elementor/ui';
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
ctaLabel: string;
|
|
6
|
+
externalUrl: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function ViolationCtaButton( { ctaLabel, externalUrl }: Props ) {
|
|
10
|
+
const handleClick = ( event: React.MouseEvent< HTMLButtonElement > ) => {
|
|
11
|
+
event.stopPropagation();
|
|
12
|
+
event.preventDefault();
|
|
13
|
+
|
|
14
|
+
window.open( externalUrl, '_blank', 'noopener' );
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Button variant="outlined" color="secondary" size="small" onClick={ handleClick }>
|
|
19
|
+
{ ctaLabel }
|
|
20
|
+
</Button>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -11,6 +11,7 @@ import { buildAngiePrompt } from '../utils/build-angie-prompt';
|
|
|
11
11
|
import { onKeyboardClick } from '../utils/keyboard-click';
|
|
12
12
|
import FixViolationWithAngie from './fix-violation-with-angie';
|
|
13
13
|
import SeverityIcon from './severity-icons';
|
|
14
|
+
import ViolationCtaButton from './violation-cta-button';
|
|
14
15
|
import ViolationIcon from './violation-icons';
|
|
15
16
|
|
|
16
17
|
type Props = {
|
|
@@ -157,7 +158,18 @@ export default function ViolationRow( { audit, skipReason, violations }: Props )
|
|
|
157
158
|
{ violation.angieFix && (
|
|
158
159
|
<FixViolationWithAngie prompt={ buildAngiePrompt( rowLabel ) } />
|
|
159
160
|
) }
|
|
160
|
-
|
|
161
|
+
{ violation.ctaLabel && violation.externalUrl ? (
|
|
162
|
+
<ViolationCtaButton
|
|
163
|
+
ctaLabel={ violation.ctaLabel }
|
|
164
|
+
externalUrl={ violation.externalUrl }
|
|
165
|
+
/>
|
|
166
|
+
) : (
|
|
167
|
+
<EyeIcon
|
|
168
|
+
className="violation-hover-icon"
|
|
169
|
+
fontSize="tiny"
|
|
170
|
+
aria-hidden={ true }
|
|
171
|
+
/>
|
|
172
|
+
) }
|
|
161
173
|
</Box>
|
|
162
174
|
);
|
|
163
175
|
} ) }
|