@elementor/editor-editing-panel 4.2.0-930 → 4.2.0-931
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 +78 -87
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/components/style-sections/layout-section/display-field.tsx +1 -8
- package/src/components/style-sections/layout-section/layout-section.tsx +2 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-editing-panel",
|
|
3
|
-
"version": "4.2.0-
|
|
3
|
+
"version": "4.2.0-931",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,31 +39,31 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor": "4.2.0-
|
|
43
|
-
"@elementor/editor-canvas": "4.2.0-
|
|
44
|
-
"@elementor/editor-controls": "4.2.0-
|
|
45
|
-
"@elementor/editor-documents": "4.2.0-
|
|
46
|
-
"@elementor/editor-elements": "4.2.0-
|
|
47
|
-
"@elementor/editor-interactions": "4.2.0-
|
|
48
|
-
"@elementor/editor-notifications": "4.2.0-
|
|
49
|
-
"@elementor/editor-panels": "4.2.0-
|
|
50
|
-
"@elementor/editor-props": "4.2.0-
|
|
51
|
-
"@elementor/editor-responsive": "4.2.0-
|
|
52
|
-
"@elementor/editor-styles": "4.2.0-
|
|
53
|
-
"@elementor/editor-styles-repository": "4.2.0-
|
|
54
|
-
"@elementor/editor-ui": "4.2.0-
|
|
55
|
-
"@elementor/editor-v1-adapters": "4.2.0-
|
|
56
|
-
"@elementor/http-client": "4.2.0-
|
|
42
|
+
"@elementor/editor": "4.2.0-931",
|
|
43
|
+
"@elementor/editor-canvas": "4.2.0-931",
|
|
44
|
+
"@elementor/editor-controls": "4.2.0-931",
|
|
45
|
+
"@elementor/editor-documents": "4.2.0-931",
|
|
46
|
+
"@elementor/editor-elements": "4.2.0-931",
|
|
47
|
+
"@elementor/editor-interactions": "4.2.0-931",
|
|
48
|
+
"@elementor/editor-notifications": "4.2.0-931",
|
|
49
|
+
"@elementor/editor-panels": "4.2.0-931",
|
|
50
|
+
"@elementor/editor-props": "4.2.0-931",
|
|
51
|
+
"@elementor/editor-responsive": "4.2.0-931",
|
|
52
|
+
"@elementor/editor-styles": "4.2.0-931",
|
|
53
|
+
"@elementor/editor-styles-repository": "4.2.0-931",
|
|
54
|
+
"@elementor/editor-ui": "4.2.0-931",
|
|
55
|
+
"@elementor/editor-v1-adapters": "4.2.0-931",
|
|
56
|
+
"@elementor/http-client": "4.2.0-931",
|
|
57
57
|
"@elementor/icons": "~1.75.1",
|
|
58
|
-
"@elementor/editor-variables": "4.2.0-
|
|
59
|
-
"@elementor/locations": "4.2.0-
|
|
60
|
-
"@elementor/menus": "4.2.0-
|
|
61
|
-
"@elementor/query": "4.2.0-
|
|
62
|
-
"@elementor/schema": "4.2.0-
|
|
63
|
-
"@elementor/session": "4.2.0-
|
|
58
|
+
"@elementor/editor-variables": "4.2.0-931",
|
|
59
|
+
"@elementor/locations": "4.2.0-931",
|
|
60
|
+
"@elementor/menus": "4.2.0-931",
|
|
61
|
+
"@elementor/query": "4.2.0-931",
|
|
62
|
+
"@elementor/schema": "4.2.0-931",
|
|
63
|
+
"@elementor/session": "4.2.0-931",
|
|
64
64
|
"@elementor/ui": "1.37.5",
|
|
65
|
-
"@elementor/utils": "4.2.0-
|
|
66
|
-
"@elementor/wp-media": "4.2.0-
|
|
65
|
+
"@elementor/utils": "4.2.0-931",
|
|
66
|
+
"@elementor/wp-media": "4.2.0-931",
|
|
67
67
|
"@wordpress/i18n": "^5.13.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
2
|
import { type ToggleButtonGroupItem, ToggleControl } from '@elementor/editor-controls';
|
|
4
|
-
import { isExperimentActive } from '@elementor/editor-v1-adapters';
|
|
5
3
|
import { __ } from '@wordpress/i18n';
|
|
6
4
|
|
|
7
5
|
import { useStylesInheritanceChain } from '../../../contexts/styles-inheritance-context';
|
|
@@ -53,16 +51,11 @@ const displayFieldItems: ToggleButtonGroupItem< Displays >[] = [
|
|
|
53
51
|
|
|
54
52
|
export const DisplayField = () => {
|
|
55
53
|
const placeholder = useDisplayPlaceholderValue();
|
|
56
|
-
const isGridActive = isExperimentActive( 'e_css_grid' );
|
|
57
|
-
const items = useMemo(
|
|
58
|
-
() => ( isGridActive ? displayFieldItems : displayFieldItems.filter( ( item ) => item.value !== 'grid' ) ),
|
|
59
|
-
[ isGridActive ]
|
|
60
|
-
);
|
|
61
54
|
|
|
62
55
|
return (
|
|
63
56
|
<StylesField bind="display" propDisplayName={ DISPLAY_LABEL } placeholder={ placeholder }>
|
|
64
57
|
<StylesFieldLayout label={ DISPLAY_LABEL } direction="column">
|
|
65
|
-
<ToggleControl options={
|
|
58
|
+
<ToggleControl options={ displayFieldItems } maxItems={ 4 } fullWidth={ true } />
|
|
66
59
|
</StylesFieldLayout>
|
|
67
60
|
</StylesField>
|
|
68
61
|
);
|
|
@@ -2,7 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { ControlFormLabel } from '@elementor/editor-controls';
|
|
3
3
|
import { useParentElement } from '@elementor/editor-elements';
|
|
4
4
|
import { type StringPropValue } from '@elementor/editor-props';
|
|
5
|
-
import { isExperimentActive } from '@elementor/editor-v1-adapters';
|
|
6
5
|
import { __ } from '@wordpress/i18n';
|
|
7
6
|
|
|
8
7
|
import { useElement } from '../../../contexts/element-context';
|
|
@@ -38,7 +37,6 @@ export const LayoutSection = () => {
|
|
|
38
37
|
history: { propDisplayName: DISPLAY_LABEL },
|
|
39
38
|
} );
|
|
40
39
|
const displayPlaceholder = useDisplayPlaceholderValue();
|
|
41
|
-
const isGridExperimentActive = isExperimentActive( 'e_css_grid' );
|
|
42
40
|
const isDisplayFlex = shouldDisplayFlexFields( display, displayPlaceholder as StringPropValue );
|
|
43
41
|
const isDisplayGrid = 'grid' === ( display?.value ?? ( displayPlaceholder as StringPropValue )?.value );
|
|
44
42
|
const { element } = useElement();
|
|
@@ -64,8 +62,8 @@ export const LayoutSection = () => {
|
|
|
64
62
|
{ 'flex' === parentStyle?.display && (
|
|
65
63
|
<FlexChildFields parentStyleDirection={ getParentStyleDirection() } />
|
|
66
64
|
) }
|
|
67
|
-
{
|
|
68
|
-
{
|
|
65
|
+
{ isDisplayGrid && <GridFields /> }
|
|
66
|
+
{ 'grid' === parentStyle?.display && (
|
|
69
67
|
<GridChildFields parentStyleDirection={ getParentStyleDirection() } />
|
|
70
68
|
) }
|
|
71
69
|
</SectionContent>
|