@elementor/editor-editing-panel 3.35.0 → 3.35.2
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.d.mts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +55 -75
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/promotions/custom-css.tsx +5 -27
- package/src/components/promotions/init.tsx +3 -1
- package/src/index.ts +0 -1
- package/src/components/promotions/types.ts +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-editing-panel",
|
|
3
|
-
"version": "3.35.
|
|
3
|
+
"version": "3.35.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,27 +39,27 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor": "3.35.
|
|
43
|
-
"@elementor/editor-canvas": "3.35.
|
|
44
|
-
"@elementor/editor-controls": "3.35.
|
|
45
|
-
"@elementor/editor-documents": "3.35.
|
|
46
|
-
"@elementor/editor-elements": "3.35.
|
|
47
|
-
"@elementor/editor-interactions": "3.35.
|
|
48
|
-
"@elementor/editor-panels": "3.35.
|
|
49
|
-
"@elementor/editor-props": "3.35.
|
|
50
|
-
"@elementor/editor-responsive": "3.35.
|
|
51
|
-
"@elementor/editor-styles": "3.35.
|
|
52
|
-
"@elementor/editor-styles-repository": "3.35.
|
|
53
|
-
"@elementor/editor-ui": "3.35.
|
|
54
|
-
"@elementor/editor-v1-adapters": "3.35.
|
|
42
|
+
"@elementor/editor": "3.35.2",
|
|
43
|
+
"@elementor/editor-canvas": "3.35.2",
|
|
44
|
+
"@elementor/editor-controls": "3.35.2",
|
|
45
|
+
"@elementor/editor-documents": "3.35.2",
|
|
46
|
+
"@elementor/editor-elements": "3.35.2",
|
|
47
|
+
"@elementor/editor-interactions": "3.35.2",
|
|
48
|
+
"@elementor/editor-panels": "3.35.2",
|
|
49
|
+
"@elementor/editor-props": "3.35.2",
|
|
50
|
+
"@elementor/editor-responsive": "3.35.2",
|
|
51
|
+
"@elementor/editor-styles": "3.35.2",
|
|
52
|
+
"@elementor/editor-styles-repository": "3.35.2",
|
|
53
|
+
"@elementor/editor-ui": "3.35.2",
|
|
54
|
+
"@elementor/editor-v1-adapters": "3.35.2",
|
|
55
55
|
"@elementor/icons": "^1.63.0",
|
|
56
|
-
"@elementor/locations": "3.35.
|
|
57
|
-
"@elementor/menus": "3.35.
|
|
58
|
-
"@elementor/schema": "3.35.
|
|
59
|
-
"@elementor/session": "3.35.
|
|
56
|
+
"@elementor/locations": "3.35.2",
|
|
57
|
+
"@elementor/menus": "3.35.2",
|
|
58
|
+
"@elementor/schema": "3.35.2",
|
|
59
|
+
"@elementor/session": "3.35.2",
|
|
60
60
|
"@elementor/ui": "1.36.17",
|
|
61
|
-
"@elementor/utils": "3.35.
|
|
62
|
-
"@elementor/wp-media": "3.35.
|
|
61
|
+
"@elementor/utils": "3.35.2",
|
|
62
|
+
"@elementor/wp-media": "3.35.2",
|
|
63
63
|
"@wordpress/i18n": "^5.13.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import { PromotionTrigger, type PromotionTriggerRef } from '@elementor/editor-controls';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
|
|
6
6
|
import { StyleTabSection } from '../style-tab-section';
|
|
7
7
|
|
|
8
|
-
function getCustomCssPromotion() {
|
|
9
|
-
return window.elementor?.config?.v4Promotions?.customCss;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
8
|
export const CustomCssSection = () => {
|
|
13
|
-
const
|
|
14
|
-
const promotion = getCustomCssPromotion();
|
|
9
|
+
const triggerRef = useRef< PromotionTriggerRef >( null );
|
|
15
10
|
|
|
16
11
|
return (
|
|
17
12
|
<StyleTabSection
|
|
@@ -19,25 +14,8 @@ export const CustomCssSection = () => {
|
|
|
19
14
|
name: 'Custom CSS',
|
|
20
15
|
title: __( 'Custom CSS', 'elementor' ),
|
|
21
16
|
action: {
|
|
22
|
-
component:
|
|
23
|
-
|
|
24
|
-
title={ promotion?.title ?? '' }
|
|
25
|
-
content={ promotion?.content ?? '' }
|
|
26
|
-
assetUrl={ promotion?.image ?? '' }
|
|
27
|
-
ctaUrl={ promotion?.ctaUrl ?? '' }
|
|
28
|
-
open={ showInfoTip }
|
|
29
|
-
onClose={ () => {
|
|
30
|
-
setShowInfoTip( false );
|
|
31
|
-
} }
|
|
32
|
-
>
|
|
33
|
-
<PromotionChip />
|
|
34
|
-
</PromotionInfotip>
|
|
35
|
-
),
|
|
36
|
-
onClick: () => {
|
|
37
|
-
if ( ! showInfoTip ) {
|
|
38
|
-
setShowInfoTip( true );
|
|
39
|
-
}
|
|
40
|
-
},
|
|
17
|
+
component: <PromotionTrigger ref={ triggerRef } promotionKey="customCss" />,
|
|
18
|
+
onClick: () => triggerRef.current?.toggle(),
|
|
41
19
|
},
|
|
42
20
|
} }
|
|
43
21
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DisplayConditionsControl } from '@elementor/editor-controls';
|
|
1
|
+
import { AttributesControl, DisplayConditionsControl } from '@elementor/editor-controls';
|
|
2
2
|
|
|
3
3
|
import { controlsRegistry } from '../../controls-registry/controls-registry';
|
|
4
4
|
import { injectIntoStyleTab } from '../style-tab';
|
|
@@ -13,6 +13,8 @@ export const init = () => {
|
|
|
13
13
|
options: { overwrite: true },
|
|
14
14
|
} );
|
|
15
15
|
|
|
16
|
+
controlsRegistry.register( 'attributes', AttributesControl, 'two-columns' );
|
|
17
|
+
|
|
16
18
|
controlsRegistry.register( 'display-conditions', DisplayConditionsControl, 'two-columns' );
|
|
17
19
|
}
|
|
18
20
|
};
|
package/src/index.ts
CHANGED
|
@@ -33,7 +33,6 @@ export { registerStyleProviderToColors } from './provider-colors-registry';
|
|
|
33
33
|
export { stylesInheritanceTransformersRegistry } from './styles-inheritance/styles-inheritance-transformers-registry';
|
|
34
34
|
export { getFieldIndicators, registerFieldIndicator, FIELD_TYPE } from './field-indicators-registry';
|
|
35
35
|
export { registerEditingPanelReplacement } from './editing-panel-replacement-registry';
|
|
36
|
-
export { type V4PromotionData } from './components/promotions/types';
|
|
37
36
|
|
|
38
37
|
export { doApplyClasses, doGetAppliedClasses, doUnapplyClass } from './apply-unapply-actions';
|
|
39
38
|
export { type DynamicTag, type DynamicTags, type DynamicTagsManager } from './dynamics/types';
|