@elementor/editor-editing-panel 4.2.0-914 → 4.2.0-916
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 +105 -102
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/components/css-classes/css-class-menu.tsx +6 -1
package/dist/index.mjs
CHANGED
|
@@ -602,6 +602,7 @@ function CssClassProvider({ children, ...contextValue }) {
|
|
|
602
602
|
|
|
603
603
|
// src/components/css-classes/css-class-menu.tsx
|
|
604
604
|
import * as React10 from "react";
|
|
605
|
+
import { isEmpty } from "@elementor/editor-props";
|
|
605
606
|
import {
|
|
606
607
|
isElementsStylesProvider as isElementsStylesProvider3,
|
|
607
608
|
stylesRepository as stylesRepository5,
|
|
@@ -1010,7 +1011,9 @@ function useModifiedStates(styleId) {
|
|
|
1010
1011
|
const { meta } = useStyle();
|
|
1011
1012
|
const styleDef = stylesRepository5.all().find((style) => style.id === styleId);
|
|
1012
1013
|
return Object.fromEntries(
|
|
1013
|
-
styleDef?.variants.filter(
|
|
1014
|
+
styleDef?.variants.filter(
|
|
1015
|
+
(variant) => meta.breakpoint === variant.meta.breakpoint && (!isEmpty(variant.props) || Boolean(variant.custom_css?.raw?.trim()))
|
|
1016
|
+
).map((variant) => [variant.meta.state ?? "normal", true]) ?? []
|
|
1014
1017
|
);
|
|
1015
1018
|
}
|
|
1016
1019
|
function getMenuItemsByProvider({
|
|
@@ -2720,7 +2723,7 @@ import { stylesRepository as stylesRepository8 } from "@elementor/editor-styles-
|
|
|
2720
2723
|
|
|
2721
2724
|
// src/styles-inheritance/create-styles-inheritance.ts
|
|
2722
2725
|
import {
|
|
2723
|
-
isEmpty,
|
|
2726
|
+
isEmpty as isEmpty2,
|
|
2724
2727
|
isTransformable as isTransformable2
|
|
2725
2728
|
} from "@elementor/editor-props";
|
|
2726
2729
|
|
|
@@ -2873,7 +2876,7 @@ function createStylesInheritance(styleDefs, breakpointsRoot) {
|
|
|
2873
2876
|
inheritanceChain = inheritanceChain.map(({ value: styleValue, ...rest }) => ({
|
|
2874
2877
|
...rest,
|
|
2875
2878
|
value: getValueByPath(styleValue, nextFields, filterPropType)
|
|
2876
|
-
})).filter(({ value: styleValue }) => !
|
|
2879
|
+
})).filter(({ value: styleValue }) => !isEmpty2(styleValue));
|
|
2877
2880
|
}
|
|
2878
2881
|
return inheritanceChain;
|
|
2879
2882
|
}
|
|
@@ -6959,7 +6962,7 @@ function useResetStyleValueProps() {
|
|
|
6959
6962
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6960
6963
|
import * as React104 from "react";
|
|
6961
6964
|
import { useBoundProp as useBoundProp14 } from "@elementor/editor-controls";
|
|
6962
|
-
import { isEmpty as
|
|
6965
|
+
import { isEmpty as isEmpty3 } from "@elementor/editor-props";
|
|
6963
6966
|
import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY4 } from "@elementor/editor-styles-repository";
|
|
6964
6967
|
import { __ as __75 } from "@wordpress/i18n";
|
|
6965
6968
|
|
|
@@ -7335,7 +7338,7 @@ var StylesInheritanceIndicator = ({
|
|
|
7335
7338
|
var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
7336
7339
|
const { id: currentStyleId, provider: currentStyleProvider, meta: currentStyleMeta } = useStyle();
|
|
7337
7340
|
const currentItem = currentStyleId ? getValueFromInheritanceChain(inheritanceChain, currentStyleId, currentStyleMeta) : null;
|
|
7338
|
-
const hasValue = !
|
|
7341
|
+
const hasValue = !isEmpty3(currentItem?.value);
|
|
7339
7342
|
const [actualStyle] = inheritanceChain;
|
|
7340
7343
|
if (actualStyle.provider === ELEMENTS_BASE_STYLES_PROVIDER_KEY4) {
|
|
7341
7344
|
return null;
|