@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/dist/index.mjs
CHANGED
|
@@ -4993,19 +4993,15 @@ var EditingPanelHooks = () => {
|
|
|
4993
4993
|
};
|
|
4994
4994
|
|
|
4995
4995
|
// src/components/promotions/init.tsx
|
|
4996
|
-
import { DisplayConditionsControl } from "@elementor/editor-controls";
|
|
4996
|
+
import { AttributesControl, DisplayConditionsControl } from "@elementor/editor-controls";
|
|
4997
4997
|
|
|
4998
4998
|
// src/components/promotions/custom-css.tsx
|
|
4999
4999
|
import * as React86 from "react";
|
|
5000
|
-
import {
|
|
5001
|
-
import {
|
|
5000
|
+
import { useRef as useRef15 } from "react";
|
|
5001
|
+
import { PromotionTrigger } from "@elementor/editor-controls";
|
|
5002
5002
|
import { __ as __58 } from "@wordpress/i18n";
|
|
5003
|
-
function getCustomCssPromotion() {
|
|
5004
|
-
return window.elementor?.config?.v4Promotions?.customCss;
|
|
5005
|
-
}
|
|
5006
5003
|
var CustomCssSection = () => {
|
|
5007
|
-
const
|
|
5008
|
-
const promotion = getCustomCssPromotion();
|
|
5004
|
+
const triggerRef = useRef15(null);
|
|
5009
5005
|
return /* @__PURE__ */ React86.createElement(
|
|
5010
5006
|
StyleTabSection,
|
|
5011
5007
|
{
|
|
@@ -5013,25 +5009,8 @@ var CustomCssSection = () => {
|
|
|
5013
5009
|
name: "Custom CSS",
|
|
5014
5010
|
title: __58("Custom CSS", "elementor"),
|
|
5015
5011
|
action: {
|
|
5016
|
-
component: /* @__PURE__ */ React86.createElement(
|
|
5017
|
-
|
|
5018
|
-
{
|
|
5019
|
-
title: promotion?.title ?? "",
|
|
5020
|
-
content: promotion?.content ?? "",
|
|
5021
|
-
assetUrl: promotion?.image ?? "",
|
|
5022
|
-
ctaUrl: promotion?.ctaUrl ?? "",
|
|
5023
|
-
open: showInfoTip,
|
|
5024
|
-
onClose: () => {
|
|
5025
|
-
setShowInfoTip(false);
|
|
5026
|
-
}
|
|
5027
|
-
},
|
|
5028
|
-
/* @__PURE__ */ React86.createElement(PromotionChip, null)
|
|
5029
|
-
),
|
|
5030
|
-
onClick: () => {
|
|
5031
|
-
if (!showInfoTip) {
|
|
5032
|
-
setShowInfoTip(true);
|
|
5033
|
-
}
|
|
5034
|
-
}
|
|
5012
|
+
component: /* @__PURE__ */ React86.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "customCss" }),
|
|
5013
|
+
onClick: () => triggerRef.current?.toggle()
|
|
5035
5014
|
}
|
|
5036
5015
|
}
|
|
5037
5016
|
}
|
|
@@ -5046,6 +5025,7 @@ var init = () => {
|
|
|
5046
5025
|
component: CustomCssSection,
|
|
5047
5026
|
options: { overwrite: true }
|
|
5048
5027
|
});
|
|
5028
|
+
controlsRegistry.register("attributes", AttributesControl, "two-columns");
|
|
5049
5029
|
controlsRegistry.register("display-conditions", DisplayConditionsControl, "two-columns");
|
|
5050
5030
|
}
|
|
5051
5031
|
};
|
|
@@ -5683,7 +5663,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5683
5663
|
};
|
|
5684
5664
|
|
|
5685
5665
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5686
|
-
import { Fragment as Fragment14, useState as
|
|
5666
|
+
import { Fragment as Fragment14, useState as useState11 } from "react";
|
|
5687
5667
|
import * as React91 from "react";
|
|
5688
5668
|
import { useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
5689
5669
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField } from "@elementor/editor-ui";
|
|
@@ -5694,7 +5674,7 @@ var SIZE4 = "tiny";
|
|
|
5694
5674
|
var PROMO_TEXT_WIDTH = 170;
|
|
5695
5675
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
5696
5676
|
var DynamicSelection = ({ close: closePopover }) => {
|
|
5697
|
-
const [searchValue, setSearchValue] =
|
|
5677
|
+
const [searchValue, setSearchValue] = useState11("");
|
|
5698
5678
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5699
5679
|
const theme = useTheme3();
|
|
5700
5680
|
const { value: anyValue } = useBoundProp9();
|
|
@@ -6148,7 +6128,7 @@ import { __ as __68 } from "@wordpress/i18n";
|
|
|
6148
6128
|
|
|
6149
6129
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6150
6130
|
import * as React98 from "react";
|
|
6151
|
-
import { useMemo as useMemo14, useRef as
|
|
6131
|
+
import { useMemo as useMemo14, useRef as useRef16, useState as useState13 } from "react";
|
|
6152
6132
|
import { createPropsResolver as createPropsResolver2 } from "@elementor/editor-canvas";
|
|
6153
6133
|
import { PopoverHeader as PopoverHeader3 } from "@elementor/editor-ui";
|
|
6154
6134
|
import {
|
|
@@ -6165,7 +6145,7 @@ import {
|
|
|
6165
6145
|
import { __ as __67 } from "@wordpress/i18n";
|
|
6166
6146
|
|
|
6167
6147
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6168
|
-
import { isValidElement, useEffect as useEffect7, useState as
|
|
6148
|
+
import { isValidElement, useEffect as useEffect7, useState as useState12 } from "react";
|
|
6169
6149
|
import { UnknownStyleStateError } from "@elementor/editor-canvas";
|
|
6170
6150
|
import {
|
|
6171
6151
|
isClassState as isClassState2,
|
|
@@ -6175,7 +6155,7 @@ import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2
|
|
|
6175
6155
|
import { __ as __65 } from "@wordpress/i18n";
|
|
6176
6156
|
var MAXIMUM_ITEMS = 2;
|
|
6177
6157
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
6178
|
-
const [items3, setItems] =
|
|
6158
|
+
const [items3, setItems] = useState12([]);
|
|
6179
6159
|
useEffect7(() => {
|
|
6180
6160
|
(async () => {
|
|
6181
6161
|
const normalizedItems = await Promise.all(
|
|
@@ -6360,8 +6340,8 @@ var StylesInheritanceInfotip = ({
|
|
|
6360
6340
|
children,
|
|
6361
6341
|
isDisabled
|
|
6362
6342
|
}) => {
|
|
6363
|
-
const [showInfotip, setShowInfotip] =
|
|
6364
|
-
const triggerRef =
|
|
6343
|
+
const [showInfotip, setShowInfotip] = useState13(false);
|
|
6344
|
+
const triggerRef = useRef16(null);
|
|
6365
6345
|
const toggleInfotip = () => {
|
|
6366
6346
|
if (isDisabled) {
|
|
6367
6347
|
return;
|