@elementor/editor-editing-panel 4.4.0-1135 → 4.4.0-1137

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
@@ -5745,11 +5745,13 @@ var PanelTabContent = () => {
5745
5745
  const { element } = useElement();
5746
5746
  const editorDefaults = useDefaultPanelSettings();
5747
5747
  const defaultComponentTab = editorDefaults.defaultTab;
5748
- const isPromotedElement = !!(0, import_editor_elements14.getWidgetsCache)()?.[element.type]?.meta?.is_pro_promotion;
5748
+ const elementMeta = (0, import_editor_elements14.getWidgetsCache)()?.[element.type]?.meta;
5749
+ const isPromotedElement = !!elementMeta?.is_pro_promotion;
5750
+ const hasDesignTabs = !elementMeta?.hide_design_tabs;
5749
5751
  const hasContentOnlyAccess = (0, import_editor_current_user.useHasContentOnlyAccess)();
5750
5752
  const areDesignTabsRestricted = hasContentOnlyAccess && !isPromotedElement;
5751
5753
  const [storedTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
5752
- const currentTab = resolveCurrentTab({ storedTab, isPromotedElement, areDesignTabsRestricted });
5754
+ const currentTab = resolveCurrentTab({ storedTab, isPromotedElement, areDesignTabsRestricted, hasDesignTabs });
5753
5755
  const { getTabProps, getTabPanelProps, getTabsProps } = (0, import_ui45.useTabs)(currentTab);
5754
5756
  const getDesignTabProps = (tab) => ({
5755
5757
  ...getTabProps(tab),
@@ -5773,28 +5775,29 @@ var PanelTabContent = () => {
5773
5775
  }
5774
5776
  },
5775
5777
  !isPromotedElement && /* @__PURE__ */ React92.createElement(import_ui45.Tab, { label: (0, import_i18n65.__)("General", "elementor"), ...getTabProps("settings") }),
5776
- /* @__PURE__ */ React92.createElement(
5778
+ hasDesignTabs && /* @__PURE__ */ React92.createElement(
5777
5779
  import_ui45.Tab,
5778
5780
  {
5779
5781
  label: withRestrictionInfotip((0, import_i18n65.__)("Style", "elementor")),
5780
5782
  ...getDesignTabProps("style")
5781
5783
  }
5782
5784
  ),
5783
- /* @__PURE__ */ React92.createElement(
5785
+ hasDesignTabs && /* @__PURE__ */ React92.createElement(
5784
5786
  import_ui45.Tab,
5785
5787
  {
5786
5788
  label: withRestrictionInfotip((0, import_i18n65.__)("Interactions", "elementor")),
5787
5789
  ...getDesignTabProps("interactions")
5788
5790
  }
5789
5791
  )
5790
- ), /* @__PURE__ */ React92.createElement(import_ui45.Divider, null)), !isPromotedElement && /* @__PURE__ */ React92.createElement(import_ui45.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React92.createElement(SettingsTab, null)), !areDesignTabsRestricted && /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(import_ui45.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React92.createElement(StyleTab, null)), /* @__PURE__ */ React92.createElement(import_ui45.TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React92.createElement(InteractionsTab, null)))));
5792
+ ), /* @__PURE__ */ React92.createElement(import_ui45.Divider, null)), !isPromotedElement && /* @__PURE__ */ React92.createElement(import_ui45.TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React92.createElement(SettingsTab, null)), hasDesignTabs && !areDesignTabsRestricted && /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(import_ui45.TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React92.createElement(StyleTab, null)), /* @__PURE__ */ React92.createElement(import_ui45.TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React92.createElement(InteractionsTab, null)))));
5791
5793
  };
5792
5794
  var resolveCurrentTab = ({
5793
5795
  storedTab,
5794
5796
  isPromotedElement,
5795
- areDesignTabsRestricted
5797
+ areDesignTabsRestricted,
5798
+ hasDesignTabs
5796
5799
  }) => {
5797
- if (areDesignTabsRestricted && DESIGN_TABS.includes(storedTab)) {
5800
+ if ((areDesignTabsRestricted || !hasDesignTabs) && DESIGN_TABS.includes(storedTab)) {
5798
5801
  return CONTENT_ONLY_TAB;
5799
5802
  }
5800
5803
  if (isPromotedElement && storedTab === "settings") {