@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.d.mts
CHANGED
|
@@ -1364,13 +1364,6 @@ declare const registerEditingPanelReplacement: ({ id, priority, ...props }: Omit
|
|
|
1364
1364
|
priority?: number;
|
|
1365
1365
|
}) => void;
|
|
1366
1366
|
|
|
1367
|
-
type V4PromotionData = {
|
|
1368
|
-
title: string;
|
|
1369
|
-
content: string;
|
|
1370
|
-
image: string;
|
|
1371
|
-
ctaUrl: string;
|
|
1372
|
-
};
|
|
1373
|
-
|
|
1374
1367
|
declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
|
|
1375
1368
|
declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
|
|
1376
1369
|
declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
|
|
@@ -1405,4 +1398,4 @@ type TagInstance = {
|
|
|
1405
1398
|
|
|
1406
1399
|
declare const isDynamicPropValue: (prop: PropValue) => prop is DynamicPropValue;
|
|
1407
1400
|
|
|
1408
|
-
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type
|
|
1401
|
+
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getControlReplacements, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, isDynamicPropValue, registerControlReplacement, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useSectionWidth, useStateByElement, useStyle, useStylesRerender };
|
package/dist/index.d.ts
CHANGED
|
@@ -1364,13 +1364,6 @@ declare const registerEditingPanelReplacement: ({ id, priority, ...props }: Omit
|
|
|
1364
1364
|
priority?: number;
|
|
1365
1365
|
}) => void;
|
|
1366
1366
|
|
|
1367
|
-
type V4PromotionData = {
|
|
1368
|
-
title: string;
|
|
1369
|
-
content: string;
|
|
1370
|
-
image: string;
|
|
1371
|
-
ctaUrl: string;
|
|
1372
|
-
};
|
|
1373
|
-
|
|
1374
1367
|
declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
|
|
1375
1368
|
declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
|
|
1376
1369
|
declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
|
|
@@ -1405,4 +1398,4 @@ type TagInstance = {
|
|
|
1405
1398
|
|
|
1406
1399
|
declare const isDynamicPropValue: (prop: PropValue) => prop is DynamicPropValue;
|
|
1407
1400
|
|
|
1408
|
-
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type
|
|
1401
|
+
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getControlReplacements, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, isDynamicPropValue, registerControlReplacement, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useSectionWidth, useStateByElement, useStyle, useStylesRerender };
|
package/dist/index.js
CHANGED
|
@@ -63,7 +63,7 @@ __export(index_exports, {
|
|
|
63
63
|
registerFieldIndicator: () => registerFieldIndicator,
|
|
64
64
|
registerStyleProviderToColors: () => registerStyleProviderToColors,
|
|
65
65
|
stylesInheritanceTransformersRegistry: () => stylesInheritanceTransformersRegistry,
|
|
66
|
-
useBoundProp: () =>
|
|
66
|
+
useBoundProp: () => import_editor_controls65.useBoundProp,
|
|
67
67
|
useClassesProp: () => useClassesProp,
|
|
68
68
|
useCustomCss: () => useCustomCss,
|
|
69
69
|
useElement: () => useElement,
|
|
@@ -76,7 +76,7 @@ __export(index_exports, {
|
|
|
76
76
|
useStylesRerender: () => useStylesRerender
|
|
77
77
|
});
|
|
78
78
|
module.exports = __toCommonJS(index_exports);
|
|
79
|
-
var
|
|
79
|
+
var import_editor_controls65 = require("@elementor/editor-controls");
|
|
80
80
|
|
|
81
81
|
// src/components/css-classes/css-class-convert-local.tsx
|
|
82
82
|
var React4 = __toESM(require("react"));
|
|
@@ -4938,19 +4938,15 @@ var EditingPanelHooks = () => {
|
|
|
4938
4938
|
};
|
|
4939
4939
|
|
|
4940
4940
|
// src/components/promotions/init.tsx
|
|
4941
|
-
var
|
|
4941
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
4942
4942
|
|
|
4943
4943
|
// src/components/promotions/custom-css.tsx
|
|
4944
4944
|
var React86 = __toESM(require("react"));
|
|
4945
4945
|
var import_react38 = require("react");
|
|
4946
|
-
var
|
|
4946
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4947
4947
|
var import_i18n58 = require("@wordpress/i18n");
|
|
4948
|
-
function getCustomCssPromotion() {
|
|
4949
|
-
return window.elementor?.config?.v4Promotions?.customCss;
|
|
4950
|
-
}
|
|
4951
4948
|
var CustomCssSection = () => {
|
|
4952
|
-
const
|
|
4953
|
-
const promotion = getCustomCssPromotion();
|
|
4949
|
+
const triggerRef = (0, import_react38.useRef)(null);
|
|
4954
4950
|
return /* @__PURE__ */ React86.createElement(
|
|
4955
4951
|
StyleTabSection,
|
|
4956
4952
|
{
|
|
@@ -4958,25 +4954,8 @@ var CustomCssSection = () => {
|
|
|
4958
4954
|
name: "Custom CSS",
|
|
4959
4955
|
title: (0, import_i18n58.__)("Custom CSS", "elementor"),
|
|
4960
4956
|
action: {
|
|
4961
|
-
component: /* @__PURE__ */ React86.createElement(
|
|
4962
|
-
|
|
4963
|
-
{
|
|
4964
|
-
title: promotion?.title ?? "",
|
|
4965
|
-
content: promotion?.content ?? "",
|
|
4966
|
-
assetUrl: promotion?.image ?? "",
|
|
4967
|
-
ctaUrl: promotion?.ctaUrl ?? "",
|
|
4968
|
-
open: showInfoTip,
|
|
4969
|
-
onClose: () => {
|
|
4970
|
-
setShowInfoTip(false);
|
|
4971
|
-
}
|
|
4972
|
-
},
|
|
4973
|
-
/* @__PURE__ */ React86.createElement(import_editor_ui8.PromotionChip, null)
|
|
4974
|
-
),
|
|
4975
|
-
onClick: () => {
|
|
4976
|
-
if (!showInfoTip) {
|
|
4977
|
-
setShowInfoTip(true);
|
|
4978
|
-
}
|
|
4979
|
-
}
|
|
4957
|
+
component: /* @__PURE__ */ React86.createElement(import_editor_controls52.PromotionTrigger, { ref: triggerRef, promotionKey: "customCss" }),
|
|
4958
|
+
onClick: () => triggerRef.current?.toggle()
|
|
4980
4959
|
}
|
|
4981
4960
|
}
|
|
4982
4961
|
}
|
|
@@ -4991,13 +4970,14 @@ var init = () => {
|
|
|
4991
4970
|
component: CustomCssSection,
|
|
4992
4971
|
options: { overwrite: true }
|
|
4993
4972
|
});
|
|
4994
|
-
controlsRegistry.register("
|
|
4973
|
+
controlsRegistry.register("attributes", import_editor_controls53.AttributesControl, "two-columns");
|
|
4974
|
+
controlsRegistry.register("display-conditions", import_editor_controls53.DisplayConditionsControl, "two-columns");
|
|
4995
4975
|
}
|
|
4996
4976
|
};
|
|
4997
4977
|
|
|
4998
4978
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
4999
4979
|
var React87 = __toESM(require("react"));
|
|
5000
|
-
var
|
|
4980
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
5001
4981
|
var import_editor_elements17 = require("@elementor/editor-elements");
|
|
5002
4982
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
5003
4983
|
var import_icons22 = require("@elementor/icons");
|
|
@@ -5022,14 +5002,14 @@ var getElementByType = (elementId, type) => {
|
|
|
5022
5002
|
};
|
|
5023
5003
|
|
|
5024
5004
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
5025
|
-
var
|
|
5005
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
5026
5006
|
var import_editor_elements16 = require("@elementor/editor-elements");
|
|
5027
5007
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
5028
5008
|
var import_i18n59 = require("@wordpress/i18n");
|
|
5029
5009
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5030
5010
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5031
5011
|
var useActions = () => {
|
|
5032
|
-
const { value, setValue: setDefaultActiveTab } = (0,
|
|
5012
|
+
const { value, setValue: setDefaultActiveTab } = (0, import_editor_controls54.useBoundProp)(import_editor_props15.numberPropTypeUtil);
|
|
5033
5013
|
const defaultActiveTab = value ?? 0;
|
|
5034
5014
|
const duplicateItem = ({
|
|
5035
5015
|
items: items3,
|
|
@@ -5259,7 +5239,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
5259
5239
|
}
|
|
5260
5240
|
};
|
|
5261
5241
|
return /* @__PURE__ */ React87.createElement(
|
|
5262
|
-
|
|
5242
|
+
import_editor_controls55.Repeater,
|
|
5263
5243
|
{
|
|
5264
5244
|
showToggle: false,
|
|
5265
5245
|
values: repeaterValues,
|
|
@@ -5283,7 +5263,7 @@ var ItemLabel = ({ value, index }) => {
|
|
|
5283
5263
|
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React87.createElement("span", null, elementTitle), /* @__PURE__ */ React87.createElement(ItemDefaultTab, { index }));
|
|
5284
5264
|
};
|
|
5285
5265
|
var ItemDefaultTab = ({ index }) => {
|
|
5286
|
-
const { value: defaultItem } = (0,
|
|
5266
|
+
const { value: defaultItem } = (0, import_editor_controls55.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5287
5267
|
const isDefault = defaultItem === index;
|
|
5288
5268
|
if (!isDefault) {
|
|
5289
5269
|
return null;
|
|
@@ -5297,9 +5277,9 @@ var ItemContent = ({ value, index }) => {
|
|
|
5297
5277
|
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { p: 2, gap: 1.5 }, /* @__PURE__ */ React87.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React87.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n60.__)("Tabs", "elementor") }, /* @__PURE__ */ React87.createElement(DefaultTabControl, { tabIndex: index })));
|
|
5298
5278
|
};
|
|
5299
5279
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
5300
|
-
const { value, setValue } = (0,
|
|
5280
|
+
const { value, setValue } = (0, import_editor_controls55.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5301
5281
|
const isDefault = value === tabIndex;
|
|
5302
|
-
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React87.createElement(
|
|
5282
|
+
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React87.createElement(import_editor_controls55.ControlFormLabel, null, (0, import_i18n60.__)("Set as default tab", "elementor")), /* @__PURE__ */ React87.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React87.createElement(
|
|
5303
5283
|
import_ui40.Switch,
|
|
5304
5284
|
{
|
|
5305
5285
|
size: "small",
|
|
@@ -5317,7 +5297,7 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
5317
5297
|
var TabLabelControl = ({ elementId }) => {
|
|
5318
5298
|
const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(elementId);
|
|
5319
5299
|
const label = editorSettings?.title ?? "";
|
|
5320
|
-
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { gap: 1 }, /* @__PURE__ */ React87.createElement(
|
|
5300
|
+
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { gap: 1 }, /* @__PURE__ */ React87.createElement(import_editor_controls55.ControlFormLabel, null, (0, import_i18n60.__)("Tab name", "elementor")), /* @__PURE__ */ React87.createElement(
|
|
5321
5301
|
import_ui40.TextField,
|
|
5322
5302
|
{
|
|
5323
5303
|
size: "tiny",
|
|
@@ -5371,11 +5351,11 @@ var registerElementControls = () => {
|
|
|
5371
5351
|
|
|
5372
5352
|
// src/dynamics/init.ts
|
|
5373
5353
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
5374
|
-
var
|
|
5354
|
+
var import_editor_controls62 = require("@elementor/editor-controls");
|
|
5375
5355
|
|
|
5376
5356
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5377
5357
|
var React88 = __toESM(require("react"));
|
|
5378
|
-
var
|
|
5358
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5379
5359
|
var import_editor_props18 = require("@elementor/editor-props");
|
|
5380
5360
|
var import_icons23 = require("@elementor/icons");
|
|
5381
5361
|
|
|
@@ -5384,7 +5364,7 @@ var import_react40 = require("react");
|
|
|
5384
5364
|
|
|
5385
5365
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5386
5366
|
var import_react39 = require("react");
|
|
5387
|
-
var
|
|
5367
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
5388
5368
|
|
|
5389
5369
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5390
5370
|
var getAtomicDynamicTags = () => {
|
|
@@ -5428,7 +5408,7 @@ var supportsDynamic = (propType) => {
|
|
|
5428
5408
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5429
5409
|
var usePropDynamicTags = () => {
|
|
5430
5410
|
let categories = [];
|
|
5431
|
-
const { propType } = (0,
|
|
5411
|
+
const { propType } = (0, import_editor_controls56.useBoundProp)();
|
|
5432
5412
|
if (propType) {
|
|
5433
5413
|
const propDynamicType = getDynamicPropType(propType);
|
|
5434
5414
|
categories = propDynamicType?.settings.categories || [];
|
|
@@ -5469,13 +5449,13 @@ var useDynamicTag = (tagName) => {
|
|
|
5469
5449
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5470
5450
|
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React88.createElement(import_icons23.DatabaseIcon, { fontSize: "tiny" });
|
|
5471
5451
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5472
|
-
const context = (0,
|
|
5473
|
-
return /* @__PURE__ */ React88.createElement(
|
|
5452
|
+
const context = (0, import_editor_controls57.useBoundProp)(import_editor_props18.backgroundImageOverlayPropTypeUtil);
|
|
5453
|
+
return /* @__PURE__ */ React88.createElement(import_editor_controls57.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React88.createElement(import_editor_controls57.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React88.createElement(Wrapper2, { rawValue: value.value })));
|
|
5474
5454
|
};
|
|
5475
5455
|
var Wrapper2 = ({ rawValue }) => {
|
|
5476
|
-
const { propType } = (0,
|
|
5456
|
+
const { propType } = (0, import_editor_controls57.useBoundProp)();
|
|
5477
5457
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5478
|
-
return /* @__PURE__ */ React88.createElement(
|
|
5458
|
+
return /* @__PURE__ */ React88.createElement(import_editor_controls57.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React88.createElement(import_editor_controls57.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React88.createElement(Content, { rawValue: rawValue.image })));
|
|
5479
5459
|
};
|
|
5480
5460
|
var Content = ({ rawValue }) => {
|
|
5481
5461
|
const src = rawValue.value.src;
|
|
@@ -5485,8 +5465,8 @@ var Content = ({ rawValue }) => {
|
|
|
5485
5465
|
|
|
5486
5466
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5487
5467
|
var React92 = __toESM(require("react"));
|
|
5488
|
-
var
|
|
5489
|
-
var
|
|
5468
|
+
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
5469
|
+
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
5490
5470
|
var import_icons25 = require("@elementor/icons");
|
|
5491
5471
|
var import_ui42 = require("@elementor/ui");
|
|
5492
5472
|
var import_i18n62 = require("@wordpress/i18n");
|
|
@@ -5501,7 +5481,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
5501
5481
|
|
|
5502
5482
|
// src/dynamics/dynamic-control.tsx
|
|
5503
5483
|
var React90 = __toESM(require("react"));
|
|
5504
|
-
var
|
|
5484
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
5505
5485
|
|
|
5506
5486
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5507
5487
|
var React89 = __toESM(require("react"));
|
|
@@ -5553,7 +5533,7 @@ var DynamicConditionalControl = ({
|
|
|
5553
5533
|
|
|
5554
5534
|
// src/dynamics/dynamic-control.tsx
|
|
5555
5535
|
var DynamicControl = ({ bind, children }) => {
|
|
5556
|
-
const { value, setValue } = (0,
|
|
5536
|
+
const { value, setValue } = (0, import_editor_controls58.useBoundProp)(dynamicPropTypeUtil);
|
|
5557
5537
|
const { name = "", group = "", settings } = value ?? {};
|
|
5558
5538
|
const dynamicTag = useDynamicTag(name);
|
|
5559
5539
|
if (!dynamicTag) {
|
|
@@ -5573,7 +5553,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5573
5553
|
});
|
|
5574
5554
|
};
|
|
5575
5555
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5576
|
-
return /* @__PURE__ */ React90.createElement(
|
|
5556
|
+
return /* @__PURE__ */ React90.createElement(import_editor_controls58.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React90.createElement(import_editor_controls58.PropKeyProvider, { bind }, /* @__PURE__ */ React90.createElement(
|
|
5577
5557
|
DynamicConditionalControl,
|
|
5578
5558
|
{
|
|
5579
5559
|
propType: dynamicPropType,
|
|
@@ -5587,8 +5567,8 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5587
5567
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5588
5568
|
var import_react41 = require("react");
|
|
5589
5569
|
var React91 = __toESM(require("react"));
|
|
5590
|
-
var
|
|
5591
|
-
var
|
|
5570
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5571
|
+
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
5592
5572
|
var import_icons24 = require("@elementor/icons");
|
|
5593
5573
|
var import_ui41 = require("@elementor/ui");
|
|
5594
5574
|
var import_i18n61 = require("@wordpress/i18n");
|
|
@@ -5599,8 +5579,8 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5599
5579
|
const [searchValue, setSearchValue] = (0, import_react41.useState)("");
|
|
5600
5580
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5601
5581
|
const theme = (0, import_ui41.useTheme)();
|
|
5602
|
-
const { value: anyValue } = (0,
|
|
5603
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
5582
|
+
const { value: anyValue } = (0, import_editor_controls59.useBoundProp)();
|
|
5583
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls59.useBoundProp)(dynamicPropTypeUtil);
|
|
5604
5584
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
5605
5585
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5606
5586
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -5629,21 +5609,21 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5629
5609
|
}))
|
|
5630
5610
|
]);
|
|
5631
5611
|
return /* @__PURE__ */ React91.createElement(PopoverBody, { "aria-label": (0, import_i18n61.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React91.createElement(
|
|
5632
|
-
|
|
5612
|
+
import_editor_ui8.PopoverHeader,
|
|
5633
5613
|
{
|
|
5634
5614
|
title: (0, import_i18n61.__)("Dynamic tags", "elementor"),
|
|
5635
5615
|
onClose: closePopover,
|
|
5636
5616
|
icon: /* @__PURE__ */ React91.createElement(import_icons24.DatabaseIcon, { fontSize: SIZE4 })
|
|
5637
5617
|
}
|
|
5638
5618
|
), hasNoDynamicTags ? /* @__PURE__ */ React91.createElement(NoDynamicTags, null) : /* @__PURE__ */ React91.createElement(import_react41.Fragment, null, /* @__PURE__ */ React91.createElement(
|
|
5639
|
-
|
|
5619
|
+
import_editor_ui8.SearchField,
|
|
5640
5620
|
{
|
|
5641
5621
|
value: searchValue,
|
|
5642
5622
|
onSearch: handleSearch,
|
|
5643
5623
|
placeholder: (0, import_i18n61.__)("Search dynamic tags\u2026", "elementor")
|
|
5644
5624
|
}
|
|
5645
5625
|
), /* @__PURE__ */ React91.createElement(import_ui41.Divider, null), /* @__PURE__ */ React91.createElement(
|
|
5646
|
-
|
|
5626
|
+
import_editor_ui8.PopoverMenuList,
|
|
5647
5627
|
{
|
|
5648
5628
|
items: virtualizedItems,
|
|
5649
5629
|
onSelect: handleSetDynamicTag,
|
|
@@ -5683,7 +5663,7 @@ var NoDynamicTags = () => /* @__PURE__ */ React91.createElement(React91.Fragment
|
|
|
5683
5663
|
/* @__PURE__ */ React91.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
5684
5664
|
/* @__PURE__ */ React91.createElement(import_ui41.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n61.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
5685
5665
|
/* @__PURE__ */ React91.createElement(import_ui41.Typography, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, (0, import_i18n61.__)("Upgrade now to display your content dynamically.", "elementor")),
|
|
5686
|
-
/* @__PURE__ */ React91.createElement(
|
|
5666
|
+
/* @__PURE__ */ React91.createElement(import_editor_ui8.CtaButton, { size: "small", href: PRO_DYNAMIC_TAGS_URL })
|
|
5687
5667
|
));
|
|
5688
5668
|
var useFilteredOptions = (searchValue) => {
|
|
5689
5669
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -5705,8 +5685,8 @@ var useFilteredOptions = (searchValue) => {
|
|
|
5705
5685
|
var SIZE5 = "tiny";
|
|
5706
5686
|
var tagsWithoutTabs = ["popup"];
|
|
5707
5687
|
var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
5708
|
-
const { setValue: setAnyValue, propType } = (0,
|
|
5709
|
-
const { bind, value } = (0,
|
|
5688
|
+
const { setValue: setAnyValue, propType } = (0, import_editor_controls60.useBoundProp)();
|
|
5689
|
+
const { bind, value } = (0, import_editor_controls60.useBoundProp)(dynamicPropTypeUtil);
|
|
5710
5690
|
const originalPropType = createTopLevelObjectType({
|
|
5711
5691
|
schema: {
|
|
5712
5692
|
[bind]: propType
|
|
@@ -5717,7 +5697,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5717
5697
|
const { name: tagName = "" } = value;
|
|
5718
5698
|
const dynamicTag = useDynamicTag(tagName);
|
|
5719
5699
|
if (!isDynamicTagSupported(tagName) && OriginalControl) {
|
|
5720
|
-
return /* @__PURE__ */ React92.createElement(
|
|
5700
|
+
return /* @__PURE__ */ React92.createElement(import_editor_controls60.PropProvider, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React92.createElement(import_editor_controls60.PropKeyProvider, { bind }, /* @__PURE__ */ React92.createElement(OriginalControl, { ...props })));
|
|
5721
5701
|
}
|
|
5722
5702
|
const removeDynamicTag = () => {
|
|
5723
5703
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -5785,7 +5765,7 @@ var DynamicSettingsPopover = ({ dynamicTag }) => {
|
|
|
5785
5765
|
...(0, import_ui42.bindPopover)(popupState)
|
|
5786
5766
|
},
|
|
5787
5767
|
/* @__PURE__ */ React92.createElement(PopoverBody, { "aria-label": (0, import_i18n62.__)("Dynamic settings", "elementor") }, /* @__PURE__ */ React92.createElement(
|
|
5788
|
-
|
|
5768
|
+
import_editor_ui9.PopoverHeader,
|
|
5789
5769
|
{
|
|
5790
5770
|
title: dynamicTag.label,
|
|
5791
5771
|
onClose: popupState.close,
|
|
@@ -5862,7 +5842,7 @@ var Control2 = ({ control }) => {
|
|
|
5862
5842
|
display: "grid",
|
|
5863
5843
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
5864
5844
|
} : {};
|
|
5865
|
-
return /* @__PURE__ */ React92.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React92.createElement(import_ui42.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React92.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(
|
|
5845
|
+
return /* @__PURE__ */ React92.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React92.createElement(import_ui42.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React92.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(import_editor_controls60.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React92.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(Control, { type: control.type, props: controlProps }))));
|
|
5866
5846
|
};
|
|
5867
5847
|
function ControlsItemsStack({ items: items3 }) {
|
|
5868
5848
|
return /* @__PURE__ */ React92.createElement(import_ui42.Stack, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
@@ -5921,11 +5901,11 @@ function getDynamicValue(name, settings) {
|
|
|
5921
5901
|
|
|
5922
5902
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
5923
5903
|
var React93 = __toESM(require("react"));
|
|
5924
|
-
var
|
|
5904
|
+
var import_editor_controls61 = require("@elementor/editor-controls");
|
|
5925
5905
|
var import_icons26 = require("@elementor/icons");
|
|
5926
5906
|
var import_i18n63 = require("@wordpress/i18n");
|
|
5927
5907
|
var usePropDynamicAction = () => {
|
|
5928
|
-
const { propType } = (0,
|
|
5908
|
+
const { propType } = (0, import_editor_controls61.useBoundProp)();
|
|
5929
5909
|
const visible = !!propType && supportsDynamic(propType);
|
|
5930
5910
|
return {
|
|
5931
5911
|
visible,
|
|
@@ -5942,12 +5922,12 @@ var init2 = () => {
|
|
|
5942
5922
|
component: DynamicSelectionControl,
|
|
5943
5923
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
5944
5924
|
});
|
|
5945
|
-
(0,
|
|
5925
|
+
(0, import_editor_controls62.injectIntoRepeaterItemLabel)({
|
|
5946
5926
|
id: "dynamic-background-image",
|
|
5947
5927
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
5948
5928
|
component: BackgroundControlDynamicTagLabel
|
|
5949
5929
|
});
|
|
5950
|
-
(0,
|
|
5930
|
+
(0, import_editor_controls62.injectIntoRepeaterItemIcon)({
|
|
5951
5931
|
id: "dynamic-background-image",
|
|
5952
5932
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
5953
5933
|
component: BackgroundControlDynamicTagIcon
|
|
@@ -5961,7 +5941,7 @@ var init2 = () => {
|
|
|
5961
5941
|
};
|
|
5962
5942
|
|
|
5963
5943
|
// src/reset-style-props.tsx
|
|
5964
|
-
var
|
|
5944
|
+
var import_editor_controls63 = require("@elementor/editor-controls");
|
|
5965
5945
|
var import_icons27 = require("@elementor/icons");
|
|
5966
5946
|
var import_i18n64 = require("@wordpress/i18n");
|
|
5967
5947
|
|
|
@@ -6018,7 +5998,7 @@ function initResetStyleProps() {
|
|
|
6018
5998
|
}
|
|
6019
5999
|
function useResetStyleValueProps() {
|
|
6020
6000
|
const isStyle = useIsStyle();
|
|
6021
|
-
const { value, resetValue, propType } = (0,
|
|
6001
|
+
const { value, resetValue, propType } = (0, import_editor_controls63.useBoundProp)();
|
|
6022
6002
|
const hasValue = value !== null && value !== void 0;
|
|
6023
6003
|
const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
|
|
6024
6004
|
const isRequired = !!propType.settings?.required;
|
|
@@ -6043,7 +6023,7 @@ function useResetStyleValueProps() {
|
|
|
6043
6023
|
|
|
6044
6024
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6045
6025
|
var React99 = __toESM(require("react"));
|
|
6046
|
-
var
|
|
6026
|
+
var import_editor_controls64 = require("@elementor/editor-controls");
|
|
6047
6027
|
var import_editor_props21 = require("@elementor/editor-props");
|
|
6048
6028
|
var import_editor_styles_repository16 = require("@elementor/editor-styles-repository");
|
|
6049
6029
|
var import_i18n68 = require("@wordpress/i18n");
|
|
@@ -6052,7 +6032,7 @@ var import_i18n68 = require("@wordpress/i18n");
|
|
|
6052
6032
|
var React98 = __toESM(require("react"));
|
|
6053
6033
|
var import_react43 = require("react");
|
|
6054
6034
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
6055
|
-
var
|
|
6035
|
+
var import_editor_ui10 = require("@elementor/editor-ui");
|
|
6056
6036
|
var import_ui47 = require("@elementor/ui");
|
|
6057
6037
|
var import_i18n67 = require("@wordpress/i18n");
|
|
6058
6038
|
|
|
@@ -6287,7 +6267,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6287
6267
|
backgroundColor: "background.paper"
|
|
6288
6268
|
}
|
|
6289
6269
|
},
|
|
6290
|
-
/* @__PURE__ */ React98.createElement(
|
|
6270
|
+
/* @__PURE__ */ React98.createElement(import_editor_ui10.PopoverHeader, { title: (0, import_i18n67.__)("Style origin", "elementor"), onClose: closeInfotip })
|
|
6291
6271
|
),
|
|
6292
6272
|
/* @__PURE__ */ React98.createElement(
|
|
6293
6273
|
import_ui47.CardContent,
|
|
@@ -6419,7 +6399,7 @@ function TooltipOrInfotip({
|
|
|
6419
6399
|
var StylesInheritanceIndicator = ({
|
|
6420
6400
|
customContext
|
|
6421
6401
|
}) => {
|
|
6422
|
-
const context = (0,
|
|
6402
|
+
const context = (0, import_editor_controls64.useBoundProp)();
|
|
6423
6403
|
const { path, propType } = customContext || context;
|
|
6424
6404
|
const inheritanceChain = useStylesInheritanceChain(path);
|
|
6425
6405
|
if (!path || !inheritanceChain.length) {
|
|
@@ -6534,7 +6514,7 @@ var getGradientValue = (gradient) => {
|
|
|
6534
6514
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
6535
6515
|
var React103 = __toESM(require("react"));
|
|
6536
6516
|
var import_editor_canvas10 = require("@elementor/editor-canvas");
|
|
6537
|
-
var
|
|
6517
|
+
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
6538
6518
|
var import_ui51 = require("@elementor/ui");
|
|
6539
6519
|
var import_wp_media = require("@elementor/wp-media");
|
|
6540
6520
|
var backgroundImageOverlayTransformer = (0, import_editor_canvas10.createTransformer)((value) => /* @__PURE__ */ React103.createElement(import_ui51.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React103.createElement(ItemIconImage, { value }), /* @__PURE__ */ React103.createElement(ItemLabelImage, { value })));
|
|
@@ -6556,7 +6536,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
6556
6536
|
};
|
|
6557
6537
|
var ItemLabelImage = ({ value }) => {
|
|
6558
6538
|
const { imageTitle } = useImage(value);
|
|
6559
|
-
return /* @__PURE__ */ React103.createElement(
|
|
6539
|
+
return /* @__PURE__ */ React103.createElement(import_editor_ui11.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React103.createElement("span", null, imageTitle));
|
|
6560
6540
|
};
|
|
6561
6541
|
var useImage = (image) => {
|
|
6562
6542
|
let imageTitle, imageUrl = null;
|