@elementor/editor-components 4.1.0-693 → 4.1.0-694

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.mjs CHANGED
@@ -10,7 +10,7 @@ import { injectTab } from "@elementor/editor-elements-panel";
10
10
  import { stylesRepository } from "@elementor/editor-styles-repository";
11
11
  import { registerDataHook as registerDataHook2 } from "@elementor/editor-v1-adapters";
12
12
  import { __registerSlice as registerSlice } from "@elementor/store";
13
- import { __ as __14 } from "@wordpress/i18n";
13
+ import { __ as __16 } from "@wordpress/i18n";
14
14
 
15
15
  // src/component-instance-transformer.ts
16
16
  import { createTransformer } from "@elementor/editor-canvas";
@@ -410,11 +410,10 @@ var componentOverrideTransformer = createTransformer3((override) => {
410
410
  });
411
411
 
412
412
  // src/components/components-tab/components.tsx
413
- import * as React8 from "react";
413
+ import * as React10 from "react";
414
414
  import { useLayoutEffect } from "react";
415
415
  import { ThemeProvider } from "@elementor/editor-ui";
416
416
  import { Stack as Stack4 } from "@elementor/ui";
417
- import { hasProInstalled as hasProInstalled2 } from "@elementor/utils";
418
417
 
419
418
  // src/hooks/use-components.ts
420
419
  import { __useSelector as useSelector2 } from "@elementor/store";
@@ -424,6 +423,16 @@ var useComponents = () => {
424
423
  return { components, isLoading };
425
424
  };
426
425
 
426
+ // src/utils/is-pro-components-supported.ts
427
+ import { hasProInstalled, isProAtLeast } from "@elementor/utils";
428
+ var MIN_PRO_VERSION_FOR_COMPONENTS = "4.0";
429
+ function isProComponentsSupported() {
430
+ return hasProInstalled() && isProAtLeast(MIN_PRO_VERSION_FOR_COMPONENTS);
431
+ }
432
+ function isProOutdatedForComponents() {
433
+ return hasProInstalled() && !isProAtLeast(MIN_PRO_VERSION_FOR_COMPONENTS);
434
+ }
435
+
427
436
  // src/components/components-tab/component-search.tsx
428
437
  import * as React2 from "react";
429
438
  import { SearchIcon } from "@elementor/icons";
@@ -476,7 +485,6 @@ var ComponentSearch = () => {
476
485
  import * as React5 from "react";
477
486
  import { ComponentsIcon as ComponentsIcon2, CrownFilledIcon } from "@elementor/icons";
478
487
  import { Box as Box4, Button, Divider, Link, List, Stack as Stack3, Typography as Typography2 } from "@elementor/ui";
479
- import { hasProInstalled } from "@elementor/utils";
480
488
  import { __ as __2 } from "@wordpress/i18n";
481
489
 
482
490
  // src/hooks/use-components-permissions.ts
@@ -621,6 +629,7 @@ var LoadingComponents = () => {
621
629
  // src/components/components-tab/components-list.tsx
622
630
  var LEARN_MORE_URL = "http://go.elementor.com/components-guide-article";
623
631
  var UPGRADE_URL = "https://go.elementor.com/go-pro-components/";
632
+ var UPDATE_PLUGINS_URL = "/wp-admin/plugins.php";
624
633
  var SUBTITLE_OVERRIDE_SX = {
625
634
  fontSize: "0.875rem !important",
626
635
  fontWeight: "500 !important"
@@ -635,7 +644,10 @@ function ComponentsList() {
635
644
  if (searchValue.length) {
636
645
  return /* @__PURE__ */ React5.createElement(EmptySearchResult, null);
637
646
  }
638
- return hasProInstalled() ? /* @__PURE__ */ React5.createElement(EmptyState, null) : /* @__PURE__ */ React5.createElement(ProUpgradeEmptyState, null);
647
+ if (isProOutdatedForComponents()) {
648
+ return /* @__PURE__ */ React5.createElement(ProOutdatedEmptyState, null);
649
+ }
650
+ return isProComponentsSupported() ? /* @__PURE__ */ React5.createElement(EmptyState, null) : /* @__PURE__ */ React5.createElement(ProUpgradeEmptyState, null);
639
651
  }
640
652
  return /* @__PURE__ */ React5.createElement(List, { sx: { display: "flex", flexDirection: "column", gap: 1, px: 2 } }, components.map((component) => /* @__PURE__ */ React5.createElement(ComponentItem, { key: component.uid, component })));
641
653
  }
@@ -666,6 +678,32 @@ var ProUpgradeEmptyState = () => {
666
678
  )
667
679
  );
668
680
  };
681
+ var ProOutdatedEmptyState = () => {
682
+ return /* @__PURE__ */ React5.createElement(
683
+ Stack3,
684
+ {
685
+ alignItems: "center",
686
+ justifyContent: "start",
687
+ height: "100%",
688
+ sx: { px: 2, py: 4, maxWidth: 268, m: "auto" },
689
+ gap: 2,
690
+ overflow: "hidden"
691
+ },
692
+ /* @__PURE__ */ React5.createElement(Stack3, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React5.createElement(ComponentsIcon2, { fontSize: "large", sx: { color: "text.secondary" } }), /* @__PURE__ */ React5.createElement(Typography2, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, __2("Create Reusable Components", "elementor")), /* @__PURE__ */ React5.createElement(Typography2, { align: "center", variant: "caption", color: "secondary" }, __2("Create design elements that sync across your entire site.", "elementor")), /* @__PURE__ */ React5.createElement(Typography2, { align: "center", variant: "caption", color: "secondary", sx: { mt: 1 } }, __2("To create components, update Elementor Pro to the latest version.", "elementor"))),
693
+ /* @__PURE__ */ React5.createElement(
694
+ Button,
695
+ {
696
+ variant: "text",
697
+ color: "info",
698
+ size: "small",
699
+ href: UPDATE_PLUGINS_URL,
700
+ target: "_blank",
701
+ rel: "noopener noreferrer"
702
+ },
703
+ __2("Update Elementor Pro", "elementor")
704
+ )
705
+ );
706
+ };
669
707
  var EmptyState = () => {
670
708
  const { canCreate } = useComponentsPermissions();
671
709
  return /* @__PURE__ */ React5.createElement(
@@ -808,7 +846,7 @@ function ComponentsUpgradeAlert({ title, description, upgradeUrl }) {
808
846
  }
809
847
 
810
848
  // src/components/components-tab/components-pro-notification.tsx
811
- var UPGRADE_URL2 = "https://go.elementor.com/go-pro-components-create/";
849
+ var UPGRADE_URL2 = "https://go.elementor.com/go-pro-components-exist-footer/";
812
850
  function ComponentsProNotification() {
813
851
  return /* @__PURE__ */ React7.createElement(
814
852
  ComponentsUpgradeAlert,
@@ -820,6 +858,54 @@ function ComponentsProNotification() {
820
858
  );
821
859
  }
822
860
 
861
+ // src/components/components-tab/components-update-notification.tsx
862
+ import * as React9 from "react";
863
+ import { __ as __6 } from "@wordpress/i18n";
864
+
865
+ // src/components/components-update-alert.tsx
866
+ import * as React8 from "react";
867
+ import { InfoCircleFilledIcon } from "@elementor/icons";
868
+ import { Alert as Alert2, AlertAction as AlertAction2, AlertTitle as AlertTitle2, Box as Box6, Typography as Typography4 } from "@elementor/ui";
869
+ import { __ as __5 } from "@wordpress/i18n";
870
+ var UPDATE_PLUGINS_URL2 = "/wp-admin/plugins.php";
871
+ function ComponentsUpdateAlert({ title, description }) {
872
+ return /* @__PURE__ */ React8.createElement(Box6, { sx: { mt: "auto", position: "sticky", bottom: 0 } }, /* @__PURE__ */ React8.createElement(
873
+ Alert2,
874
+ {
875
+ variant: "standard",
876
+ color: "info",
877
+ icon: /* @__PURE__ */ React8.createElement(InfoCircleFilledIcon, { fontSize: "tiny" }),
878
+ role: "status",
879
+ size: "small",
880
+ action: /* @__PURE__ */ React8.createElement(
881
+ AlertAction2,
882
+ {
883
+ variant: "contained",
884
+ color: "info",
885
+ href: UPDATE_PLUGINS_URL2,
886
+ target: "_blank",
887
+ rel: "noopener noreferrer"
888
+ },
889
+ __5("Upgrade Now", "elementor")
890
+ ),
891
+ sx: { m: 2, mt: 1 }
892
+ },
893
+ /* @__PURE__ */ React8.createElement(AlertTitle2, null, title),
894
+ /* @__PURE__ */ React8.createElement(Typography4, { variant: "caption" }, description)
895
+ ));
896
+ }
897
+
898
+ // src/components/components-tab/components-update-notification.tsx
899
+ function ComponentsUpdateNotification() {
900
+ return /* @__PURE__ */ React9.createElement(
901
+ ComponentsUpdateAlert,
902
+ {
903
+ title: __6("Create new Components", "elementor"),
904
+ description: __6("To create new components, update Elementor Pro to the latest version.", "elementor")
905
+ }
906
+ );
907
+ }
908
+
823
909
  // src/components/components-tab/components.tsx
824
910
  var FULL_HEIGHT_STYLE_ID = "components-full-height-panel";
825
911
  var FULL_HEIGHT_CSS = `
@@ -860,34 +946,34 @@ var useFullHeightPanel = () => {
860
946
  var ComponentsContent = () => {
861
947
  const { components, isLoading } = useComponents();
862
948
  const hasComponents = !isLoading && components.length > 0;
863
- const hasPro = hasProInstalled2();
864
- const showProNotification = !hasPro && hasComponents;
949
+ const showProNotification = !isProComponentsSupported() && hasComponents;
950
+ const isOutdated = isProOutdatedForComponents();
865
951
  useFullHeightPanel();
866
- return /* @__PURE__ */ React8.createElement(Stack4, { justifyContent: "space-between", sx: { flex: 1, minHeight: 0 } }, hasComponents && /* @__PURE__ */ React8.createElement(ComponentSearch, null), /* @__PURE__ */ React8.createElement(ComponentsList, null), showProNotification && /* @__PURE__ */ React8.createElement(ComponentsProNotification, null));
952
+ return /* @__PURE__ */ React10.createElement(Stack4, { justifyContent: "space-between", sx: { flex: 1, minHeight: 0 } }, hasComponents && /* @__PURE__ */ React10.createElement(ComponentSearch, null), /* @__PURE__ */ React10.createElement(ComponentsList, null), showProNotification && (isOutdated ? /* @__PURE__ */ React10.createElement(ComponentsUpdateNotification, null) : /* @__PURE__ */ React10.createElement(ComponentsProNotification, null)));
867
953
  };
868
954
  var Components = () => {
869
- return /* @__PURE__ */ React8.createElement(ThemeProvider, null, /* @__PURE__ */ React8.createElement(SearchProvider, { localStorageKey: "elementor-components-search" }, /* @__PURE__ */ React8.createElement(ComponentsContent, null)));
955
+ return /* @__PURE__ */ React10.createElement(ThemeProvider, null, /* @__PURE__ */ React10.createElement(SearchProvider, { localStorageKey: "elementor-components-search" }, /* @__PURE__ */ React10.createElement(ComponentsContent, null)));
870
956
  };
871
957
 
872
958
  // src/components/detach-instance-confirmation-dialog.tsx
873
- import * as React9 from "react";
959
+ import * as React11 from "react";
874
960
  import { closeDialog, ConfirmationDialog, openDialog } from "@elementor/editor-ui";
875
961
  import { AlertTriangleFilledIcon } from "@elementor/icons";
876
- import { __ as __5 } from "@wordpress/i18n";
962
+ import { __ as __7 } from "@wordpress/i18n";
877
963
  function DetachInstanceConfirmationDialog({
878
964
  open,
879
965
  onClose,
880
966
  onConfirm
881
967
  }) {
882
- return /* @__PURE__ */ React9.createElement(ConfirmationDialog, { open, onClose }, /* @__PURE__ */ React9.createElement(ConfirmationDialog.Title, { icon: AlertTriangleFilledIcon, iconColor: "secondary" }, __5("Detach from Component?", "elementor")), /* @__PURE__ */ React9.createElement(ConfirmationDialog.Content, null, /* @__PURE__ */ React9.createElement(ConfirmationDialog.ContentText, null, __5(
968
+ return /* @__PURE__ */ React11.createElement(ConfirmationDialog, { open, onClose }, /* @__PURE__ */ React11.createElement(ConfirmationDialog.Title, { icon: AlertTriangleFilledIcon, iconColor: "secondary" }, __7("Detach from Component?", "elementor")), /* @__PURE__ */ React11.createElement(ConfirmationDialog.Content, null, /* @__PURE__ */ React11.createElement(ConfirmationDialog.ContentText, null, __7(
883
969
  "Detaching this instance will break its link to the Component. Changes to the Component will no longer apply. Continue?",
884
970
  "elementor"
885
- ))), /* @__PURE__ */ React9.createElement(
971
+ ))), /* @__PURE__ */ React11.createElement(
886
972
  ConfirmationDialog.Actions,
887
973
  {
888
974
  onClose,
889
975
  onConfirm,
890
- confirmLabel: __5("Detach", "elementor"),
976
+ confirmLabel: __7("Detach", "elementor"),
891
977
  color: "primary"
892
978
  }
893
979
  ));
@@ -898,59 +984,58 @@ function openDetachConfirmDialog(onConfirm) {
898
984
  onConfirm();
899
985
  };
900
986
  openDialog({
901
- component: /* @__PURE__ */ React9.createElement(DetachInstanceConfirmationDialog, { open: true, onClose: closeDialog, onConfirm: handleConfirm })
987
+ component: /* @__PURE__ */ React11.createElement(DetachInstanceConfirmationDialog, { open: true, onClose: closeDialog, onConfirm: handleConfirm })
902
988
  });
903
989
  }
904
990
 
905
991
  // src/components/in-edit-mode.tsx
906
- import * as React10 from "react";
992
+ import * as React12 from "react";
907
993
  import { closeDialog as closeDialog2, openDialog as openDialog2 } from "@elementor/editor-ui";
908
- import { InfoCircleFilledIcon } from "@elementor/icons";
909
- import { Box as Box6, Button as Button2, DialogActions, DialogContent, DialogHeader, Icon, Stack as Stack5, Typography as Typography4 } from "@elementor/ui";
910
- import { __ as __6 } from "@wordpress/i18n";
994
+ import { InfoCircleFilledIcon as InfoCircleFilledIcon2 } from "@elementor/icons";
995
+ import { Box as Box7, Button as Button2, DialogActions, DialogContent, DialogHeader, Icon, Stack as Stack5, Typography as Typography5 } from "@elementor/ui";
996
+ import { __ as __8 } from "@wordpress/i18n";
911
997
  var openEditModeDialog = (lockedBy) => {
912
998
  openDialog2({
913
- component: /* @__PURE__ */ React10.createElement(EditModeDialog, { lockedBy })
999
+ component: /* @__PURE__ */ React12.createElement(EditModeDialog, { lockedBy })
914
1000
  });
915
1001
  };
916
1002
  var EditModeDialog = ({ lockedBy }) => {
917
- const content = __6("%s is currently editing this document", "elementor").replace("%s", lockedBy);
918
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React10.createElement(Box6, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React10.createElement(Icon, { color: "secondary" }, /* @__PURE__ */ React10.createElement(InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React10.createElement(Typography4, { variant: "subtitle1" }, content))), /* @__PURE__ */ React10.createElement(DialogContent, null, /* @__PURE__ */ React10.createElement(Stack5, { spacing: 2, direction: "column" }, /* @__PURE__ */ React10.createElement(Typography4, { variant: "body2" }, __6(
1003
+ const content = __8("%s is currently editing this document", "elementor").replace("%s", lockedBy);
1004
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React12.createElement(Box7, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React12.createElement(Icon, { color: "secondary" }, /* @__PURE__ */ React12.createElement(InfoCircleFilledIcon2, { fontSize: "medium" })), /* @__PURE__ */ React12.createElement(Typography5, { variant: "subtitle1" }, content))), /* @__PURE__ */ React12.createElement(DialogContent, null, /* @__PURE__ */ React12.createElement(Stack5, { spacing: 2, direction: "column" }, /* @__PURE__ */ React12.createElement(Typography5, { variant: "body2" }, __8(
919
1005
  "You can wait for them to finish or reach out to coordinate your changes together.",
920
1006
  "elementor"
921
- )), /* @__PURE__ */ React10.createElement(DialogActions, null, /* @__PURE__ */ React10.createElement(Button2, { color: "secondary", variant: "contained", onClick: closeDialog2 }, __6("Close", "elementor"))))));
1007
+ )), /* @__PURE__ */ React12.createElement(DialogActions, null, /* @__PURE__ */ React12.createElement(Button2, { color: "secondary", variant: "contained", onClick: closeDialog2 }, __8("Close", "elementor"))))));
922
1008
  };
923
1009
 
924
1010
  // src/components/instance-editing-panel/instance-editing-panel.tsx
925
- import * as React20 from "react";
1011
+ import * as React22 from "react";
926
1012
  import { PencilIcon as PencilIcon2 } from "@elementor/icons";
927
- import { Box as Box9, Stack as Stack11 } from "@elementor/ui";
928
- import { hasProInstalled as hasProInstalled3 } from "@elementor/utils";
929
- import { __ as __10 } from "@wordpress/i18n";
1013
+ import { Box as Box10, Stack as Stack11 } from "@elementor/ui";
1014
+ import { __ as __12 } from "@wordpress/i18n";
930
1015
 
931
1016
  // src/provider/component-instance-context.tsx
932
- import * as React11 from "react";
1017
+ import * as React13 from "react";
933
1018
  import { createContext as createContext2, useContext as useContext2 } from "react";
934
1019
  var ComponentInstanceContext = createContext2(null);
935
1020
  function ComponentInstanceProvider({ children, ...props }) {
936
- return /* @__PURE__ */ React11.createElement(ComponentInstanceContext.Provider, { value: props }, children);
1021
+ return /* @__PURE__ */ React13.createElement(ComponentInstanceContext.Provider, { value: props }, children);
937
1022
  }
938
1023
  var useComponentId = () => useContext2(ComponentInstanceContext)?.componentId;
939
1024
  var useComponentInstanceOverrides = () => useContext2(ComponentInstanceContext)?.overrides;
940
1025
  var useComponentOverridableProps = () => useContext2(ComponentInstanceContext)?.overridableProps;
941
1026
 
942
1027
  // src/components/instance-editing-panel/detach-action.tsx
943
- import * as React13 from "react";
1028
+ import * as React15 from "react";
944
1029
  import { useState } from "react";
945
1030
  import { notify } from "@elementor/editor-notifications";
946
1031
  import { DetachIcon } from "@elementor/icons";
947
- import { __ as __8 } from "@wordpress/i18n";
1032
+ import { __ as __10 } from "@wordpress/i18n";
948
1033
 
949
1034
  // src/utils/detach-component-instance/detach-component-instance.ts
950
1035
  import { getContainer, replaceElement } from "@elementor/editor-elements";
951
1036
  import { undoable } from "@elementor/editor-v1-adapters";
952
1037
  import { __dispatch as dispatch2, __getState as getState3 } from "@elementor/store";
953
- import { __ as __7 } from "@wordpress/i18n";
1038
+ import { __ as __9 } from "@wordpress/i18n";
954
1039
 
955
1040
  // src/prop-types/component-instance-overrides-prop-type.ts
956
1041
  import { createPropUtils as createPropUtils3 } from "@elementor/editor-props";
@@ -1299,8 +1384,8 @@ async function detachComponentInstance({
1299
1384
  }
1300
1385
  },
1301
1386
  {
1302
- title: __7("Detach from Component", "elementor"),
1303
- subtitle: __7("Instance detached", "elementor")
1387
+ title: __9("Detach from Component", "elementor"),
1388
+ subtitle: __9("Instance detached", "elementor")
1304
1389
  }
1305
1390
  );
1306
1391
  return undoableDetach();
@@ -1315,16 +1400,16 @@ function extractInstanceOverrides(instanceContainer) {
1315
1400
  }
1316
1401
 
1317
1402
  // src/components/instance-editing-panel/instance-panel-header.tsx
1318
- import * as React12 from "react";
1403
+ import * as React14 from "react";
1319
1404
  import { PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
1320
1405
  import { EllipsisWithTooltip as EllipsisWithTooltip2 } from "@elementor/editor-ui";
1321
1406
  import { ComponentsIcon as ComponentsIcon3 } from "@elementor/icons";
1322
1407
  import { IconButton, Stack as Stack6, Tooltip } from "@elementor/ui";
1323
1408
  function InstancePanelHeader({ componentName, actions }) {
1324
- return /* @__PURE__ */ React12.createElement(PanelHeader, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React12.createElement(Stack6, { direction: "row", alignItems: "center", flexGrow: 1, gap: 1, maxWidth: "100%" }, /* @__PURE__ */ React12.createElement(ComponentsIcon3, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React12.createElement(EllipsisWithTooltip2, { title: componentName, as: PanelHeaderTitle, sx: { flexGrow: 1 } }), actions));
1409
+ return /* @__PURE__ */ React14.createElement(PanelHeader, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React14.createElement(Stack6, { direction: "row", alignItems: "center", flexGrow: 1, gap: 1, maxWidth: "100%" }, /* @__PURE__ */ React14.createElement(ComponentsIcon3, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React14.createElement(EllipsisWithTooltip2, { title: componentName, as: PanelHeaderTitle, sx: { flexGrow: 1 } }), actions));
1325
1410
  }
1326
1411
  function EditComponentAction({ label, onClick, disabled = false, icon: Icon2 }) {
1327
- return /* @__PURE__ */ React12.createElement(Tooltip, { title: label }, /* @__PURE__ */ React12.createElement(IconButton, { size: "tiny", onClick, "aria-label": label, disabled }, /* @__PURE__ */ React12.createElement(Icon2, { fontSize: "tiny" })));
1412
+ return /* @__PURE__ */ React14.createElement(Tooltip, { title: label }, /* @__PURE__ */ React14.createElement(IconButton, { size: "tiny", onClick, "aria-label": label, disabled }, /* @__PURE__ */ React14.createElement(Icon2, { fontSize: "tiny" })));
1328
1413
  }
1329
1414
 
1330
1415
  // src/components/instance-editing-panel/detach-action.tsx
@@ -1344,7 +1429,7 @@ var DetachAction = ({
1344
1429
  } catch {
1345
1430
  notify({
1346
1431
  type: "error",
1347
- message: __8("Failed to detach component instance.", "elementor"),
1432
+ message: __10("Failed to detach component instance.", "elementor"),
1348
1433
  id: "detach-component-instance-failed"
1349
1434
  });
1350
1435
  }
@@ -1355,8 +1440,8 @@ var DetachAction = ({
1355
1440
  const handleDetachClick = () => {
1356
1441
  setIsDetachDialogOpen(true);
1357
1442
  };
1358
- const detachLabel = __8("Detach from Component", "elementor");
1359
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(EditComponentAction, { label: detachLabel, icon: DetachIcon, onClick: handleDetachClick }), /* @__PURE__ */ React13.createElement(
1443
+ const detachLabel = __10("Detach from Component", "elementor");
1444
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(EditComponentAction, { label: detachLabel, icon: DetachIcon, onClick: handleDetachClick }), /* @__PURE__ */ React15.createElement(
1360
1445
  DetachInstanceConfirmationDialog,
1361
1446
  {
1362
1447
  open: isDetachDialogOpen,
@@ -1381,20 +1466,20 @@ function getDetachTrackingInfo() {
1381
1466
  }
1382
1467
 
1383
1468
  // src/components/instance-editing-panel/empty-state.tsx
1384
- import * as React14 from "react";
1469
+ import * as React16 from "react";
1385
1470
  import { ComponentPropListIcon, PencilIcon } from "@elementor/icons";
1386
- import { Button as Button3, Stack as Stack7, Typography as Typography5 } from "@elementor/ui";
1387
- import { __ as __9 } from "@wordpress/i18n";
1471
+ import { Button as Button3, Stack as Stack7, Typography as Typography6 } from "@elementor/ui";
1472
+ import { __ as __11 } from "@wordpress/i18n";
1388
1473
  var EmptyState2 = ({ onEditComponent }) => {
1389
1474
  const { canEdit } = useComponentsPermissions();
1390
- const message = canEdit ? __9(
1475
+ const message = canEdit ? __11(
1391
1476
  "Edit the component to add properties, manage them or update the design across all instances.",
1392
1477
  "elementor"
1393
- ) : __9(
1478
+ ) : __11(
1394
1479
  "With your current role, you cannot edit this component. Contact an administrator to add properties.",
1395
1480
  "elementor"
1396
1481
  );
1397
- return /* @__PURE__ */ React14.createElement(
1482
+ return /* @__PURE__ */ React16.createElement(
1398
1483
  Stack7,
1399
1484
  {
1400
1485
  alignItems: "center",
@@ -1404,10 +1489,10 @@ var EmptyState2 = ({ onEditComponent }) => {
1404
1489
  sx: { p: 2.5, pt: 8, pb: 5.5, mt: 1 },
1405
1490
  gap: 1.5
1406
1491
  },
1407
- /* @__PURE__ */ React14.createElement(ComponentPropListIcon, { fontSize: "large" }),
1408
- /* @__PURE__ */ React14.createElement(Typography5, { align: "center", variant: "subtitle2" }, __9("No properties yet", "elementor")),
1409
- /* @__PURE__ */ React14.createElement(Typography5, { align: "center", variant: "caption", maxWidth: "170px" }, message),
1410
- canEdit && /* @__PURE__ */ React14.createElement(
1492
+ /* @__PURE__ */ React16.createElement(ComponentPropListIcon, { fontSize: "large" }),
1493
+ /* @__PURE__ */ React16.createElement(Typography6, { align: "center", variant: "subtitle2" }, __11("No properties yet", "elementor")),
1494
+ /* @__PURE__ */ React16.createElement(Typography6, { align: "center", variant: "caption", maxWidth: "170px" }, message),
1495
+ canEdit && /* @__PURE__ */ React16.createElement(
1411
1496
  Button3,
1412
1497
  {
1413
1498
  variant: "outlined",
@@ -1417,28 +1502,28 @@ var EmptyState2 = ({ onEditComponent }) => {
1417
1502
  disabled: !onEditComponent,
1418
1503
  onClick: onEditComponent
1419
1504
  },
1420
- /* @__PURE__ */ React14.createElement(PencilIcon, { fontSize: "small" }),
1421
- __9("Edit component", "elementor")
1505
+ /* @__PURE__ */ React16.createElement(PencilIcon, { fontSize: "small" }),
1506
+ __11("Edit component", "elementor")
1422
1507
  )
1423
1508
  );
1424
1509
  };
1425
1510
 
1426
1511
  // src/components/instance-editing-panel/instance-panel-body.tsx
1427
- import * as React19 from "react";
1512
+ import * as React21 from "react";
1428
1513
  import { ControlAdornmentsProvider } from "@elementor/editor-controls";
1429
1514
  import { getFieldIndicators } from "@elementor/editor-editing-panel";
1430
1515
  import { PanelBody } from "@elementor/editor-panels";
1431
1516
  import { Divider as Divider2, Stack as Stack10 } from "@elementor/ui";
1432
1517
 
1433
1518
  // src/components/instance-editing-panel/override-props-group.tsx
1434
- import * as React18 from "react";
1519
+ import * as React20 from "react";
1435
1520
  import { useId } from "react";
1436
1521
  import { useStateByElement } from "@elementor/editor-editing-panel";
1437
1522
  import { CollapseIcon } from "@elementor/editor-ui";
1438
- import { Box as Box8, Collapse, ListItemButton as ListItemButton2, ListItemText, Stack as Stack9 } from "@elementor/ui";
1523
+ import { Box as Box9, Collapse, ListItemButton as ListItemButton2, ListItemText, Stack as Stack9 } from "@elementor/ui";
1439
1524
 
1440
1525
  // src/components/instance-editing-panel/override-prop-control.tsx
1441
- import * as React17 from "react";
1526
+ import * as React19 from "react";
1442
1527
  import {
1443
1528
  ControlReplacementsProvider,
1444
1529
  getControlReplacements,
@@ -1457,7 +1542,7 @@ import {
1457
1542
  useElement
1458
1543
  } from "@elementor/editor-editing-panel";
1459
1544
  import { getElementSettings, getElementType as getElementType2 } from "@elementor/editor-elements";
1460
- import { Box as Box7 } from "@elementor/ui";
1545
+ import { Box as Box8 } from "@elementor/ui";
1461
1546
 
1462
1547
  // src/hooks/use-controls-by-widget-type.ts
1463
1548
  import { getElementType } from "@elementor/editor-elements";
@@ -1491,11 +1576,11 @@ function getControlsByBind(controls) {
1491
1576
  }
1492
1577
 
1493
1578
  // src/provider/overridable-prop-context.tsx
1494
- import * as React15 from "react";
1579
+ import * as React17 from "react";
1495
1580
  import { createContext as createContext3, useContext as useContext3 } from "react";
1496
1581
  var OverridablePropContext = createContext3(null);
1497
1582
  function OverridablePropProvider({ children, ...props }) {
1498
- return /* @__PURE__ */ React15.createElement(OverridablePropContext.Provider, { value: props }, children);
1583
+ return /* @__PURE__ */ React17.createElement(OverridablePropContext.Provider, { value: props }, children);
1499
1584
  }
1500
1585
  var useOverridablePropValue = () => useContext3(OverridablePropContext)?.value;
1501
1586
  var useComponentInstanceElement = () => useContext3(OverridablePropContext)?.componentInstanceElement;
@@ -1727,11 +1812,11 @@ function extractInnerOverrideInfo(override) {
1727
1812
  }
1728
1813
 
1729
1814
  // src/components/control-label.tsx
1730
- import * as React16 from "react";
1815
+ import * as React18 from "react";
1731
1816
  import { ControlAdornments, ControlFormLabel } from "@elementor/editor-controls";
1732
1817
  import { Stack as Stack8 } from "@elementor/ui";
1733
1818
  var ControlLabel = ({ children, ...props }) => {
1734
- return /* @__PURE__ */ React16.createElement(Stack8, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React16.createElement(ControlFormLabel, { ...props }, children), /* @__PURE__ */ React16.createElement(ControlAdornments, null));
1819
+ return /* @__PURE__ */ React18.createElement(Stack8, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React18.createElement(ControlFormLabel, { ...props }, children), /* @__PURE__ */ React18.createElement(ControlAdornments, null));
1735
1820
  };
1736
1821
 
1737
1822
  // src/components/errors.ts
@@ -1840,7 +1925,7 @@ function OverridePropControl({ overrideKey }) {
1840
1925
  if (!overridableProp) {
1841
1926
  return null;
1842
1927
  }
1843
- return /* @__PURE__ */ React17.createElement(SettingsField, { bind: "component_instance", propDisplayName: overridableProp.label }, /* @__PURE__ */ React17.createElement(OverrideControl, { overridableProp }));
1928
+ return /* @__PURE__ */ React19.createElement(SettingsField, { bind: "component_instance", propDisplayName: overridableProp.label }, /* @__PURE__ */ React19.createElement(OverrideControl, { overridableProp }));
1844
1929
  }
1845
1930
  function OverrideControl({ overridableProp }) {
1846
1931
  const componentInstanceElement = useElement();
@@ -1934,13 +2019,13 @@ function OverrideControl({ overridableProp }) {
1934
2019
  [overridableProp.overrideKey]: propType
1935
2020
  }
1936
2021
  });
1937
- return /* @__PURE__ */ React17.createElement(
2022
+ return /* @__PURE__ */ React19.createElement(
1938
2023
  OverridablePropProvider,
1939
2024
  {
1940
2025
  value: componentOverridablePropTypeUtil.extract(matchingOverride) ?? void 0,
1941
2026
  componentInstanceElement
1942
2027
  },
1943
- /* @__PURE__ */ React17.createElement(ElementProvider, { element: { id: elementId, type }, elementType, settings }, /* @__PURE__ */ React17.createElement(SettingsField, { bind: propKey, propDisplayName: overridableProp.label }, /* @__PURE__ */ React17.createElement(
2028
+ /* @__PURE__ */ React19.createElement(ElementProvider, { element: { id: elementId, type }, elementType, settings }, /* @__PURE__ */ React19.createElement(SettingsField, { bind: propKey, propDisplayName: overridableProp.label }, /* @__PURE__ */ React19.createElement(
1944
2029
  PropProvider,
1945
2030
  {
1946
2031
  propType: propTypeSchema,
@@ -1950,7 +2035,7 @@ function OverrideControl({ overridableProp }) {
1950
2035
  return false;
1951
2036
  }
1952
2037
  },
1953
- /* @__PURE__ */ React17.createElement(PropKeyProvider, { bind: overridableProp.overrideKey }, /* @__PURE__ */ React17.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React17.createElement(Box7, { mb: 1.5 }, /* @__PURE__ */ React17.createElement(ControlTypeContainer, { layout }, layout !== "custom" && /* @__PURE__ */ React17.createElement(ControlLabel, null, overridableProp.label), /* @__PURE__ */ React17.createElement(OriginalControl, { control, controlProps })))))
2038
+ /* @__PURE__ */ React19.createElement(PropKeyProvider, { bind: overridableProp.overrideKey }, /* @__PURE__ */ React19.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React19.createElement(Box8, { mb: 1.5 }, /* @__PURE__ */ React19.createElement(ControlTypeContainer, { layout }, layout !== "custom" && /* @__PURE__ */ React19.createElement(ControlLabel, null, overridableProp.label), /* @__PURE__ */ React19.createElement(OriginalControl, { control, controlProps })))))
1954
2039
  )))
1955
2040
  );
1956
2041
  }
@@ -2009,7 +2094,7 @@ function getControlParams(controls, originPropFields, label) {
2009
2094
  }
2010
2095
  function OriginalControl({ control, controlProps }) {
2011
2096
  const { value } = control;
2012
- return /* @__PURE__ */ React17.createElement(BaseControl, { type: value.type, props: controlProps });
2097
+ return /* @__PURE__ */ React19.createElement(BaseControl, { type: value.type, props: controlProps });
2013
2098
  }
2014
2099
  function getControlLayout(control) {
2015
2100
  return control.value.meta?.layout || controlsRegistry.getLayout(control.value.type);
@@ -2044,7 +2129,7 @@ function OverridePropsGroup({ group }) {
2044
2129
  const labelId = `label-${id}`;
2045
2130
  const contentId = `content-${id}`;
2046
2131
  const title = group.label;
2047
- return /* @__PURE__ */ React18.createElement(Box8, { "aria-label": `${title} section` }, /* @__PURE__ */ React18.createElement(
2132
+ return /* @__PURE__ */ React20.createElement(Box9, { "aria-label": `${title} section` }, /* @__PURE__ */ React20.createElement(
2048
2133
  ListItemButton2,
2049
2134
  {
2050
2135
  id: labelId,
@@ -2054,7 +2139,7 @@ function OverridePropsGroup({ group }) {
2054
2139
  p: 0,
2055
2140
  sx: { "&:hover": { backgroundColor: "transparent" } }
2056
2141
  },
2057
- /* @__PURE__ */ React18.createElement(Stack9, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React18.createElement(
2142
+ /* @__PURE__ */ React20.createElement(Stack9, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React20.createElement(
2058
2143
  ListItemText,
2059
2144
  {
2060
2145
  secondary: title,
@@ -2062,13 +2147,13 @@ function OverridePropsGroup({ group }) {
2062
2147
  sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
2063
2148
  }
2064
2149
  )),
2065
- /* @__PURE__ */ React18.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
2066
- ), /* @__PURE__ */ React18.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto" }, /* @__PURE__ */ React18.createElement(Stack9, { direction: "column", gap: 1, p: 2 }, group.props.map((overrideKey) => /* @__PURE__ */ React18.createElement(OverridePropControl, { key: overrideKey, overrideKey })))));
2150
+ /* @__PURE__ */ React20.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
2151
+ ), /* @__PURE__ */ React20.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto" }, /* @__PURE__ */ React20.createElement(Stack9, { direction: "column", gap: 1, p: 2 }, group.props.map((overrideKey) => /* @__PURE__ */ React20.createElement(OverridePropControl, { key: overrideKey, overrideKey })))));
2067
2152
  }
2068
2153
 
2069
2154
  // src/components/instance-editing-panel/instance-panel-body.tsx
2070
2155
  function InstancePanelBody({ groups, isEmpty, emptyState, componentInstanceId }) {
2071
- return /* @__PURE__ */ React19.createElement(PanelBody, null, /* @__PURE__ */ React19.createElement(ControlAdornmentsProvider, { items: getFieldIndicators("settings") }, isEmpty ? emptyState : /* @__PURE__ */ React19.createElement(Stack10, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React19.createElement(React19.Fragment, { key: group.id + componentInstanceId }, /* @__PURE__ */ React19.createElement(OverridePropsGroup, { group }), /* @__PURE__ */ React19.createElement(Divider2, null))))));
2156
+ return /* @__PURE__ */ React21.createElement(PanelBody, null, /* @__PURE__ */ React21.createElement(ControlAdornmentsProvider, { items: getFieldIndicators("settings") }, isEmpty ? emptyState : /* @__PURE__ */ React21.createElement(Stack10, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React21.createElement(React21.Fragment, { key: group.id + componentInstanceId }, /* @__PURE__ */ React21.createElement(OverridePropsGroup, { group }), /* @__PURE__ */ React21.createElement(Divider2, null))))));
2072
2157
  }
2073
2158
 
2074
2159
  // src/components/instance-editing-panel/use-instance-panel-data.ts
@@ -2168,42 +2253,50 @@ function useComponentInstanceSettings() {
2168
2253
  }
2169
2254
 
2170
2255
  // src/components/instance-editing-panel/instance-editing-panel.tsx
2171
- var EDIT_UPGRADE_URL = "https://go.elementor.com/go-pro-components-edit/";
2256
+ var EDIT_UPGRADE_URL = "https://go.elementor.com/go-pro-components-Instance-edit-footer/";
2172
2257
  function InstanceEditingPanel() {
2173
2258
  const { canEdit } = useComponentsPermissions();
2174
2259
  const data = useInstancePanelData();
2175
- const hasPro = hasProInstalled3();
2176
2260
  if (!data) {
2177
2261
  return null;
2178
2262
  }
2179
2263
  const { componentId, component, overrides, overridableProps, groups, isEmpty, componentInstanceId } = data;
2180
- const panelTitle = __10("Edit %s", "elementor").replace("%s", component.name);
2181
- const actions = /* @__PURE__ */ React20.createElement(Stack11, { direction: "row", gap: 0.5 }, /* @__PURE__ */ React20.createElement(DetachAction, { componentInstanceId, componentId }), canEdit && /* @__PURE__ */ React20.createElement(EditComponentAction, { disabled: true, label: panelTitle, icon: PencilIcon2 }));
2182
- return /* @__PURE__ */ React20.createElement(Box9, { "data-testid": "instance-editing-panel", sx: { display: "flex", flexDirection: "column", height: "100%" } }, /* @__PURE__ */ React20.createElement(
2264
+ const panelTitle = __12("Edit %s", "elementor").replace("%s", component.name);
2265
+ const actions = /* @__PURE__ */ React22.createElement(Stack11, { direction: "row", gap: 0.5 }, /* @__PURE__ */ React22.createElement(DetachAction, { componentInstanceId, componentId }), canEdit && /* @__PURE__ */ React22.createElement(EditComponentAction, { disabled: true, label: panelTitle, icon: PencilIcon2 }));
2266
+ return /* @__PURE__ */ React22.createElement(Box10, { "data-testid": "instance-editing-panel", sx: { display: "flex", flexDirection: "column", height: "100%" } }, /* @__PURE__ */ React22.createElement(
2183
2267
  ComponentInstanceProvider,
2184
2268
  {
2185
2269
  componentId,
2186
2270
  overrides,
2187
2271
  overridableProps
2188
2272
  },
2189
- /* @__PURE__ */ React20.createElement(InstancePanelHeader, { componentName: component.name, actions }),
2190
- /* @__PURE__ */ React20.createElement(
2273
+ /* @__PURE__ */ React22.createElement(InstancePanelHeader, { componentName: component.name, actions }),
2274
+ /* @__PURE__ */ React22.createElement(
2191
2275
  InstancePanelBody,
2192
2276
  {
2193
2277
  groups,
2194
2278
  isEmpty,
2195
- emptyState: /* @__PURE__ */ React20.createElement(EmptyState2, null),
2279
+ emptyState: /* @__PURE__ */ React22.createElement(EmptyState2, null),
2196
2280
  componentInstanceId
2197
2281
  }
2198
2282
  )
2199
- ), !hasPro && /* @__PURE__ */ React20.createElement(
2283
+ ), !isProComponentsSupported() && (isProOutdatedForComponents() ? /* @__PURE__ */ React22.createElement(
2284
+ ComponentsUpdateAlert,
2285
+ {
2286
+ title: __12("Edit Component", "elementor"),
2287
+ description: __12(
2288
+ "To edit components, update Elementor Pro to the latest version.",
2289
+ "elementor"
2290
+ )
2291
+ }
2292
+ ) : /* @__PURE__ */ React22.createElement(
2200
2293
  ComponentsUpgradeAlert,
2201
2294
  {
2202
- title: __10("Edit components", "elementor"),
2203
- description: __10("Editing components requires an active Pro subscription.", "elementor"),
2295
+ title: __12("Edit components", "elementor"),
2296
+ description: __12("Editing components requires an active Pro subscription.", "elementor"),
2204
2297
  upgradeUrl: EDIT_UPGRADE_URL
2205
2298
  }
2206
- ));
2299
+ )));
2207
2300
  }
2208
2301
 
2209
2302
  // src/components/load-template-components.tsx
@@ -2343,8 +2436,8 @@ import {
2343
2436
  import { getCurrentDocument } from "@elementor/editor-documents";
2344
2437
  import { notify as notify2 } from "@elementor/editor-notifications";
2345
2438
  import { __getState as getState8 } from "@elementor/store";
2346
- import { hasProInstalled as hasProInstalled4 } from "@elementor/utils";
2347
- import { __ as __11 } from "@wordpress/i18n";
2439
+ import { hasProInstalled as hasProInstalled2 } from "@elementor/utils";
2440
+ import { __ as __13 } from "@wordpress/i18n";
2348
2441
 
2349
2442
  // src/utils/format-component-elements-id.ts
2350
2443
  import { hashString } from "@elementor/utils";
@@ -2416,21 +2509,41 @@ function buildUniqueSelector(element) {
2416
2509
 
2417
2510
  // src/create-component-type.ts
2418
2511
  var COMPONENT_WIDGET_TYPE2 = "e-component";
2419
- var EDIT_COMPONENT_UPGRADE_URL = "https://go.elementor.com/go-pro-components-edit/";
2512
+ var EDIT_COMPONENT_DB_CLICK_UPGRADE_URL = "https://go.elementor.com/go-pro-components-Instance-edit-canvas-double-click/";
2513
+ var EDIT_COMPONENT_CONTEXT_MENU_UPGRADE_URL = "https://go.elementor.com/go-pro-components-Instance-edit-context-menu/";
2514
+ var UPDATE_PLUGINS_URL3 = "/wp-admin/plugins.php";
2420
2515
  var COMPONENT_EDIT_UPGRADE_NOTIFICATION_ID = "component-edit-upgrade";
2516
+ var COMPONENT_EDIT_UPDATE_NOTIFICATION_ID = "component-edit-update";
2421
2517
  function notifyComponentEditUpgrade() {
2422
2518
  notify2({
2423
2519
  type: "promotion",
2424
2520
  id: COMPONENT_EDIT_UPGRADE_NOTIFICATION_ID,
2425
- message: __11("Editing components requires an active Pro subscription.", "elementor"),
2521
+ message: __13("Editing components requires an active Pro subscription.", "elementor"),
2426
2522
  additionalActionProps: [
2427
2523
  {
2428
2524
  size: "small",
2429
2525
  variant: "contained",
2430
2526
  color: "promotion",
2431
- href: EDIT_COMPONENT_UPGRADE_URL,
2527
+ href: EDIT_COMPONENT_DB_CLICK_UPGRADE_URL,
2528
+ target: "_blank",
2529
+ children: __13("Upgrade Now", "elementor")
2530
+ }
2531
+ ]
2532
+ });
2533
+ }
2534
+ function notifyComponentEditUpdate() {
2535
+ notify2({
2536
+ type: "info",
2537
+ id: COMPONENT_EDIT_UPDATE_NOTIFICATION_ID,
2538
+ message: __13("To edit components, update Elementor Pro to the latest version.", "elementor"),
2539
+ additionalActionProps: [
2540
+ {
2541
+ size: "small",
2542
+ variant: "contained",
2543
+ color: "info",
2544
+ href: UPDATE_PLUGINS_URL3,
2432
2545
  target: "_blank",
2433
- children: __11("Upgrade Now", "elementor")
2546
+ children: __13("Update Now", "elementor")
2434
2547
  }
2435
2548
  ]
2436
2549
  });
@@ -2543,21 +2656,23 @@ function createComponentView(options) {
2543
2656
  }
2544
2657
  _getContextMenuConfig() {
2545
2658
  const isAdministrator = isUserAdministrator();
2546
- const hasPro = hasProInstalled4();
2659
+ const hasPro = hasProInstalled2();
2660
+ const isOutdated = isProOutdatedForComponents();
2661
+ const showPromoBadge = !hasPro && !isOutdated;
2547
2662
  const badgeClass = "elementor-context-menu-list__item__shortcut__promotion-badge";
2548
- const proBadge = `<a href="${EDIT_COMPONENT_UPGRADE_URL}" target="_blank" onclick="event.stopPropagation()" class="${badgeClass}"><i class="eicon-upgrade-crown"></i></a>`;
2663
+ const proBadge = `<a href="${EDIT_COMPONENT_CONTEXT_MENU_UPGRADE_URL}" target="_blank" onclick="event.stopPropagation()" class="${badgeClass}"><i class="eicon-upgrade-crown"></i></a>`;
2549
2664
  const editComponentAction = {
2550
2665
  name: "edit component",
2551
2666
  icon: "eicon-edit",
2552
- title: () => __11("Edit Component", "elementor"),
2553
- ...!hasPro && { shortcut: proBadge, hasShortcutAction: true },
2554
- isEnabled: () => hasPro,
2667
+ title: () => __13("Edit Component", "elementor"),
2668
+ ...showPromoBadge && { shortcut: proBadge, hasShortcutAction: true },
2669
+ isEnabled: () => isProComponentsSupported() || isOutdated,
2555
2670
  callback: (_, eventData) => this.editComponent(eventData)
2556
2671
  };
2557
2672
  const detachInstanceAction = {
2558
2673
  name: "detach instance",
2559
2674
  icon: "eicon-chain-broken",
2560
- title: () => __11("Detach from Component", "elementor"),
2675
+ title: () => __13("Detach from Component", "elementor"),
2561
2676
  isEnabled: () => true,
2562
2677
  callback: (_, eventData) => this.detachInstance(eventData)
2563
2678
  };
@@ -2584,8 +2699,11 @@ function createComponentView(options) {
2584
2699
  }
2585
2700
  }
2586
2701
  editComponent({ trigger, location, secondaryLocation }) {
2587
- const hasPro = hasProInstalled4();
2588
- if (!hasPro || this.isComponentCurrentlyEdited()) {
2702
+ if (isProOutdatedForComponents()) {
2703
+ notifyComponentEditUpdate();
2704
+ return;
2705
+ }
2706
+ if (!isProComponentsSupported() || this.isComponentCurrentlyEdited()) {
2589
2707
  return;
2590
2708
  }
2591
2709
  this.switchDocument();
@@ -2616,7 +2734,7 @@ function createComponentView(options) {
2616
2734
  } catch {
2617
2735
  notify2({
2618
2736
  type: "error",
2619
- message: __11("Failed to detach component instance.", "elementor"),
2737
+ message: __13("Failed to detach component instance.", "elementor"),
2620
2738
  id: "detach-component-instance-failed"
2621
2739
  });
2622
2740
  }
@@ -2628,7 +2746,11 @@ function createComponentView(options) {
2628
2746
  if (!isUserAdministrator()) {
2629
2747
  return;
2630
2748
  }
2631
- if (!hasProInstalled4()) {
2749
+ if (isProOutdatedForComponents()) {
2750
+ notifyComponentEditUpdate();
2751
+ return;
2752
+ }
2753
+ if (!hasProInstalled2()) {
2632
2754
  notifyComponentEditUpgrade();
2633
2755
  return;
2634
2756
  }
@@ -2729,11 +2851,11 @@ import { getAllDescendants } from "@elementor/editor-elements";
2729
2851
  import { notify as notify3 } from "@elementor/editor-notifications";
2730
2852
  import { blockCommand } from "@elementor/editor-v1-adapters";
2731
2853
  import { __getState as getState9 } from "@elementor/store";
2732
- import { __ as __12 } from "@wordpress/i18n";
2854
+ import { __ as __14 } from "@wordpress/i18n";
2733
2855
  var COMPONENT_TYPE = "e-component";
2734
2856
  var COMPONENT_CIRCULAR_NESTING_ALERT = {
2735
2857
  type: "default",
2736
- message: __12("Can't add this component - components that contain each other can't be nested.", "elementor"),
2858
+ message: __14("Can't add this component - components that contain each other can't be nested.", "elementor"),
2737
2859
  id: "circular-component-nesting-blocked"
2738
2860
  };
2739
2861
  function initCircularNestingPrevention() {
@@ -2884,9 +3006,9 @@ var componentsStylesProvider = createStylesProvider({
2884
3006
  import { invalidateDocumentData as invalidateDocumentData2, isDocumentDirty as isDocumentDirty2 } from "@elementor/editor-documents";
2885
3007
  import { notify as notify4 } from "@elementor/editor-notifications";
2886
3008
  import { AxiosError } from "@elementor/http-client";
2887
- import { __ as __13 } from "@wordpress/i18n";
3009
+ import { __ as __15 } from "@wordpress/i18n";
2888
3010
  var INSUFFICIENT_PERMISSIONS_ERROR_CODE = "insufficient_permissions";
2889
- var PUBLISH_UPGRADE_URL = "https://go.elementor.com/go-pro-components-edit/";
3011
+ var PUBLISH_UPGRADE_URL = "https://go.elementor.com/go-pro-components-Instance-draft-failure/";
2890
3012
  var PUBLISH_UPGRADE_NOTIFICATION_ID = "component-publish-upgrade";
2891
3013
  async function publishDraftComponentsInPageBeforeSave({ status, elements }) {
2892
3014
  if (status !== "publish") {
@@ -2915,7 +3037,7 @@ function notifyPublishUpgrade() {
2915
3037
  notify4({
2916
3038
  type: "promotion",
2917
3039
  id: PUBLISH_UPGRADE_NOTIFICATION_ID,
2918
- message: __13(
3040
+ message: __15(
2919
3041
  "You have unpublished component on this page. You need a pro version to publish it.",
2920
3042
  "elementor"
2921
3043
  ),
@@ -2926,7 +3048,7 @@ function notifyPublishUpgrade() {
2926
3048
  color: "promotion",
2927
3049
  href: PUBLISH_UPGRADE_URL,
2928
3050
  target: "_blank",
2929
- children: __13("Upgrade Now", "elementor")
3051
+ children: __15("Upgrade Now", "elementor")
2930
3052
  }
2931
3053
  ]
2932
3054
  });
@@ -2968,7 +3090,7 @@ function init() {
2968
3090
  window.elementorCommon.__beforeSave = beforeSave;
2969
3091
  injectTab({
2970
3092
  id: "components",
2971
- label: __14("Components", "elementor"),
3093
+ label: __16("Components", "elementor"),
2972
3094
  component: Components,
2973
3095
  position: 1
2974
3096
  });