@elementor/editor-editing-panel 4.0.0-529 → 4.0.0-531
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 +58 -79
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/components/promotions/custom-css.tsx +5 -27
- package/src/index.ts +0 -1
- package/src/components/promotions/types.ts +0 -8
package/dist/index.d.mts
CHANGED
|
@@ -1318,13 +1318,6 @@ declare const registerEditingPanelReplacement: ({ id, priority, ...props }: Omit
|
|
|
1318
1318
|
priority?: number;
|
|
1319
1319
|
}) => void;
|
|
1320
1320
|
|
|
1321
|
-
type V4PromotionData = {
|
|
1322
|
-
title: string;
|
|
1323
|
-
content: string;
|
|
1324
|
-
image: string;
|
|
1325
|
-
ctaUrl: string;
|
|
1326
|
-
};
|
|
1327
|
-
|
|
1328
1321
|
declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
|
|
1329
1322
|
declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
|
|
1330
1323
|
declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
|
|
@@ -1368,4 +1361,4 @@ type TagInstance = {
|
|
|
1368
1361
|
|
|
1369
1362
|
declare const isDynamicPropValue: (prop: PropValue) => prop is DynamicPropValue;
|
|
1370
1363
|
|
|
1371
|
-
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type
|
|
1364
|
+
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, isDynamicPropValue, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useCustomCss, useElement, usePanelActions, usePanelStatus, useStateByElement, useStyle, useStylesRerender };
|
package/dist/index.d.ts
CHANGED
|
@@ -1318,13 +1318,6 @@ declare const registerEditingPanelReplacement: ({ id, priority, ...props }: Omit
|
|
|
1318
1318
|
priority?: number;
|
|
1319
1319
|
}) => void;
|
|
1320
1320
|
|
|
1321
|
-
type V4PromotionData = {
|
|
1322
|
-
title: string;
|
|
1323
|
-
content: string;
|
|
1324
|
-
image: string;
|
|
1325
|
-
ctaUrl: string;
|
|
1326
|
-
};
|
|
1327
|
-
|
|
1328
1321
|
declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
|
|
1329
1322
|
declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
|
|
1330
1323
|
declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
|
|
@@ -1368,4 +1361,4 @@ type TagInstance = {
|
|
|
1368
1361
|
|
|
1369
1362
|
declare const isDynamicPropValue: (prop: PropValue) => prop is DynamicPropValue;
|
|
1370
1363
|
|
|
1371
|
-
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type
|
|
1364
|
+
export { Control as BaseControl, type ControlType, CustomCssIndicator, type DynamicTag, type DynamicTags, type DynamicTagsManager, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, isDynamicPropValue, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, setLicenseConfig, useClassesProp, useCustomCss, useElement, usePanelActions, usePanelStatus, useStateByElement, useStyle, useStylesRerender };
|
package/dist/index.js
CHANGED
|
@@ -4786,19 +4786,15 @@ var EditingPanelHooks = () => {
|
|
|
4786
4786
|
};
|
|
4787
4787
|
|
|
4788
4788
|
// src/components/promotions/init.tsx
|
|
4789
|
-
var
|
|
4789
|
+
var import_editor_controls51 = require("@elementor/editor-controls");
|
|
4790
4790
|
|
|
4791
4791
|
// src/components/promotions/custom-css.tsx
|
|
4792
4792
|
var React83 = __toESM(require("react"));
|
|
4793
4793
|
var import_react36 = require("react");
|
|
4794
|
-
var
|
|
4794
|
+
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
4795
4795
|
var import_i18n57 = require("@wordpress/i18n");
|
|
4796
|
-
function getCustomCssPromotion() {
|
|
4797
|
-
return window.elementor?.config?.v4Promotions?.customCss;
|
|
4798
|
-
}
|
|
4799
4796
|
var CustomCssSection = () => {
|
|
4800
|
-
const
|
|
4801
|
-
const promotion = getCustomCssPromotion();
|
|
4797
|
+
const triggerRef = (0, import_react36.useRef)(null);
|
|
4802
4798
|
return /* @__PURE__ */ React83.createElement(
|
|
4803
4799
|
StyleTabSection,
|
|
4804
4800
|
{
|
|
@@ -4806,25 +4802,8 @@ var CustomCssSection = () => {
|
|
|
4806
4802
|
name: "Custom CSS",
|
|
4807
4803
|
title: (0, import_i18n57.__)("Custom CSS", "elementor"),
|
|
4808
4804
|
action: {
|
|
4809
|
-
component: /* @__PURE__ */ React83.createElement(
|
|
4810
|
-
|
|
4811
|
-
{
|
|
4812
|
-
title: promotion?.title ?? "",
|
|
4813
|
-
content: promotion?.content ?? "",
|
|
4814
|
-
assetUrl: promotion?.image ?? "",
|
|
4815
|
-
ctaUrl: promotion?.ctaUrl ?? "",
|
|
4816
|
-
open: showInfoTip,
|
|
4817
|
-
onClose: () => {
|
|
4818
|
-
setShowInfoTip(false);
|
|
4819
|
-
}
|
|
4820
|
-
},
|
|
4821
|
-
/* @__PURE__ */ React83.createElement(import_editor_ui8.PromotionChip, null)
|
|
4822
|
-
),
|
|
4823
|
-
onClick: () => {
|
|
4824
|
-
if (!showInfoTip) {
|
|
4825
|
-
setShowInfoTip(true);
|
|
4826
|
-
}
|
|
4827
|
-
}
|
|
4805
|
+
component: /* @__PURE__ */ React83.createElement(import_editor_controls50.PromotionTrigger, { ref: triggerRef, promotionKey: "customCss" }),
|
|
4806
|
+
onClick: () => triggerRef.current?.toggle()
|
|
4828
4807
|
}
|
|
4829
4808
|
}
|
|
4830
4809
|
}
|
|
@@ -4839,13 +4818,13 @@ var init = () => {
|
|
|
4839
4818
|
component: CustomCssSection,
|
|
4840
4819
|
options: { overwrite: true }
|
|
4841
4820
|
});
|
|
4842
|
-
controlsRegistry.register("display-conditions",
|
|
4821
|
+
controlsRegistry.register("display-conditions", import_editor_controls51.DisplayConditionsControl, "two-columns");
|
|
4843
4822
|
}
|
|
4844
4823
|
};
|
|
4845
4824
|
|
|
4846
4825
|
// src/controls-registry/element-controls/tabs-control/tabs-control.tsx
|
|
4847
4826
|
var React84 = __toESM(require("react"));
|
|
4848
|
-
var
|
|
4827
|
+
var import_editor_controls53 = require("@elementor/editor-controls");
|
|
4849
4828
|
var import_editor_elements17 = require("@elementor/editor-elements");
|
|
4850
4829
|
var import_editor_props16 = require("@elementor/editor-props");
|
|
4851
4830
|
var import_icons22 = require("@elementor/icons");
|
|
@@ -4870,14 +4849,14 @@ var getElementByType = (elementId, type) => {
|
|
|
4870
4849
|
};
|
|
4871
4850
|
|
|
4872
4851
|
// src/controls-registry/element-controls/tabs-control/use-actions.ts
|
|
4873
|
-
var
|
|
4852
|
+
var import_editor_controls52 = require("@elementor/editor-controls");
|
|
4874
4853
|
var import_editor_elements16 = require("@elementor/editor-elements");
|
|
4875
4854
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
4876
4855
|
var import_i18n58 = require("@wordpress/i18n");
|
|
4877
4856
|
var TAB_ELEMENT_TYPE = "e-tab";
|
|
4878
4857
|
var TAB_CONTENT_ELEMENT_TYPE = "e-tab-content";
|
|
4879
4858
|
var useActions = () => {
|
|
4880
|
-
const { value, setValue: setDefaultActiveTab } = (0,
|
|
4859
|
+
const { value, setValue: setDefaultActiveTab } = (0, import_editor_controls52.useBoundProp)(import_editor_props15.numberPropTypeUtil);
|
|
4881
4860
|
const defaultActiveTab = value ?? 0;
|
|
4882
4861
|
const duplicateItem = ({
|
|
4883
4862
|
items: items3,
|
|
@@ -5107,7 +5086,7 @@ var TabsControlContent = ({ label }) => {
|
|
|
5107
5086
|
}
|
|
5108
5087
|
};
|
|
5109
5088
|
return /* @__PURE__ */ React84.createElement(
|
|
5110
|
-
|
|
5089
|
+
import_editor_controls53.Repeater,
|
|
5111
5090
|
{
|
|
5112
5091
|
showToggle: false,
|
|
5113
5092
|
values: repeaterValues,
|
|
@@ -5131,7 +5110,7 @@ var ItemLabel = ({ value, index }) => {
|
|
|
5131
5110
|
return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { sx: { minHeight: 20 }, direction: "row", alignItems: "center", gap: 1.5 }, /* @__PURE__ */ React84.createElement("span", null, elementTitle), /* @__PURE__ */ React84.createElement(ItemDefaultTab, { index }));
|
|
5132
5111
|
};
|
|
5133
5112
|
var ItemDefaultTab = ({ index }) => {
|
|
5134
|
-
const { value: defaultItem } = (0,
|
|
5113
|
+
const { value: defaultItem } = (0, import_editor_controls53.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5135
5114
|
const isDefault = defaultItem === index;
|
|
5136
5115
|
if (!isDefault) {
|
|
5137
5116
|
return null;
|
|
@@ -5145,9 +5124,9 @@ var ItemContent = ({ value, index }) => {
|
|
|
5145
5124
|
return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { p: 2, gap: 1.5 }, /* @__PURE__ */ React84.createElement(TabLabelControl, { elementId: value.id }), /* @__PURE__ */ React84.createElement(SettingsField, { bind: "default-active-tab", propDisplayName: (0, import_i18n59.__)("Tabs", "elementor") }, /* @__PURE__ */ React84.createElement(DefaultTabControl, { tabIndex: index })));
|
|
5146
5125
|
};
|
|
5147
5126
|
var DefaultTabControl = ({ tabIndex }) => {
|
|
5148
|
-
const { value, setValue } = (0,
|
|
5127
|
+
const { value, setValue } = (0, import_editor_controls53.useBoundProp)(import_editor_props16.numberPropTypeUtil);
|
|
5149
5128
|
const isDefault = value === tabIndex;
|
|
5150
|
-
return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React84.createElement(
|
|
5129
|
+
return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { direction: "row", alignItems: "center", justifyContent: "space-between", gap: 2 }, /* @__PURE__ */ React84.createElement(import_editor_controls53.ControlFormLabel, null, (0, import_i18n59.__)("Set as default tab", "elementor")), /* @__PURE__ */ React84.createElement(ConditionalTooltip, { showTooltip: isDefault, placement: "right" }, /* @__PURE__ */ React84.createElement(
|
|
5151
5130
|
import_ui38.Switch,
|
|
5152
5131
|
{
|
|
5153
5132
|
size: "small",
|
|
@@ -5165,7 +5144,7 @@ var DefaultTabControl = ({ tabIndex }) => {
|
|
|
5165
5144
|
var TabLabelControl = ({ elementId }) => {
|
|
5166
5145
|
const editorSettings = (0, import_editor_elements17.useElementEditorSettings)(elementId);
|
|
5167
5146
|
const label = editorSettings?.title ?? "";
|
|
5168
|
-
return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { gap: 1 }, /* @__PURE__ */ React84.createElement(
|
|
5147
|
+
return /* @__PURE__ */ React84.createElement(import_ui38.Stack, { gap: 1 }, /* @__PURE__ */ React84.createElement(import_editor_controls53.ControlFormLabel, null, (0, import_i18n59.__)("Tab name", "elementor")), /* @__PURE__ */ React84.createElement(
|
|
5169
5148
|
import_ui38.TextField,
|
|
5170
5149
|
{
|
|
5171
5150
|
size: "tiny",
|
|
@@ -5219,12 +5198,12 @@ var registerElementControls = () => {
|
|
|
5219
5198
|
|
|
5220
5199
|
// src/dynamics/init.ts
|
|
5221
5200
|
var import_editor_canvas3 = require("@elementor/editor-canvas");
|
|
5222
|
-
var
|
|
5201
|
+
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
5223
5202
|
var import_menus2 = require("@elementor/menus");
|
|
5224
5203
|
|
|
5225
5204
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5226
5205
|
var React85 = __toESM(require("react"));
|
|
5227
|
-
var
|
|
5206
|
+
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
5228
5207
|
var import_editor_props18 = require("@elementor/editor-props");
|
|
5229
5208
|
var import_icons23 = require("@elementor/icons");
|
|
5230
5209
|
|
|
@@ -5233,7 +5212,7 @@ var import_react39 = require("react");
|
|
|
5233
5212
|
|
|
5234
5213
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5235
5214
|
var import_react38 = require("react");
|
|
5236
|
-
var
|
|
5215
|
+
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
5237
5216
|
|
|
5238
5217
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5239
5218
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
@@ -5317,7 +5296,7 @@ var useAllPropDynamicTags = () => {
|
|
|
5317
5296
|
};
|
|
5318
5297
|
var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
5319
5298
|
let categories = [];
|
|
5320
|
-
const { propType } = (0,
|
|
5299
|
+
const { propType } = (0, import_editor_controls54.useBoundProp)();
|
|
5321
5300
|
if (propType) {
|
|
5322
5301
|
const propDynamicType = getDynamicPropType(propType);
|
|
5323
5302
|
categories = propDynamicType?.settings.categories || [];
|
|
@@ -5363,13 +5342,13 @@ var useDynamicTag = (tagName) => {
|
|
|
5363
5342
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
5364
5343
|
var BackgroundControlDynamicTagIcon = () => /* @__PURE__ */ React85.createElement(import_icons23.DatabaseIcon, { fontSize: "tiny" });
|
|
5365
5344
|
var BackgroundControlDynamicTagLabel = ({ value }) => {
|
|
5366
|
-
const context = (0,
|
|
5367
|
-
return /* @__PURE__ */ React85.createElement(
|
|
5345
|
+
const context = (0, import_editor_controls55.useBoundProp)(import_editor_props18.backgroundImageOverlayPropTypeUtil);
|
|
5346
|
+
return /* @__PURE__ */ React85.createElement(import_editor_controls55.PropProvider, { ...context, value: value.value }, /* @__PURE__ */ React85.createElement(import_editor_controls55.PropKeyProvider, { bind: "image" }, /* @__PURE__ */ React85.createElement(Wrapper2, { rawValue: value.value })));
|
|
5368
5347
|
};
|
|
5369
5348
|
var Wrapper2 = ({ rawValue }) => {
|
|
5370
|
-
const { propType } = (0,
|
|
5349
|
+
const { propType } = (0, import_editor_controls55.useBoundProp)();
|
|
5371
5350
|
const imageOverlayPropType = propType.prop_types["background-image-overlay"];
|
|
5372
|
-
return /* @__PURE__ */ React85.createElement(
|
|
5351
|
+
return /* @__PURE__ */ React85.createElement(import_editor_controls55.PropProvider, { propType: imageOverlayPropType.shape.image, value: rawValue, setValue: () => void 0 }, /* @__PURE__ */ React85.createElement(import_editor_controls55.PropKeyProvider, { bind: "src" }, /* @__PURE__ */ React85.createElement(Content, { rawValue: rawValue.image })));
|
|
5373
5352
|
};
|
|
5374
5353
|
var Content = ({ rawValue }) => {
|
|
5375
5354
|
const src = rawValue.value.src;
|
|
@@ -5379,8 +5358,8 @@ var Content = ({ rawValue }) => {
|
|
|
5379
5358
|
|
|
5380
5359
|
// src/dynamics/components/dynamic-selection-control.tsx
|
|
5381
5360
|
var React89 = __toESM(require("react"));
|
|
5382
|
-
var
|
|
5383
|
-
var
|
|
5361
|
+
var import_editor_controls58 = require("@elementor/editor-controls");
|
|
5362
|
+
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
5384
5363
|
var import_icons25 = require("@elementor/icons");
|
|
5385
5364
|
var import_ui40 = require("@elementor/ui");
|
|
5386
5365
|
var import_i18n61 = require("@wordpress/i18n");
|
|
@@ -5395,7 +5374,7 @@ var usePersistDynamicValue = (propKey) => {
|
|
|
5395
5374
|
|
|
5396
5375
|
// src/dynamics/dynamic-control.tsx
|
|
5397
5376
|
var React87 = __toESM(require("react"));
|
|
5398
|
-
var
|
|
5377
|
+
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
5399
5378
|
|
|
5400
5379
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
5401
5380
|
var React86 = __toESM(require("react"));
|
|
@@ -5447,7 +5426,7 @@ var DynamicConditionalControl = ({
|
|
|
5447
5426
|
|
|
5448
5427
|
// src/dynamics/dynamic-control.tsx
|
|
5449
5428
|
var DynamicControl = ({ bind, children }) => {
|
|
5450
|
-
const { value, setValue } = (0,
|
|
5429
|
+
const { value, setValue } = (0, import_editor_controls56.useBoundProp)(dynamicPropTypeUtil);
|
|
5451
5430
|
const { name = "", group = "", settings } = value ?? {};
|
|
5452
5431
|
const dynamicTag = useDynamicTag(name);
|
|
5453
5432
|
if (!dynamicTag) {
|
|
@@ -5467,7 +5446,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5467
5446
|
});
|
|
5468
5447
|
};
|
|
5469
5448
|
const propType = createTopLevelObjectType({ schema: dynamicTag.props_schema });
|
|
5470
|
-
return /* @__PURE__ */ React87.createElement(
|
|
5449
|
+
return /* @__PURE__ */ React87.createElement(import_editor_controls56.PropProvider, { propType, setValue: setDynamicValue, value: { [bind]: dynamicValue } }, /* @__PURE__ */ React87.createElement(import_editor_controls56.PropKeyProvider, { bind }, /* @__PURE__ */ React87.createElement(
|
|
5471
5450
|
DynamicConditionalControl,
|
|
5472
5451
|
{
|
|
5473
5452
|
propType: dynamicPropType,
|
|
@@ -5481,8 +5460,8 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5481
5460
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5482
5461
|
var import_react40 = require("react");
|
|
5483
5462
|
var React88 = __toESM(require("react"));
|
|
5484
|
-
var
|
|
5485
|
-
var
|
|
5463
|
+
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5464
|
+
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
5486
5465
|
var import_icons24 = require("@elementor/icons");
|
|
5487
5466
|
var import_ui39 = require("@elementor/ui");
|
|
5488
5467
|
var import_i18n60 = require("@wordpress/i18n");
|
|
@@ -5494,8 +5473,8 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5494
5473
|
const [searchValue, setSearchValue] = (0, import_react40.useState)("");
|
|
5495
5474
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5496
5475
|
const theme = (0, import_ui39.useTheme)();
|
|
5497
|
-
const { value: anyValue } = (0,
|
|
5498
|
-
const { bind, value: dynamicValue, setValue } = (0,
|
|
5476
|
+
const { value: anyValue } = (0, import_editor_controls57.useBoundProp)();
|
|
5477
|
+
const { bind, value: dynamicValue, setValue } = (0, import_editor_controls57.useBoundProp)(dynamicPropTypeUtil);
|
|
5499
5478
|
const [, updatePropValueHistory] = usePersistDynamicValue(bind);
|
|
5500
5479
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5501
5480
|
const options12 = useFilteredOptions(searchValue);
|
|
@@ -5531,14 +5510,14 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5531
5510
|
return /* @__PURE__ */ React88.createElement(ExpiredDynamicTags, null);
|
|
5532
5511
|
}
|
|
5533
5512
|
return /* @__PURE__ */ React88.createElement(import_react40.Fragment, null, /* @__PURE__ */ React88.createElement(
|
|
5534
|
-
|
|
5513
|
+
import_editor_ui8.SearchField,
|
|
5535
5514
|
{
|
|
5536
5515
|
value: searchValue,
|
|
5537
5516
|
onSearch: handleSearch,
|
|
5538
5517
|
placeholder: (0, import_i18n60.__)("Search dynamic tags\u2026", "elementor")
|
|
5539
5518
|
}
|
|
5540
5519
|
), /* @__PURE__ */ React88.createElement(import_ui39.Divider, null), /* @__PURE__ */ React88.createElement(
|
|
5541
|
-
|
|
5520
|
+
import_editor_ui8.PopoverMenuList,
|
|
5542
5521
|
{
|
|
5543
5522
|
items: virtualizedItems,
|
|
5544
5523
|
onSelect: handleSetDynamicTag,
|
|
@@ -5549,8 +5528,8 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5549
5528
|
}
|
|
5550
5529
|
));
|
|
5551
5530
|
};
|
|
5552
|
-
return /* @__PURE__ */ React88.createElement(
|
|
5553
|
-
|
|
5531
|
+
return /* @__PURE__ */ React88.createElement(import_editor_ui8.SectionPopoverBody, { "aria-label": (0, import_i18n60.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React88.createElement(
|
|
5532
|
+
import_editor_ui8.PopoverHeader,
|
|
5554
5533
|
{
|
|
5555
5534
|
title: (0, import_i18n60.__)("Dynamic tags", "elementor"),
|
|
5556
5535
|
onClose: closePopover,
|
|
@@ -5587,7 +5566,7 @@ var NoDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fragment
|
|
|
5587
5566
|
/* @__PURE__ */ React88.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
5588
5567
|
/* @__PURE__ */ React88.createElement(import_ui39.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n60.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
5589
5568
|
/* @__PURE__ */ React88.createElement(import_ui39.Typography, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, (0, import_i18n60.__)("Upgrade now to display your content dynamically.", "elementor")),
|
|
5590
|
-
/* @__PURE__ */ React88.createElement(
|
|
5569
|
+
/* @__PURE__ */ React88.createElement(import_editor_ui8.CtaButton, { size: "small", href: PRO_DYNAMIC_TAGS_URL })
|
|
5591
5570
|
));
|
|
5592
5571
|
var ExpiredDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fragment, null, /* @__PURE__ */ React88.createElement(import_ui39.Divider, null), /* @__PURE__ */ React88.createElement(
|
|
5593
5572
|
import_ui39.Stack,
|
|
@@ -5603,7 +5582,7 @@ var ExpiredDynamicTags = () => /* @__PURE__ */ React88.createElement(React88.Fra
|
|
|
5603
5582
|
/* @__PURE__ */ React88.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
5604
5583
|
/* @__PURE__ */ React88.createElement(import_ui39.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n60.__)("Unlock your Dynamic tags again", "elementor")),
|
|
5605
5584
|
/* @__PURE__ */ React88.createElement(import_ui39.Typography, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, (0, import_i18n60.__)("Dynamic tags need Elementor Pro. Renew now to keep them active.", "elementor")),
|
|
5606
|
-
/* @__PURE__ */ React88.createElement(
|
|
5585
|
+
/* @__PURE__ */ React88.createElement(import_editor_ui8.CtaButton, { size: "small", href: RENEW_DYNAMIC_TAGS_URL, children: (0, import_i18n60.__)("Renew Now", "elementor") })
|
|
5607
5586
|
));
|
|
5608
5587
|
var useFilteredOptions = (searchValue) => {
|
|
5609
5588
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -5625,8 +5604,8 @@ var useFilteredOptions = (searchValue) => {
|
|
|
5625
5604
|
var SIZE3 = "tiny";
|
|
5626
5605
|
var tagsWithoutTabs = ["popup"];
|
|
5627
5606
|
var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
5628
|
-
const { setValue: setAnyValue, propType } = (0,
|
|
5629
|
-
const { bind, value } = (0,
|
|
5607
|
+
const { setValue: setAnyValue, propType } = (0, import_editor_controls58.useBoundProp)();
|
|
5608
|
+
const { bind, value } = (0, import_editor_controls58.useBoundProp)(dynamicPropTypeUtil);
|
|
5630
5609
|
const { expired: readonly } = useLicenseConfig();
|
|
5631
5610
|
const originalPropType = createTopLevelObjectType({
|
|
5632
5611
|
schema: {
|
|
@@ -5638,7 +5617,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5638
5617
|
const { name: tagName = "" } = value;
|
|
5639
5618
|
const dynamicTag = useDynamicTag(tagName);
|
|
5640
5619
|
if (!isDynamicTagSupported(tagName) && OriginalControl) {
|
|
5641
|
-
return /* @__PURE__ */ React89.createElement(
|
|
5620
|
+
return /* @__PURE__ */ React89.createElement(import_editor_controls58.PropProvider, { propType: originalPropType, value: { [bind]: null }, setValue: setAnyValue }, /* @__PURE__ */ React89.createElement(import_editor_controls58.PropKeyProvider, { bind }, /* @__PURE__ */ React89.createElement(OriginalControl, { ...props })));
|
|
5642
5621
|
}
|
|
5643
5622
|
const removeDynamicTag = () => {
|
|
5644
5623
|
setAnyValue(propValueFromHistory ?? null);
|
|
@@ -5676,7 +5655,7 @@ var DynamicSelectionControl = ({ OriginalControl, ...props }) => {
|
|
|
5676
5655
|
},
|
|
5677
5656
|
...(0, import_ui40.bindPopover)(selectionPopoverState)
|
|
5678
5657
|
},
|
|
5679
|
-
/* @__PURE__ */ React89.createElement(
|
|
5658
|
+
/* @__PURE__ */ React89.createElement(import_editor_ui9.SectionPopoverBody, { "aria-label": (0, import_i18n61.__)("Dynamic tags", "elementor") }, /* @__PURE__ */ React89.createElement(DynamicSelection, { close: selectionPopoverState.close, expired: readonly }))
|
|
5680
5659
|
));
|
|
5681
5660
|
};
|
|
5682
5661
|
var DynamicSettingsPopover = ({
|
|
@@ -5709,8 +5688,8 @@ var DynamicSettingsPopover = ({
|
|
|
5709
5688
|
},
|
|
5710
5689
|
...(0, import_ui40.bindPopover)(popupState)
|
|
5711
5690
|
},
|
|
5712
|
-
/* @__PURE__ */ React89.createElement(
|
|
5713
|
-
|
|
5691
|
+
/* @__PURE__ */ React89.createElement(import_editor_ui9.SectionPopoverBody, { "aria-label": (0, import_i18n61.__)("Dynamic settings", "elementor") }, /* @__PURE__ */ React89.createElement(
|
|
5692
|
+
import_editor_ui9.PopoverHeader,
|
|
5714
5693
|
{
|
|
5715
5694
|
title: dynamicTag.label,
|
|
5716
5695
|
onClose: popupState.close,
|
|
@@ -5787,7 +5766,7 @@ var Control2 = ({ control }) => {
|
|
|
5787
5766
|
display: "grid",
|
|
5788
5767
|
gridTemplateColumns: isSwitchControl ? "minmax(0, 1fr) max-content" : "1fr 1fr"
|
|
5789
5768
|
} : {};
|
|
5790
|
-
return /* @__PURE__ */ React89.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React89.createElement(import_ui40.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React89.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(
|
|
5769
|
+
return /* @__PURE__ */ React89.createElement(DynamicControl, { bind: control.bind }, /* @__PURE__ */ React89.createElement(import_ui40.Grid, { container: true, gap: 0.75, sx: layoutStyleProps }, control.label ? /* @__PURE__ */ React89.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(import_editor_controls58.ControlFormLabel, null, control.label)) : null, /* @__PURE__ */ React89.createElement(import_ui40.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React89.createElement(Control, { type: control.type, props: controlProps }))));
|
|
5791
5770
|
};
|
|
5792
5771
|
function ControlsItemsStack({ items: items3 }) {
|
|
5793
5772
|
return /* @__PURE__ */ React89.createElement(import_ui40.Stack, { p: 2, gap: 2, sx: { overflowY: "auto" } }, items3.map(
|
|
@@ -5845,11 +5824,11 @@ function getDynamicValue(name, settings) {
|
|
|
5845
5824
|
|
|
5846
5825
|
// src/dynamics/hooks/use-prop-dynamic-action.tsx
|
|
5847
5826
|
var React90 = __toESM(require("react"));
|
|
5848
|
-
var
|
|
5827
|
+
var import_editor_controls59 = require("@elementor/editor-controls");
|
|
5849
5828
|
var import_icons26 = require("@elementor/icons");
|
|
5850
5829
|
var import_i18n62 = require("@wordpress/i18n");
|
|
5851
5830
|
var usePropDynamicAction = () => {
|
|
5852
|
-
const { propType } = (0,
|
|
5831
|
+
const { propType } = (0, import_editor_controls59.useBoundProp)();
|
|
5853
5832
|
const visible = !!propType && supportsDynamic(propType);
|
|
5854
5833
|
return {
|
|
5855
5834
|
visible,
|
|
@@ -5862,16 +5841,16 @@ var usePropDynamicAction = () => {
|
|
|
5862
5841
|
// src/dynamics/init.ts
|
|
5863
5842
|
var { registerPopoverAction } = import_menus2.controlActionsMenu;
|
|
5864
5843
|
var init2 = () => {
|
|
5865
|
-
(0,
|
|
5844
|
+
(0, import_editor_controls60.registerControlReplacement)({
|
|
5866
5845
|
component: DynamicSelectionControl,
|
|
5867
5846
|
condition: ({ value }) => isDynamicPropValue(value)
|
|
5868
5847
|
});
|
|
5869
|
-
(0,
|
|
5848
|
+
(0, import_editor_controls60.injectIntoRepeaterItemLabel)({
|
|
5870
5849
|
id: "dynamic-background-image",
|
|
5871
5850
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
5872
5851
|
component: BackgroundControlDynamicTagLabel
|
|
5873
5852
|
});
|
|
5874
|
-
(0,
|
|
5853
|
+
(0, import_editor_controls60.injectIntoRepeaterItemIcon)({
|
|
5875
5854
|
id: "dynamic-background-image",
|
|
5876
5855
|
condition: ({ value }) => isDynamicPropValue(value.value?.image?.value?.src),
|
|
5877
5856
|
component: BackgroundControlDynamicTagIcon
|
|
@@ -5885,7 +5864,7 @@ var init2 = () => {
|
|
|
5885
5864
|
};
|
|
5886
5865
|
|
|
5887
5866
|
// src/reset-style-props.tsx
|
|
5888
|
-
var
|
|
5867
|
+
var import_editor_controls61 = require("@elementor/editor-controls");
|
|
5889
5868
|
var import_editor_variables2 = require("@elementor/editor-variables");
|
|
5890
5869
|
var import_icons27 = require("@elementor/icons");
|
|
5891
5870
|
var import_menus3 = require("@elementor/menus");
|
|
@@ -5944,7 +5923,7 @@ function initResetStyleProps() {
|
|
|
5944
5923
|
}
|
|
5945
5924
|
function useResetStyleValueProps() {
|
|
5946
5925
|
const isStyle = useIsStyle();
|
|
5947
|
-
const { value, resetValue, propType } = (0,
|
|
5926
|
+
const { value, resetValue, propType } = (0, import_editor_controls61.useBoundProp)();
|
|
5948
5927
|
const hasValue = value !== null && value !== void 0;
|
|
5949
5928
|
const hasInitial = propType.initial_value !== void 0 && propType.initial_value !== null;
|
|
5950
5929
|
const isRequired = !!propType.settings?.required;
|
|
@@ -5972,7 +5951,7 @@ function useResetStyleValueProps() {
|
|
|
5972
5951
|
|
|
5973
5952
|
// src/styles-inheritance/components/styles-inheritance-indicator.tsx
|
|
5974
5953
|
var React96 = __toESM(require("react"));
|
|
5975
|
-
var
|
|
5954
|
+
var import_editor_controls62 = require("@elementor/editor-controls");
|
|
5976
5955
|
var import_editor_props21 = require("@elementor/editor-props");
|
|
5977
5956
|
var import_editor_styles_repository16 = require("@elementor/editor-styles-repository");
|
|
5978
5957
|
var import_i18n67 = require("@wordpress/i18n");
|
|
@@ -5981,7 +5960,7 @@ var import_i18n67 = require("@wordpress/i18n");
|
|
|
5981
5960
|
var React95 = __toESM(require("react"));
|
|
5982
5961
|
var import_react42 = require("react");
|
|
5983
5962
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
5984
|
-
var
|
|
5963
|
+
var import_editor_ui10 = require("@elementor/editor-ui");
|
|
5985
5964
|
var import_ui45 = require("@elementor/ui");
|
|
5986
5965
|
var import_i18n66 = require("@wordpress/i18n");
|
|
5987
5966
|
|
|
@@ -6181,7 +6160,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6181
6160
|
setShowInfotip(false);
|
|
6182
6161
|
};
|
|
6183
6162
|
const key = path.join(".");
|
|
6184
|
-
const sectionWidth = (0,
|
|
6163
|
+
const sectionWidth = (0, import_editor_ui10.useSectionWidth)();
|
|
6185
6164
|
const resolve = (0, import_react42.useMemo)(() => {
|
|
6186
6165
|
return (0, import_editor_canvas5.createPropsResolver)({
|
|
6187
6166
|
transformers: import_editor_canvas5.stylesInheritanceTransformersRegistry,
|
|
@@ -6212,7 +6191,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6212
6191
|
backgroundColor: "background.paper"
|
|
6213
6192
|
}
|
|
6214
6193
|
},
|
|
6215
|
-
/* @__PURE__ */ React95.createElement(
|
|
6194
|
+
/* @__PURE__ */ React95.createElement(import_editor_ui10.PopoverHeader, { title: (0, import_i18n66.__)("Style origin", "elementor"), onClose: closeInfotip })
|
|
6216
6195
|
),
|
|
6217
6196
|
/* @__PURE__ */ React95.createElement(
|
|
6218
6197
|
import_ui45.CardContent,
|
|
@@ -6344,7 +6323,7 @@ function TooltipOrInfotip({
|
|
|
6344
6323
|
var StylesInheritanceIndicator = ({
|
|
6345
6324
|
customContext
|
|
6346
6325
|
}) => {
|
|
6347
|
-
const context = (0,
|
|
6326
|
+
const context = (0, import_editor_controls62.useBoundProp)();
|
|
6348
6327
|
const { path, propType } = customContext || context;
|
|
6349
6328
|
const inheritanceChain = useStylesInheritanceChain(path);
|
|
6350
6329
|
if (!path || !inheritanceChain.length) {
|
|
@@ -6459,7 +6438,7 @@ var getGradientValue = (gradient) => {
|
|
|
6459
6438
|
// src/styles-inheritance/transformers/background-image-overlay-transformer.tsx
|
|
6460
6439
|
var React100 = __toESM(require("react"));
|
|
6461
6440
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
6462
|
-
var
|
|
6441
|
+
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
6463
6442
|
var import_ui49 = require("@elementor/ui");
|
|
6464
6443
|
var import_wp_media = require("@elementor/wp-media");
|
|
6465
6444
|
var backgroundImageOverlayTransformer = (0, import_editor_canvas9.createTransformer)((value) => /* @__PURE__ */ React100.createElement(import_ui49.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React100.createElement(ItemIconImage, { value }), /* @__PURE__ */ React100.createElement(ItemLabelImage, { value })));
|
|
@@ -6481,7 +6460,7 @@ var ItemIconImage = ({ value }) => {
|
|
|
6481
6460
|
};
|
|
6482
6461
|
var ItemLabelImage = ({ value }) => {
|
|
6483
6462
|
const { imageTitle } = useImage(value);
|
|
6484
|
-
return /* @__PURE__ */ React100.createElement(
|
|
6463
|
+
return /* @__PURE__ */ React100.createElement(import_editor_ui11.EllipsisWithTooltip, { title: imageTitle }, /* @__PURE__ */ React100.createElement("span", null, imageTitle));
|
|
6485
6464
|
};
|
|
6486
6465
|
var useImage = (image) => {
|
|
6487
6466
|
let imageTitle, imageUrl = null;
|