@elementor/editor-editing-panel 4.0.0-544 → 4.0.0-545

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
@@ -4894,9 +4894,14 @@ var useActions = () => {
4894
4894
  movedElementIndex
4895
4895
  }) => {
4896
4896
  const tabContentContainer = (0, import_editor_elements16.getContainer)(tabContentAreaId);
4897
- const tabContentId = tabContentContainer?.children?.[movedElementIndex]?.id;
4898
- if (!tabContentId) {
4899
- throw new Error("Content ID is required");
4897
+ const tabContent = tabContentContainer?.children?.[movedElementIndex];
4898
+ const movedElement = (0, import_editor_elements16.getContainer)(movedElementId);
4899
+ const tabsMenu = (0, import_editor_elements16.getContainer)(tabsMenuId);
4900
+ if (!tabContent) {
4901
+ throw new Error("Content element is required");
4902
+ }
4903
+ if (!movedElement || !tabsMenu) {
4904
+ throw new Error("Tab element or menu not found");
4900
4905
  }
4901
4906
  const newDefault = calculateDefaultOnMove({
4902
4907
  from: movedElementIndex,
@@ -4907,13 +4912,13 @@ var useActions = () => {
4907
4912
  title: (0, import_i18n58.__)("Reorder Tabs", "elementor"),
4908
4913
  moves: [
4909
4914
  {
4910
- elementId: movedElementId,
4911
- targetContainerId: tabsMenuId,
4915
+ element: movedElement,
4916
+ targetContainer: tabsMenu,
4912
4917
  options: { at: toIndex }
4913
4918
  },
4914
4919
  {
4915
- elementId: tabContentId,
4916
- targetContainerId: tabContentAreaId,
4920
+ element: tabContent,
4921
+ targetContainer: tabContentContainer,
4917
4922
  options: { at: toIndex }
4918
4923
  }
4919
4924
  ],
@@ -4965,20 +4970,25 @@ var useActions = () => {
4965
4970
  tabsMenuId,
4966
4971
  items: items3
4967
4972
  }) => {
4973
+ const tabContentArea = (0, import_editor_elements16.getContainer)(tabContentAreaId);
4974
+ const tabsMenu = (0, import_editor_elements16.getContainer)(tabsMenuId);
4975
+ if (!tabContentArea || !tabsMenu) {
4976
+ throw new Error("Tab containers not found");
4977
+ }
4968
4978
  items3.forEach(({ index }) => {
4969
4979
  const position = index + 1;
4970
4980
  (0, import_editor_elements16.createElements)({
4971
4981
  title: (0, import_i18n58.__)("Tabs", "elementor"),
4972
4982
  elements: [
4973
4983
  {
4974
- containerId: tabContentAreaId,
4984
+ container: tabContentArea,
4975
4985
  model: {
4976
4986
  elType: TAB_CONTENT_ELEMENT_TYPE,
4977
4987
  editor_settings: { title: `Tab ${position} content`, initial_position: position }
4978
4988
  }
4979
4989
  },
4980
4990
  {
4981
- containerId: tabsMenuId,
4991
+ container: tabsMenu,
4982
4992
  model: {
4983
4993
  elType: TAB_ELEMENT_TYPE,
4984
4994
  editor_settings: { title: `Tab ${position} trigger`, initial_position: position }