@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/dist/index.js +10 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/components/fix-violation-with-angie.tsx +11 -20
package/dist/index.mjs
CHANGED
|
@@ -101,8 +101,6 @@ import { __ as __17 } from "@wordpress/i18n";
|
|
|
101
101
|
import { __ } from "@wordpress/i18n";
|
|
102
102
|
var AUDIT_PANEL_ID = "audit-panel";
|
|
103
103
|
var REPORT_STORAGE_KEY_PREFIX = "elementor/audits/report";
|
|
104
|
-
var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
|
|
105
|
-
var ANGIE_FIX_ENTRY_POINT = "audit_violation";
|
|
106
104
|
var FEEDBACK_EXPERIMENT_NAME = "in_editor_feedback";
|
|
107
105
|
var FEEDBACK_ENTRY_POINT = "audit_panel";
|
|
108
106
|
var FEEDBACK_CLICKED_EVENT = "audit_feedback_clicked";
|
|
@@ -1155,29 +1153,21 @@ import { AngieIcon } from "@elementor/icons";
|
|
|
1155
1153
|
import { Button as Button3, IconButton as IconButton4, Tooltip as Tooltip2 } from "@elementor/ui";
|
|
1156
1154
|
import { __ as __9 } from "@wordpress/i18n";
|
|
1157
1155
|
function FixViolationWithAngie({ audit: audit25, prompt, panelZIndex, variant = "icon" }) {
|
|
1156
|
+
if (!isAngieAvailable()) {
|
|
1157
|
+
return null;
|
|
1158
|
+
}
|
|
1158
1159
|
const label = __9("Fix with Angie", "elementor");
|
|
1159
1160
|
const href = `#angie-prompt=${encodeURIComponent(prompt)}`;
|
|
1160
1161
|
const handleClick = (event) => {
|
|
1161
1162
|
event.stopPropagation();
|
|
1162
1163
|
event.preventDefault();
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
});
|
|
1171
|
-
return;
|
|
1172
|
-
}
|
|
1173
|
-
window.dispatchEvent(
|
|
1174
|
-
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
1175
|
-
detail: {
|
|
1176
|
-
entry_point: ANGIE_FIX_ENTRY_POINT,
|
|
1177
|
-
prompt
|
|
1178
|
-
}
|
|
1179
|
-
})
|
|
1180
|
-
);
|
|
1164
|
+
sendPromptToAngie(prompt);
|
|
1165
|
+
trackFindingClicked({
|
|
1166
|
+
audit: audit25,
|
|
1167
|
+
locationL2: "issues",
|
|
1168
|
+
actionType: "fix_with_angie",
|
|
1169
|
+
interactionResult: "angie_prompt_sent"
|
|
1170
|
+
});
|
|
1181
1171
|
};
|
|
1182
1172
|
if (variant === "button") {
|
|
1183
1173
|
return /* @__PURE__ */ React8.createElement(
|