@elementor/editor-audits 4.5.0-1165 → 4.5.0-1167

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-audits",
3
- "version": "4.5.0-1165",
3
+ "version": "4.5.0-1167",
4
4
  "private": false,
5
5
  "author": "Elementor Team",
6
6
  "homepage": "https://elementor.com/",
@@ -39,22 +39,22 @@
39
39
  "dev": "tsup --config=../../tsup.dev.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@elementor/editor": "4.5.0-1165",
43
- "@elementor/editor-mcp": "4.5.0-1165",
44
- "@elementor/editor-app-bar": "4.5.0-1165",
45
- "@elementor/editor-current-user": "4.5.0-1165",
46
- "@elementor/editor-elements": "4.5.0-1165",
47
- "@elementor/editor-floating-panels": "4.5.0-1165",
48
- "@elementor/editor-notifications": "4.5.0-1165",
49
- "@elementor/editor-props": "4.5.0-1165",
50
- "@elementor/editor-styles": "4.5.0-1165",
51
- "@elementor/editor-v1-adapters": "4.5.0-1165",
52
- "@elementor/events": "4.5.0-1165",
53
- "@elementor/http-client": "4.5.0-1165",
42
+ "@elementor/editor": "4.5.0-1167",
43
+ "@elementor/editor-mcp": "4.5.0-1167",
44
+ "@elementor/editor-app-bar": "4.5.0-1167",
45
+ "@elementor/editor-current-user": "4.5.0-1167",
46
+ "@elementor/editor-elements": "4.5.0-1167",
47
+ "@elementor/editor-floating-panels": "4.5.0-1167",
48
+ "@elementor/editor-notifications": "4.5.0-1167",
49
+ "@elementor/editor-props": "4.5.0-1167",
50
+ "@elementor/editor-styles": "4.5.0-1167",
51
+ "@elementor/editor-v1-adapters": "4.5.0-1167",
52
+ "@elementor/events": "4.5.0-1167",
53
+ "@elementor/http-client": "4.5.0-1167",
54
54
  "@elementor/icons": "~1.78.1",
55
- "@elementor/locations": "4.5.0-1165",
56
- "@elementor/session": "4.5.0-1165",
57
- "@elementor/store": "4.5.0-1165",
55
+ "@elementor/locations": "4.5.0-1167",
56
+ "@elementor/session": "4.5.0-1167",
57
+ "@elementor/store": "4.5.0-1167",
58
58
  "@elementor/ui": "1.41.4"
59
59
  },
60
60
  "peerDependencies": {
@@ -4,7 +4,6 @@ import { AngieIcon } from '@elementor/icons';
4
4
  import { Button, IconButton, Tooltip } from '@elementor/ui';
5
5
  import { __ } from '@wordpress/i18n';
6
6
 
7
- import { ANGIE_FIX_ENTRY_POINT, CREATE_WIDGET_EVENT } from '../constants';
8
7
  import { type AuditMeta } from '../types';
9
8
  import { trackFindingClicked } from '../utils/tracking';
10
9
 
@@ -16,6 +15,10 @@ type Props = {
16
15
  };
17
16
 
18
17
  export default function FixViolationWithAngie( { audit, prompt, panelZIndex, variant = 'icon' }: Props ) {
18
+ if ( ! isAngieAvailable() ) {
19
+ return null;
20
+ }
21
+
19
22
  const label = __( 'Fix with Angie', 'elementor' );
20
23
  const href = `#angie-prompt=${ encodeURIComponent( prompt ) }`;
21
24
 
@@ -23,25 +26,13 @@ export default function FixViolationWithAngie( { audit, prompt, panelZIndex, var
23
26
  event.stopPropagation();
24
27
  event.preventDefault();
25
28
 
26
- if ( isAngieAvailable() ) {
27
- sendPromptToAngie( prompt );
28
- trackFindingClicked( {
29
- audit,
30
- locationL2: 'issues',
31
- actionType: 'fix_with_angie',
32
- interactionResult: 'angie_prompt_sent',
33
- } );
34
- return;
35
- }
36
-
37
- window.dispatchEvent(
38
- new CustomEvent( CREATE_WIDGET_EVENT, {
39
- detail: {
40
- entry_point: ANGIE_FIX_ENTRY_POINT,
41
- prompt,
42
- },
43
- } )
44
- );
29
+ sendPromptToAngie( prompt );
30
+ trackFindingClicked( {
31
+ audit,
32
+ locationL2: 'issues',
33
+ actionType: 'fix_with_angie',
34
+ interactionResult: 'angie_prompt_sent',
35
+ } );
45
36
  };
46
37
 
47
38
  if ( variant === 'button' ) {