@elementor/editor-editing-panel 4.4.0-1135 → 4.4.0-1136
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 +10 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -25
- package/src/components/editing-panel-tabs.tsx +20 -12
package/dist/index.mjs
CHANGED
|
@@ -5818,11 +5818,13 @@ var PanelTabContent = () => {
|
|
|
5818
5818
|
const { element } = useElement();
|
|
5819
5819
|
const editorDefaults = useDefaultPanelSettings();
|
|
5820
5820
|
const defaultComponentTab = editorDefaults.defaultTab;
|
|
5821
|
-
const
|
|
5821
|
+
const elementMeta = getWidgetsCache2()?.[element.type]?.meta;
|
|
5822
|
+
const isPromotedElement = !!elementMeta?.is_pro_promotion;
|
|
5823
|
+
const hasDesignTabs = !elementMeta?.hide_design_tabs;
|
|
5822
5824
|
const hasContentOnlyAccess = useHasContentOnlyAccess();
|
|
5823
5825
|
const areDesignTabsRestricted = hasContentOnlyAccess && !isPromotedElement;
|
|
5824
5826
|
const [storedTab, setCurrentTab] = useStateByElement("tab", defaultComponentTab);
|
|
5825
|
-
const currentTab = resolveCurrentTab({ storedTab, isPromotedElement, areDesignTabsRestricted });
|
|
5827
|
+
const currentTab = resolveCurrentTab({ storedTab, isPromotedElement, areDesignTabsRestricted, hasDesignTabs });
|
|
5826
5828
|
const { getTabProps, getTabPanelProps, getTabsProps } = useTabs(currentTab);
|
|
5827
5829
|
const getDesignTabProps = (tab) => ({
|
|
5828
5830
|
...getTabProps(tab),
|
|
@@ -5846,28 +5848,29 @@ var PanelTabContent = () => {
|
|
|
5846
5848
|
}
|
|
5847
5849
|
},
|
|
5848
5850
|
!isPromotedElement && /* @__PURE__ */ React92.createElement(Tab, { label: __65("General", "elementor"), ...getTabProps("settings") }),
|
|
5849
|
-
/* @__PURE__ */ React92.createElement(
|
|
5851
|
+
hasDesignTabs && /* @__PURE__ */ React92.createElement(
|
|
5850
5852
|
Tab,
|
|
5851
5853
|
{
|
|
5852
5854
|
label: withRestrictionInfotip(__65("Style", "elementor")),
|
|
5853
5855
|
...getDesignTabProps("style")
|
|
5854
5856
|
}
|
|
5855
5857
|
),
|
|
5856
|
-
/* @__PURE__ */ React92.createElement(
|
|
5858
|
+
hasDesignTabs && /* @__PURE__ */ React92.createElement(
|
|
5857
5859
|
Tab,
|
|
5858
5860
|
{
|
|
5859
5861
|
label: withRestrictionInfotip(__65("Interactions", "elementor")),
|
|
5860
5862
|
...getDesignTabProps("interactions")
|
|
5861
5863
|
}
|
|
5862
5864
|
)
|
|
5863
|
-
), /* @__PURE__ */ React92.createElement(Divider6, null)), !isPromotedElement && /* @__PURE__ */ React92.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React92.createElement(SettingsTab, null)), !areDesignTabsRestricted && /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React92.createElement(StyleTab, null)), /* @__PURE__ */ React92.createElement(TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React92.createElement(InteractionsTab, null)))));
|
|
5865
|
+
), /* @__PURE__ */ React92.createElement(Divider6, null)), !isPromotedElement && /* @__PURE__ */ React92.createElement(TabPanel, { ...getTabPanelProps("settings"), disablePadding: true }, /* @__PURE__ */ React92.createElement(SettingsTab, null)), hasDesignTabs && !areDesignTabsRestricted && /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(TabPanel, { ...getTabPanelProps("style"), disablePadding: true }, /* @__PURE__ */ React92.createElement(StyleTab, null)), /* @__PURE__ */ React92.createElement(TabPanel, { ...getTabPanelProps("interactions"), disablePadding: true }, /* @__PURE__ */ React92.createElement(InteractionsTab, null)))));
|
|
5864
5866
|
};
|
|
5865
5867
|
var resolveCurrentTab = ({
|
|
5866
5868
|
storedTab,
|
|
5867
5869
|
isPromotedElement,
|
|
5868
|
-
areDesignTabsRestricted
|
|
5870
|
+
areDesignTabsRestricted,
|
|
5871
|
+
hasDesignTabs
|
|
5869
5872
|
}) => {
|
|
5870
|
-
if (areDesignTabsRestricted && DESIGN_TABS.includes(storedTab)) {
|
|
5873
|
+
if ((areDesignTabsRestricted || !hasDesignTabs) && DESIGN_TABS.includes(storedTab)) {
|
|
5871
5874
|
return CONTENT_ONLY_TAB;
|
|
5872
5875
|
}
|
|
5873
5876
|
if (isPromotedElement && storedTab === "settings") {
|