@elementor/editor-components 4.1.0-745 → 4.1.0-747
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-components",
|
|
3
3
|
"description": "Elementor editor components",
|
|
4
|
-
"version": "4.1.0-
|
|
4
|
+
"version": "4.1.0-747",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -40,31 +40,31 @@
|
|
|
40
40
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@elementor/editor": "4.1.0-
|
|
44
|
-
"@elementor/editor-canvas": "4.1.0-
|
|
45
|
-
"@elementor/editor-controls": "4.1.0-
|
|
46
|
-
"@elementor/editor-documents": "4.1.0-
|
|
47
|
-
"@elementor/editor-editing-panel": "4.1.0-
|
|
48
|
-
"@elementor/editor-elements": "4.1.0-
|
|
49
|
-
"@elementor/editor-elements-panel": "4.1.0-
|
|
50
|
-
"@elementor/editor-mcp": "4.1.0-
|
|
51
|
-
"@elementor/editor-templates": "4.1.0-
|
|
52
|
-
"@elementor/editor-panels": "4.1.0-
|
|
53
|
-
"@elementor/editor-props": "4.1.0-
|
|
54
|
-
"@elementor/editor-styles-repository": "4.1.0-
|
|
55
|
-
"@elementor/editor-ui": "4.1.0-
|
|
56
|
-
"@elementor/editor-v1-adapters": "4.1.0-
|
|
57
|
-
"@elementor/http-client": "4.1.0-
|
|
43
|
+
"@elementor/editor": "4.1.0-747",
|
|
44
|
+
"@elementor/editor-canvas": "4.1.0-747",
|
|
45
|
+
"@elementor/editor-controls": "4.1.0-747",
|
|
46
|
+
"@elementor/editor-documents": "4.1.0-747",
|
|
47
|
+
"@elementor/editor-editing-panel": "4.1.0-747",
|
|
48
|
+
"@elementor/editor-elements": "4.1.0-747",
|
|
49
|
+
"@elementor/editor-elements-panel": "4.1.0-747",
|
|
50
|
+
"@elementor/editor-mcp": "4.1.0-747",
|
|
51
|
+
"@elementor/editor-templates": "4.1.0-747",
|
|
52
|
+
"@elementor/editor-panels": "4.1.0-747",
|
|
53
|
+
"@elementor/editor-props": "4.1.0-747",
|
|
54
|
+
"@elementor/editor-styles-repository": "4.1.0-747",
|
|
55
|
+
"@elementor/editor-ui": "4.1.0-747",
|
|
56
|
+
"@elementor/editor-v1-adapters": "4.1.0-747",
|
|
57
|
+
"@elementor/http-client": "4.1.0-747",
|
|
58
58
|
"@elementor/icons": "^1.68.0",
|
|
59
|
-
"@elementor/events": "4.1.0-
|
|
60
|
-
"@elementor/query": "4.1.0-
|
|
61
|
-
"@elementor/schema": "4.1.0-
|
|
62
|
-
"@elementor/store": "4.1.0-
|
|
59
|
+
"@elementor/events": "4.1.0-747",
|
|
60
|
+
"@elementor/query": "4.1.0-747",
|
|
61
|
+
"@elementor/schema": "4.1.0-747",
|
|
62
|
+
"@elementor/store": "4.1.0-747",
|
|
63
63
|
"@elementor/ui": "1.36.17",
|
|
64
|
-
"@elementor/utils": "4.1.0-
|
|
64
|
+
"@elementor/utils": "4.1.0-747",
|
|
65
65
|
"@wordpress/i18n": "^5.13.0",
|
|
66
|
-
"@elementor/editor-notifications": "4.1.0-
|
|
67
|
-
"@elementor/editor-current-user": "4.1.0-
|
|
66
|
+
"@elementor/editor-notifications": "4.1.0-747",
|
|
67
|
+
"@elementor/editor-current-user": "4.1.0-747"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.3.1",
|
|
@@ -158,12 +158,20 @@ function OverrideControl( { overridableProp }: InternalProps ) {
|
|
|
158
158
|
return null;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
const propValue
|
|
161
|
+
const { propValue, placeholderValue } = resolveValueAndPlaceholder(
|
|
162
|
+
matchingOverride,
|
|
163
|
+
settingsWithInnerOverrides,
|
|
164
|
+
propKey
|
|
165
|
+
);
|
|
162
166
|
|
|
163
167
|
const value = {
|
|
164
168
|
[ overridableProp.overrideKey ]: propValue,
|
|
165
169
|
} as OverridesSchema;
|
|
166
170
|
|
|
171
|
+
const placeholder = {
|
|
172
|
+
[ overridableProp.overrideKey ]: placeholderValue,
|
|
173
|
+
} as OverridesSchema;
|
|
174
|
+
|
|
167
175
|
const setValue = ( newValue: OverridesSchema ) => {
|
|
168
176
|
if ( ! overridableProps ) {
|
|
169
177
|
setInstanceValue( {
|
|
@@ -247,6 +255,7 @@ function OverrideControl( { overridableProp }: InternalProps ) {
|
|
|
247
255
|
propType={ propTypeSchema }
|
|
248
256
|
value={ value }
|
|
249
257
|
setValue={ setValue }
|
|
258
|
+
placeholder={ placeholder }
|
|
250
259
|
isDisabled={ () => {
|
|
251
260
|
return false;
|
|
252
261
|
} }
|
|
@@ -270,7 +279,27 @@ function OverrideControl( { overridableProp }: InternalProps ) {
|
|
|
270
279
|
);
|
|
271
280
|
}
|
|
272
281
|
|
|
273
|
-
|
|
282
|
+
type ElementSettings = Record< string, AnyTransformable | null >;
|
|
283
|
+
|
|
284
|
+
function resolveValueAndPlaceholder(
|
|
285
|
+
matchingOverride: ComponentInstanceOverride | null,
|
|
286
|
+
settingsWithInnerOverrides: ElementSettings,
|
|
287
|
+
propKey: string
|
|
288
|
+
) {
|
|
289
|
+
const overrideValue = matchingOverride ? resolveOverridePropValue( matchingOverride ) : null;
|
|
290
|
+
|
|
291
|
+
const placeholderSettings = unwrapOverridableSettings( settingsWithInnerOverrides );
|
|
292
|
+
const inheritedValue = placeholderSettings[ propKey ] ?? null;
|
|
293
|
+
const isInheritedDynamic = isDynamicPropValue( inheritedValue );
|
|
294
|
+
|
|
295
|
+
const propValue = isInheritedDynamic && ! matchingOverride ? inheritedValue : overrideValue;
|
|
296
|
+
const placeholderValue = matchingOverride || isInheritedDynamic ? null : inheritedValue;
|
|
297
|
+
|
|
298
|
+
return { propValue, placeholderValue };
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Temp solution: when removing an override on a dynamic value, fall back to propType.default
|
|
302
|
+
// instead of null, since we don't have placeholder support for dynamics yet.
|
|
274
303
|
function getTempNewValueForDynamicProp( propType: PropType, propValue: PropValue, newPropValue: PropValue ) {
|
|
275
304
|
const isRemovingOverride = newPropValue === null;
|
|
276
305
|
|