@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 CHANGED
@@ -1453,25 +1453,43 @@ function init8() {
1453
1453
  }
1454
1454
 
1455
1455
  // src/extensions/help/hooks/use-action-props.ts
1456
+ var import_editor_mcp2 = require("@elementor/editor-mcp");
1456
1457
  var import_icons17 = require("@elementor/icons");
1457
1458
  var import_i18n20 = require("@wordpress/i18n");
1459
+ var HELP_CENTER_URL = "https://go.elementor.com/editor-top-bar-learn/";
1460
+ var HELP_CENTER_ANGIE_PROMPT = `${(0, import_i18n20.__)("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 = (0, import_editor_mcp2.isAngieAvailable)();
1475
+ if (hasAngieActive) {
1476
+ return {
1477
+ title: (0, import_i18n20.__)("Help Center", "elementor"),
1478
+ icon: import_icons17.HelpIcon,
1479
+ onClick: (event) => {
1480
+ event.preventDefault();
1481
+ dispatchHelpClickEvent();
1482
+ (0, import_editor_mcp2.openAngieInAskMode)(HELP_CENTER_ANGIE_PROMPT);
1483
+ }
1484
+ };
1485
+ }
1459
1486
  return {
1460
1487
  title: (0, import_i18n20.__)("Help Center", "elementor"),
1461
- href: "https://go.elementor.com/editor-top-bar-learn/",
1488
+ href: HELP_CENTER_URL,
1462
1489
  icon: import_icons17.HelpIcon,
1463
1490
  target: "_blank",
1464
1491
  onClick: () => {
1465
- const extendedWindow = window;
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
  }