@elementor/editor-editing-panel 3.35.0-493 → 3.35.1
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 +31 -6
- package/dist/index.d.ts +31 -6
- package/dist/index.js +90 -157
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -108
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/promotions/custom-css.tsx +5 -30
- package/src/components/promotions/init.tsx +7 -0
- package/src/dynamics/components/dynamic-selection-control.tsx +4 -13
- package/src/dynamics/components/dynamic-selection.tsx +27 -63
- package/src/index.ts +2 -1
- package/src/components/promotions/types.ts +0 -14
- package/src/hooks/use-license-config.ts +0 -26
package/dist/index.mjs
CHANGED
|
@@ -4992,18 +4992,16 @@ var EditingPanelHooks = () => {
|
|
|
4992
4992
|
return null;
|
|
4993
4993
|
};
|
|
4994
4994
|
|
|
4995
|
+
// src/components/promotions/init.tsx
|
|
4996
|
+
import { AttributesControl, DisplayConditionsControl } from "@elementor/editor-controls";
|
|
4997
|
+
|
|
4995
4998
|
// src/components/promotions/custom-css.tsx
|
|
4996
4999
|
import * as React86 from "react";
|
|
4997
|
-
import {
|
|
4998
|
-
import {
|
|
5000
|
+
import { useRef as useRef15 } from "react";
|
|
5001
|
+
import { PromotionTrigger } from "@elementor/editor-controls";
|
|
4999
5002
|
import { __ as __58 } from "@wordpress/i18n";
|
|
5000
|
-
function getCustomCssPromotion() {
|
|
5001
|
-
const extendedWindow2 = window;
|
|
5002
|
-
return extendedWindow2.elementor?.config?.v4Promotions?.customCss;
|
|
5003
|
-
}
|
|
5004
5003
|
var CustomCssSection = () => {
|
|
5005
|
-
const
|
|
5006
|
-
const promotion = getCustomCssPromotion();
|
|
5004
|
+
const triggerRef = useRef15(null);
|
|
5007
5005
|
return /* @__PURE__ */ React86.createElement(
|
|
5008
5006
|
StyleTabSection,
|
|
5009
5007
|
{
|
|
@@ -5011,25 +5009,8 @@ var CustomCssSection = () => {
|
|
|
5011
5009
|
name: "Custom CSS",
|
|
5012
5010
|
title: __58("Custom CSS", "elementor"),
|
|
5013
5011
|
action: {
|
|
5014
|
-
component: /* @__PURE__ */ React86.createElement(
|
|
5015
|
-
|
|
5016
|
-
{
|
|
5017
|
-
title: promotion?.title ?? "",
|
|
5018
|
-
content: promotion?.content ?? "",
|
|
5019
|
-
assetUrl: promotion?.image ?? "",
|
|
5020
|
-
ctaUrl: promotion?.ctaUrl ?? "",
|
|
5021
|
-
open: showInfoTip,
|
|
5022
|
-
onClose: () => {
|
|
5023
|
-
setShowInfoTip(false);
|
|
5024
|
-
}
|
|
5025
|
-
},
|
|
5026
|
-
/* @__PURE__ */ React86.createElement(PromotionChip, null)
|
|
5027
|
-
),
|
|
5028
|
-
onClick: () => {
|
|
5029
|
-
if (!showInfoTip) {
|
|
5030
|
-
setShowInfoTip(true);
|
|
5031
|
-
}
|
|
5032
|
-
}
|
|
5012
|
+
component: /* @__PURE__ */ React86.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "customCss" }),
|
|
5013
|
+
onClick: () => triggerRef.current?.toggle()
|
|
5033
5014
|
}
|
|
5034
5015
|
}
|
|
5035
5016
|
}
|
|
@@ -5044,6 +5025,8 @@ var init = () => {
|
|
|
5044
5025
|
component: CustomCssSection,
|
|
5045
5026
|
options: { overwrite: true }
|
|
5046
5027
|
});
|
|
5028
|
+
controlsRegistry.register("attributes", AttributesControl, "two-columns");
|
|
5029
|
+
controlsRegistry.register("display-conditions", DisplayConditionsControl, "two-columns");
|
|
5047
5030
|
}
|
|
5048
5031
|
};
|
|
5049
5032
|
|
|
@@ -5586,25 +5569,6 @@ import {
|
|
|
5586
5569
|
} from "@elementor/ui";
|
|
5587
5570
|
import { __ as __62 } from "@wordpress/i18n";
|
|
5588
5571
|
|
|
5589
|
-
// src/hooks/use-license-config.ts
|
|
5590
|
-
import { useSyncExternalStore } from "react";
|
|
5591
|
-
var config = { expired: false };
|
|
5592
|
-
var listeners = /* @__PURE__ */ new Set();
|
|
5593
|
-
function setLicenseConfig(newConfig) {
|
|
5594
|
-
config = { ...config, ...newConfig };
|
|
5595
|
-
listeners.forEach((listener) => listener());
|
|
5596
|
-
}
|
|
5597
|
-
function getConfig() {
|
|
5598
|
-
return config;
|
|
5599
|
-
}
|
|
5600
|
-
function subscribe(listener) {
|
|
5601
|
-
listeners.add(listener);
|
|
5602
|
-
return () => listeners.delete(listener);
|
|
5603
|
-
}
|
|
5604
|
-
function useLicenseConfig() {
|
|
5605
|
-
return useSyncExternalStore(subscribe, getConfig, getConfig);
|
|
5606
|
-
}
|
|
5607
|
-
|
|
5608
5572
|
// src/hooks/use-persist-dynamic-value.ts
|
|
5609
5573
|
import { useSessionStorage as useSessionStorage4 } from "@elementor/session";
|
|
5610
5574
|
var usePersistDynamicValue = (propKey) => {
|
|
@@ -5699,7 +5663,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5699
5663
|
};
|
|
5700
5664
|
|
|
5701
5665
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5702
|
-
import { Fragment as Fragment14, useState as
|
|
5666
|
+
import { Fragment as Fragment14, useState as useState11 } from "react";
|
|
5703
5667
|
import * as React91 from "react";
|
|
5704
5668
|
import { useBoundProp as useBoundProp9 } from "@elementor/editor-controls";
|
|
5705
5669
|
import { CtaButton, PopoverHeader, PopoverMenuList, SearchField } from "@elementor/editor-ui";
|
|
@@ -5709,9 +5673,8 @@ import { __ as __61 } from "@wordpress/i18n";
|
|
|
5709
5673
|
var SIZE4 = "tiny";
|
|
5710
5674
|
var PROMO_TEXT_WIDTH = 170;
|
|
5711
5675
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
5712
|
-
var
|
|
5713
|
-
|
|
5714
|
-
const [searchValue, setSearchValue] = useState12("");
|
|
5676
|
+
var DynamicSelection = ({ close: closePopover }) => {
|
|
5677
|
+
const [searchValue, setSearchValue] = useState11("");
|
|
5715
5678
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5716
5679
|
const theme = useTheme3();
|
|
5717
5680
|
const { value: anyValue } = useBoundProp9();
|
|
@@ -5743,32 +5706,6 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5743
5706
|
label: item.label
|
|
5744
5707
|
}))
|
|
5745
5708
|
]);
|
|
5746
|
-
const getPopOverContent = () => {
|
|
5747
|
-
if (hasNoDynamicTags) {
|
|
5748
|
-
return /* @__PURE__ */ React91.createElement(NoDynamicTags, null);
|
|
5749
|
-
}
|
|
5750
|
-
if (expired) {
|
|
5751
|
-
return /* @__PURE__ */ React91.createElement(ExpiredDynamicTags, null);
|
|
5752
|
-
}
|
|
5753
|
-
return /* @__PURE__ */ React91.createElement(Fragment14, null, /* @__PURE__ */ React91.createElement(
|
|
5754
|
-
SearchField,
|
|
5755
|
-
{
|
|
5756
|
-
value: searchValue,
|
|
5757
|
-
onSearch: handleSearch,
|
|
5758
|
-
placeholder: __61("Search dynamic tags\u2026", "elementor")
|
|
5759
|
-
}
|
|
5760
|
-
), /* @__PURE__ */ React91.createElement(Divider7, null), /* @__PURE__ */ React91.createElement(
|
|
5761
|
-
PopoverMenuList,
|
|
5762
|
-
{
|
|
5763
|
-
items: virtualizedItems,
|
|
5764
|
-
onSelect: handleSetDynamicTag,
|
|
5765
|
-
onClose: closePopover,
|
|
5766
|
-
selectedValue: dynamicValue?.name,
|
|
5767
|
-
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
5768
|
-
noResultsComponent: /* @__PURE__ */ React91.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
5769
|
-
}
|
|
5770
|
-
));
|
|
5771
|
-
};
|
|
5772
5709
|
return /* @__PURE__ */ React91.createElement(PopoverBody, { "aria-label": __61("Dynamic tags", "elementor") }, /* @__PURE__ */ React91.createElement(
|
|
5773
5710
|
PopoverHeader,
|
|
5774
5711
|
{
|
|
@@ -5776,7 +5713,24 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5776
5713
|
onClose: closePopover,
|
|
5777
5714
|
icon: /* @__PURE__ */ React91.createElement(DatabaseIcon2, { fontSize: SIZE4 })
|
|
5778
5715
|
}
|
|
5779
|
-
),
|
|
5716
|
+
), hasNoDynamicTags ? /* @__PURE__ */ React91.createElement(NoDynamicTags, null) : /* @__PURE__ */ React91.createElement(Fragment14, null, /* @__PURE__ */ React91.createElement(
|
|
5717
|
+
SearchField,
|
|
5718
|
+
{
|
|
5719
|
+
value: searchValue,
|
|
5720
|
+
onSearch: handleSearch,
|
|
5721
|
+
placeholder: __61("Search dynamic tags\u2026", "elementor")
|
|
5722
|
+
}
|
|
5723
|
+
), /* @__PURE__ */ React91.createElement(Divider7, null), /* @__PURE__ */ React91.createElement(
|
|
5724
|
+
PopoverMenuList,
|
|
5725
|
+
{
|
|
5726
|
+
items: virtualizedItems,
|
|
5727
|
+
onSelect: handleSetDynamicTag,
|
|
5728
|
+
onClose: closePopover,
|
|
5729
|
+
selectedValue: dynamicValue?.name,
|
|
5730
|
+
itemStyle: (item) => item.type === "item" ? { paddingInlineStart: theme.spacing(3.5) } : {},
|
|
5731
|
+
noResultsComponent: /* @__PURE__ */ React91.createElement(NoResults, { searchValue, onClear: () => setSearchValue("") })
|
|
5732
|
+
}
|
|
5733
|
+
)));
|
|
5780
5734
|
};
|
|
5781
5735
|
var NoResults = ({ searchValue, onClear }) => /* @__PURE__ */ React91.createElement(
|
|
5782
5736
|
Stack16,
|
|
@@ -5809,22 +5763,6 @@ var NoDynamicTags = () => /* @__PURE__ */ React91.createElement(React91.Fragment
|
|
|
5809
5763
|
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __61("Upgrade now to display your content dynamically.", "elementor")),
|
|
5810
5764
|
/* @__PURE__ */ React91.createElement(CtaButton, { size: "small", href: PRO_DYNAMIC_TAGS_URL })
|
|
5811
5765
|
));
|
|
5812
|
-
var ExpiredDynamicTags = () => /* @__PURE__ */ React91.createElement(React91.Fragment, null, /* @__PURE__ */ React91.createElement(Divider7, null), /* @__PURE__ */ React91.createElement(
|
|
5813
|
-
Stack16,
|
|
5814
|
-
{
|
|
5815
|
-
gap: 1,
|
|
5816
|
-
alignItems: "center",
|
|
5817
|
-
justifyContent: "center",
|
|
5818
|
-
height: "100%",
|
|
5819
|
-
p: 2.5,
|
|
5820
|
-
color: "text.secondary",
|
|
5821
|
-
sx: { pb: 3.5 }
|
|
5822
|
-
},
|
|
5823
|
-
/* @__PURE__ */ React91.createElement(DatabaseIcon2, { fontSize: "large" }),
|
|
5824
|
-
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "subtitle2" }, __61("Unlock your Dynamic tags again", "elementor")),
|
|
5825
|
-
/* @__PURE__ */ React91.createElement(Typography5, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, __61("Dynamic tags need Elementor Pro. Renew now to keep them active.", "elementor")),
|
|
5826
|
-
/* @__PURE__ */ React91.createElement(CtaButton, { size: "small", href: RENEW_DYNAMIC_TAGS_URL, children: __61("Renew Now", "elementor") })
|
|
5827
|
-
));
|
|
5828
5766
|
var useFilteredOptions = (searchValue) => {
|
|
5829
5767
|
const dynamicTags = usePropDynamicTags();
|
|
5830
5768
|
const options12 = dynamicTags.reduce((categories, { name, label, group }) => {
|
|
@@ -5847,7 +5785,6 @@ var tagsWithoutTabs = ["popup"];
|
|
|
5847
5785
|
var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
5848
5786
|
const { setValue: setAnyValue, propType } = useBoundProp10();
|
|
5849
5787
|
const { bind, value } = useBoundProp10(dynamicPropTypeUtil);
|
|
5850
|
-
const { expired: readonly } = useLicenseConfig();
|
|
5851
5788
|
const originalPropType = createTopLevelObjectType({
|
|
5852
5789
|
schema: {
|
|
5853
5790
|
[bind]: propType
|
|
@@ -5874,7 +5811,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5874
5811
|
label: dynamicTag.label,
|
|
5875
5812
|
startIcon: /* @__PURE__ */ React92.createElement(DatabaseIcon3, { fontSize: SIZE5 }),
|
|
5876
5813
|
...bindTrigger3(selectionPopoverState),
|
|
5877
|
-
actions: /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(DynamicSettingsPopover, { dynamicTag
|
|
5814
|
+
actions: /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(DynamicSettingsPopover, { dynamicTag }), /* @__PURE__ */ React92.createElement(
|
|
5878
5815
|
IconButton4,
|
|
5879
5816
|
{
|
|
5880
5817
|
size: SIZE5,
|
|
@@ -5896,13 +5833,10 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5896
5833
|
},
|
|
5897
5834
|
...bindPopover2(selectionPopoverState)
|
|
5898
5835
|
},
|
|
5899
|
-
/* @__PURE__ */ React92.createElement(PopoverBody, { "aria-label": __62("Dynamic tags", "elementor") }, /* @__PURE__ */ React92.createElement(DynamicSelection, { close: selectionPopoverState.close
|
|
5836
|
+
/* @__PURE__ */ React92.createElement(PopoverBody, { "aria-label": __62("Dynamic tags", "elementor") }, /* @__PURE__ */ React92.createElement(DynamicSelection, { close: selectionPopoverState.close }))
|
|
5900
5837
|
));
|
|
5901
5838
|
};
|
|
5902
|
-
var DynamicSettingsPopover = ({
|
|
5903
|
-
dynamicTag,
|
|
5904
|
-
disabled = false
|
|
5905
|
-
}) => {
|
|
5839
|
+
var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
5906
5840
|
const popupState = usePopupState3({ variant: "popover" });
|
|
5907
5841
|
const hasDynamicSettings = !!dynamicTag.atomic_controls.length;
|
|
5908
5842
|
if (!hasDynamicSettings) {
|
|
@@ -5912,8 +5846,7 @@ var DynamicSettingsPopover = ({
|
|
|
5912
5846
|
IconButton4,
|
|
5913
5847
|
{
|
|
5914
5848
|
size: SIZE5,
|
|
5915
|
-
|
|
5916
|
-
...!disabled && bindTrigger3(popupState),
|
|
5849
|
+
...bindTrigger3(popupState),
|
|
5917
5850
|
"aria-label": __62("Dynamic settings", "elementor")
|
|
5918
5851
|
},
|
|
5919
5852
|
/* @__PURE__ */ React92.createElement(SettingsIcon, { fontSize: SIZE5 })
|
|
@@ -6195,7 +6128,7 @@ import { __ as __68 } from "@wordpress/i18n";
|
|
|
6195
6128
|
|
|
6196
6129
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6197
6130
|
import * as React98 from "react";
|
|
6198
|
-
import { useMemo as useMemo14, useRef as
|
|
6131
|
+
import { useMemo as useMemo14, useRef as useRef16, useState as useState13 } from "react";
|
|
6199
6132
|
import { createPropsResolver as createPropsResolver2 } from "@elementor/editor-canvas";
|
|
6200
6133
|
import { PopoverHeader as PopoverHeader3 } from "@elementor/editor-ui";
|
|
6201
6134
|
import {
|
|
@@ -6212,7 +6145,7 @@ import {
|
|
|
6212
6145
|
import { __ as __67 } from "@wordpress/i18n";
|
|
6213
6146
|
|
|
6214
6147
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6215
|
-
import { isValidElement, useEffect as useEffect7, useState as
|
|
6148
|
+
import { isValidElement, useEffect as useEffect7, useState as useState12 } from "react";
|
|
6216
6149
|
import { UnknownStyleStateError } from "@elementor/editor-canvas";
|
|
6217
6150
|
import {
|
|
6218
6151
|
isClassState as isClassState2,
|
|
@@ -6222,7 +6155,7 @@ import { ELEMENTS_BASE_STYLES_PROVIDER_KEY as ELEMENTS_BASE_STYLES_PROVIDER_KEY2
|
|
|
6222
6155
|
import { __ as __65 } from "@wordpress/i18n";
|
|
6223
6156
|
var MAXIMUM_ITEMS = 2;
|
|
6224
6157
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
6225
|
-
const [items3, setItems] =
|
|
6158
|
+
const [items3, setItems] = useState12([]);
|
|
6226
6159
|
useEffect7(() => {
|
|
6227
6160
|
(async () => {
|
|
6228
6161
|
const normalizedItems = await Promise.all(
|
|
@@ -6407,8 +6340,8 @@ var StylesInheritanceInfotip = ({
|
|
|
6407
6340
|
children,
|
|
6408
6341
|
isDisabled
|
|
6409
6342
|
}) => {
|
|
6410
|
-
const [showInfotip, setShowInfotip] =
|
|
6411
|
-
const triggerRef =
|
|
6343
|
+
const [showInfotip, setShowInfotip] = useState13(false);
|
|
6344
|
+
const triggerRef = useRef16(null);
|
|
6412
6345
|
const toggleInfotip = () => {
|
|
6413
6346
|
if (isDisabled) {
|
|
6414
6347
|
return;
|
|
@@ -6904,11 +6837,11 @@ export {
|
|
|
6904
6837
|
injectIntoCssClassConvert,
|
|
6905
6838
|
injectIntoPanelHeaderTop,
|
|
6906
6839
|
injectIntoStyleTab,
|
|
6840
|
+
isDynamicPropValue,
|
|
6907
6841
|
registerControlReplacement,
|
|
6908
6842
|
registerEditingPanelReplacement,
|
|
6909
6843
|
registerFieldIndicator,
|
|
6910
6844
|
registerStyleProviderToColors,
|
|
6911
|
-
setLicenseConfig,
|
|
6912
6845
|
stylesInheritanceTransformersRegistry,
|
|
6913
6846
|
useBoundProp14 as useBoundProp,
|
|
6914
6847
|
useClassesProp,
|