@elementor/editor-components 4.1.0-751 → 4.1.0-752
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-752",
|
|
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-752",
|
|
44
|
+
"@elementor/editor-canvas": "4.1.0-752",
|
|
45
|
+
"@elementor/editor-controls": "4.1.0-752",
|
|
46
|
+
"@elementor/editor-documents": "4.1.0-752",
|
|
47
|
+
"@elementor/editor-editing-panel": "4.1.0-752",
|
|
48
|
+
"@elementor/editor-elements": "4.1.0-752",
|
|
49
|
+
"@elementor/editor-elements-panel": "4.1.0-752",
|
|
50
|
+
"@elementor/editor-mcp": "4.1.0-752",
|
|
51
|
+
"@elementor/editor-templates": "4.1.0-752",
|
|
52
|
+
"@elementor/editor-panels": "4.1.0-752",
|
|
53
|
+
"@elementor/editor-props": "4.1.0-752",
|
|
54
|
+
"@elementor/editor-styles-repository": "4.1.0-752",
|
|
55
|
+
"@elementor/editor-ui": "4.1.0-752",
|
|
56
|
+
"@elementor/editor-v1-adapters": "4.1.0-752",
|
|
57
|
+
"@elementor/http-client": "4.1.0-752",
|
|
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-752",
|
|
60
|
+
"@elementor/query": "4.1.0-752",
|
|
61
|
+
"@elementor/schema": "4.1.0-752",
|
|
62
|
+
"@elementor/store": "4.1.0-752",
|
|
63
63
|
"@elementor/ui": "1.36.17",
|
|
64
|
-
"@elementor/utils": "4.1.0-
|
|
64
|
+
"@elementor/utils": "4.1.0-752",
|
|
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-752",
|
|
67
|
+
"@elementor/editor-current-user": "4.1.0-752"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.3.1",
|
|
@@ -50,7 +50,7 @@ import { resolveOverridePropValue } from '../../utils/resolve-override-prop-valu
|
|
|
50
50
|
import { ControlLabel } from '../control-label';
|
|
51
51
|
import { OverrideControlPropTypeNotFoundError } from '../errors';
|
|
52
52
|
import { correctExposedEmptyOverride } from './utils/correct-exposed-empty-override';
|
|
53
|
-
import { unwrapOverridableSettings } from './utils/resolve-element-settings';
|
|
53
|
+
import { type ElementSettings, unwrapOverridableSettings } from './utils/resolve-element-settings';
|
|
54
54
|
import { useOverrideControlDependencies } from './utils/use-override-dependencies';
|
|
55
55
|
import { useResolvedInnerElement } from './utils/use-resolved-inner-element';
|
|
56
56
|
|
|
@@ -115,7 +115,7 @@ function OverrideControl( { overridableProp }: InternalProps ) {
|
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
const { propValue,
|
|
118
|
+
const { propValue, baseValue: resolvedBaseValue } = resolveOverrideValues(
|
|
119
119
|
matchingOverride,
|
|
120
120
|
overrideValue,
|
|
121
121
|
resolvedOriginValues,
|
|
@@ -126,8 +126,8 @@ function OverrideControl( { overridableProp }: InternalProps ) {
|
|
|
126
126
|
[ overridableProp.overrideKey ]: propValue,
|
|
127
127
|
} as OverridesSchema;
|
|
128
128
|
|
|
129
|
-
const
|
|
130
|
-
[ overridableProp.overrideKey ]:
|
|
129
|
+
const baseValue = {
|
|
130
|
+
[ overridableProp.overrideKey ]: resolvedBaseValue,
|
|
131
131
|
} as OverridesSchema;
|
|
132
132
|
|
|
133
133
|
const { control, controlProps, layout } = getControlParams(
|
|
@@ -201,7 +201,7 @@ function OverrideControl( { overridableProp }: InternalProps ) {
|
|
|
201
201
|
propType={ propTypeSchema }
|
|
202
202
|
value={ value }
|
|
203
203
|
setValue={ setValue }
|
|
204
|
-
|
|
204
|
+
baseValue={ baseValue }
|
|
205
205
|
isDisabled={ isDisabled }
|
|
206
206
|
>
|
|
207
207
|
<PropKeyProvider bind={ overridableProp.overrideKey }>
|
|
@@ -220,24 +220,22 @@ function OverrideControl( { overridableProp }: InternalProps ) {
|
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
function resolveValueAndPlaceholder(
|
|
223
|
+
function resolveOverrideValues(
|
|
226
224
|
matchingOverride: ComponentInstanceOverride | null,
|
|
227
225
|
overrideValue: AnyTransformable | null,
|
|
228
226
|
resolvedOriginValues: ElementSettings,
|
|
229
227
|
propKey: string
|
|
230
228
|
) {
|
|
231
|
-
const
|
|
232
|
-
const inheritedValue =
|
|
229
|
+
const unwrappedSettings = unwrapOverridableSettings( resolvedOriginValues );
|
|
230
|
+
const inheritedValue = unwrappedSettings[ propKey ] ?? null;
|
|
233
231
|
const isInheritedDynamic = isDynamicPropValue( inheritedValue );
|
|
234
232
|
|
|
235
233
|
const shouldUseInheritedAsValue = isInheritedDynamic && ! matchingOverride;
|
|
236
234
|
|
|
237
235
|
const propValue = shouldUseInheritedAsValue ? inheritedValue : overrideValue;
|
|
238
|
-
const
|
|
236
|
+
const baseValue = matchingOverride || isInheritedDynamic ? null : inheritedValue;
|
|
239
237
|
|
|
240
|
-
return { propValue,
|
|
238
|
+
return { propValue, baseValue };
|
|
241
239
|
}
|
|
242
240
|
|
|
243
241
|
// Temp solution: when removing an override on a dynamic value, fall back to propType.default
|
|
@@ -263,10 +261,8 @@ function createOverrideValue( {
|
|
|
263
261
|
overrideValue: ComponentInstanceOverrideProp | ComponentOverridableProp;
|
|
264
262
|
componentId: number;
|
|
265
263
|
} ): ComponentInstanceOverride {
|
|
266
|
-
// this is for an override that's already set as overridable
|
|
267
264
|
const overridableValue = componentOverridablePropTypeUtil.extract( matchingOverride );
|
|
268
265
|
|
|
269
|
-
// this is for changes via the overridable-prop-indicator
|
|
270
266
|
const newOverridableValue = componentOverridablePropTypeUtil.extract( overrideValue );
|
|
271
267
|
|
|
272
268
|
const anyOverridable = newOverridableValue ?? overridableValue;
|