@elementor/editor-app-bar 4.4.0-1066 → 4.4.0-1069
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 +29 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/extensions/help/hooks/use-action-props.ts +34 -12
package/dist/index.mjs
CHANGED
|
@@ -1453,25 +1453,43 @@ function init8() {
|
|
|
1453
1453
|
}
|
|
1454
1454
|
|
|
1455
1455
|
// src/extensions/help/hooks/use-action-props.ts
|
|
1456
|
+
import { isAngieAvailable as isAngieAvailable2, openAngieInAskMode } from "@elementor/editor-mcp";
|
|
1456
1457
|
import { HelpIcon } from "@elementor/icons";
|
|
1457
1458
|
import { __ as __20 } from "@wordpress/i18n";
|
|
1459
|
+
var HELP_CENTER_URL = "https://go.elementor.com/editor-top-bar-learn/";
|
|
1460
|
+
var HELP_CENTER_ANGIE_PROMPT = `${__20("Help me with", "elementor")} `;
|
|
1461
|
+
var dispatchHelpClickEvent = () => {
|
|
1462
|
+
const extendedWindow = window;
|
|
1463
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1464
|
+
if (config) {
|
|
1465
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.help, {
|
|
1466
|
+
location: config.locations.topBar,
|
|
1467
|
+
secondaryLocation: config.secondaryLocations.help,
|
|
1468
|
+
trigger: config.triggers.click,
|
|
1469
|
+
element: config.elements.buttonIcon
|
|
1470
|
+
});
|
|
1471
|
+
}
|
|
1472
|
+
};
|
|
1458
1473
|
function useActionProps6() {
|
|
1474
|
+
const hasAngieActive = isAngieAvailable2();
|
|
1475
|
+
if (hasAngieActive) {
|
|
1476
|
+
return {
|
|
1477
|
+
title: __20("Help Center", "elementor"),
|
|
1478
|
+
icon: HelpIcon,
|
|
1479
|
+
onClick: (event) => {
|
|
1480
|
+
event.preventDefault();
|
|
1481
|
+
dispatchHelpClickEvent();
|
|
1482
|
+
openAngieInAskMode(HELP_CENTER_ANGIE_PROMPT);
|
|
1483
|
+
}
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1459
1486
|
return {
|
|
1460
1487
|
title: __20("Help Center", "elementor"),
|
|
1461
|
-
href:
|
|
1488
|
+
href: HELP_CENTER_URL,
|
|
1462
1489
|
icon: HelpIcon,
|
|
1463
1490
|
target: "_blank",
|
|
1464
1491
|
onClick: () => {
|
|
1465
|
-
|
|
1466
|
-
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1467
|
-
if (config) {
|
|
1468
|
-
extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.help, {
|
|
1469
|
-
location: config.locations.topBar,
|
|
1470
|
-
secondaryLocation: config.secondaryLocations.help,
|
|
1471
|
-
trigger: config.triggers.click,
|
|
1472
|
-
element: config.elements.buttonIcon
|
|
1473
|
-
});
|
|
1474
|
-
}
|
|
1492
|
+
dispatchHelpClickEvent();
|
|
1475
1493
|
}
|
|
1476
1494
|
};
|
|
1477
1495
|
}
|