@elementor/editor-components 4.0.0-683 → 4.0.0

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
@@ -94,7 +94,7 @@ var import_editor_elements_panel = require("@elementor/editor-elements-panel");
94
94
  var import_editor_styles_repository2 = require("@elementor/editor-styles-repository");
95
95
  var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
96
96
  var import_store36 = require("@elementor/store");
97
- var import_i18n14 = require("@wordpress/i18n");
97
+ var import_i18n16 = require("@wordpress/i18n");
98
98
 
99
99
  // src/component-instance-transformer.ts
100
100
  var import_editor_canvas = require("@elementor/editor-canvas");
@@ -490,11 +490,10 @@ var componentOverrideTransformer = (0, import_editor_canvas3.createTransformer)(
490
490
  });
491
491
 
492
492
  // src/components/components-tab/components.tsx
493
- var React8 = __toESM(require("react"));
493
+ var React10 = __toESM(require("react"));
494
494
  var import_react3 = require("react");
495
495
  var import_editor_ui2 = require("@elementor/editor-ui");
496
- var import_ui6 = require("@elementor/ui");
497
- var import_utils3 = require("@elementor/utils");
496
+ var import_ui7 = require("@elementor/ui");
498
497
 
499
498
  // src/hooks/use-components.ts
500
499
  var import_store6 = require("@elementor/store");
@@ -504,6 +503,16 @@ var useComponents = () => {
504
503
  return { components, isLoading };
505
504
  };
506
505
 
506
+ // src/utils/is-pro-components-supported.ts
507
+ var import_utils = require("@elementor/utils");
508
+ var MIN_PRO_VERSION_FOR_COMPONENTS = "4.0";
509
+ function isProComponentsSupported() {
510
+ return (0, import_utils.hasProInstalled)() && (0, import_utils.isProAtLeast)(MIN_PRO_VERSION_FOR_COMPONENTS);
511
+ }
512
+ function isProOutdatedForComponents() {
513
+ return (0, import_utils.hasProInstalled)() && !(0, import_utils.isProAtLeast)(MIN_PRO_VERSION_FOR_COMPONENTS);
514
+ }
515
+
507
516
  // src/components/components-tab/component-search.tsx
508
517
  var React2 = __toESM(require("react"));
509
518
  var import_icons = require("@elementor/icons");
@@ -513,13 +522,13 @@ var import_i18n = require("@wordpress/i18n");
513
522
  // src/components/components-tab/search-provider.tsx
514
523
  var React = __toESM(require("react"));
515
524
  var import_react = require("react");
516
- var import_utils = require("@elementor/utils");
525
+ var import_utils2 = require("@elementor/utils");
517
526
  var SearchContext = (0, import_react.createContext)(void 0);
518
527
  var SearchProvider = ({
519
528
  children,
520
529
  localStorageKey
521
530
  }) => {
522
- const { debouncedValue, handleChange, inputValue } = (0, import_utils.useSearchState)({ localStorageKey });
531
+ const { debouncedValue, handleChange, inputValue } = (0, import_utils2.useSearchState)({ localStorageKey });
523
532
  const clearSearch = () => {
524
533
  handleChange("");
525
534
  };
@@ -556,7 +565,6 @@ var ComponentSearch = () => {
556
565
  var React5 = __toESM(require("react"));
557
566
  var import_icons3 = require("@elementor/icons");
558
567
  var import_ui4 = require("@elementor/ui");
559
- var import_utils2 = require("@elementor/utils");
560
568
  var import_i18n2 = require("@wordpress/i18n");
561
569
 
562
570
  // src/hooks/use-components-permissions.ts
@@ -701,6 +709,7 @@ var LoadingComponents = () => {
701
709
  // src/components/components-tab/components-list.tsx
702
710
  var LEARN_MORE_URL = "http://go.elementor.com/components-guide-article";
703
711
  var UPGRADE_URL = "https://go.elementor.com/go-pro-components/";
712
+ var UPDATE_PLUGINS_URL = "/wp-admin/plugins.php";
704
713
  var SUBTITLE_OVERRIDE_SX = {
705
714
  fontSize: "0.875rem !important",
706
715
  fontWeight: "500 !important"
@@ -715,7 +724,10 @@ function ComponentsList() {
715
724
  if (searchValue.length) {
716
725
  return /* @__PURE__ */ React5.createElement(EmptySearchResult, null);
717
726
  }
718
- return (0, import_utils2.hasProInstalled)() ? /* @__PURE__ */ React5.createElement(EmptyState, null) : /* @__PURE__ */ React5.createElement(ProUpgradeEmptyState, null);
727
+ if (isProOutdatedForComponents()) {
728
+ return /* @__PURE__ */ React5.createElement(ProOutdatedEmptyState, null);
729
+ }
730
+ return isProComponentsSupported() ? /* @__PURE__ */ React5.createElement(EmptyState, null) : /* @__PURE__ */ React5.createElement(ProUpgradeEmptyState, null);
719
731
  }
720
732
  return /* @__PURE__ */ React5.createElement(import_ui4.List, { sx: { display: "flex", flexDirection: "column", gap: 1, px: 2 } }, components.map((component) => /* @__PURE__ */ React5.createElement(ComponentItem, { key: component.uid, component })));
721
733
  }
@@ -746,6 +758,32 @@ var ProUpgradeEmptyState = () => {
746
758
  )
747
759
  );
748
760
  };
761
+ var ProOutdatedEmptyState = () => {
762
+ return /* @__PURE__ */ React5.createElement(
763
+ import_ui4.Stack,
764
+ {
765
+ alignItems: "center",
766
+ justifyContent: "start",
767
+ height: "100%",
768
+ sx: { px: 2, py: 4, maxWidth: 268, m: "auto" },
769
+ gap: 2,
770
+ overflow: "hidden"
771
+ },
772
+ /* @__PURE__ */ React5.createElement(import_ui4.Stack, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React5.createElement(import_icons3.ComponentsIcon, { fontSize: "large", sx: { color: "text.secondary" } }), /* @__PURE__ */ React5.createElement(import_ui4.Typography, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, (0, import_i18n2.__)("Create Reusable Components", "elementor")), /* @__PURE__ */ React5.createElement(import_ui4.Typography, { align: "center", variant: "caption", color: "secondary" }, (0, import_i18n2.__)("Create design elements that sync across your entire site.", "elementor")), /* @__PURE__ */ React5.createElement(import_ui4.Typography, { align: "center", variant: "caption", color: "secondary", sx: { mt: 1 } }, (0, import_i18n2.__)("To create components, update Elementor Pro to the latest version.", "elementor"))),
773
+ /* @__PURE__ */ React5.createElement(
774
+ import_ui4.Button,
775
+ {
776
+ variant: "text",
777
+ color: "info",
778
+ size: "small",
779
+ href: UPDATE_PLUGINS_URL,
780
+ target: "_blank",
781
+ rel: "noopener noreferrer"
782
+ },
783
+ (0, import_i18n2.__)("Update Elementor Pro", "elementor")
784
+ )
785
+ );
786
+ };
749
787
  var EmptyState = () => {
750
788
  const { canCreate } = useComponentsPermissions();
751
789
  return /* @__PURE__ */ React5.createElement(
@@ -888,7 +926,7 @@ function ComponentsUpgradeAlert({ title, description, upgradeUrl }) {
888
926
  }
889
927
 
890
928
  // src/components/components-tab/components-pro-notification.tsx
891
- var UPGRADE_URL2 = "https://go.elementor.com/go-pro-components-create/";
929
+ var UPGRADE_URL2 = "https://go.elementor.com/go-pro-components-exist-footer/";
892
930
  function ComponentsProNotification() {
893
931
  return /* @__PURE__ */ React7.createElement(
894
932
  ComponentsUpgradeAlert,
@@ -900,6 +938,54 @@ function ComponentsProNotification() {
900
938
  );
901
939
  }
902
940
 
941
+ // src/components/components-tab/components-update-notification.tsx
942
+ var React9 = __toESM(require("react"));
943
+ var import_i18n6 = require("@wordpress/i18n");
944
+
945
+ // src/components/components-update-alert.tsx
946
+ var React8 = __toESM(require("react"));
947
+ var import_icons5 = require("@elementor/icons");
948
+ var import_ui6 = require("@elementor/ui");
949
+ var import_i18n5 = require("@wordpress/i18n");
950
+ var UPDATE_PLUGINS_URL2 = "/wp-admin/plugins.php";
951
+ function ComponentsUpdateAlert({ title, description }) {
952
+ return /* @__PURE__ */ React8.createElement(import_ui6.Box, { sx: { mt: "auto", position: "sticky", bottom: 0 } }, /* @__PURE__ */ React8.createElement(
953
+ import_ui6.Alert,
954
+ {
955
+ variant: "standard",
956
+ color: "info",
957
+ icon: /* @__PURE__ */ React8.createElement(import_icons5.InfoCircleFilledIcon, { fontSize: "tiny" }),
958
+ role: "status",
959
+ size: "small",
960
+ action: /* @__PURE__ */ React8.createElement(
961
+ import_ui6.AlertAction,
962
+ {
963
+ variant: "contained",
964
+ color: "info",
965
+ href: UPDATE_PLUGINS_URL2,
966
+ target: "_blank",
967
+ rel: "noopener noreferrer"
968
+ },
969
+ (0, import_i18n5.__)("Upgrade Now", "elementor")
970
+ ),
971
+ sx: { m: 2, mt: 1 }
972
+ },
973
+ /* @__PURE__ */ React8.createElement(import_ui6.AlertTitle, null, title),
974
+ /* @__PURE__ */ React8.createElement(import_ui6.Typography, { variant: "caption" }, description)
975
+ ));
976
+ }
977
+
978
+ // src/components/components-tab/components-update-notification.tsx
979
+ function ComponentsUpdateNotification() {
980
+ return /* @__PURE__ */ React9.createElement(
981
+ ComponentsUpdateAlert,
982
+ {
983
+ title: (0, import_i18n6.__)("Create new Components", "elementor"),
984
+ description: (0, import_i18n6.__)("To create new components, update Elementor Pro to the latest version.", "elementor")
985
+ }
986
+ );
987
+ }
988
+
903
989
  // src/components/components-tab/components.tsx
904
990
  var FULL_HEIGHT_STYLE_ID = "components-full-height-panel";
905
991
  var FULL_HEIGHT_CSS = `
@@ -940,34 +1026,34 @@ var useFullHeightPanel = () => {
940
1026
  var ComponentsContent = () => {
941
1027
  const { components, isLoading } = useComponents();
942
1028
  const hasComponents = !isLoading && components.length > 0;
943
- const hasPro = (0, import_utils3.hasProInstalled)();
944
- const showProNotification = !hasPro && hasComponents;
1029
+ const showProNotification = !isProComponentsSupported() && hasComponents;
1030
+ const isOutdated = isProOutdatedForComponents();
945
1031
  useFullHeightPanel();
946
- return /* @__PURE__ */ React8.createElement(import_ui6.Stack, { 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));
1032
+ return /* @__PURE__ */ React10.createElement(import_ui7.Stack, { 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)));
947
1033
  };
948
1034
  var Components = () => {
949
- return /* @__PURE__ */ React8.createElement(import_editor_ui2.ThemeProvider, null, /* @__PURE__ */ React8.createElement(SearchProvider, { localStorageKey: "elementor-components-search" }, /* @__PURE__ */ React8.createElement(ComponentsContent, null)));
1035
+ return /* @__PURE__ */ React10.createElement(import_editor_ui2.ThemeProvider, null, /* @__PURE__ */ React10.createElement(SearchProvider, { localStorageKey: "elementor-components-search" }, /* @__PURE__ */ React10.createElement(ComponentsContent, null)));
950
1036
  };
951
1037
 
952
1038
  // src/components/detach-instance-confirmation-dialog.tsx
953
- var React9 = __toESM(require("react"));
1039
+ var React11 = __toESM(require("react"));
954
1040
  var import_editor_ui3 = require("@elementor/editor-ui");
955
- var import_icons5 = require("@elementor/icons");
956
- var import_i18n5 = require("@wordpress/i18n");
1041
+ var import_icons6 = require("@elementor/icons");
1042
+ var import_i18n7 = require("@wordpress/i18n");
957
1043
  function DetachInstanceConfirmationDialog({
958
1044
  open,
959
1045
  onClose,
960
1046
  onConfirm
961
1047
  }) {
962
- return /* @__PURE__ */ React9.createElement(import_editor_ui3.ConfirmationDialog, { open, onClose }, /* @__PURE__ */ React9.createElement(import_editor_ui3.ConfirmationDialog.Title, { icon: import_icons5.AlertTriangleFilledIcon, iconColor: "secondary" }, (0, import_i18n5.__)("Detach from Component?", "elementor")), /* @__PURE__ */ React9.createElement(import_editor_ui3.ConfirmationDialog.Content, null, /* @__PURE__ */ React9.createElement(import_editor_ui3.ConfirmationDialog.ContentText, null, (0, import_i18n5.__)(
1048
+ return /* @__PURE__ */ React11.createElement(import_editor_ui3.ConfirmationDialog, { open, onClose }, /* @__PURE__ */ React11.createElement(import_editor_ui3.ConfirmationDialog.Title, { icon: import_icons6.AlertTriangleFilledIcon, iconColor: "secondary" }, (0, import_i18n7.__)("Detach from Component?", "elementor")), /* @__PURE__ */ React11.createElement(import_editor_ui3.ConfirmationDialog.Content, null, /* @__PURE__ */ React11.createElement(import_editor_ui3.ConfirmationDialog.ContentText, null, (0, import_i18n7.__)(
963
1049
  "Detaching this instance will break its link to the Component. Changes to the Component will no longer apply. Continue?",
964
1050
  "elementor"
965
- ))), /* @__PURE__ */ React9.createElement(
1051
+ ))), /* @__PURE__ */ React11.createElement(
966
1052
  import_editor_ui3.ConfirmationDialog.Actions,
967
1053
  {
968
1054
  onClose,
969
1055
  onConfirm,
970
- confirmLabel: (0, import_i18n5.__)("Detach", "elementor"),
1056
+ confirmLabel: (0, import_i18n7.__)("Detach", "elementor"),
971
1057
  color: "primary"
972
1058
  }
973
1059
  ));
@@ -978,59 +1064,58 @@ function openDetachConfirmDialog(onConfirm) {
978
1064
  onConfirm();
979
1065
  };
980
1066
  (0, import_editor_ui3.openDialog)({
981
- component: /* @__PURE__ */ React9.createElement(DetachInstanceConfirmationDialog, { open: true, onClose: import_editor_ui3.closeDialog, onConfirm: handleConfirm })
1067
+ component: /* @__PURE__ */ React11.createElement(DetachInstanceConfirmationDialog, { open: true, onClose: import_editor_ui3.closeDialog, onConfirm: handleConfirm })
982
1068
  });
983
1069
  }
984
1070
 
985
1071
  // src/components/in-edit-mode.tsx
986
- var React10 = __toESM(require("react"));
1072
+ var React12 = __toESM(require("react"));
987
1073
  var import_editor_ui4 = require("@elementor/editor-ui");
988
- var import_icons6 = require("@elementor/icons");
989
- var import_ui7 = require("@elementor/ui");
990
- var import_i18n6 = require("@wordpress/i18n");
1074
+ var import_icons7 = require("@elementor/icons");
1075
+ var import_ui8 = require("@elementor/ui");
1076
+ var import_i18n8 = require("@wordpress/i18n");
991
1077
  var openEditModeDialog = (lockedBy) => {
992
1078
  (0, import_editor_ui4.openDialog)({
993
- component: /* @__PURE__ */ React10.createElement(EditModeDialog, { lockedBy })
1079
+ component: /* @__PURE__ */ React12.createElement(EditModeDialog, { lockedBy })
994
1080
  });
995
1081
  };
996
1082
  var EditModeDialog = ({ lockedBy }) => {
997
- const content = (0, import_i18n6.__)("%s is currently editing this document", "elementor").replace("%s", lockedBy);
998
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(import_ui7.DialogHeader, { logo: false }, /* @__PURE__ */ React10.createElement(import_ui7.Box, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React10.createElement(import_ui7.Icon, { color: "secondary" }, /* @__PURE__ */ React10.createElement(import_icons6.InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React10.createElement(import_ui7.Typography, { variant: "subtitle1" }, content))), /* @__PURE__ */ React10.createElement(import_ui7.DialogContent, null, /* @__PURE__ */ React10.createElement(import_ui7.Stack, { spacing: 2, direction: "column" }, /* @__PURE__ */ React10.createElement(import_ui7.Typography, { variant: "body2" }, (0, import_i18n6.__)(
1083
+ const content = (0, import_i18n8.__)("%s is currently editing this document", "elementor").replace("%s", lockedBy);
1084
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(import_ui8.DialogHeader, { logo: false }, /* @__PURE__ */ React12.createElement(import_ui8.Box, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React12.createElement(import_ui8.Icon, { color: "secondary" }, /* @__PURE__ */ React12.createElement(import_icons7.InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React12.createElement(import_ui8.Typography, { variant: "subtitle1" }, content))), /* @__PURE__ */ React12.createElement(import_ui8.DialogContent, null, /* @__PURE__ */ React12.createElement(import_ui8.Stack, { spacing: 2, direction: "column" }, /* @__PURE__ */ React12.createElement(import_ui8.Typography, { variant: "body2" }, (0, import_i18n8.__)(
999
1085
  "You can wait for them to finish or reach out to coordinate your changes together.",
1000
1086
  "elementor"
1001
- )), /* @__PURE__ */ React10.createElement(import_ui7.DialogActions, null, /* @__PURE__ */ React10.createElement(import_ui7.Button, { color: "secondary", variant: "contained", onClick: import_editor_ui4.closeDialog }, (0, import_i18n6.__)("Close", "elementor"))))));
1087
+ )), /* @__PURE__ */ React12.createElement(import_ui8.DialogActions, null, /* @__PURE__ */ React12.createElement(import_ui8.Button, { color: "secondary", variant: "contained", onClick: import_editor_ui4.closeDialog }, (0, import_i18n8.__)("Close", "elementor"))))));
1002
1088
  };
1003
1089
 
1004
1090
  // src/components/instance-editing-panel/instance-editing-panel.tsx
1005
- var React20 = __toESM(require("react"));
1006
- var import_icons10 = require("@elementor/icons");
1007
- var import_ui14 = require("@elementor/ui");
1008
- var import_utils5 = require("@elementor/utils");
1009
- var import_i18n10 = require("@wordpress/i18n");
1091
+ var React22 = __toESM(require("react"));
1092
+ var import_icons11 = require("@elementor/icons");
1093
+ var import_ui15 = require("@elementor/ui");
1094
+ var import_i18n12 = require("@wordpress/i18n");
1010
1095
 
1011
1096
  // src/provider/component-instance-context.tsx
1012
- var React11 = __toESM(require("react"));
1097
+ var React13 = __toESM(require("react"));
1013
1098
  var import_react4 = require("react");
1014
1099
  var ComponentInstanceContext = (0, import_react4.createContext)(null);
1015
1100
  function ComponentInstanceProvider({ children, ...props }) {
1016
- return /* @__PURE__ */ React11.createElement(ComponentInstanceContext.Provider, { value: props }, children);
1101
+ return /* @__PURE__ */ React13.createElement(ComponentInstanceContext.Provider, { value: props }, children);
1017
1102
  }
1018
1103
  var useComponentId = () => (0, import_react4.useContext)(ComponentInstanceContext)?.componentId;
1019
1104
  var useComponentInstanceOverrides = () => (0, import_react4.useContext)(ComponentInstanceContext)?.overrides;
1020
1105
  var useComponentOverridableProps = () => (0, import_react4.useContext)(ComponentInstanceContext)?.overridableProps;
1021
1106
 
1022
1107
  // src/components/instance-editing-panel/detach-action.tsx
1023
- var React13 = __toESM(require("react"));
1108
+ var React15 = __toESM(require("react"));
1024
1109
  var import_react5 = require("react");
1025
1110
  var import_editor_notifications = require("@elementor/editor-notifications");
1026
- var import_icons8 = require("@elementor/icons");
1027
- var import_i18n8 = require("@wordpress/i18n");
1111
+ var import_icons9 = require("@elementor/icons");
1112
+ var import_i18n10 = require("@wordpress/i18n");
1028
1113
 
1029
1114
  // src/utils/detach-component-instance/detach-component-instance.ts
1030
1115
  var import_editor_elements3 = require("@elementor/editor-elements");
1031
1116
  var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
1032
1117
  var import_store10 = require("@elementor/store");
1033
- var import_i18n7 = require("@wordpress/i18n");
1118
+ var import_i18n9 = require("@wordpress/i18n");
1034
1119
 
1035
1120
  // src/prop-types/component-instance-overrides-prop-type.ts
1036
1121
  var import_editor_props3 = require("@elementor/editor-props");
@@ -1379,8 +1464,8 @@ async function detachComponentInstance({
1379
1464
  }
1380
1465
  },
1381
1466
  {
1382
- title: (0, import_i18n7.__)("Detach from Component", "elementor"),
1383
- subtitle: (0, import_i18n7.__)("Instance detached", "elementor")
1467
+ title: (0, import_i18n9.__)("Detach from Component", "elementor"),
1468
+ subtitle: (0, import_i18n9.__)("Instance detached", "elementor")
1384
1469
  }
1385
1470
  );
1386
1471
  return undoableDetach();
@@ -1395,16 +1480,16 @@ function extractInstanceOverrides(instanceContainer) {
1395
1480
  }
1396
1481
 
1397
1482
  // src/components/instance-editing-panel/instance-panel-header.tsx
1398
- var React12 = __toESM(require("react"));
1483
+ var React14 = __toESM(require("react"));
1399
1484
  var import_editor_panels = require("@elementor/editor-panels");
1400
1485
  var import_editor_ui5 = require("@elementor/editor-ui");
1401
- var import_icons7 = require("@elementor/icons");
1402
- var import_ui8 = require("@elementor/ui");
1486
+ var import_icons8 = require("@elementor/icons");
1487
+ var import_ui9 = require("@elementor/ui");
1403
1488
  function InstancePanelHeader({ componentName, actions }) {
1404
- return /* @__PURE__ */ React12.createElement(import_editor_panels.PanelHeader, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React12.createElement(import_ui8.Stack, { direction: "row", alignItems: "center", flexGrow: 1, gap: 1, maxWidth: "100%" }, /* @__PURE__ */ React12.createElement(import_icons7.ComponentsIcon, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React12.createElement(import_editor_ui5.EllipsisWithTooltip, { title: componentName, as: import_editor_panels.PanelHeaderTitle, sx: { flexGrow: 1 } }), actions));
1489
+ return /* @__PURE__ */ React14.createElement(import_editor_panels.PanelHeader, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React14.createElement(import_ui9.Stack, { direction: "row", alignItems: "center", flexGrow: 1, gap: 1, maxWidth: "100%" }, /* @__PURE__ */ React14.createElement(import_icons8.ComponentsIcon, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React14.createElement(import_editor_ui5.EllipsisWithTooltip, { title: componentName, as: import_editor_panels.PanelHeaderTitle, sx: { flexGrow: 1 } }), actions));
1405
1490
  }
1406
1491
  function EditComponentAction({ label, onClick, disabled = false, icon: Icon2 }) {
1407
- return /* @__PURE__ */ React12.createElement(import_ui8.Tooltip, { title: label }, /* @__PURE__ */ React12.createElement(import_ui8.IconButton, { size: "tiny", onClick, "aria-label": label, disabled }, /* @__PURE__ */ React12.createElement(Icon2, { fontSize: "tiny" })));
1492
+ return /* @__PURE__ */ React14.createElement(import_ui9.Tooltip, { title: label }, /* @__PURE__ */ React14.createElement(import_ui9.IconButton, { size: "tiny", onClick, "aria-label": label, disabled }, /* @__PURE__ */ React14.createElement(Icon2, { fontSize: "tiny" })));
1408
1493
  }
1409
1494
 
1410
1495
  // src/components/instance-editing-panel/detach-action.tsx
@@ -1424,7 +1509,7 @@ var DetachAction = ({
1424
1509
  } catch {
1425
1510
  (0, import_editor_notifications.notify)({
1426
1511
  type: "error",
1427
- message: (0, import_i18n8.__)("Failed to detach component instance.", "elementor"),
1512
+ message: (0, import_i18n10.__)("Failed to detach component instance.", "elementor"),
1428
1513
  id: "detach-component-instance-failed"
1429
1514
  });
1430
1515
  }
@@ -1435,8 +1520,8 @@ var DetachAction = ({
1435
1520
  const handleDetachClick = () => {
1436
1521
  setIsDetachDialogOpen(true);
1437
1522
  };
1438
- const detachLabel = (0, import_i18n8.__)("Detach from Component", "elementor");
1439
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(EditComponentAction, { label: detachLabel, icon: import_icons8.DetachIcon, onClick: handleDetachClick }), /* @__PURE__ */ React13.createElement(
1523
+ const detachLabel = (0, import_i18n10.__)("Detach from Component", "elementor");
1524
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(EditComponentAction, { label: detachLabel, icon: import_icons9.DetachIcon, onClick: handleDetachClick }), /* @__PURE__ */ React15.createElement(
1440
1525
  DetachInstanceConfirmationDialog,
1441
1526
  {
1442
1527
  open: isDetachDialogOpen,
@@ -1461,21 +1546,21 @@ function getDetachTrackingInfo() {
1461
1546
  }
1462
1547
 
1463
1548
  // src/components/instance-editing-panel/empty-state.tsx
1464
- var React14 = __toESM(require("react"));
1465
- var import_icons9 = require("@elementor/icons");
1466
- var import_ui9 = require("@elementor/ui");
1467
- var import_i18n9 = require("@wordpress/i18n");
1549
+ var React16 = __toESM(require("react"));
1550
+ var import_icons10 = require("@elementor/icons");
1551
+ var import_ui10 = require("@elementor/ui");
1552
+ var import_i18n11 = require("@wordpress/i18n");
1468
1553
  var EmptyState2 = ({ onEditComponent }) => {
1469
1554
  const { canEdit } = useComponentsPermissions();
1470
- const message = canEdit ? (0, import_i18n9.__)(
1555
+ const message = canEdit ? (0, import_i18n11.__)(
1471
1556
  "Edit the component to add properties, manage them or update the design across all instances.",
1472
1557
  "elementor"
1473
- ) : (0, import_i18n9.__)(
1558
+ ) : (0, import_i18n11.__)(
1474
1559
  "With your current role, you cannot edit this component. Contact an administrator to add properties.",
1475
1560
  "elementor"
1476
1561
  );
1477
- return /* @__PURE__ */ React14.createElement(
1478
- import_ui9.Stack,
1562
+ return /* @__PURE__ */ React16.createElement(
1563
+ import_ui10.Stack,
1479
1564
  {
1480
1565
  alignItems: "center",
1481
1566
  justifyContent: "start",
@@ -1484,11 +1569,11 @@ var EmptyState2 = ({ onEditComponent }) => {
1484
1569
  sx: { p: 2.5, pt: 8, pb: 5.5, mt: 1 },
1485
1570
  gap: 1.5
1486
1571
  },
1487
- /* @__PURE__ */ React14.createElement(import_icons9.ComponentPropListIcon, { fontSize: "large" }),
1488
- /* @__PURE__ */ React14.createElement(import_ui9.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n9.__)("No properties yet", "elementor")),
1489
- /* @__PURE__ */ React14.createElement(import_ui9.Typography, { align: "center", variant: "caption", maxWidth: "170px" }, message),
1490
- canEdit && /* @__PURE__ */ React14.createElement(
1491
- import_ui9.Button,
1572
+ /* @__PURE__ */ React16.createElement(import_icons10.ComponentPropListIcon, { fontSize: "large" }),
1573
+ /* @__PURE__ */ React16.createElement(import_ui10.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n11.__)("No properties yet", "elementor")),
1574
+ /* @__PURE__ */ React16.createElement(import_ui10.Typography, { align: "center", variant: "caption", maxWidth: "170px" }, message),
1575
+ canEdit && /* @__PURE__ */ React16.createElement(
1576
+ import_ui10.Button,
1492
1577
  {
1493
1578
  variant: "outlined",
1494
1579
  color: "secondary",
@@ -1497,32 +1582,32 @@ var EmptyState2 = ({ onEditComponent }) => {
1497
1582
  disabled: !onEditComponent,
1498
1583
  onClick: onEditComponent
1499
1584
  },
1500
- /* @__PURE__ */ React14.createElement(import_icons9.PencilIcon, { fontSize: "small" }),
1501
- (0, import_i18n9.__)("Edit component", "elementor")
1585
+ /* @__PURE__ */ React16.createElement(import_icons10.PencilIcon, { fontSize: "small" }),
1586
+ (0, import_i18n11.__)("Edit component", "elementor")
1502
1587
  )
1503
1588
  );
1504
1589
  };
1505
1590
 
1506
1591
  // src/components/instance-editing-panel/instance-panel-body.tsx
1507
- var React19 = __toESM(require("react"));
1592
+ var React21 = __toESM(require("react"));
1508
1593
  var import_editor_controls3 = require("@elementor/editor-controls");
1509
1594
  var import_editor_editing_panel3 = require("@elementor/editor-editing-panel");
1510
1595
  var import_editor_panels2 = require("@elementor/editor-panels");
1511
- var import_ui13 = require("@elementor/ui");
1596
+ var import_ui14 = require("@elementor/ui");
1512
1597
 
1513
1598
  // src/components/instance-editing-panel/override-props-group.tsx
1514
- var React18 = __toESM(require("react"));
1599
+ var React20 = __toESM(require("react"));
1515
1600
  var import_react7 = require("react");
1516
1601
  var import_editor_editing_panel2 = require("@elementor/editor-editing-panel");
1517
1602
  var import_editor_ui6 = require("@elementor/editor-ui");
1518
- var import_ui12 = require("@elementor/ui");
1603
+ var import_ui13 = require("@elementor/ui");
1519
1604
 
1520
1605
  // src/components/instance-editing-panel/override-prop-control.tsx
1521
- var React17 = __toESM(require("react"));
1606
+ var React19 = __toESM(require("react"));
1522
1607
  var import_editor_controls2 = require("@elementor/editor-controls");
1523
1608
  var import_editor_editing_panel = require("@elementor/editor-editing-panel");
1524
1609
  var import_editor_elements7 = require("@elementor/editor-elements");
1525
- var import_ui11 = require("@elementor/ui");
1610
+ var import_ui12 = require("@elementor/ui");
1526
1611
 
1527
1612
  // src/hooks/use-controls-by-widget-type.ts
1528
1613
  var import_editor_elements4 = require("@elementor/editor-elements");
@@ -1556,11 +1641,11 @@ function getControlsByBind(controls) {
1556
1641
  }
1557
1642
 
1558
1643
  // src/provider/overridable-prop-context.tsx
1559
- var React15 = __toESM(require("react"));
1644
+ var React17 = __toESM(require("react"));
1560
1645
  var import_react6 = require("react");
1561
1646
  var OverridablePropContext = (0, import_react6.createContext)(null);
1562
1647
  function OverridablePropProvider({ children, ...props }) {
1563
- return /* @__PURE__ */ React15.createElement(OverridablePropContext.Provider, { value: props }, children);
1648
+ return /* @__PURE__ */ React17.createElement(OverridablePropContext.Provider, { value: props }, children);
1564
1649
  }
1565
1650
  var useOverridablePropValue = () => (0, import_react6.useContext)(OverridablePropContext)?.value;
1566
1651
  var useComponentInstanceElement = () => (0, import_react6.useContext)(OverridablePropContext)?.componentInstanceElement;
@@ -1792,16 +1877,16 @@ function extractInnerOverrideInfo(override) {
1792
1877
  }
1793
1878
 
1794
1879
  // src/components/control-label.tsx
1795
- var React16 = __toESM(require("react"));
1880
+ var React18 = __toESM(require("react"));
1796
1881
  var import_editor_controls = require("@elementor/editor-controls");
1797
- var import_ui10 = require("@elementor/ui");
1882
+ var import_ui11 = require("@elementor/ui");
1798
1883
  var ControlLabel = ({ children, ...props }) => {
1799
- return /* @__PURE__ */ React16.createElement(import_ui10.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React16.createElement(import_editor_controls.ControlFormLabel, { ...props }, children), /* @__PURE__ */ React16.createElement(import_editor_controls.ControlAdornments, null));
1884
+ return /* @__PURE__ */ React18.createElement(import_ui11.Stack, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React18.createElement(import_editor_controls.ControlFormLabel, { ...props }, children), /* @__PURE__ */ React18.createElement(import_editor_controls.ControlAdornments, null));
1800
1885
  };
1801
1886
 
1802
1887
  // src/components/errors.ts
1803
- var import_utils4 = require("@elementor/utils");
1804
- var OverrideControlInnerElementNotFoundError = (0, import_utils4.createError)({
1888
+ var import_utils3 = require("@elementor/utils");
1889
+ var OverrideControlInnerElementNotFoundError = (0, import_utils3.createError)({
1805
1890
  code: "override_control_inner_element_not_found",
1806
1891
  message: `Component inner element not found for override control. The element may have been deleted without updating the overridable props, or the component has not finished rendering yet.`
1807
1892
  });
@@ -1898,6 +1983,19 @@ function hasValue(value) {
1898
1983
  return value !== null && value !== void 0;
1899
1984
  }
1900
1985
 
1986
+ // src/components/instance-editing-panel/utils/correct-exposed-empty-override.ts
1987
+ function correctExposedEmptyOverride(newPropValue, matchingOverride) {
1988
+ const newOverridableValue = componentOverridablePropTypeUtil.extract(newPropValue);
1989
+ const isExposingEmptyOverride = newOverridableValue && matchingOverride === null;
1990
+ if (!isExposingEmptyOverride) {
1991
+ return newPropValue;
1992
+ }
1993
+ return componentOverridablePropTypeUtil.create({
1994
+ override_key: newOverridableValue.override_key,
1995
+ origin_value: null
1996
+ });
1997
+ }
1998
+
1901
1999
  // src/components/instance-editing-panel/override-prop-control.tsx
1902
2000
  function OverridePropControl({ overrideKey }) {
1903
2001
  const overridableProps = useComponentOverridableProps();
@@ -1905,7 +2003,7 @@ function OverridePropControl({ overrideKey }) {
1905
2003
  if (!overridableProp) {
1906
2004
  return null;
1907
2005
  }
1908
- return /* @__PURE__ */ React17.createElement(import_editor_editing_panel.SettingsField, { bind: "component_instance", propDisplayName: overridableProp.label }, /* @__PURE__ */ React17.createElement(OverrideControl, { overridableProp }));
2006
+ return /* @__PURE__ */ React19.createElement(import_editor_editing_panel.SettingsField, { bind: "component_instance", propDisplayName: overridableProp.label }, /* @__PURE__ */ React19.createElement(OverrideControl, { overridableProp }));
1909
2007
  }
1910
2008
  function OverrideControl({ overridableProp }) {
1911
2009
  const componentInstanceElement = (0, import_editor_editing_panel.useElement)();
@@ -1943,11 +2041,12 @@ function OverrideControl({ overridableProp }) {
1943
2041
  });
1944
2042
  return;
1945
2043
  }
1946
- const newPropValue = getTempNewValueForDynamicProp(
2044
+ let newPropValue = getTempNewValueForDynamicProp(
1947
2045
  propType,
1948
2046
  propValue,
1949
2047
  newValue[overridableProp.overrideKey]
1950
2048
  );
2049
+ newPropValue = correctExposedEmptyOverride(newPropValue, matchingOverride);
1951
2050
  const newOverrideValue = createOverrideValue({
1952
2051
  matchingOverride,
1953
2052
  overrideKey: overridableProp.overrideKey,
@@ -1999,13 +2098,13 @@ function OverrideControl({ overridableProp }) {
1999
2098
  [overridableProp.overrideKey]: propType
2000
2099
  }
2001
2100
  });
2002
- return /* @__PURE__ */ React17.createElement(
2101
+ return /* @__PURE__ */ React19.createElement(
2003
2102
  OverridablePropProvider,
2004
2103
  {
2005
2104
  value: componentOverridablePropTypeUtil.extract(matchingOverride) ?? void 0,
2006
2105
  componentInstanceElement
2007
2106
  },
2008
- /* @__PURE__ */ React17.createElement(import_editor_editing_panel.ElementProvider, { element: { id: elementId, type }, elementType, settings }, /* @__PURE__ */ React17.createElement(import_editor_editing_panel.SettingsField, { bind: propKey, propDisplayName: overridableProp.label }, /* @__PURE__ */ React17.createElement(
2107
+ /* @__PURE__ */ React19.createElement(import_editor_editing_panel.ElementProvider, { element: { id: elementId, type }, elementType, settings }, /* @__PURE__ */ React19.createElement(import_editor_editing_panel.SettingsField, { bind: propKey, propDisplayName: overridableProp.label }, /* @__PURE__ */ React19.createElement(
2009
2108
  import_editor_controls2.PropProvider,
2010
2109
  {
2011
2110
  propType: propTypeSchema,
@@ -2015,7 +2114,7 @@ function OverrideControl({ overridableProp }) {
2015
2114
  return false;
2016
2115
  }
2017
2116
  },
2018
- /* @__PURE__ */ React17.createElement(import_editor_controls2.PropKeyProvider, { bind: overridableProp.overrideKey }, /* @__PURE__ */ React17.createElement(import_editor_controls2.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React17.createElement(import_ui11.Stack, { direction: "column", gap: 1, mb: 1.5 }, layout !== "custom" && /* @__PURE__ */ React17.createElement(ControlLabel, null, overridableProp.label), /* @__PURE__ */ React17.createElement(OriginalControl, { control, controlProps }))))
2117
+ /* @__PURE__ */ React19.createElement(import_editor_controls2.PropKeyProvider, { bind: overridableProp.overrideKey }, /* @__PURE__ */ React19.createElement(import_editor_controls2.ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React19.createElement(import_ui12.Box, { mb: 1.5 }, /* @__PURE__ */ React19.createElement(import_editor_editing_panel.ControlTypeContainer, { layout }, layout !== "custom" && /* @__PURE__ */ React19.createElement(ControlLabel, null, overridableProp.label), /* @__PURE__ */ React19.createElement(OriginalControl, { control, controlProps })))))
2019
2118
  )))
2020
2119
  );
2021
2120
  }
@@ -2074,7 +2173,7 @@ function getControlParams(controls, originPropFields, label) {
2074
2173
  }
2075
2174
  function OriginalControl({ control, controlProps }) {
2076
2175
  const { value } = control;
2077
- return /* @__PURE__ */ React17.createElement(import_editor_editing_panel.BaseControl, { type: value.type, props: controlProps });
2176
+ return /* @__PURE__ */ React19.createElement(import_editor_editing_panel.BaseControl, { type: value.type, props: controlProps });
2078
2177
  }
2079
2178
  function getControlLayout(control) {
2080
2179
  return control.value.meta?.layout || import_editor_editing_panel.controlsRegistry.getLayout(control.value.type);
@@ -2109,8 +2208,8 @@ function OverridePropsGroup({ group }) {
2109
2208
  const labelId = `label-${id}`;
2110
2209
  const contentId = `content-${id}`;
2111
2210
  const title = group.label;
2112
- return /* @__PURE__ */ React18.createElement(import_ui12.Box, { "aria-label": `${title} section` }, /* @__PURE__ */ React18.createElement(
2113
- import_ui12.ListItemButton,
2211
+ return /* @__PURE__ */ React20.createElement(import_ui13.Box, { "aria-label": `${title} section` }, /* @__PURE__ */ React20.createElement(
2212
+ import_ui13.ListItemButton,
2114
2213
  {
2115
2214
  id: labelId,
2116
2215
  "aria-controls": contentId,
@@ -2119,21 +2218,21 @@ function OverridePropsGroup({ group }) {
2119
2218
  p: 0,
2120
2219
  sx: { "&:hover": { backgroundColor: "transparent" } }
2121
2220
  },
2122
- /* @__PURE__ */ React18.createElement(import_ui12.Stack, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React18.createElement(
2123
- import_ui12.ListItemText,
2221
+ /* @__PURE__ */ React20.createElement(import_ui13.Stack, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React20.createElement(
2222
+ import_ui13.ListItemText,
2124
2223
  {
2125
2224
  secondary: title,
2126
2225
  secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" },
2127
2226
  sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
2128
2227
  }
2129
2228
  )),
2130
- /* @__PURE__ */ React18.createElement(import_editor_ui6.CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
2131
- ), /* @__PURE__ */ React18.createElement(import_ui12.Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto" }, /* @__PURE__ */ React18.createElement(import_ui12.Stack, { direction: "column", gap: 1, p: 2 }, group.props.map((overrideKey) => /* @__PURE__ */ React18.createElement(OverridePropControl, { key: overrideKey, overrideKey })))));
2229
+ /* @__PURE__ */ React20.createElement(import_editor_ui6.CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
2230
+ ), /* @__PURE__ */ React20.createElement(import_ui13.Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto" }, /* @__PURE__ */ React20.createElement(import_ui13.Stack, { direction: "column", gap: 1, p: 2 }, group.props.map((overrideKey) => /* @__PURE__ */ React20.createElement(OverridePropControl, { key: overrideKey, overrideKey })))));
2132
2231
  }
2133
2232
 
2134
2233
  // src/components/instance-editing-panel/instance-panel-body.tsx
2135
2234
  function InstancePanelBody({ groups, isEmpty, emptyState, componentInstanceId }) {
2136
- return /* @__PURE__ */ React19.createElement(import_editor_panels2.PanelBody, null, /* @__PURE__ */ React19.createElement(import_editor_controls3.ControlAdornmentsProvider, { items: (0, import_editor_editing_panel3.getFieldIndicators)("settings") }, isEmpty ? emptyState : /* @__PURE__ */ React19.createElement(import_ui13.Stack, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React19.createElement(React19.Fragment, { key: group.id + componentInstanceId }, /* @__PURE__ */ React19.createElement(OverridePropsGroup, { group }), /* @__PURE__ */ React19.createElement(import_ui13.Divider, null))))));
2235
+ return /* @__PURE__ */ React21.createElement(import_editor_panels2.PanelBody, null, /* @__PURE__ */ React21.createElement(import_editor_controls3.ControlAdornmentsProvider, { items: (0, import_editor_editing_panel3.getFieldIndicators)("settings") }, isEmpty ? emptyState : /* @__PURE__ */ React21.createElement(import_ui14.Stack, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React21.createElement(React21.Fragment, { key: group.id + componentInstanceId }, /* @__PURE__ */ React21.createElement(OverridePropsGroup, { group }), /* @__PURE__ */ React21.createElement(import_ui14.Divider, null))))));
2137
2236
  }
2138
2237
 
2139
2238
  // src/components/instance-editing-panel/use-instance-panel-data.ts
@@ -2233,42 +2332,50 @@ function useComponentInstanceSettings() {
2233
2332
  }
2234
2333
 
2235
2334
  // src/components/instance-editing-panel/instance-editing-panel.tsx
2236
- var EDIT_UPGRADE_URL = "https://go.elementor.com/go-pro-components-edit/";
2335
+ var EDIT_UPGRADE_URL = "https://go.elementor.com/go-pro-components-Instance-edit-footer/";
2237
2336
  function InstanceEditingPanel() {
2238
2337
  const { canEdit } = useComponentsPermissions();
2239
2338
  const data = useInstancePanelData();
2240
- const hasPro = (0, import_utils5.hasProInstalled)();
2241
2339
  if (!data) {
2242
2340
  return null;
2243
2341
  }
2244
2342
  const { componentId, component, overrides, overridableProps, groups, isEmpty, componentInstanceId } = data;
2245
- const panelTitle = (0, import_i18n10.__)("Edit %s", "elementor").replace("%s", component.name);
2246
- const actions = /* @__PURE__ */ React20.createElement(import_ui14.Stack, { direction: "row", gap: 0.5 }, /* @__PURE__ */ React20.createElement(DetachAction, { componentInstanceId, componentId }), canEdit && /* @__PURE__ */ React20.createElement(EditComponentAction, { disabled: true, label: panelTitle, icon: import_icons10.PencilIcon }));
2247
- return /* @__PURE__ */ React20.createElement(import_ui14.Box, { "data-testid": "instance-editing-panel", sx: { display: "flex", flexDirection: "column", height: "100%" } }, /* @__PURE__ */ React20.createElement(
2343
+ const panelTitle = (0, import_i18n12.__)("Edit %s", "elementor").replace("%s", component.name);
2344
+ const actions = /* @__PURE__ */ React22.createElement(import_ui15.Stack, { direction: "row", gap: 0.5 }, /* @__PURE__ */ React22.createElement(DetachAction, { componentInstanceId, componentId }), canEdit && /* @__PURE__ */ React22.createElement(EditComponentAction, { disabled: true, label: panelTitle, icon: import_icons11.PencilIcon }));
2345
+ return /* @__PURE__ */ React22.createElement(import_ui15.Box, { "data-testid": "instance-editing-panel", sx: { display: "flex", flexDirection: "column", height: "100%" } }, /* @__PURE__ */ React22.createElement(
2248
2346
  ComponentInstanceProvider,
2249
2347
  {
2250
2348
  componentId,
2251
2349
  overrides,
2252
2350
  overridableProps
2253
2351
  },
2254
- /* @__PURE__ */ React20.createElement(InstancePanelHeader, { componentName: component.name, actions }),
2255
- /* @__PURE__ */ React20.createElement(
2352
+ /* @__PURE__ */ React22.createElement(InstancePanelHeader, { componentName: component.name, actions }),
2353
+ /* @__PURE__ */ React22.createElement(
2256
2354
  InstancePanelBody,
2257
2355
  {
2258
2356
  groups,
2259
2357
  isEmpty,
2260
- emptyState: /* @__PURE__ */ React20.createElement(EmptyState2, null),
2358
+ emptyState: /* @__PURE__ */ React22.createElement(EmptyState2, null),
2261
2359
  componentInstanceId
2262
2360
  }
2263
2361
  )
2264
- ), !hasPro && /* @__PURE__ */ React20.createElement(
2362
+ ), !isProComponentsSupported() && (isProOutdatedForComponents() ? /* @__PURE__ */ React22.createElement(
2363
+ ComponentsUpdateAlert,
2364
+ {
2365
+ title: (0, import_i18n12.__)("Edit Component", "elementor"),
2366
+ description: (0, import_i18n12.__)(
2367
+ "To edit components, update Elementor Pro to the latest version.",
2368
+ "elementor"
2369
+ )
2370
+ }
2371
+ ) : /* @__PURE__ */ React22.createElement(
2265
2372
  ComponentsUpgradeAlert,
2266
2373
  {
2267
- title: (0, import_i18n10.__)("Edit components", "elementor"),
2268
- description: (0, import_i18n10.__)("Editing components requires an active Pro subscription.", "elementor"),
2374
+ title: (0, import_i18n12.__)("Edit components", "elementor"),
2375
+ description: (0, import_i18n12.__)("Editing components requires an active Pro subscription.", "elementor"),
2269
2376
  upgradeUrl: EDIT_UPGRADE_URL
2270
2377
  }
2271
- ));
2378
+ )));
2272
2379
  }
2273
2380
 
2274
2381
  // src/components/load-template-components.tsx
@@ -2406,16 +2513,16 @@ var import_editor_canvas4 = require("@elementor/editor-canvas");
2406
2513
  var import_editor_documents4 = require("@elementor/editor-documents");
2407
2514
  var import_editor_notifications2 = require("@elementor/editor-notifications");
2408
2515
  var import_store27 = require("@elementor/store");
2409
- var import_utils7 = require("@elementor/utils");
2410
- var import_i18n11 = require("@wordpress/i18n");
2516
+ var import_utils5 = require("@elementor/utils");
2517
+ var import_i18n13 = require("@wordpress/i18n");
2411
2518
 
2412
2519
  // src/utils/format-component-elements-id.ts
2413
- var import_utils6 = require("@elementor/utils");
2520
+ var import_utils4 = require("@elementor/utils");
2414
2521
  var ELEMENT_ID_LENGTH = 7;
2415
2522
  function formatComponentElementsId(elements, path) {
2416
2523
  return elements.map((element) => {
2417
2524
  const nestingPath = [...path, element.id];
2418
- const id = (0, import_utils6.hashString)(nestingPath.join("_"), ELEMENT_ID_LENGTH);
2525
+ const id = (0, import_utils4.hashString)(nestingPath.join("_"), ELEMENT_ID_LENGTH);
2419
2526
  return {
2420
2527
  ...element,
2421
2528
  id,
@@ -2479,21 +2586,43 @@ function buildUniqueSelector(element) {
2479
2586
 
2480
2587
  // src/create-component-type.ts
2481
2588
  var COMPONENT_WIDGET_TYPE2 = "e-component";
2482
- var EDIT_COMPONENT_UPGRADE_URL = "https://go.elementor.com/go-pro-components-edit/";
2589
+ var EDIT_COMPONENT_DB_CLICK_UPGRADE_URL = "https://go.elementor.com/go-pro-components-Instance-edit-canvas-double-click/";
2590
+ var EDIT_COMPONENT_CONTEXT_MENU_UPGRADE_URL = "https://go.elementor.com/go-pro-components-Instance-edit-context-menu/";
2591
+ var UPDATE_PLUGINS_URL3 = "/wp-admin/plugins.php";
2483
2592
  var COMPONENT_EDIT_UPGRADE_NOTIFICATION_ID = "component-edit-upgrade";
2593
+ var COMPONENT_EDIT_UPDATE_NOTIFICATION_ID = "component-edit-update";
2594
+ var COMPONENT_EDIT_UPGRADE_AUTO_HIDE_DURATION = 2e3;
2484
2595
  function notifyComponentEditUpgrade() {
2485
2596
  (0, import_editor_notifications2.notify)({
2486
2597
  type: "promotion",
2487
2598
  id: COMPONENT_EDIT_UPGRADE_NOTIFICATION_ID,
2488
- message: (0, import_i18n11.__)("Editing components requires an active Pro subscription.", "elementor"),
2599
+ message: (0, import_i18n13.__)("Editing components requires an active Pro subscription.", "elementor"),
2600
+ autoHideDuration: COMPONENT_EDIT_UPGRADE_AUTO_HIDE_DURATION,
2489
2601
  additionalActionProps: [
2490
2602
  {
2491
2603
  size: "small",
2492
2604
  variant: "contained",
2493
2605
  color: "promotion",
2494
- href: EDIT_COMPONENT_UPGRADE_URL,
2606
+ href: EDIT_COMPONENT_DB_CLICK_UPGRADE_URL,
2495
2607
  target: "_blank",
2496
- children: (0, import_i18n11.__)("Upgrade Now", "elementor")
2608
+ children: (0, import_i18n13.__)("Upgrade Now", "elementor")
2609
+ }
2610
+ ]
2611
+ });
2612
+ }
2613
+ function notifyComponentEditUpdate() {
2614
+ (0, import_editor_notifications2.notify)({
2615
+ type: "info",
2616
+ id: COMPONENT_EDIT_UPDATE_NOTIFICATION_ID,
2617
+ message: (0, import_i18n13.__)("To edit components, update Elementor Pro to the latest version.", "elementor"),
2618
+ additionalActionProps: [
2619
+ {
2620
+ size: "small",
2621
+ variant: "contained",
2622
+ color: "info",
2623
+ href: UPDATE_PLUGINS_URL3,
2624
+ target: "_blank",
2625
+ children: (0, import_i18n13.__)("Update Now", "elementor")
2497
2626
  }
2498
2627
  ]
2499
2628
  });
@@ -2606,21 +2735,23 @@ function createComponentView(options) {
2606
2735
  }
2607
2736
  _getContextMenuConfig() {
2608
2737
  const isAdministrator = isUserAdministrator();
2609
- const hasPro = (0, import_utils7.hasProInstalled)();
2738
+ const hasPro = (0, import_utils5.hasProInstalled)();
2739
+ const isOutdated = isProOutdatedForComponents();
2740
+ const showPromoBadge = !hasPro && !isOutdated;
2610
2741
  const badgeClass = "elementor-context-menu-list__item__shortcut__promotion-badge";
2611
- const proBadge = `<a href="${EDIT_COMPONENT_UPGRADE_URL}" target="_blank" onclick="event.stopPropagation()" class="${badgeClass}"><i class="eicon-upgrade-crown"></i></a>`;
2742
+ const proBadge = `<a href="${EDIT_COMPONENT_CONTEXT_MENU_UPGRADE_URL}" target="_blank" onclick="event.stopPropagation()" class="${badgeClass}"><i class="eicon-upgrade-crown"></i></a>`;
2612
2743
  const editComponentAction = {
2613
2744
  name: "edit component",
2614
2745
  icon: "eicon-edit",
2615
- title: () => (0, import_i18n11.__)("Edit Component", "elementor"),
2616
- ...!hasPro && { shortcut: proBadge, hasShortcutAction: true },
2617
- isEnabled: () => hasPro,
2746
+ title: () => (0, import_i18n13.__)("Edit Component", "elementor"),
2747
+ ...showPromoBadge && { shortcut: proBadge, hasShortcutAction: true },
2748
+ isEnabled: () => isProComponentsSupported() || isOutdated,
2618
2749
  callback: (_, eventData) => this.editComponent(eventData)
2619
2750
  };
2620
2751
  const detachInstanceAction = {
2621
2752
  name: "detach instance",
2622
2753
  icon: "eicon-chain-broken",
2623
- title: () => (0, import_i18n11.__)("Detach from Component", "elementor"),
2754
+ title: () => (0, import_i18n13.__)("Detach from Component", "elementor"),
2624
2755
  isEnabled: () => true,
2625
2756
  callback: (_, eventData) => this.detachInstance(eventData)
2626
2757
  };
@@ -2647,8 +2778,11 @@ function createComponentView(options) {
2647
2778
  }
2648
2779
  }
2649
2780
  editComponent({ trigger, location, secondaryLocation }) {
2650
- const hasPro = (0, import_utils7.hasProInstalled)();
2651
- if (!hasPro || this.isComponentCurrentlyEdited()) {
2781
+ if (isProOutdatedForComponents()) {
2782
+ notifyComponentEditUpdate();
2783
+ return;
2784
+ }
2785
+ if (!isProComponentsSupported() || this.isComponentCurrentlyEdited()) {
2652
2786
  return;
2653
2787
  }
2654
2788
  this.switchDocument();
@@ -2679,7 +2813,7 @@ function createComponentView(options) {
2679
2813
  } catch {
2680
2814
  (0, import_editor_notifications2.notify)({
2681
2815
  type: "error",
2682
- message: (0, import_i18n11.__)("Failed to detach component instance.", "elementor"),
2816
+ message: (0, import_i18n13.__)("Failed to detach component instance.", "elementor"),
2683
2817
  id: "detach-component-instance-failed"
2684
2818
  });
2685
2819
  }
@@ -2691,7 +2825,11 @@ function createComponentView(options) {
2691
2825
  if (!isUserAdministrator()) {
2692
2826
  return;
2693
2827
  }
2694
- if (!(0, import_utils7.hasProInstalled)()) {
2828
+ if (isProOutdatedForComponents()) {
2829
+ notifyComponentEditUpdate();
2830
+ return;
2831
+ }
2832
+ if (!(0, import_utils5.hasProInstalled)()) {
2695
2833
  notifyComponentEditUpgrade();
2696
2834
  return;
2697
2835
  }
@@ -2792,11 +2930,11 @@ var import_editor_elements9 = require("@elementor/editor-elements");
2792
2930
  var import_editor_notifications3 = require("@elementor/editor-notifications");
2793
2931
  var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
2794
2932
  var import_store30 = require("@elementor/store");
2795
- var import_i18n12 = require("@wordpress/i18n");
2933
+ var import_i18n14 = require("@wordpress/i18n");
2796
2934
  var COMPONENT_TYPE = "e-component";
2797
2935
  var COMPONENT_CIRCULAR_NESTING_ALERT = {
2798
2936
  type: "default",
2799
- message: (0, import_i18n12.__)("Can't add this component - components that contain each other can't be nested.", "elementor"),
2937
+ message: (0, import_i18n14.__)("Can't add this component - components that contain each other can't be nested.", "elementor"),
2800
2938
  id: "circular-component-nesting-blocked"
2801
2939
  };
2802
2940
  function initCircularNestingPrevention() {
@@ -2947,9 +3085,9 @@ var componentsStylesProvider = (0, import_editor_styles_repository.createStylesP
2947
3085
  var import_editor_documents5 = require("@elementor/editor-documents");
2948
3086
  var import_editor_notifications4 = require("@elementor/editor-notifications");
2949
3087
  var import_http_client2 = require("@elementor/http-client");
2950
- var import_i18n13 = require("@wordpress/i18n");
3088
+ var import_i18n15 = require("@wordpress/i18n");
2951
3089
  var INSUFFICIENT_PERMISSIONS_ERROR_CODE = "insufficient_permissions";
2952
- var PUBLISH_UPGRADE_URL = "https://go.elementor.com/go-pro-components-edit/";
3090
+ var PUBLISH_UPGRADE_URL = "https://go.elementor.com/go-pro-components-Instance-draft-failure/";
2953
3091
  var PUBLISH_UPGRADE_NOTIFICATION_ID = "component-publish-upgrade";
2954
3092
  async function publishDraftComponentsInPageBeforeSave({ status, elements }) {
2955
3093
  if (status !== "publish") {
@@ -2978,7 +3116,7 @@ function notifyPublishUpgrade() {
2978
3116
  (0, import_editor_notifications4.notify)({
2979
3117
  type: "promotion",
2980
3118
  id: PUBLISH_UPGRADE_NOTIFICATION_ID,
2981
- message: (0, import_i18n13.__)(
3119
+ message: (0, import_i18n15.__)(
2982
3120
  "You have unpublished component on this page. You need a pro version to publish it.",
2983
3121
  "elementor"
2984
3122
  ),
@@ -2989,7 +3127,7 @@ function notifyPublishUpgrade() {
2989
3127
  color: "promotion",
2990
3128
  href: PUBLISH_UPGRADE_URL,
2991
3129
  target: "_blank",
2992
- children: (0, import_i18n13.__)("Upgrade Now", "elementor")
3130
+ children: (0, import_i18n15.__)("Upgrade Now", "elementor")
2993
3131
  }
2994
3132
  ]
2995
3133
  });
@@ -3031,7 +3169,7 @@ function init() {
3031
3169
  window.elementorCommon.__beforeSave = beforeSave;
3032
3170
  (0, import_editor_elements_panel.injectTab)({
3033
3171
  id: "components",
3034
- label: (0, import_i18n14.__)("Components", "elementor"),
3172
+ label: (0, import_i18n16.__)("Components", "elementor"),
3035
3173
  component: Components,
3036
3174
  position: 1
3037
3175
  });