@elementor/editor-editing-panel 4.3.0-960 → 4.3.0-962
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 +276 -259
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/components/style-sections/layout-section/grid-outline-field.tsx +22 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-editing-panel",
|
|
3
|
-
"version": "4.3.0-
|
|
3
|
+
"version": "4.3.0-962",
|
|
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.3.0-
|
|
43
|
-
"@elementor/editor-canvas": "4.3.0-
|
|
44
|
-
"@elementor/editor-controls": "4.3.0-
|
|
45
|
-
"@elementor/editor-documents": "4.3.0-
|
|
46
|
-
"@elementor/editor-elements": "4.3.0-
|
|
47
|
-
"@elementor/editor-interactions": "4.3.0-
|
|
48
|
-
"@elementor/editor-notifications": "4.3.0-
|
|
49
|
-
"@elementor/editor-panels": "4.3.0-
|
|
50
|
-
"@elementor/editor-props": "4.3.0-
|
|
51
|
-
"@elementor/editor-responsive": "4.3.0-
|
|
52
|
-
"@elementor/editor-styles": "4.3.0-
|
|
53
|
-
"@elementor/editor-styles-repository": "4.3.0-
|
|
54
|
-
"@elementor/editor-ui": "4.3.0-
|
|
55
|
-
"@elementor/editor-v1-adapters": "4.3.0-
|
|
56
|
-
"@elementor/http-client": "4.3.0-
|
|
42
|
+
"@elementor/editor": "4.3.0-962",
|
|
43
|
+
"@elementor/editor-canvas": "4.3.0-962",
|
|
44
|
+
"@elementor/editor-controls": "4.3.0-962",
|
|
45
|
+
"@elementor/editor-documents": "4.3.0-962",
|
|
46
|
+
"@elementor/editor-elements": "4.3.0-962",
|
|
47
|
+
"@elementor/editor-interactions": "4.3.0-962",
|
|
48
|
+
"@elementor/editor-notifications": "4.3.0-962",
|
|
49
|
+
"@elementor/editor-panels": "4.3.0-962",
|
|
50
|
+
"@elementor/editor-props": "4.3.0-962",
|
|
51
|
+
"@elementor/editor-responsive": "4.3.0-962",
|
|
52
|
+
"@elementor/editor-styles": "4.3.0-962",
|
|
53
|
+
"@elementor/editor-styles-repository": "4.3.0-962",
|
|
54
|
+
"@elementor/editor-ui": "4.3.0-962",
|
|
55
|
+
"@elementor/editor-v1-adapters": "4.3.0-962",
|
|
56
|
+
"@elementor/http-client": "4.3.0-962",
|
|
57
57
|
"@elementor/icons": "~1.75.1",
|
|
58
|
-
"@elementor/editor-variables": "4.3.0-
|
|
59
|
-
"@elementor/locations": "4.3.0-
|
|
60
|
-
"@elementor/menus": "4.3.0-
|
|
61
|
-
"@elementor/query": "4.3.0-
|
|
62
|
-
"@elementor/schema": "4.3.0-
|
|
63
|
-
"@elementor/session": "4.3.0-
|
|
58
|
+
"@elementor/editor-variables": "4.3.0-962",
|
|
59
|
+
"@elementor/locations": "4.3.0-962",
|
|
60
|
+
"@elementor/menus": "4.3.0-962",
|
|
61
|
+
"@elementor/query": "4.3.0-962",
|
|
62
|
+
"@elementor/schema": "4.3.0-962",
|
|
63
|
+
"@elementor/session": "4.3.0-962",
|
|
64
64
|
"@elementor/ui": "1.37.5",
|
|
65
|
-
"@elementor/utils": "4.3.0-
|
|
66
|
-
"@elementor/wp-media": "4.3.0-
|
|
65
|
+
"@elementor/utils": "4.3.0-962",
|
|
66
|
+
"@elementor/wp-media": "4.3.0-962",
|
|
67
67
|
"@wordpress/i18n": "^5.13.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { updateElementEditorSettings, useElementEditorSettings } from '@elementor/editor-elements';
|
|
3
|
+
import { Box, Switch } from '@elementor/ui';
|
|
3
4
|
import { __ } from '@wordpress/i18n';
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
+
import { useElement } from '../../../contexts/element-context';
|
|
6
7
|
import { StylesFieldLayout } from '../../styles-field-layout';
|
|
7
8
|
|
|
8
9
|
const GRID_OUTLINE_LABEL = __( 'Show Grid Outline', 'elementor' );
|
|
9
10
|
|
|
10
11
|
export const GridOutlineField = () => {
|
|
12
|
+
const { element } = useElement();
|
|
13
|
+
const settings = useElementEditorSettings( element.id );
|
|
14
|
+
const value = settings?.grid_outline ?? true;
|
|
15
|
+
|
|
11
16
|
return (
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
<StylesFieldLayout label={ GRID_OUTLINE_LABEL }>
|
|
18
|
+
<Box sx={ { display: 'flex', justifyContent: 'flex-end' } }>
|
|
19
|
+
<Switch
|
|
20
|
+
aria-label={ GRID_OUTLINE_LABEL }
|
|
21
|
+
checked={ value }
|
|
22
|
+
onChange={ ( event: React.ChangeEvent< HTMLInputElement > ) => {
|
|
23
|
+
updateElementEditorSettings( {
|
|
24
|
+
elementId: element.id,
|
|
25
|
+
settings: { grid_outline: event.target.checked },
|
|
26
|
+
} );
|
|
27
|
+
} }
|
|
28
|
+
size="small"
|
|
29
|
+
/>
|
|
30
|
+
</Box>
|
|
31
|
+
</StylesFieldLayout>
|
|
17
32
|
);
|
|
18
33
|
};
|