@elementor/editor-editing-panel 3.35.0-358 → 3.35.0-360
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.mjs
CHANGED
|
@@ -1060,7 +1060,7 @@ function CssClassItem(props) {
|
|
|
1060
1060
|
const allowRename = Boolean(providerActions?.update) && userCan(provider ?? "")?.update;
|
|
1061
1061
|
const isShowingState = isActive && meta.state;
|
|
1062
1062
|
const stateLabel = useMemo3(() => {
|
|
1063
|
-
if (isClassState(meta.state)) {
|
|
1063
|
+
if (meta.state && isClassState(meta.state)) {
|
|
1064
1064
|
return elementStates.find((state) => state.value === meta.state)?.label;
|
|
1065
1065
|
}
|
|
1066
1066
|
return meta.state;
|
|
@@ -6085,6 +6085,7 @@ import { __ as __66 } from "@wordpress/i18n";
|
|
|
6085
6085
|
|
|
6086
6086
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6087
6087
|
import { isValidElement, useEffect as useEffect7, useState as useState12 } from "react";
|
|
6088
|
+
import { UnknownStyleStateError } from "@elementor/editor-canvas";
|
|
6088
6089
|
import {
|
|
6089
6090
|
isClassState as isClassState2,
|
|
6090
6091
|
isPseudoState
|
|
@@ -6116,7 +6117,7 @@ var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
|
6116
6117
|
},
|
|
6117
6118
|
style: { label, id }
|
|
6118
6119
|
} = item;
|
|
6119
|
-
const displayLabel =
|
|
6120
|
+
const displayLabel = getDisplayLabel({ label, state });
|
|
6120
6121
|
return {
|
|
6121
6122
|
id: id ? id + (state ?? "") : index,
|
|
6122
6123
|
provider: item.provider || "",
|
|
@@ -6125,14 +6126,17 @@ var normalizeInheritanceItem = async (item, index, bind, resolve) => {
|
|
|
6125
6126
|
value: await getTransformedValue(item, bind, resolve)
|
|
6126
6127
|
};
|
|
6127
6128
|
};
|
|
6128
|
-
function
|
|
6129
|
+
function getDisplayLabel({ label, state }) {
|
|
6130
|
+
if (!state) {
|
|
6131
|
+
return label;
|
|
6132
|
+
}
|
|
6129
6133
|
if (isClassState2(state)) {
|
|
6130
6134
|
return `${label}.${state}`;
|
|
6131
6135
|
}
|
|
6132
6136
|
if (isPseudoState(state)) {
|
|
6133
6137
|
return `${label}:${state}`;
|
|
6134
6138
|
}
|
|
6135
|
-
|
|
6139
|
+
throw new UnknownStyleStateError({ context: { state } });
|
|
6136
6140
|
}
|
|
6137
6141
|
var getTransformedValue = async (item, bind, resolve) => {
|
|
6138
6142
|
try {
|
|
@@ -6446,7 +6450,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6446
6450
|
return null;
|
|
6447
6451
|
}
|
|
6448
6452
|
const isFinalValue = currentItem === actualStyle;
|
|
6449
|
-
const label =
|
|
6453
|
+
const label = getLabel({ isFinalValue, hasValue });
|
|
6450
6454
|
const styleIndicatorProps = {
|
|
6451
6455
|
getColor: isFinalValue && currentStyleProvider ? getStylesProviderThemeColor(currentStyleProvider.getKey()) : void 0,
|
|
6452
6456
|
isOverridden: hasValue && !isFinalValue ? true : void 0
|
|
@@ -6463,7 +6467,7 @@ var Indicator = ({ inheritanceChain, path, propType, isDisabled }) => {
|
|
|
6463
6467
|
/* @__PURE__ */ React98.createElement(StyleIndicator, { ...styleIndicatorProps })
|
|
6464
6468
|
);
|
|
6465
6469
|
};
|
|
6466
|
-
var
|
|
6470
|
+
var getLabel = ({ isFinalValue, hasValue }) => {
|
|
6467
6471
|
if (isFinalValue) {
|
|
6468
6472
|
return __67("This is the final value", "elementor");
|
|
6469
6473
|
}
|