@elementor/editor-editing-panel 4.4.0-1093 → 4.4.0-1094

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-editing-panel",
3
- "version": "4.4.0-1093",
3
+ "version": "4.4.0-1094",
4
4
  "private": false,
5
5
  "author": "Elementor Team",
6
6
  "homepage": "https://elementor.com/",
@@ -39,32 +39,32 @@
39
39
  "dev": "tsup --config=../../tsup.dev.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@elementor/editor": "4.4.0-1093",
43
- "@elementor/editor-canvas": "4.4.0-1093",
44
- "@elementor/editor-controls": "4.4.0-1093",
45
- "@elementor/editor-current-user": "4.4.0-1093",
46
- "@elementor/editor-documents": "4.4.0-1093",
47
- "@elementor/editor-elements": "4.4.0-1093",
48
- "@elementor/editor-interactions": "4.4.0-1093",
49
- "@elementor/editor-notifications": "4.4.0-1093",
50
- "@elementor/editor-panels": "4.4.0-1093",
51
- "@elementor/editor-props": "4.4.0-1093",
52
- "@elementor/editor-responsive": "4.4.0-1093",
53
- "@elementor/editor-styles": "4.4.0-1093",
54
- "@elementor/editor-styles-repository": "4.4.0-1093",
55
- "@elementor/editor-ui": "4.4.0-1093",
56
- "@elementor/editor-v1-adapters": "4.4.0-1093",
57
- "@elementor/http-client": "4.4.0-1093",
42
+ "@elementor/editor": "4.4.0-1094",
43
+ "@elementor/editor-canvas": "4.4.0-1094",
44
+ "@elementor/editor-controls": "4.4.0-1094",
45
+ "@elementor/editor-current-user": "4.4.0-1094",
46
+ "@elementor/editor-documents": "4.4.0-1094",
47
+ "@elementor/editor-elements": "4.4.0-1094",
48
+ "@elementor/editor-interactions": "4.4.0-1094",
49
+ "@elementor/editor-notifications": "4.4.0-1094",
50
+ "@elementor/editor-panels": "4.4.0-1094",
51
+ "@elementor/editor-props": "4.4.0-1094",
52
+ "@elementor/editor-responsive": "4.4.0-1094",
53
+ "@elementor/editor-styles": "4.4.0-1094",
54
+ "@elementor/editor-styles-repository": "4.4.0-1094",
55
+ "@elementor/editor-ui": "4.4.0-1094",
56
+ "@elementor/editor-v1-adapters": "4.4.0-1094",
57
+ "@elementor/http-client": "4.4.0-1094",
58
58
  "@elementor/icons": "~1.75.1",
59
- "@elementor/editor-variables": "4.4.0-1093",
60
- "@elementor/locations": "4.4.0-1093",
61
- "@elementor/menus": "4.4.0-1093",
62
- "@elementor/query": "4.4.0-1093",
63
- "@elementor/schema": "4.4.0-1093",
64
- "@elementor/session": "4.4.0-1093",
59
+ "@elementor/editor-variables": "4.4.0-1094",
60
+ "@elementor/locations": "4.4.0-1094",
61
+ "@elementor/menus": "4.4.0-1094",
62
+ "@elementor/query": "4.4.0-1094",
63
+ "@elementor/schema": "4.4.0-1094",
64
+ "@elementor/session": "4.4.0-1094",
65
65
  "@elementor/ui": "1.37.5",
66
- "@elementor/utils": "4.4.0-1093",
67
- "@elementor/wp-media": "4.4.0-1093",
66
+ "@elementor/utils": "4.4.0-1094",
67
+ "@elementor/wp-media": "4.4.0-1094",
68
68
  "@wordpress/i18n": "^5.13.0"
69
69
  },
70
70
  "peerDependencies": {
@@ -101,11 +101,22 @@ export const AccordionItemsControl = ( { label }: { label: string } ) => {
101
101
  const ItemLabel = ( { value }: { value: AccordionItem } ) => {
102
102
  return (
103
103
  <Stack sx={ { minHeight: 20 } } direction="row" alignItems="center" gap={ 1.5 }>
104
- <span>{ value?.title }</span>
104
+ { value.id ? (
105
+ <AccordionItemRepeaterLabel elementId={ value.id } fallbackTitle={ value.title } />
106
+ ) : (
107
+ <span>{ value?.title }</span>
108
+ ) }
105
109
  </Stack>
106
110
  );
107
111
  };
108
112
 
113
+ const AccordionItemRepeaterLabel = ( { elementId, fallbackTitle }: { elementId: string; fallbackTitle?: string } ) => {
114
+ const editorSettings = useElementEditorSettings( elementId );
115
+ const label = editorSettings?.title ?? fallbackTitle ?? '';
116
+
117
+ return <span>{ label }</span>;
118
+ };
119
+
109
120
  const ItemContent = ( { value }: { value: AccordionItem } ) => {
110
121
  if ( ! value.id ) {
111
122
  return null;
@@ -109,16 +109,25 @@ export const TabsControlContent = ( { label }: { label: string } ) => {
109
109
  };
110
110
 
111
111
  const ItemLabel = ( { value, index }: { value: TabItem; index: number } ) => {
112
- const elementTitle = value?.title;
113
-
114
112
  return (
115
113
  <Stack sx={ { minHeight: 20 } } direction="row" alignItems="center" gap={ 1.5 }>
116
- <span>{ elementTitle }</span>
114
+ { value.id ? (
115
+ <TabRepeaterLabel elementId={ value.id } fallbackTitle={ value.title } />
116
+ ) : (
117
+ <span>{ value?.title }</span>
118
+ ) }
117
119
  <ItemDefaultTab index={ index } />
118
120
  </Stack>
119
121
  );
120
122
  };
121
123
 
124
+ const TabRepeaterLabel = ( { elementId, fallbackTitle }: { elementId: string; fallbackTitle?: string } ) => {
125
+ const editorSettings = useElementEditorSettings( elementId );
126
+ const label = editorSettings?.title ?? fallbackTitle ?? '';
127
+
128
+ return <span>{ label }</span>;
129
+ };
130
+
122
131
  const ItemDefaultTab = ( { index }: { index: number } ) => {
123
132
  const { value: defaultItem } = useBoundProp( numberPropTypeUtil );
124
133