@elementor/editor-editing-panel 4.0.0-531 → 4.0.0-532
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 +4 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/controls-registry/element-controls/get-element-by-type.ts +2 -8
- package/src/controls-registry/element-controls/tabs-control/tabs-control.tsx +5 -11
package/dist/index.js
CHANGED
|
@@ -4836,16 +4836,12 @@ var import_editor_elements15 = require("@elementor/editor-elements");
|
|
|
4836
4836
|
var getElementByType = (elementId, type) => {
|
|
4837
4837
|
const currentElement = (0, import_editor_elements15.getContainer)(elementId);
|
|
4838
4838
|
if (!currentElement) {
|
|
4839
|
-
|
|
4839
|
+
return null;
|
|
4840
4840
|
}
|
|
4841
4841
|
if (currentElement.model.get("elType") === type) {
|
|
4842
4842
|
return currentElement;
|
|
4843
4843
|
}
|
|
4844
|
-
|
|
4845
|
-
if (!element) {
|
|
4846
|
-
throw new Error(`Child element ${type} not found`);
|
|
4847
|
-
}
|
|
4848
|
-
return element;
|
|
4844
|
+
return currentElement.children?.findRecursive?.((child) => child.model.get("elType") === type) ?? null;
|
|
4849
4845
|
};
|
|
4850
4846
|
|
|
4851
4847
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
@@ -5051,10 +5047,9 @@ var TabsControlContent = ({ label }) => {
|
|
|
5051
5047
|
const tabList = getElementByType(element.id, TAB_MENU_ELEMENT_TYPE);
|
|
5052
5048
|
const tabContentArea = getElementByType(element.id, TAB_CONTENT_AREA_ELEMENT_TYPE);
|
|
5053
5049
|
const repeaterValues = tabLinks.map((tabLink, index) => {
|
|
5054
|
-
const { title: titleSetting } = (0, import_editor_elements17.getElementEditorSettings)(tabLink.id) ?? {};
|
|
5055
5050
|
return {
|
|
5056
5051
|
id: tabLink.id,
|
|
5057
|
-
title:
|
|
5052
|
+
title: tabLink.editorSettings?.title,
|
|
5058
5053
|
index
|
|
5059
5054
|
};
|
|
5060
5055
|
});
|
|
@@ -5104,9 +5099,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
5104
5099
|
);
|
|
5105
5100
|
};
|
|
5106
5101
|
var ItemLabel = ({ value, index }) => {
|
|
5107
|
-
const
|
|
5108
|
-
const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(id);
|
|
5109
|
-
const elementTitle = editorSettings?.title;
|
|
5102
|
+
const elementTitle = value?.title;
|
|
5110
5103
|
return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React84.createElement("span", null, elementTitle), /* @__PURE__ */ React84.createElement(ItemDefaultTab, { index }));
|
|
5111
5104
|
};
|
|
5112
5105
|
var ItemDefaultTab = ({ index }) => {
|