@elementor/editor-editing-panel 3.35.0-492 → 3.35.0
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 +40 -3
- package/dist/index.d.ts +40 -3
- package/dist/index.js +44 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/promotions/custom-css.tsx +1 -4
- package/src/components/promotions/init.tsx +5 -0
- package/src/components/promotions/types.ts +3 -9
- package/src/index.ts +3 -0
package/dist/index.d.mts
CHANGED
|
@@ -6,9 +6,9 @@ import { StyleDefinition, StyleDefinitionVariant, StyleDefinitionState, StyleDef
|
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import { FC, PropsWithChildren, ReactNode, Dispatch, ElementType as ElementType$1, ComponentType, ComponentProps } from 'react';
|
|
8
8
|
import { PopoverBody as PopoverBody$1 } from '@elementor/editor-ui';
|
|
9
|
-
import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout } from '@elementor/editor-elements';
|
|
9
|
+
import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout, ControlItem } from '@elementor/editor-elements';
|
|
10
10
|
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
11
|
-
import { PropKey, PropTypeUtil, PropsSchema, ObjectPropType } from '@elementor/editor-props';
|
|
11
|
+
import { PropKey, PropTypeUtil, PropsSchema, ObjectPropType, TransformablePropValue, PropValue } from '@elementor/editor-props';
|
|
12
12
|
import * as _emotion_styled from '@emotion/styled';
|
|
13
13
|
import * as _mui_system from '@mui/system';
|
|
14
14
|
import { Theme, ChipProps } from '@elementor/ui';
|
|
@@ -1364,8 +1364,45 @@ 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
|
+
|
|
1367
1374
|
declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
|
|
1368
1375
|
declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
|
|
1369
1376
|
declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
|
|
1370
1377
|
|
|
1371
|
-
|
|
1378
|
+
type DynamicTags = Record<DynamicTag['name'], DynamicTag>;
|
|
1379
|
+
type DynamicTag = {
|
|
1380
|
+
name: string;
|
|
1381
|
+
label: string;
|
|
1382
|
+
group: string;
|
|
1383
|
+
categories: string[];
|
|
1384
|
+
atomic_controls: ControlItem[];
|
|
1385
|
+
props_schema: PropsSchema;
|
|
1386
|
+
};
|
|
1387
|
+
type DynamicPropValue = TransformablePropValue<'dynamic', {
|
|
1388
|
+
name: string;
|
|
1389
|
+
settings?: Record<string, unknown>;
|
|
1390
|
+
}>;
|
|
1391
|
+
type DynamicTagsManager = {
|
|
1392
|
+
createTag: (id: string, name: string, settings: Record<string, unknown>) => TagInstance;
|
|
1393
|
+
loadTagDataFromCache: (tag: TagInstance) => unknown;
|
|
1394
|
+
refreshCacheFromServer: (callback: () => void) => void;
|
|
1395
|
+
};
|
|
1396
|
+
type TagInstance = {
|
|
1397
|
+
options: {
|
|
1398
|
+
id: string;
|
|
1399
|
+
name: string;
|
|
1400
|
+
};
|
|
1401
|
+
model: {
|
|
1402
|
+
toJSON: () => Record<string, unknown>;
|
|
1403
|
+
};
|
|
1404
|
+
};
|
|
1405
|
+
|
|
1406
|
+
declare const isDynamicPropValue: (prop: PropValue) => prop is DynamicPropValue;
|
|
1407
|
+
|
|
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 V4PromotionData, 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
|
@@ -6,9 +6,9 @@ import { StyleDefinition, StyleDefinitionVariant, StyleDefinitionState, StyleDef
|
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import { FC, PropsWithChildren, ReactNode, Dispatch, ElementType as ElementType$1, ComponentType, ComponentProps } from 'react';
|
|
8
8
|
import { PopoverBody as PopoverBody$1 } from '@elementor/editor-ui';
|
|
9
|
-
import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout } from '@elementor/editor-elements';
|
|
9
|
+
import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout, ControlItem } from '@elementor/editor-elements';
|
|
10
10
|
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
11
|
-
import { PropKey, PropTypeUtil, PropsSchema, ObjectPropType } from '@elementor/editor-props';
|
|
11
|
+
import { PropKey, PropTypeUtil, PropsSchema, ObjectPropType, TransformablePropValue, PropValue } from '@elementor/editor-props';
|
|
12
12
|
import * as _emotion_styled from '@emotion/styled';
|
|
13
13
|
import * as _mui_system from '@mui/system';
|
|
14
14
|
import { Theme, ChipProps } from '@elementor/ui';
|
|
@@ -1364,8 +1364,45 @@ 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
|
+
|
|
1367
1374
|
declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
|
|
1368
1375
|
declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
|
|
1369
1376
|
declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
|
|
1370
1377
|
|
|
1371
|
-
|
|
1378
|
+
type DynamicTags = Record<DynamicTag['name'], DynamicTag>;
|
|
1379
|
+
type DynamicTag = {
|
|
1380
|
+
name: string;
|
|
1381
|
+
label: string;
|
|
1382
|
+
group: string;
|
|
1383
|
+
categories: string[];
|
|
1384
|
+
atomic_controls: ControlItem[];
|
|
1385
|
+
props_schema: PropsSchema;
|
|
1386
|
+
};
|
|
1387
|
+
type DynamicPropValue = TransformablePropValue<'dynamic', {
|
|
1388
|
+
name: string;
|
|
1389
|
+
settings?: Record<string, unknown>;
|
|
1390
|
+
}>;
|
|
1391
|
+
type DynamicTagsManager = {
|
|
1392
|
+
createTag: (id: string, name: string, settings: Record<string, unknown>) => TagInstance;
|
|
1393
|
+
loadTagDataFromCache: (tag: TagInstance) => unknown;
|
|
1394
|
+
refreshCacheFromServer: (callback: () => void) => void;
|
|
1395
|
+
};
|
|
1396
|
+
type TagInstance = {
|
|
1397
|
+
options: {
|
|
1398
|
+
id: string;
|
|
1399
|
+
name: string;
|
|
1400
|
+
};
|
|
1401
|
+
model: {
|
|
1402
|
+
toJSON: () => Record<string, unknown>;
|
|
1403
|
+
};
|
|
1404
|
+
};
|
|
1405
|
+
|
|
1406
|
+
declare const isDynamicPropValue: (prop: PropValue) => prop is DynamicPropValue;
|
|
1407
|
+
|
|
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 V4PromotionData, 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
|
@@ -57,12 +57,13 @@ __export(index_exports, {
|
|
|
57
57
|
injectIntoCssClassConvert: () => injectIntoCssClassConvert,
|
|
58
58
|
injectIntoPanelHeaderTop: () => injectIntoPanelHeaderTop,
|
|
59
59
|
injectIntoStyleTab: () => injectIntoStyleTab,
|
|
60
|
+
isDynamicPropValue: () => isDynamicPropValue,
|
|
60
61
|
registerControlReplacement: () => registerControlReplacement,
|
|
61
62
|
registerEditingPanelReplacement: () => registerEditingPanelReplacement,
|
|
62
63
|
registerFieldIndicator: () => registerFieldIndicator,
|
|
63
64
|
registerStyleProviderToColors: () => registerStyleProviderToColors,
|
|
64
65
|
stylesInheritanceTransformersRegistry: () => stylesInheritanceTransformersRegistry,
|
|
65
|
-
useBoundProp: () =>
|
|
66
|
+
useBoundProp: () => import_editor_controls64.useBoundProp,
|
|
66
67
|
useClassesProp: () => useClassesProp,
|
|
67
68
|
useCustomCss: () => useCustomCss,
|
|
68
69
|
useElement: () => useElement,
|
|
@@ -75,7 +76,7 @@ __export(index_exports, {
|
|
|
75
76
|
useStylesRerender: () => useStylesRerender
|
|
76
77
|
});
|
|
77
78
|
module.exports = __toCommonJS(index_exports);
|
|
78
|
-
var
|
|
79
|
+
var import_editor_controls64 = require("@elementor/editor-controls");
|
|
79
80
|
|
|
80
81
|
// src/components/css-classes/css-class-convert-local.tsx
|
|
81
82
|
var React4 = __toESM(require("react"));
|
|
@@ -4936,14 +4937,16 @@ var EditingPanelHooks = () => {
|
|
|
4936
4937
|
return null;
|
|
4937
4938
|
};
|
|
4938
4939
|
|
|
4940
|
+
// src/components/promotions/init.tsx
|
|
4941
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4942
|
+
|
|
4939
4943
|
// src/components/promotions/custom-css.tsx
|
|
4940
4944
|
var React86 = __toESM(require("react"));
|
|
4941
4945
|
var import_react38 = require("react");
|
|
4942
4946
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
4943
4947
|
var import_i18n58 = require("@wordpress/i18n");
|
|
4944
4948
|
function getCustomCssPromotion() {
|
|
4945
|
-
|
|
4946
|
-
return extendedWindow2.elementor?.config?.v4Promotions?.customCss;
|
|
4949
|
+
return window.elementor?.config?.v4Promotions?.customCss;
|
|
4947
4950
|
}
|
|
4948
4951
|
var CustomCssSection = () => {
|
|
4949
4952
|
const [showInfoTip, setShowInfoTip] = (0, import_react38.useState)(false);
|
|
@@ -4988,12 +4991,13 @@ var init = () => {
|
|
|
4988
4991
|
component: CustomCssSection,
|
|
4989
4992
|
options: { overwrite: true }
|
|
4990
4993
|
});
|
|
4994
|
+
controlsRegistry.register("display-conditions", import_editor_controls52.DisplayConditionsControl, "two-columns");
|
|
4991
4995
|
}
|
|
4992
4996
|
};
|
|
4993
4997
|
|
|
4994
4998
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
4995
4999
|
var React87 = __toESM(require("react"));
|
|
4996
|
-
var
|
|
5000
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
4997
5001
|
var import_editor_elements17 = require("@elementor/editor-elements");
|
|
4998
5002
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
4999
5003
|
var import_icons22 = require("@elementor/icons");
|
|
@@ -5018,14 +5022,14 @@ var getElementByType = (elementId, type) => {
|
|
|
5018
5022
|
};
|
|
5019
5023
|
|
|
5020
5024
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
5021
|
-
var
|
|
5025
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
5022
5026
|
var import_editor_elements16 = require("@elementor/editor-elements");
|
|
5023
5027
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
5024
5028
|
var import_i18n59 = require("@wordpress/i18n");
|
|
5025
5029
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
5026
5030
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
5027
5031
|
var useActions = () => {
|
|
5028
|
-
const { value, setValue: setDefaultActiveTab } = (0,
|
|
5032
|
+
const { value, setValue: setDefaultActiveTab } = (0, import_editor_controls53.useBoundProp)(import_editor_props15.numberPropTypeUtil);
|
|
5029
5033
|
const defaultActiveTab = value ?? 0;
|
|
5030
5034
|
const duplicateItem = ({
|
|
5031
5035
|
items: items3,
|
|
@@ -5255,7 +5259,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
5255
5259
|
}
|
|
5256
5260
|
};
|
|
5257
5261
|
return /* @__PURE__ */ React87.createElement(
|
|
5258
|
-
|
|
5262
|
+
import_editor_controls54.Repeater,
|
|
5259
5263
|
{
|
|
5260
5264
|
showToggle: false,
|
|
5261
5265
|
values: repeaterValues,
|
|
@@ -5279,7 +5283,7 @@ var ItemLabel = ({ value, index }) => {
|
|
|
5279
5283
|
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 }));
|
|
5280
5284
|
};
|
|
5281
5285
|
var ItemDefaultTab = ({ index }) => {
|
|
5282
|
-
const { value: defaultItem } = (0,
|
|
5286
|
+
const { value: defaultItem } = (0, import_editor_controls54.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5283
5287
|
const isDefault = defaultItem === index;
|
|
5284
5288
|
if (!isDefault) {
|
|
5285
5289
|
return null;
|
|
@@ -5293,9 +5297,9 @@ var ItemContent = ({ value, index }) => {
|
|
|
5293
5297
|
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 })));
|
|
5294
5298
|
};
|
|
5295
5299
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
5296
|
-
const { value, setValue } = (0,
|
|
5300
|
+
const { value, setValue } = (0, import_editor_controls54.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5297
5301
|
const isDefault = value === tabIndex;
|
|
5298
|
-
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React87.createElement(
|
|
5302
|
+
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React87.createElement(import_editor_controls54.ControlFormLabel, null, (0, import_i18n60.__)("Set as default tab", "elementor")), /* @__PURE__ */ React87.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React87.createElement(
|
|
5299
5303
|
import_ui40.Switch,
|
|
5300
5304
|
{
|
|
5301
5305
|
size: "small",
|
|
@@ -5313,7 +5317,7 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
5313
5317
|
var TabLabelControl = ({ elementId }) => {
|
|
5314
5318
|
const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(elementId);
|
|
5315
5319
|
const label = editorSettings?.title ?? "";
|
|
5316
|
-
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { gap: 1 }, /* @__PURE__ */ React87.createElement(
|
|
5320
|
+
return /* @__PURE__ */ React87.createElement(import_ui40.Stack, { gap: 1 }, /* @__PURE__ */ React87.createElement(import_editor_controls54.ControlFormLabel, null, (0, import_i18n60.__)("Tab name", "elementor")), /* @__PURE__ */ React87.createElement(
|
|
5317
5321
|
import_ui40.TextField,
|
|
5318
5322
|
{
|
|
5319
5323
|
size: "tiny",
|
|
@@ -5367,11 +5371,11 @@ var registerElementControls = () => {
|
|
|
5367
5371
|
|
|
5368
5372
|
// src/dynamics/init.ts
|
|
5369
5373
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
5370
|
-
var
|
|
5374
|
+
var import_editor_controls61 = require("@elementor/editor-controls");
|
|
5371
5375
|
|
|
5372
5376
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5373
5377
|
var React88 = __toESM(require("react"));
|
|
5374
|
-
var
|
|
5378
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
5375
5379
|
var import_editor_props18 = require("@elementor/editor-props");
|
|
5376
5380
|
var import_icons23 = require("@elementor/icons");
|
|
5377
5381
|
|
|
@@ -5380,7 +5384,7 @@ var import_react40 = require("react");
|
|
|
5380
5384
|
|
|
5381
5385
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5382
5386
|
var import_react39 = require("react");
|
|
5383
|
-
var
|
|
5387
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
5384
5388
|
|
|
5385
5389
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5386
5390
|
var getAtomicDynamicTags = () => {
|
|
@@ -5424,7 +5428,7 @@ var supportsDynamic = (propType) => {
|
|
|
5424
5428
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5425
5429
|
var usePropDynamicTags = () => {
|
|
5426
5430
|
let categories = [];
|
|
5427
|
-
const { propType } = (0,
|
|
5431
|
+
const { propType } = (0, import_editor_controls55.useBoundProp)();
|
|
5428
5432
|
if (propType) {
|
|
5429
5433
|
const propDynamicType = getDynamicPropType(propType);
|
|
5430
5434
|
categories = propDynamicType?.settings.categories || [];
|
|
@@ -5465,13 +5469,13 @@ var useDynamicTag = (tagName) => {
|
|
|
5465
5469
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5466
5470
|
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React88.createElement(import_icons23.DatabaseIcon, { fontSize: "tiny" });
|
|
5467
5471
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5468
|
-
const context = (0,
|
|
5469
|
-
return /* @__PURE__ */ React88.createElement(
|
|
5472
|
+
const context = (0, import_editor_controls56.useBoundProp)(import_editor_props18.backgroundImageOverlayPropTypeUtil);
|
|
5473
|
+
return /* @__PURE__ */ React88.createElement(import_editor_controls56.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React88.createElement(import_editor_controls56.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React88.createElement(Wrapper2, { rawValue: value.value })));
|
|
5470
5474
|
};
|
|
5471
5475
|
var Wrapper2 = ({ rawValue }) => {
|
|
5472
|
-
const { propType } = (0,
|
|
5476
|
+
const { propType } = (0, import_editor_controls56.useBoundProp)();
|
|
5473
5477
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5474
|
-
return /* @__PURE__ */ React88.createElement(
|
|
5478
|
+
return /* @__PURE__ */ React88.createElement(import_editor_controls56.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React88.createElement(import_editor_controls56.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React88.createElement(Content, { rawValue: rawValue.image })));
|
|
5475
5479
|
};
|
|
5476
5480
|
var Content = ({ rawValue }) => {
|
|
5477
5481
|
const src = rawValue.value.src;
|
|
@@ -5481,7 +5485,7 @@ var Content = ({ rawValue }) => {
|
|
|
5481
5485
|
|
|
5482
5486
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5483
5487
|
var React92 = __toESM(require("react"));
|
|
5484
|
-
var
|
|
5488
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5485
5489
|
var import_editor_ui10 = require("@elementor/editor-ui");
|
|
5486
5490
|
var import_icons25 = require("@elementor/icons");
|
|
5487
5491
|
var import_ui42 = require("@elementor/ui");
|
|
@@ -5497,7 +5501,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
5497
5501
|
|
|
5498
5502
|
// src/dynamics/dynamic-control.tsx
|
|
5499
5503
|
var React90 = __toESM(require("react"));
|
|
5500
|
-
var
|
|
5504
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5501
5505
|
|
|
5502
5506
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5503
5507
|
var React89 = __toESM(require("react"));
|
|
@@ -5549,7 +5553,7 @@ var DynamicConditionalControl = ({
|
|
|
5549
5553
|
|
|
5550
5554
|
// src/dynamics/dynamic-control.tsx
|
|
5551
5555
|
var DynamicControl = ({ bind, children }) => {
|
|
5552
|
-
const { value, setValue } = (0,
|
|
5556
|
+
const { value, setValue } = (0, import_editor_controls57.useBoundProp)(dynamicPropTypeUtil);
|
|
5553
5557
|
const { name = "", group = "", settings } = value ?? {};
|
|
5554
5558
|
const dynamicTag = useDynamicTag(name);
|
|
5555
5559
|
if (!dynamicTag) {
|
|
@@ -5569,7 +5573,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5569
5573
|
});
|
|
5570
5574
|
};
|
|
5571
5575
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5572
|
-
return /* @__PURE__ */ React90.createElement(
|
|
5576
|
+
return /* @__PURE__ */ React90.createElement(import_editor_controls57.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React90.createElement(import_editor_controls57.PropKeyProvider, { bind }, /* @__PURE__ */ React90.createElement(
|
|
5573
5577
|
DynamicConditionalControl,
|
|
5574
5578
|
{
|
|
5575
5579
|
propType: dynamicPropType,
|
|
@@ -5583,7 +5587,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5583
5587
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5584
5588
|
var import_react41 = require("react");
|
|
5585
5589
|
var React91 = __toESM(require("react"));
|
|
5586
|
-
var
|
|
5590
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
5587
5591
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
5588
5592
|
var import_icons24 = require("@elementor/icons");
|
|
5589
5593
|
var import_ui41 = require("@elementor/ui");
|
|
@@ -5595,8 +5599,8 @@ var DynamicSelection = ({ close: closePopover }) => {
|
|
|
5595
5599
|
const [searchValue, setSearchValue] = (0, import_react41.useState)("");
|
|
5596
5600
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5597
5601
|
const theme = (0, import_ui41.useTheme)();
|
|
5598
|
-
const { value: anyValue } = (0,
|
|
5599
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
5602
|
+
const { value: anyValue } = (0, import_editor_controls58.useBoundProp)();
|
|
5603
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls58.useBoundProp)(dynamicPropTypeUtil);
|
|
5600
5604
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
5601
5605
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5602
5606
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -5701,8 +5705,8 @@ var useFilteredOptions = (searchValue) => {
|
|
|
5701
5705
|
var SIZE5 = "tiny";
|
|
5702
5706
|
var tagsWithoutTabs = ["popup"];
|
|
5703
5707
|
var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
5704
|
-
const { setValue: setAnyValue, propType } = (0,
|
|
5705
|
-
const { bind, value } = (0,
|
|
5708
|
+
const { setValue: setAnyValue, propType } = (0, import_editor_controls59.useBoundProp)();
|
|
5709
|
+
const { bind, value } = (0, import_editor_controls59.useBoundProp)(dynamicPropTypeUtil);
|
|
5706
5710
|
const originalPropType = createTopLevelObjectType({
|
|
5707
5711
|
schema: {
|
|
5708
5712
|
[bind]: propType
|
|
@@ -5713,7 +5717,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5713
5717
|
const { name: tagName = "" } = value;
|
|
5714
5718
|
const dynamicTag = useDynamicTag(tagName);
|
|
5715
5719
|
if (!isDynamicTagSupported(tagName) && OriginalControl) {
|
|
5716
|
-
return /* @__PURE__ */ React92.createElement(
|
|
5720
|
+
return /* @__PURE__ */ React92.createElement(import_editor_controls59.PropProvider, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React92.createElement(import_editor_controls59.PropKeyProvider, { bind }, /* @__PURE__ */ React92.createElement(OriginalControl, { ...props })));
|
|
5717
5721
|
}
|
|
5718
5722
|
const removeDynamicTag = () => {
|
|
5719
5723
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -5858,7 +5862,7 @@ var Control2 = ({ control }) => {
|
|
|
5858
5862
|
display: "grid",
|
|
5859
5863
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
5860
5864
|
} : {};
|
|
5861
|
-
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(
|
|
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(import_editor_controls59.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React92.createElement(import_ui42.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React92.createElement(Control, { type: control.type, props: controlProps }))));
|
|
5862
5866
|
};
|
|
5863
5867
|
function ControlsItemsStack({ items: items3 }) {
|
|
5864
5868
|
return /* @__PURE__ */ React92.createElement(import_ui42.Stack, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
@@ -5917,11 +5921,11 @@ function getDynamicValue(name, settings) {
|
|
|
5917
5921
|
|
|
5918
5922
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
5919
5923
|
var React93 = __toESM(require("react"));
|
|
5920
|
-
var
|
|
5924
|
+
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
5921
5925
|
var import_icons26 = require("@elementor/icons");
|
|
5922
5926
|
var import_i18n63 = require("@wordpress/i18n");
|
|
5923
5927
|
var usePropDynamicAction = () => {
|
|
5924
|
-
const { propType } = (0,
|
|
5928
|
+
const { propType } = (0, import_editor_controls60.useBoundProp)();
|
|
5925
5929
|
const visible = !!propType && supportsDynamic(propType);
|
|
5926
5930
|
return {
|
|
5927
5931
|
visible,
|
|
@@ -5938,12 +5942,12 @@ var init2 = () => {
|
|
|
5938
5942
|
component: DynamicSelectionControl,
|
|
5939
5943
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
5940
5944
|
});
|
|
5941
|
-
(0,
|
|
5945
|
+
(0, import_editor_controls61.injectIntoRepeaterItemLabel)({
|
|
5942
5946
|
id: "dynamic-background-image",
|
|
5943
5947
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
5944
5948
|
component: BackgroundControlDynamicTagLabel
|
|
5945
5949
|
});
|
|
5946
|
-
(0,
|
|
5950
|
+
(0, import_editor_controls61.injectIntoRepeaterItemIcon)({
|
|
5947
5951
|
id: "dynamic-background-image",
|
|
5948
5952
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
5949
5953
|
component: BackgroundControlDynamicTagIcon
|
|
@@ -5957,7 +5961,7 @@ var init2 = () => {
|
|
|
5957
5961
|
};
|
|
5958
5962
|
|
|
5959
5963
|
// src/reset-style-props.tsx
|
|
5960
|
-
var
|
|
5964
|
+
var import_editor_controls62 = require("@elementor/editor-controls");
|
|
5961
5965
|
var import_icons27 = require("@elementor/icons");
|
|
5962
5966
|
var import_i18n64 = require("@wordpress/i18n");
|
|
5963
5967
|
|
|
@@ -6014,7 +6018,7 @@ function initResetStyleProps() {
|
|
|
6014
6018
|
}
|
|
6015
6019
|
function useResetStyleValueProps() {
|
|
6016
6020
|
const isStyle = useIsStyle();
|
|
6017
|
-
const { value, resetValue, propType } = (0,
|
|
6021
|
+
const { value, resetValue, propType } = (0, import_editor_controls62.useBoundProp)();
|
|
6018
6022
|
const hasValue = value !== null && value !== void 0;
|
|
6019
6023
|
const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
|
|
6020
6024
|
const isRequired = !!propType.settings?.required;
|
|
@@ -6039,7 +6043,7 @@ function useResetStyleValueProps() {
|
|
|
6039
6043
|
|
|
6040
6044
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
6041
6045
|
var React99 = __toESM(require("react"));
|
|
6042
|
-
var
|
|
6046
|
+
var import_editor_controls63 = require("@elementor/editor-controls");
|
|
6043
6047
|
var import_editor_props21 = require("@elementor/editor-props");
|
|
6044
6048
|
var import_editor_styles_repository16 = require("@elementor/editor-styles-repository");
|
|
6045
6049
|
var import_i18n68 = require("@wordpress/i18n");
|
|
@@ -6415,7 +6419,7 @@ function TooltipOrInfotip({
|
|
|
6415
6419
|
var StylesInheritanceIndicator = ({
|
|
6416
6420
|
customContext
|
|
6417
6421
|
}) => {
|
|
6418
|
-
const context = (0,
|
|
6422
|
+
const context = (0, import_editor_controls63.useBoundProp)();
|
|
6419
6423
|
const { path, propType } = customContext || context;
|
|
6420
6424
|
const inheritanceChain = useStylesInheritanceChain(path);
|
|
6421
6425
|
if (!path || !inheritanceChain.length) {
|
|
@@ -6735,6 +6739,7 @@ var blockV1Panel = () => {
|
|
|
6735
6739
|
injectIntoCssClassConvert,
|
|
6736
6740
|
injectIntoPanelHeaderTop,
|
|
6737
6741
|
injectIntoStyleTab,
|
|
6742
|
+
isDynamicPropValue,
|
|
6738
6743
|
registerControlReplacement,
|
|
6739
6744
|
registerEditingPanelReplacement,
|
|
6740
6745
|
registerFieldIndicator,
|