@elementor/editor-app-bar 4.2.0-873 → 4.2.0-875
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
|
@@ -378,6 +378,7 @@ var React20 = __toESM(require("react"));
|
|
|
378
378
|
// src/extensions/angie/components/angie-guide-location.tsx
|
|
379
379
|
var React15 = __toESM(require("react"));
|
|
380
380
|
var import_react4 = require("react");
|
|
381
|
+
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
381
382
|
var import_editor_ui = require("@elementor/editor-ui");
|
|
382
383
|
var import_events = require("@elementor/events");
|
|
383
384
|
var import_ui8 = require("@elementor/ui");
|
|
@@ -421,7 +422,7 @@ function AngieGuideCard({ imageUrl, description, learnMoreUrl, onInstall, onClos
|
|
|
421
422
|
}
|
|
422
423
|
},
|
|
423
424
|
(0, import_i18n3.__)("Learn More", "elementor")
|
|
424
|
-
), /* @__PURE__ */ React14.createElement(import_ui7.Button, { variant: "contained", size: "small", color: "accent", onClick: onInstall }, (0, import_i18n3.__)("Try for free", "elementor")))));
|
|
425
|
+
), onInstall && /* @__PURE__ */ React14.createElement(import_ui7.Button, { variant: "contained", size: "small", color: "accent", onClick: onInstall }, (0, import_i18n3.__)("Try for free", "elementor")))));
|
|
425
426
|
}
|
|
426
427
|
|
|
427
428
|
// src/extensions/angie/hooks/use-auto-show.ts
|
|
@@ -443,6 +444,7 @@ function AngieGuideLocation() {
|
|
|
443
444
|
useAutoShow();
|
|
444
445
|
const [anchorEl, setAnchorEl] = (0, import_react4.useState)(null);
|
|
445
446
|
const { dispatchEvent: dispatchEvent2 } = (0, import_events.useMixpanel)();
|
|
447
|
+
const { isAdmin } = (0, import_editor_current_user.useCurrentUserCapabilities)();
|
|
446
448
|
const isOpen = Boolean(anchorEl);
|
|
447
449
|
(0, import_react4.useEffect)(() => {
|
|
448
450
|
const handleToggle = () => {
|
|
@@ -481,7 +483,7 @@ function AngieGuideLocation() {
|
|
|
481
483
|
imageUrl: ANGIE_TOP_BAR_PROMOTION_IMAGE_URL,
|
|
482
484
|
description: ANGIE_TOP_BAR_DESCRIPTION,
|
|
483
485
|
learnMoreUrl: ANGIE_LEARN_MORE_URL,
|
|
484
|
-
onInstall: handleInstall,
|
|
486
|
+
onInstall: isAdmin ? handleInstall : void 0,
|
|
485
487
|
onClose: handleClose
|
|
486
488
|
}
|
|
487
489
|
),
|