@elementor/editor-editing-panel 4.5.0-1191 → 4.5.0-1193
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.js +104 -86
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -25
- package/src/components/css-classes/css-class-menu.tsx +4 -1
- package/src/components/style-tab.tsx +3 -0
- package/src/hooks/use-broadcast-style-state.ts +20 -0
package/dist/index.js
CHANGED
|
@@ -1092,6 +1092,9 @@ var CLASS_STATES_MAP = {
|
|
|
1092
1092
|
},
|
|
1093
1093
|
disabled: {
|
|
1094
1094
|
label: (0, import_i18n5.__)("disabled", "elementor")
|
|
1095
|
+
},
|
|
1096
|
+
current: {
|
|
1097
|
+
label: (0, import_i18n5.__)("current", "elementor")
|
|
1095
1098
|
}
|
|
1096
1099
|
};
|
|
1097
1100
|
function useElementStates() {
|
|
@@ -1100,7 +1103,7 @@ function useElementStates() {
|
|
|
1100
1103
|
const elementStates = styleStates.map(({ value, name }) => ({
|
|
1101
1104
|
key: value,
|
|
1102
1105
|
value,
|
|
1103
|
-
label: CLASS_STATES_MAP[
|
|
1106
|
+
label: CLASS_STATES_MAP[name]?.label ?? name
|
|
1104
1107
|
}));
|
|
1105
1108
|
return {
|
|
1106
1109
|
elementStates,
|
|
@@ -2032,7 +2035,7 @@ var EditingPanelStickyPromotion = () => {
|
|
|
2032
2035
|
};
|
|
2033
2036
|
|
|
2034
2037
|
// src/components/editing-panel-tabs.tsx
|
|
2035
|
-
var
|
|
2038
|
+
var import_react40 = require("react");
|
|
2036
2039
|
var React92 = __toESM(require("react"));
|
|
2037
2040
|
var import_editor_current_user = require("@elementor/editor-current-user");
|
|
2038
2041
|
var import_editor_elements15 = require("@elementor/editor-elements");
|
|
@@ -2899,7 +2902,7 @@ function isControlHiddenByDependencies(control, propsSchema, settings, elementId
|
|
|
2899
2902
|
|
|
2900
2903
|
// src/components/style-tab.tsx
|
|
2901
2904
|
var React91 = __toESM(require("react"));
|
|
2902
|
-
var
|
|
2905
|
+
var import_react39 = require("react");
|
|
2903
2906
|
var import_editor_props17 = require("@elementor/editor-props");
|
|
2904
2907
|
var import_editor_responsive4 = require("@elementor/editor-responsive");
|
|
2905
2908
|
var import_locations6 = require("@elementor/locations");
|
|
@@ -3254,6 +3257,20 @@ function useActiveAndAppliedClassId(id, appliedClassesIds) {
|
|
|
3254
3257
|
return isClassApplied ? id : null;
|
|
3255
3258
|
}
|
|
3256
3259
|
|
|
3260
|
+
// src/hooks/use-broadcast-style-state.ts
|
|
3261
|
+
var import_react21 = require("react");
|
|
3262
|
+
var STYLE_STATE_EVENT = "elementor/editor/style-state/change";
|
|
3263
|
+
function broadcast(id, state) {
|
|
3264
|
+
window.dispatchEvent(new CustomEvent(STYLE_STATE_EVENT, { detail: { id, state } }));
|
|
3265
|
+
}
|
|
3266
|
+
function useBroadcastStyleState(state) {
|
|
3267
|
+
const { element } = useElement();
|
|
3268
|
+
(0, import_react21.useEffect)(() => {
|
|
3269
|
+
broadcast(element.id, state);
|
|
3270
|
+
return () => broadcast(element.id, null);
|
|
3271
|
+
}, [element.id, state]);
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3257
3274
|
// src/components/style-sections.tsx
|
|
3258
3275
|
var React90 = __toESM(require("react"));
|
|
3259
3276
|
|
|
@@ -3282,7 +3299,7 @@ function useStylesField(propName, meta) {
|
|
|
3282
3299
|
}
|
|
3283
3300
|
|
|
3284
3301
|
// src/controls-registry/conditional-field.tsx
|
|
3285
|
-
var
|
|
3302
|
+
var import_react22 = require("react");
|
|
3286
3303
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
3287
3304
|
var import_editor_props11 = require("@elementor/editor-props");
|
|
3288
3305
|
var ConditionalField = ({ children }) => {
|
|
@@ -3311,8 +3328,8 @@ function useSyncDepsWithInherited({
|
|
|
3311
3328
|
setDepValues,
|
|
3312
3329
|
resetValue
|
|
3313
3330
|
}) {
|
|
3314
|
-
const syncRef = (0,
|
|
3315
|
-
(0,
|
|
3331
|
+
const syncRef = (0, import_react22.useRef)({ hasSynced: false, prevDepValues: depValues });
|
|
3332
|
+
(0, import_react22.useEffect)(() => {
|
|
3316
3333
|
const { hasSynced, prevDepValues } = syncRef.current;
|
|
3317
3334
|
if (hasSynced && value && wasDepsCleared(prevDepValues, depValues) || isHidden && depValues && value) {
|
|
3318
3335
|
resetValue();
|
|
@@ -3706,12 +3723,12 @@ var BlendModeField = () => {
|
|
|
3706
3723
|
|
|
3707
3724
|
// src/components/style-sections/effects-section/opacity-control-field.tsx
|
|
3708
3725
|
var React40 = __toESM(require("react"));
|
|
3709
|
-
var
|
|
3726
|
+
var import_react23 = require("react");
|
|
3710
3727
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
3711
3728
|
var import_i18n18 = require("@wordpress/i18n");
|
|
3712
3729
|
var OPACITY_LABEL = (0, import_i18n18.__)("Opacity", "elementor");
|
|
3713
3730
|
var OpacityControlField = () => {
|
|
3714
|
-
const rowRef = (0,
|
|
3731
|
+
const rowRef = (0, import_react23.useRef)(null);
|
|
3715
3732
|
return /* @__PURE__ */ React40.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React40.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React40.createElement(import_editor_controls13.SizeControl, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
3716
3733
|
};
|
|
3717
3734
|
|
|
@@ -3855,7 +3872,7 @@ var import_i18n22 = require("@wordpress/i18n");
|
|
|
3855
3872
|
|
|
3856
3873
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
3857
3874
|
var React44 = __toESM(require("react"));
|
|
3858
|
-
var
|
|
3875
|
+
var import_react24 = require("react");
|
|
3859
3876
|
var import_ui25 = require("@elementor/ui");
|
|
3860
3877
|
var import_i18n21 = require("@wordpress/i18n");
|
|
3861
3878
|
var FLEX_DIRECTION_LABEL = (0, import_i18n21.__)("Flex direction", "elementor");
|
|
@@ -3878,7 +3895,7 @@ var RotatedIcon = ({
|
|
|
3878
3895
|
offset = 0,
|
|
3879
3896
|
disableRotationForReversed = false
|
|
3880
3897
|
}) => {
|
|
3881
|
-
const rotate = (0,
|
|
3898
|
+
const rotate = (0, import_react24.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
3882
3899
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
3883
3900
|
return /* @__PURE__ */ React44.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
3884
3901
|
};
|
|
@@ -4210,7 +4227,7 @@ var FlexDirectionField = () => {
|
|
|
4210
4227
|
|
|
4211
4228
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
4212
4229
|
var React51 = __toESM(require("react"));
|
|
4213
|
-
var
|
|
4230
|
+
var import_react25 = require("react");
|
|
4214
4231
|
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
4215
4232
|
var import_icons13 = require("@elementor/icons");
|
|
4216
4233
|
var import_ui30 = require("@elementor/ui");
|
|
@@ -4258,15 +4275,15 @@ function FlexOrderFieldContent() {
|
|
|
4258
4275
|
});
|
|
4259
4276
|
const { placeholder } = (0, import_editor_controls21.useBoundProp)();
|
|
4260
4277
|
const placeholderValue = placeholder;
|
|
4261
|
-
const currentGroup = (0,
|
|
4262
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
4263
|
-
const [customLocked, setCustomLocked] = (0,
|
|
4264
|
-
(0,
|
|
4278
|
+
const currentGroup = (0, import_react25.useMemo)(() => getGroupControlValue(order?.value ?? null), [order]);
|
|
4279
|
+
const [activeGroup, setActiveGroup] = (0, import_react25.useState)(currentGroup);
|
|
4280
|
+
const [customLocked, setCustomLocked] = (0, import_react25.useState)(false);
|
|
4281
|
+
(0, import_react25.useEffect)(() => {
|
|
4265
4282
|
if (!customLocked) {
|
|
4266
4283
|
setActiveGroup(currentGroup);
|
|
4267
4284
|
}
|
|
4268
4285
|
}, [currentGroup, customLocked]);
|
|
4269
|
-
(0,
|
|
4286
|
+
(0, import_react25.useEffect)(() => {
|
|
4270
4287
|
if (order === null) {
|
|
4271
4288
|
setCustomLocked(false);
|
|
4272
4289
|
}
|
|
@@ -4326,7 +4343,7 @@ var getGroupControlValue = (order) => {
|
|
|
4326
4343
|
|
|
4327
4344
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
4328
4345
|
var React52 = __toESM(require("react"));
|
|
4329
|
-
var
|
|
4346
|
+
var import_react26 = require("react");
|
|
4330
4347
|
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
4331
4348
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
4332
4349
|
var import_icons14 = require("@elementor/icons");
|
|
@@ -4362,15 +4379,15 @@ var FlexSizeFieldContent = () => {
|
|
|
4362
4379
|
});
|
|
4363
4380
|
const { placeholder } = (0, import_editor_controls22.useBoundProp)();
|
|
4364
4381
|
const flexValues = extractFlexValues(value);
|
|
4365
|
-
const currentGroup = (0,
|
|
4366
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
4367
|
-
const [customLocked, setCustomLocked] = (0,
|
|
4368
|
-
(0,
|
|
4382
|
+
const currentGroup = (0, import_react26.useMemo)(() => getActiveGroup(flexValues), [flexValues]);
|
|
4383
|
+
const [activeGroup, setActiveGroup] = (0, import_react26.useState)(currentGroup);
|
|
4384
|
+
const [customLocked, setCustomLocked] = (0, import_react26.useState)(false);
|
|
4385
|
+
(0, import_react26.useEffect)(() => {
|
|
4369
4386
|
if (!customLocked) {
|
|
4370
4387
|
setActiveGroup(currentGroup);
|
|
4371
4388
|
}
|
|
4372
4389
|
}, [currentGroup, customLocked]);
|
|
4373
|
-
(0,
|
|
4390
|
+
(0, import_react26.useEffect)(() => {
|
|
4374
4391
|
if (value === null) {
|
|
4375
4392
|
setCustomLocked(false);
|
|
4376
4393
|
}
|
|
@@ -4433,7 +4450,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
4433
4450
|
return null;
|
|
4434
4451
|
};
|
|
4435
4452
|
var FlexCustomField = () => {
|
|
4436
|
-
const flexBasisRowRef = (0,
|
|
4453
|
+
const flexBasisRowRef = (0, import_react26.useRef)(null);
|
|
4437
4454
|
const context = (0, import_editor_controls22.useBoundProp)(import_editor_props15.flexPropTypeUtil);
|
|
4438
4455
|
return /* @__PURE__ */ React52.createElement(import_editor_controls22.PropProvider, { ...context }, /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: (0, import_i18n29.__)("Grow", "elementor") }, /* @__PURE__ */ React52.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexGrow" }, /* @__PURE__ */ React52.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: (0, import_i18n29.__)("Shrink", "elementor") }, /* @__PURE__ */ React52.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexShrink" }, /* @__PURE__ */ React52.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React52.createElement(StylesFieldLayout, { label: (0, import_i18n29.__)("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React52.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexBasis" }, /* @__PURE__ */ React52.createElement(import_editor_controls22.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
4439
4456
|
};
|
|
@@ -4547,7 +4564,7 @@ var GridAutoFlowField = () => /* @__PURE__ */ React54.createElement(StylesField,
|
|
|
4547
4564
|
|
|
4548
4565
|
// src/components/style-sections/layout-section/grid-auto-track-fields.tsx
|
|
4549
4566
|
var React55 = __toESM(require("react"));
|
|
4550
|
-
var
|
|
4567
|
+
var import_react27 = require("react");
|
|
4551
4568
|
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
4552
4569
|
var import_ui32 = require("@elementor/ui");
|
|
4553
4570
|
var import_i18n32 = require("@wordpress/i18n");
|
|
@@ -4571,7 +4588,7 @@ var GridAutoTrackField = ({ bind, infoTooltip, label, rowRef }) => /* @__PURE__
|
|
|
4571
4588
|
}
|
|
4572
4589
|
)));
|
|
4573
4590
|
var GridAutoTrackFields = () => {
|
|
4574
|
-
const rowRef = (0,
|
|
4591
|
+
const rowRef = (0, import_react27.useRef)(null);
|
|
4575
4592
|
return /* @__PURE__ */ React55.createElement(import_ui32.Stack, { gap: 2, pt: 2, ref: rowRef }, /* @__PURE__ */ React55.createElement(
|
|
4576
4593
|
GridAutoTrackField,
|
|
4577
4594
|
{
|
|
@@ -4656,7 +4673,7 @@ var GridOutlineField = () => {
|
|
|
4656
4673
|
|
|
4657
4674
|
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
4658
4675
|
var React58 = __toESM(require("react"));
|
|
4659
|
-
var
|
|
4676
|
+
var import_react28 = require("react");
|
|
4660
4677
|
var import_editor_controls27 = require("@elementor/editor-controls");
|
|
4661
4678
|
var import_ui35 = require("@elementor/ui");
|
|
4662
4679
|
var import_i18n35 = require("@wordpress/i18n");
|
|
@@ -4774,7 +4791,7 @@ var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
|
4774
4791
|
history: { propDisplayName: label }
|
|
4775
4792
|
});
|
|
4776
4793
|
const { placeholder: inheritedPlaceholder } = (0, import_editor_controls27.useBoundProp)();
|
|
4777
|
-
const anchorRef = (0,
|
|
4794
|
+
const anchorRef = (0, import_react28.useRef)(null);
|
|
4778
4795
|
const local = parseValue(value);
|
|
4779
4796
|
const inherited = parseValue(inheritedPlaceholder);
|
|
4780
4797
|
const displayValue = local.kind !== "empty" ? toSizeInput(local) : toSizeInput(EMPTY, unitOf(inherited));
|
|
@@ -4938,14 +4955,14 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
4938
4955
|
|
|
4939
4956
|
// src/components/style-sections/position-section/position-section.tsx
|
|
4940
4957
|
var React67 = __toESM(require("react"));
|
|
4941
|
-
var
|
|
4958
|
+
var import_react31 = require("react");
|
|
4942
4959
|
var import_session7 = require("@elementor/session");
|
|
4943
4960
|
var import_ui40 = require("@elementor/ui");
|
|
4944
4961
|
var import_i18n44 = require("@wordpress/i18n");
|
|
4945
4962
|
|
|
4946
4963
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
4947
4964
|
var React63 = __toESM(require("react"));
|
|
4948
|
-
var
|
|
4965
|
+
var import_react29 = require("react");
|
|
4949
4966
|
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
4950
4967
|
var import_icons19 = require("@elementor/icons");
|
|
4951
4968
|
var import_ui38 = require("@elementor/ui");
|
|
@@ -4962,7 +4979,7 @@ var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n40.__)("Righ
|
|
|
4962
4979
|
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n40.__)("Left", "elementor") : (0, import_i18n40.__)("Right", "elementor");
|
|
4963
4980
|
var DimensionsField = () => {
|
|
4964
4981
|
const { isSiteRtl } = useDirection();
|
|
4965
|
-
const rowRefs = [(0,
|
|
4982
|
+
const rowRefs = [(0, import_react29.useRef)(null), (0, import_react29.useRef)(null)];
|
|
4966
4983
|
return /* @__PURE__ */ React63.createElement(UiProviders, null, /* @__PURE__ */ React63.createElement(import_ui38.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React63.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n40.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React63.createElement(
|
|
4967
4984
|
DimensionField,
|
|
4968
4985
|
{
|
|
@@ -4995,13 +5012,13 @@ var DimensionField = ({
|
|
|
4995
5012
|
|
|
4996
5013
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
4997
5014
|
var React64 = __toESM(require("react"));
|
|
4998
|
-
var
|
|
5015
|
+
var import_react30 = require("react");
|
|
4999
5016
|
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
5000
5017
|
var import_i18n41 = require("@wordpress/i18n");
|
|
5001
5018
|
var OFFSET_LABEL = (0, import_i18n41.__)("Anchor offset", "elementor");
|
|
5002
5019
|
var UNITS2 = ["px", "em", "rem", "vw", "vh"];
|
|
5003
5020
|
var OffsetField = () => {
|
|
5004
|
-
const rowRef = (0,
|
|
5021
|
+
const rowRef = (0, import_react30.useRef)(null);
|
|
5005
5022
|
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React64.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React64.createElement(import_editor_controls33.SizeControl, { units: UNITS2, anchorRef: rowRef })));
|
|
5006
5023
|
};
|
|
5007
5024
|
|
|
@@ -5062,10 +5079,10 @@ var PositionSection = () => {
|
|
|
5062
5079
|
const inheritedPosition = useInheritedValues(["position"]).position;
|
|
5063
5080
|
const resolvedPosition = position ?? inheritedPosition ?? null;
|
|
5064
5081
|
const isPositionUnsetOrStatic = !resolvedPosition || resolvedPosition.value === POSITION_STATIC;
|
|
5065
|
-
const positionPrevRef = (0,
|
|
5082
|
+
const positionPrevRef = (0, import_react31.useRef)(position);
|
|
5066
5083
|
const { values: dependentValues, setValues: setDependentValues } = useStylesFields(DEPENDENT_PROP_NAMES);
|
|
5067
5084
|
const [savedDependentValues, saveToHistory, clearHistory] = usePersistDimensions();
|
|
5068
|
-
(0,
|
|
5085
|
+
(0, import_react31.useEffect)(() => {
|
|
5069
5086
|
if (position && position?.value === POSITION_STATIC && hasDependentValues(dependentValues)) {
|
|
5070
5087
|
saveToHistory(extractDimensions(dependentValues));
|
|
5071
5088
|
}
|
|
@@ -5129,7 +5146,7 @@ var StyledSectionContent = (0, import_ui40.styled)(SectionContent, {
|
|
|
5129
5146
|
|
|
5130
5147
|
// src/components/style-sections/size-section/size-section.tsx
|
|
5131
5148
|
var React70 = __toESM(require("react"));
|
|
5132
|
-
var
|
|
5149
|
+
var import_react32 = require("react");
|
|
5133
5150
|
var import_editor_controls38 = require("@elementor/editor-controls");
|
|
5134
5151
|
var import_ui41 = require("@elementor/ui");
|
|
5135
5152
|
var import_i18n47 = require("@wordpress/i18n");
|
|
@@ -5215,7 +5232,7 @@ var CssSizeProps = [
|
|
|
5215
5232
|
];
|
|
5216
5233
|
var ASPECT_RATIO_LABEL = (0, import_i18n47.__)("Aspect Ratio", "elementor");
|
|
5217
5234
|
var SizeSection = () => {
|
|
5218
|
-
const gridRowRefs = [(0,
|
|
5235
|
+
const gridRowRefs = [(0, import_react32.useRef)(null), (0, import_react32.useRef)(null), (0, import_react32.useRef)(null)];
|
|
5219
5236
|
return /* @__PURE__ */ React70.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React70.createElement(import_ui41.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React70.createElement(import_ui41.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React70.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React70.createElement(PanelDivider, null), /* @__PURE__ */ React70.createElement(import_ui41.Stack, null, /* @__PURE__ */ React70.createElement(OverflowField, null)), /* @__PURE__ */ React70.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React70.createElement(import_ui41.Stack, { gap: 2, pt: 2 }, /* @__PURE__ */ React70.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React70.createElement(import_editor_controls38.AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React70.createElement(PanelDivider, null), /* @__PURE__ */ React70.createElement(ObjectFitField, null), /* @__PURE__ */ React70.createElement(StylesField, { bind: "object-position", propDisplayName: (0, import_i18n47.__)("Object position", "elementor") }, /* @__PURE__ */ React70.createElement(import_ui41.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React70.createElement(import_editor_controls38.PositionControl, null))))));
|
|
5220
5237
|
};
|
|
5221
5238
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
@@ -5254,12 +5271,12 @@ var ColumnCountField = () => {
|
|
|
5254
5271
|
|
|
5255
5272
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
5256
5273
|
var React73 = __toESM(require("react"));
|
|
5257
|
-
var
|
|
5274
|
+
var import_react33 = require("react");
|
|
5258
5275
|
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
5259
5276
|
var import_i18n50 = require("@wordpress/i18n");
|
|
5260
5277
|
var COLUMN_GAP_LABEL = (0, import_i18n50.__)("Column gap", "elementor");
|
|
5261
5278
|
var ColumnGapField = () => {
|
|
5262
|
-
const rowRef = (0,
|
|
5279
|
+
const rowRef = (0, import_react33.useRef)(null);
|
|
5263
5280
|
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React73.createElement(import_editor_controls41.SizeControl, { anchorRef: rowRef })));
|
|
5264
5281
|
};
|
|
5265
5282
|
|
|
@@ -5287,12 +5304,12 @@ var FontFamilyField = () => {
|
|
|
5287
5304
|
|
|
5288
5305
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
5289
5306
|
var React75 = __toESM(require("react"));
|
|
5290
|
-
var
|
|
5307
|
+
var import_react34 = require("react");
|
|
5291
5308
|
var import_editor_controls43 = require("@elementor/editor-controls");
|
|
5292
5309
|
var import_i18n52 = require("@wordpress/i18n");
|
|
5293
5310
|
var FONT_SIZE_LABEL = (0, import_i18n52.__)("Font size", "elementor");
|
|
5294
5311
|
var FontSizeField = () => {
|
|
5295
|
-
const rowRef = (0,
|
|
5312
|
+
const rowRef = (0, import_react34.useRef)(null);
|
|
5296
5313
|
return /* @__PURE__ */ React75.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React75.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React75.createElement(import_editor_controls43.SizeControl, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
|
|
5297
5314
|
};
|
|
5298
5315
|
|
|
@@ -5342,23 +5359,23 @@ var FontWeightField = () => {
|
|
|
5342
5359
|
|
|
5343
5360
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
5344
5361
|
var React78 = __toESM(require("react"));
|
|
5345
|
-
var
|
|
5362
|
+
var import_react35 = require("react");
|
|
5346
5363
|
var import_editor_controls46 = require("@elementor/editor-controls");
|
|
5347
5364
|
var import_i18n55 = require("@wordpress/i18n");
|
|
5348
5365
|
var LETTER_SPACING_LABEL = (0, import_i18n55.__)("Letter spacing", "elementor");
|
|
5349
5366
|
var LetterSpacingField = () => {
|
|
5350
|
-
const rowRef = (0,
|
|
5367
|
+
const rowRef = (0, import_react35.useRef)(null);
|
|
5351
5368
|
return /* @__PURE__ */ React78.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React78.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React78.createElement(import_editor_controls46.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
5352
5369
|
};
|
|
5353
5370
|
|
|
5354
5371
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
5355
5372
|
var React79 = __toESM(require("react"));
|
|
5356
|
-
var
|
|
5373
|
+
var import_react36 = require("react");
|
|
5357
5374
|
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
5358
5375
|
var import_i18n56 = require("@wordpress/i18n");
|
|
5359
5376
|
var LINE_HEIGHT_LABEL = (0, import_i18n56.__)("Line height", "elementor");
|
|
5360
5377
|
var LineHeightField = () => {
|
|
5361
|
-
const rowRef = (0,
|
|
5378
|
+
const rowRef = (0, import_react36.useRef)(null);
|
|
5362
5379
|
return /* @__PURE__ */ React79.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React79.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React79.createElement(import_editor_controls47.SizeControl, { anchorRef: rowRef })));
|
|
5363
5380
|
};
|
|
5364
5381
|
|
|
@@ -5580,12 +5597,12 @@ var TransformField = () => /* @__PURE__ */ React86.createElement(StylesField, {
|
|
|
5580
5597
|
|
|
5581
5598
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
5582
5599
|
var React87 = __toESM(require("react"));
|
|
5583
|
-
var
|
|
5600
|
+
var import_react37 = require("react");
|
|
5584
5601
|
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
5585
5602
|
var import_i18n63 = require("@wordpress/i18n");
|
|
5586
5603
|
var WORD_SPACING_LABEL = (0, import_i18n63.__)("Word spacing", "elementor");
|
|
5587
5604
|
var WordSpacingField = () => {
|
|
5588
|
-
const rowRef = (0,
|
|
5605
|
+
const rowRef = (0, import_react37.useRef)(null);
|
|
5589
5606
|
return /* @__PURE__ */ React87.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React87.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React87.createElement(import_editor_controls54.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
5590
5607
|
};
|
|
5591
5608
|
|
|
@@ -5715,7 +5732,7 @@ var STYLE_SECTION_NAMES = STYLE_SECTIONS.map((section) => section.name);
|
|
|
5715
5732
|
var React89 = __toESM(require("react"));
|
|
5716
5733
|
|
|
5717
5734
|
// src/components/style-section-header-location.tsx
|
|
5718
|
-
var
|
|
5735
|
+
var import_react38 = require("react");
|
|
5719
5736
|
var import_locations5 = require("@elementor/locations");
|
|
5720
5737
|
var { Slot: StyleSectionHeaderSlot, inject: injectStyleSectionHeader } = (0, import_locations5.createLocation)();
|
|
5721
5738
|
var injectIntoStyleSectionHeader = ({ id, component, sections, options: options13 }) => {
|
|
@@ -5723,7 +5740,7 @@ var injectIntoStyleSectionHeader = ({ id, component, sections, options: options1
|
|
|
5723
5740
|
if (sections && !sections.includes(props.sectionName)) {
|
|
5724
5741
|
return null;
|
|
5725
5742
|
}
|
|
5726
|
-
return (0,
|
|
5743
|
+
return (0, import_react38.createElement)(component, props);
|
|
5727
5744
|
};
|
|
5728
5745
|
injectStyleSectionHeader({ id, component: filteredComponent, options: options13 });
|
|
5729
5746
|
};
|
|
@@ -5778,8 +5795,9 @@ var stickyHeaderStyles = {
|
|
|
5778
5795
|
var StyleTab = () => {
|
|
5779
5796
|
const currentClassesProp = useCurrentClassesProp();
|
|
5780
5797
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp ?? "");
|
|
5781
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
5798
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react39.useState)(null);
|
|
5782
5799
|
const breakpoint = (0, import_editor_responsive4.useActiveBreakpoint)();
|
|
5800
|
+
useBroadcastStyleState(activeStyleState);
|
|
5783
5801
|
if (!currentClassesProp) {
|
|
5784
5802
|
return null;
|
|
5785
5803
|
}
|
|
@@ -5829,7 +5847,7 @@ var EditingPanelTabs = () => {
|
|
|
5829
5847
|
return (
|
|
5830
5848
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
5831
5849
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
5832
|
-
/* @__PURE__ */ React92.createElement(
|
|
5850
|
+
/* @__PURE__ */ React92.createElement(import_react40.Fragment, { key: element.id }, /* @__PURE__ */ React92.createElement(PanelTabContent, null))
|
|
5833
5851
|
);
|
|
5834
5852
|
};
|
|
5835
5853
|
var PanelTabContent = () => {
|
|
@@ -5963,7 +5981,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
5963
5981
|
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
5964
5982
|
|
|
5965
5983
|
// src/hooks/use-open-editor-panel.ts
|
|
5966
|
-
var
|
|
5984
|
+
var import_react41 = require("react");
|
|
5967
5985
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
5968
5986
|
|
|
5969
5987
|
// src/panel.ts
|
|
@@ -5987,7 +6005,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
5987
6005
|
// src/hooks/use-open-editor-panel.ts
|
|
5988
6006
|
var useOpenEditorPanel = () => {
|
|
5989
6007
|
const { open } = usePanelActions();
|
|
5990
|
-
(0,
|
|
6008
|
+
(0, import_react41.useEffect)(() => {
|
|
5991
6009
|
return (0, import_editor_v1_adapters9.__privateListenTo)((0, import_editor_v1_adapters9.commandStartEvent)("panel/editor/open"), () => {
|
|
5992
6010
|
if (isAtomicWidgetSelected()) {
|
|
5993
6011
|
open();
|
|
@@ -6007,12 +6025,12 @@ var import_editor_controls57 = require("@elementor/editor-controls");
|
|
|
6007
6025
|
|
|
6008
6026
|
// src/components/promotions/custom-css.tsx
|
|
6009
6027
|
var React95 = __toESM(require("react"));
|
|
6010
|
-
var
|
|
6028
|
+
var import_react42 = require("react");
|
|
6011
6029
|
var import_editor_controls56 = require("@elementor/editor-controls");
|
|
6012
6030
|
var import_i18n68 = require("@wordpress/i18n");
|
|
6013
6031
|
var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
|
|
6014
6032
|
var CustomCssSection = () => {
|
|
6015
|
-
const triggerRef = (0,
|
|
6033
|
+
const triggerRef = (0, import_react42.useRef)(null);
|
|
6016
6034
|
return /* @__PURE__ */ React95.createElement(
|
|
6017
6035
|
StyleTabSection,
|
|
6018
6036
|
{
|
|
@@ -6218,7 +6236,7 @@ var useActions = () => {
|
|
|
6218
6236
|
};
|
|
6219
6237
|
|
|
6220
6238
|
// src/controls-registry/element-controls/accordion-items-control/use-show-icon-write-through.ts
|
|
6221
|
-
var
|
|
6239
|
+
var import_react43 = require("react");
|
|
6222
6240
|
var import_editor_elements19 = require("@elementor/editor-elements");
|
|
6223
6241
|
var import_editor_props19 = require("@elementor/editor-props");
|
|
6224
6242
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
@@ -6324,8 +6342,8 @@ var cascadeDifferentOpenIconToHeaders = (0, import_editor_v1_adapters10.undoable
|
|
|
6324
6342
|
}
|
|
6325
6343
|
);
|
|
6326
6344
|
function useDifferentOpenIconWriteThrough(accordionId, differentOpenIcon) {
|
|
6327
|
-
const previousRef = (0,
|
|
6328
|
-
(0,
|
|
6345
|
+
const previousRef = (0, import_react43.useRef)(null);
|
|
6346
|
+
(0, import_react43.useEffect)(() => {
|
|
6329
6347
|
const previous = previousRef.current;
|
|
6330
6348
|
previousRef.current = { accordionId, differentOpenIcon };
|
|
6331
6349
|
if (!previous || previous.accordionId !== accordionId || previous.differentOpenIcon === differentOpenIcon) {
|
|
@@ -6335,8 +6353,8 @@ function useDifferentOpenIconWriteThrough(accordionId, differentOpenIcon) {
|
|
|
6335
6353
|
}, [accordionId, differentOpenIcon]);
|
|
6336
6354
|
}
|
|
6337
6355
|
function useShowIconWriteThrough(accordionId, showIcon) {
|
|
6338
|
-
const previousRef = (0,
|
|
6339
|
-
(0,
|
|
6356
|
+
const previousRef = (0, import_react43.useRef)(null);
|
|
6357
|
+
(0, import_react43.useEffect)(() => {
|
|
6340
6358
|
const previous = previousRef.current;
|
|
6341
6359
|
previousRef.current = { accordionId, showIcon };
|
|
6342
6360
|
if (!previous || previous.accordionId !== accordionId || previous.showIcon === showIcon) {
|
|
@@ -6579,7 +6597,7 @@ var addItem = ({
|
|
|
6579
6597
|
};
|
|
6580
6598
|
|
|
6581
6599
|
// src/controls-registry/element-controls/list-items-control/use-show-markers-write-through.ts
|
|
6582
|
-
var
|
|
6600
|
+
var import_react44 = require("react");
|
|
6583
6601
|
var import_editor_elements22 = require("@elementor/editor-elements");
|
|
6584
6602
|
var import_editor_props22 = require("@elementor/editor-props");
|
|
6585
6603
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
@@ -6631,8 +6649,8 @@ function getListItemIds(listId) {
|
|
|
6631
6649
|
return itemContainers.map((item) => item.id);
|
|
6632
6650
|
}
|
|
6633
6651
|
function useShowMarkersWriteThrough(listId, showMarkers) {
|
|
6634
|
-
const previousRef = (0,
|
|
6635
|
-
(0,
|
|
6652
|
+
const previousRef = (0, import_react44.useRef)(null);
|
|
6653
|
+
(0, import_react44.useEffect)(() => {
|
|
6636
6654
|
const previous = previousRef.current;
|
|
6637
6655
|
previousRef.current = { listId, showMarkers };
|
|
6638
6656
|
if (!previous || previous.listId !== listId || previous.showMarkers === showMarkers) {
|
|
@@ -6745,7 +6763,7 @@ var ListItemLabelControl = ({ elementId, fallbackLabel }) => {
|
|
|
6745
6763
|
|
|
6746
6764
|
// src/controls-registry/element-controls/menu-items-control/menu-items-control.tsx
|
|
6747
6765
|
var React98 = __toESM(require("react"));
|
|
6748
|
-
var
|
|
6766
|
+
var import_react45 = require("react");
|
|
6749
6767
|
var import_editor_controls60 = require("@elementor/editor-controls");
|
|
6750
6768
|
var import_editor_elements27 = require("@elementor/editor-elements");
|
|
6751
6769
|
var import_session10 = require("@elementor/session");
|
|
@@ -6953,7 +6971,7 @@ var ItemContent3 = ({ value }) => {
|
|
|
6953
6971
|
};
|
|
6954
6972
|
var ItemNameControl2 = ({ elementId }) => {
|
|
6955
6973
|
const editorSettings = (0, import_editor_elements27.useElementEditorSettings)(elementId);
|
|
6956
|
-
const inputId = (0,
|
|
6974
|
+
const inputId = (0, import_react45.useId)();
|
|
6957
6975
|
return /* @__PURE__ */ React98.createElement(import_ui50.Stack, { gap: 1 }, /* @__PURE__ */ React98.createElement(import_editor_controls60.ControlFormLabel, { htmlFor: inputId }, (0, import_i18n76.__)("Item name", "elementor")), /* @__PURE__ */ React98.createElement(
|
|
6958
6976
|
import_ui50.TextField,
|
|
6959
6977
|
{
|
|
@@ -7381,17 +7399,17 @@ var import_editor_props28 = require("@elementor/editor-props");
|
|
|
7381
7399
|
var import_icons30 = require("@elementor/icons");
|
|
7382
7400
|
|
|
7383
7401
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
7384
|
-
var
|
|
7402
|
+
var import_react48 = require("react");
|
|
7385
7403
|
|
|
7386
7404
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
7387
|
-
var
|
|
7405
|
+
var import_react47 = require("react");
|
|
7388
7406
|
var import_editor_controls63 = require("@elementor/editor-controls");
|
|
7389
7407
|
|
|
7390
7408
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
7391
7409
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
7392
7410
|
|
|
7393
7411
|
// src/hooks/use-license-config.ts
|
|
7394
|
-
var
|
|
7412
|
+
var import_react46 = require("react");
|
|
7395
7413
|
var config = { expired: false };
|
|
7396
7414
|
var listeners = /* @__PURE__ */ new Set();
|
|
7397
7415
|
function setLicenseConfig(newConfig) {
|
|
@@ -7406,7 +7424,7 @@ function subscribe(listener) {
|
|
|
7406
7424
|
return () => listeners.delete(listener);
|
|
7407
7425
|
}
|
|
7408
7426
|
function useLicenseConfig() {
|
|
7409
|
-
return (0,
|
|
7427
|
+
return (0, import_react46.useSyncExternalStore)(subscribe, getLicenseConfig, getLicenseConfig);
|
|
7410
7428
|
}
|
|
7411
7429
|
|
|
7412
7430
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
@@ -7475,7 +7493,7 @@ var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
|
7475
7493
|
categories = propDynamicType?.settings.categories || [];
|
|
7476
7494
|
}
|
|
7477
7495
|
const categoriesKey = categories.join();
|
|
7478
|
-
return (0,
|
|
7496
|
+
return (0, import_react47.useMemo)(
|
|
7479
7497
|
() => getDynamicTagsByCategories(categories, filterByLicense2),
|
|
7480
7498
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7481
7499
|
[categoriesKey, filterByLicense2]
|
|
@@ -7509,7 +7527,7 @@ var getDynamicTagsByCategories = (categories, filterByLicense2) => {
|
|
|
7509
7527
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
7510
7528
|
var useDynamicTag = (tagName) => {
|
|
7511
7529
|
const dynamicTags = useAllPropDynamicTags();
|
|
7512
|
-
return (0,
|
|
7530
|
+
return (0, import_react48.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
7513
7531
|
};
|
|
7514
7532
|
|
|
7515
7533
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
@@ -7551,7 +7569,7 @@ var import_editor_controls65 = require("@elementor/editor-controls");
|
|
|
7551
7569
|
|
|
7552
7570
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
7553
7571
|
var React101 = __toESM(require("react"));
|
|
7554
|
-
var
|
|
7572
|
+
var import_react49 = require("react");
|
|
7555
7573
|
var import_editor_props29 = require("@elementor/editor-props");
|
|
7556
7574
|
var DynamicConditionalControl = ({
|
|
7557
7575
|
children,
|
|
@@ -7559,7 +7577,7 @@ var DynamicConditionalControl = ({
|
|
|
7559
7577
|
propsSchema,
|
|
7560
7578
|
dynamicSettings
|
|
7561
7579
|
}) => {
|
|
7562
|
-
const defaults = (0,
|
|
7580
|
+
const defaults = (0, import_react49.useMemo)(() => {
|
|
7563
7581
|
if (!propsSchema) {
|
|
7564
7582
|
return {};
|
|
7565
7583
|
}
|
|
@@ -7569,7 +7587,7 @@ var DynamicConditionalControl = ({
|
|
|
7569
7587
|
return result;
|
|
7570
7588
|
}, {});
|
|
7571
7589
|
}, [propsSchema]);
|
|
7572
|
-
const convertedSettings = (0,
|
|
7590
|
+
const convertedSettings = (0, import_react49.useMemo)(() => {
|
|
7573
7591
|
if (!dynamicSettings) {
|
|
7574
7592
|
return {};
|
|
7575
7593
|
}
|
|
@@ -7588,7 +7606,7 @@ var DynamicConditionalControl = ({
|
|
|
7588
7606
|
{}
|
|
7589
7607
|
);
|
|
7590
7608
|
}, [dynamicSettings]);
|
|
7591
|
-
const effectiveSettings = (0,
|
|
7609
|
+
const effectiveSettings = (0, import_react49.useMemo)(() => {
|
|
7592
7610
|
return { ...defaults, ...convertedSettings };
|
|
7593
7611
|
}, [defaults, convertedSettings]);
|
|
7594
7612
|
if (!propType?.dependencies?.terms.length) {
|
|
@@ -7633,7 +7651,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
7633
7651
|
|
|
7634
7652
|
// src/dynamics/components/dynamic-selection.tsx
|
|
7635
7653
|
var React103 = __toESM(require("react"));
|
|
7636
|
-
var
|
|
7654
|
+
var import_react50 = require("react");
|
|
7637
7655
|
var import_editor_controls66 = require("@elementor/editor-controls");
|
|
7638
7656
|
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
7639
7657
|
var import_icons31 = require("@elementor/icons");
|
|
@@ -7644,7 +7662,7 @@ var PROMO_TEXT_WIDTH = 170;
|
|
|
7644
7662
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
7645
7663
|
var RENEW_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-renew-modal/";
|
|
7646
7664
|
var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
7647
|
-
const [searchValue, setSearchValue] = (0,
|
|
7665
|
+
const [searchValue, setSearchValue] = (0, import_react50.useState)("");
|
|
7648
7666
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
7649
7667
|
const theme = (0, import_ui52.useTheme)();
|
|
7650
7668
|
const { value: anyValue } = (0, import_editor_controls66.useBoundProp)();
|
|
@@ -7653,7 +7671,7 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
7653
7671
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
7654
7672
|
const options13 = useFilteredOptions(searchValue);
|
|
7655
7673
|
const hasNoDynamicTags = !options13.length && !searchValue.trim();
|
|
7656
|
-
(0,
|
|
7674
|
+
(0, import_react50.useEffect)(() => {
|
|
7657
7675
|
if (hasNoDynamicTags) {
|
|
7658
7676
|
(0, import_editor_controls66.trackViewPromotion)({ target_name: "dynamic_tags" });
|
|
7659
7677
|
} else if (expired) {
|
|
@@ -7690,7 +7708,7 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
7690
7708
|
if (expired) {
|
|
7691
7709
|
return /* @__PURE__ */ React103.createElement(ExpiredDynamicTags, null);
|
|
7692
7710
|
}
|
|
7693
|
-
return /* @__PURE__ */ React103.createElement(
|
|
7711
|
+
return /* @__PURE__ */ React103.createElement(import_react50.Fragment, null, /* @__PURE__ */ React103.createElement(
|
|
7694
7712
|
import_editor_ui11.SearchField,
|
|
7695
7713
|
{
|
|
7696
7714
|
value: searchValue,
|
|
@@ -8160,22 +8178,22 @@ var import_i18n86 = require("@wordpress/i18n");
|
|
|
8160
8178
|
|
|
8161
8179
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
8162
8180
|
var React110 = __toESM(require("react"));
|
|
8163
|
-
var
|
|
8181
|
+
var import_react52 = require("react");
|
|
8164
8182
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
8165
8183
|
var import_editor_ui13 = require("@elementor/editor-ui");
|
|
8166
8184
|
var import_ui58 = require("@elementor/ui");
|
|
8167
8185
|
var import_i18n85 = require("@wordpress/i18n");
|
|
8168
8186
|
|
|
8169
8187
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
8170
|
-
var
|
|
8188
|
+
var import_react51 = require("react");
|
|
8171
8189
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
8172
8190
|
var import_editor_styles8 = require("@elementor/editor-styles");
|
|
8173
8191
|
var import_editor_styles_repository18 = require("@elementor/editor-styles-repository");
|
|
8174
8192
|
var import_i18n83 = require("@wordpress/i18n");
|
|
8175
8193
|
var MAXIMUM_ITEMS = 2;
|
|
8176
8194
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
8177
|
-
const [items3, setItems] = (0,
|
|
8178
|
-
(0,
|
|
8195
|
+
const [items3, setItems] = (0, import_react51.useState)([]);
|
|
8196
|
+
(0, import_react51.useEffect)(() => {
|
|
8179
8197
|
(async () => {
|
|
8180
8198
|
const normalizedItems = await Promise.all(
|
|
8181
8199
|
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
@@ -8226,7 +8244,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
8226
8244
|
}
|
|
8227
8245
|
});
|
|
8228
8246
|
const value = result?.[bind] ?? result;
|
|
8229
|
-
if ((0,
|
|
8247
|
+
if ((0, import_react51.isValidElement)(value)) {
|
|
8230
8248
|
return value;
|
|
8231
8249
|
}
|
|
8232
8250
|
if (typeof value === "object") {
|
|
@@ -8341,8 +8359,8 @@ var StylesInheritanceInfotip = ({
|
|
|
8341
8359
|
children,
|
|
8342
8360
|
isDisabled
|
|
8343
8361
|
}) => {
|
|
8344
|
-
const [showInfotip, setShowInfotip] = (0,
|
|
8345
|
-
const triggerRef = (0,
|
|
8362
|
+
const [showInfotip, setShowInfotip] = (0, import_react52.useState)(false);
|
|
8363
|
+
const triggerRef = (0, import_react52.useRef)(null);
|
|
8346
8364
|
const toggleInfotip = () => {
|
|
8347
8365
|
if (isDisabled) {
|
|
8348
8366
|
return;
|
|
@@ -8357,7 +8375,7 @@ var StylesInheritanceInfotip = ({
|
|
|
8357
8375
|
};
|
|
8358
8376
|
const key = path.join(".");
|
|
8359
8377
|
const sectionWidth = (0, import_editor_ui13.useSectionWidth)();
|
|
8360
|
-
const resolve = (0,
|
|
8378
|
+
const resolve = (0, import_react52.useMemo)(() => {
|
|
8361
8379
|
return (0, import_editor_canvas5.createPropsResolver)({
|
|
8362
8380
|
transformers: import_editor_canvas5.stylesInheritanceTransformersRegistry,
|
|
8363
8381
|
schema: { [key]: propType }
|