@elementor/editor-editing-panel 4.2.0-905 → 4.2.0-906
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 +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +95 -92
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +24 -24
- package/src/hooks/use-default-panel-settings.ts +9 -6
- package/src/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -62,6 +62,7 @@ __export(index_exports, {
|
|
|
62
62
|
injectIntoStyleTab: () => injectIntoStyleTab,
|
|
63
63
|
isDynamicPropValue: () => isDynamicPropValue,
|
|
64
64
|
registerEditingPanelReplacement: () => registerEditingPanelReplacement,
|
|
65
|
+
registerElementPanelDefaults: () => registerElementPanelDefaults,
|
|
65
66
|
registerFieldIndicator: () => registerFieldIndicator,
|
|
66
67
|
registerStyleProviderToColors: () => registerStyleProviderToColors,
|
|
67
68
|
setLicenseConfig: () => setLicenseConfig,
|
|
@@ -1951,7 +1952,7 @@ function EditorPanelErrorFallback() {
|
|
|
1951
1952
|
}
|
|
1952
1953
|
|
|
1953
1954
|
// src/components/editing-panel-tabs.tsx
|
|
1954
|
-
var
|
|
1955
|
+
var import_react38 = require("react");
|
|
1955
1956
|
var React89 = __toESM(require("react"));
|
|
1956
1957
|
var import_editor_elements12 = require("@elementor/editor-elements");
|
|
1957
1958
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
@@ -1998,7 +1999,6 @@ function useScrollDirection() {
|
|
|
1998
1999
|
}
|
|
1999
2000
|
|
|
2000
2001
|
// src/hooks/use-default-panel-settings.ts
|
|
2001
|
-
var import_react16 = require("react");
|
|
2002
2002
|
var fallbackEditorSettings = {
|
|
2003
2003
|
defaultSectionsExpanded: {
|
|
2004
2004
|
settings: ["Content", "Settings"],
|
|
@@ -2006,7 +2006,7 @@ var fallbackEditorSettings = {
|
|
|
2006
2006
|
},
|
|
2007
2007
|
defaultTab: "settings"
|
|
2008
2008
|
};
|
|
2009
|
-
var
|
|
2009
|
+
var elementPanelDefaults = {
|
|
2010
2010
|
"e-div-block": {
|
|
2011
2011
|
defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
|
|
2012
2012
|
defaultTab: "style"
|
|
@@ -2023,21 +2023,23 @@ var defaultPanelSettingsContext = (0, import_react16.createContext)({
|
|
|
2023
2023
|
defaultSectionsExpanded: fallbackEditorSettings.defaultSectionsExpanded,
|
|
2024
2024
|
defaultTab: "style"
|
|
2025
2025
|
}
|
|
2026
|
-
}
|
|
2026
|
+
};
|
|
2027
|
+
function registerElementPanelDefaults(type, defaults) {
|
|
2028
|
+
elementPanelDefaults[type] = defaults;
|
|
2029
|
+
}
|
|
2027
2030
|
var useDefaultPanelSettings = () => {
|
|
2028
2031
|
const { element } = useElement();
|
|
2029
|
-
|
|
2030
|
-
return defaults || fallbackEditorSettings;
|
|
2032
|
+
return elementPanelDefaults[element.type] ?? fallbackEditorSettings;
|
|
2031
2033
|
};
|
|
2032
2034
|
|
|
2033
2035
|
// src/hooks/use-state-by-element.ts
|
|
2034
|
-
var
|
|
2036
|
+
var import_react16 = require("react");
|
|
2035
2037
|
var import_session4 = require("@elementor/session");
|
|
2036
2038
|
var useStateByElement = (key, initialValue) => {
|
|
2037
2039
|
const { element } = useElement();
|
|
2038
2040
|
const lookup = `elementor/editor-state/${element.id}/${key}`;
|
|
2039
2041
|
const storedValue = (0, import_session4.getSessionStorageItem)(lookup);
|
|
2040
|
-
const [value, setValue] = (0,
|
|
2042
|
+
const [value, setValue] = (0, import_react16.useState)(storedValue ?? initialValue);
|
|
2041
2043
|
const doUpdate = (newValue) => {
|
|
2042
2044
|
(0, import_session4.setSessionStorageItem)(lookup, newValue);
|
|
2043
2045
|
setValue(newValue);
|
|
@@ -2274,12 +2276,12 @@ function removePreviousValueFromStorage({ path, elementId }) {
|
|
|
2274
2276
|
|
|
2275
2277
|
// src/components/section.tsx
|
|
2276
2278
|
var React18 = __toESM(require("react"));
|
|
2277
|
-
var
|
|
2279
|
+
var import_react17 = require("react");
|
|
2278
2280
|
var import_editor_ui5 = require("@elementor/editor-ui");
|
|
2279
2281
|
var import_ui12 = require("@elementor/ui");
|
|
2280
2282
|
function Section({ title, children, defaultExpanded = false, titleEnd, unmountOnExit = true, action }) {
|
|
2281
2283
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
2282
|
-
const ref = (0,
|
|
2284
|
+
const ref = (0, import_react17.useRef)(null);
|
|
2283
2285
|
const isDisabled = !!action;
|
|
2284
2286
|
const handleClick = () => {
|
|
2285
2287
|
if (isDisabled) {
|
|
@@ -2288,7 +2290,7 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2288
2290
|
setIsOpen(!isOpen);
|
|
2289
2291
|
}
|
|
2290
2292
|
};
|
|
2291
|
-
const id = (0,
|
|
2293
|
+
const id = (0, import_react17.useId)();
|
|
2292
2294
|
const labelId = `label-${id}`;
|
|
2293
2295
|
const contentId = `content-${id}`;
|
|
2294
2296
|
return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
|
|
@@ -2463,7 +2465,7 @@ var getStyleByLayout = (layout) => {
|
|
|
2463
2465
|
|
|
2464
2466
|
// src/controls-registry/settings-field.tsx
|
|
2465
2467
|
var React21 = __toESM(require("react"));
|
|
2466
|
-
var
|
|
2468
|
+
var import_react18 = require("react");
|
|
2467
2469
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
2468
2470
|
var import_editor_documents2 = require("@elementor/editor-documents");
|
|
2469
2471
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
@@ -2518,7 +2520,7 @@ function useUndoableUpdateElementProp({
|
|
|
2518
2520
|
elementId,
|
|
2519
2521
|
propDisplayName
|
|
2520
2522
|
}) {
|
|
2521
|
-
return (0,
|
|
2523
|
+
return (0, import_react18.useMemo)(() => {
|
|
2522
2524
|
return (0, import_editor_v1_adapters4.undoable)(
|
|
2523
2525
|
{
|
|
2524
2526
|
do: (newSettings) => {
|
|
@@ -2678,7 +2680,7 @@ function isControlHiddenByDependencies(control, propsSchema, settings) {
|
|
|
2678
2680
|
|
|
2679
2681
|
// src/components/style-tab.tsx
|
|
2680
2682
|
var React88 = __toESM(require("react"));
|
|
2681
|
-
var
|
|
2683
|
+
var import_react37 = require("react");
|
|
2682
2684
|
var import_editor_props15 = require("@elementor/editor-props");
|
|
2683
2685
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
2684
2686
|
var import_locations3 = require("@elementor/locations");
|
|
@@ -2688,7 +2690,7 @@ var import_i18n62 = require("@wordpress/i18n");
|
|
|
2688
2690
|
|
|
2689
2691
|
// src/contexts/styles-inheritance-context.tsx
|
|
2690
2692
|
var React25 = __toESM(require("react"));
|
|
2691
|
-
var
|
|
2693
|
+
var import_react19 = require("react");
|
|
2692
2694
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
2693
2695
|
var import_editor_props8 = require("@elementor/editor-props");
|
|
2694
2696
|
var import_editor_responsive2 = require("@elementor/editor-responsive");
|
|
@@ -2920,7 +2922,7 @@ var getFilterPropType = (propType, path) => {
|
|
|
2920
2922
|
};
|
|
2921
2923
|
|
|
2922
2924
|
// src/contexts/styles-inheritance-context.tsx
|
|
2923
|
-
var Context4 = (0,
|
|
2925
|
+
var Context4 = (0, import_react19.createContext)(null);
|
|
2924
2926
|
function StyleInheritanceProvider({ children }) {
|
|
2925
2927
|
const styleDefs = useAppliedStyles();
|
|
2926
2928
|
const breakpointsTree = (0, import_editor_responsive2.getBreakpointsTree)();
|
|
@@ -2928,7 +2930,7 @@ function StyleInheritanceProvider({ children }) {
|
|
|
2928
2930
|
return /* @__PURE__ */ React25.createElement(Context4.Provider, { value: { getSnapshot, getInheritanceChain } }, children);
|
|
2929
2931
|
}
|
|
2930
2932
|
function useStylesInheritanceSnapshot() {
|
|
2931
|
-
const context = (0,
|
|
2933
|
+
const context = (0, import_react19.useContext)(Context4);
|
|
2932
2934
|
const { meta } = useStyle();
|
|
2933
2935
|
if (!context) {
|
|
2934
2936
|
throw new Error("useStylesInheritanceSnapshot must be used within a StyleInheritanceProvider");
|
|
@@ -2939,7 +2941,7 @@ function useStylesInheritanceSnapshot() {
|
|
|
2939
2941
|
return context.getSnapshot(meta) ?? null;
|
|
2940
2942
|
}
|
|
2941
2943
|
function useStylesInheritanceChain(path) {
|
|
2942
|
-
const context = (0,
|
|
2944
|
+
const context = (0, import_react19.useContext)(Context4);
|
|
2943
2945
|
if (!context) {
|
|
2944
2946
|
throw new Error("useStylesInheritanceChain must be used within a StyleInheritanceProvider");
|
|
2945
2947
|
}
|
|
@@ -2954,7 +2956,7 @@ function useStylesInheritanceChain(path) {
|
|
|
2954
2956
|
var EMPTY_INHERITED_VALUES = {};
|
|
2955
2957
|
function useInheritedValues(propKeys) {
|
|
2956
2958
|
const snapshot = useStylesInheritanceSnapshot();
|
|
2957
|
-
return (0,
|
|
2959
|
+
return (0, import_react19.useMemo)(() => {
|
|
2958
2960
|
if (!snapshot || propKeys.length === 0) {
|
|
2959
2961
|
return EMPTY_INHERITED_VALUES;
|
|
2960
2962
|
}
|
|
@@ -3029,7 +3031,7 @@ function useStylesField(propName, meta) {
|
|
|
3029
3031
|
}
|
|
3030
3032
|
|
|
3031
3033
|
// src/controls-registry/conditional-field.tsx
|
|
3032
|
-
var
|
|
3034
|
+
var import_react20 = require("react");
|
|
3033
3035
|
var import_editor_controls5 = require("@elementor/editor-controls");
|
|
3034
3036
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
3035
3037
|
var ConditionalField = ({ children }) => {
|
|
@@ -3058,8 +3060,8 @@ function useSyncDepsWithInherited({
|
|
|
3058
3060
|
setDepValues,
|
|
3059
3061
|
resetValue
|
|
3060
3062
|
}) {
|
|
3061
|
-
const syncRef = (0,
|
|
3062
|
-
(0,
|
|
3063
|
+
const syncRef = (0, import_react20.useRef)({ hasSynced: false, prevDepValues: depValues });
|
|
3064
|
+
(0, import_react20.useEffect)(() => {
|
|
3063
3065
|
const { hasSynced, prevDepValues } = syncRef.current;
|
|
3064
3066
|
if (hasSynced && value && wasDepsCleared(prevDepValues, depValues) || isHidden && depValues && value) {
|
|
3065
3067
|
resetValue();
|
|
@@ -3452,12 +3454,12 @@ var BlendModeField = () => {
|
|
|
3452
3454
|
|
|
3453
3455
|
// src/components/style-sections/effects-section/opacity-control-field.tsx
|
|
3454
3456
|
var React38 = __toESM(require("react"));
|
|
3455
|
-
var
|
|
3457
|
+
var import_react21 = require("react");
|
|
3456
3458
|
var import_editor_controls13 = require("@elementor/editor-controls");
|
|
3457
3459
|
var import_i18n16 = require("@wordpress/i18n");
|
|
3458
3460
|
var OPACITY_LABEL = (0, import_i18n16.__)("Opacity", "elementor");
|
|
3459
3461
|
var OpacityControlField = () => {
|
|
3460
|
-
const rowRef = (0,
|
|
3462
|
+
const rowRef = (0, import_react21.useRef)(null);
|
|
3461
3463
|
return /* @__PURE__ */ React38.createElement(StylesField, { bind: "opacity", propDisplayName: OPACITY_LABEL }, /* @__PURE__ */ React38.createElement(StylesFieldLayout, { ref: rowRef, label: OPACITY_LABEL }, /* @__PURE__ */ React38.createElement(import_editor_controls13.SizeControl, { units: ["%"], anchorRef: rowRef, defaultUnit: "%" })));
|
|
3462
3464
|
};
|
|
3463
3465
|
|
|
@@ -3601,7 +3603,7 @@ var import_i18n20 = require("@wordpress/i18n");
|
|
|
3601
3603
|
|
|
3602
3604
|
// src/components/style-sections/layout-section/utils/rotated-icon.tsx
|
|
3603
3605
|
var React42 = __toESM(require("react"));
|
|
3604
|
-
var
|
|
3606
|
+
var import_react22 = require("react");
|
|
3605
3607
|
var import_ui24 = require("@elementor/ui");
|
|
3606
3608
|
var import_i18n19 = require("@wordpress/i18n");
|
|
3607
3609
|
var FLEX_DIRECTION_LABEL = (0, import_i18n19.__)("Flex direction", "elementor");
|
|
@@ -3624,7 +3626,7 @@ var RotatedIcon = ({
|
|
|
3624
3626
|
offset = 0,
|
|
3625
3627
|
disableRotationForReversed = false
|
|
3626
3628
|
}) => {
|
|
3627
|
-
const rotate = (0,
|
|
3629
|
+
const rotate = (0, import_react22.useRef)(useGetTargetAngle(isClockwise, offset, disableRotationForReversed));
|
|
3628
3630
|
rotate.current = useGetTargetAngle(isClockwise, offset, disableRotationForReversed, rotate);
|
|
3629
3631
|
return /* @__PURE__ */ React42.createElement(Icon, { fontSize: size, sx: { transition: ".3s", rotate: `${rotate.current}deg` } });
|
|
3630
3632
|
};
|
|
@@ -3864,7 +3866,7 @@ var getOptions2 = (parentStyleDirection) => {
|
|
|
3864
3866
|
|
|
3865
3867
|
// src/components/style-sections/layout-section/display-field.tsx
|
|
3866
3868
|
var React47 = __toESM(require("react"));
|
|
3867
|
-
var
|
|
3869
|
+
var import_react23 = require("react");
|
|
3868
3870
|
var import_editor_controls19 = require("@elementor/editor-controls");
|
|
3869
3871
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
3870
3872
|
var import_i18n24 = require("@wordpress/i18n");
|
|
@@ -3910,7 +3912,7 @@ var displayFieldItems = [
|
|
|
3910
3912
|
var DisplayField = () => {
|
|
3911
3913
|
const placeholder = useDisplayPlaceholderValue();
|
|
3912
3914
|
const isGridActive = (0, import_editor_v1_adapters7.isExperimentActive)("e_css_grid");
|
|
3913
|
-
const items3 = (0,
|
|
3915
|
+
const items3 = (0, import_react23.useMemo)(
|
|
3914
3916
|
() => isGridActive ? displayFieldItems : displayFieldItems.filter((item) => item.value !== "grid"),
|
|
3915
3917
|
[isGridActive]
|
|
3916
3918
|
);
|
|
@@ -3963,7 +3965,7 @@ var FlexDirectionField = () => {
|
|
|
3963
3965
|
|
|
3964
3966
|
// src/components/style-sections/layout-section/flex-order-field.tsx
|
|
3965
3967
|
var React49 = __toESM(require("react"));
|
|
3966
|
-
var
|
|
3968
|
+
var import_react24 = require("react");
|
|
3967
3969
|
var import_editor_controls21 = require("@elementor/editor-controls");
|
|
3968
3970
|
var import_icons12 = require("@elementor/icons");
|
|
3969
3971
|
var import_ui29 = require("@elementor/ui");
|
|
@@ -4011,15 +4013,15 @@ function FlexOrderFieldContent() {
|
|
|
4011
4013
|
});
|
|
4012
4014
|
const { placeholder } = (0, import_editor_controls21.useBoundProp)();
|
|
4013
4015
|
const placeholderValue = placeholder;
|
|
4014
|
-
const currentGroup = (0,
|
|
4015
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
4016
|
-
const [customLocked, setCustomLocked] = (0,
|
|
4017
|
-
(0,
|
|
4016
|
+
const currentGroup = (0, import_react24.useMemo)(() => getGroupControlValue(order?.value ?? null), [order]);
|
|
4017
|
+
const [activeGroup, setActiveGroup] = (0, import_react24.useState)(currentGroup);
|
|
4018
|
+
const [customLocked, setCustomLocked] = (0, import_react24.useState)(false);
|
|
4019
|
+
(0, import_react24.useEffect)(() => {
|
|
4018
4020
|
if (!customLocked) {
|
|
4019
4021
|
setActiveGroup(currentGroup);
|
|
4020
4022
|
}
|
|
4021
4023
|
}, [currentGroup, customLocked]);
|
|
4022
|
-
(0,
|
|
4024
|
+
(0, import_react24.useEffect)(() => {
|
|
4023
4025
|
if (order === null) {
|
|
4024
4026
|
setCustomLocked(false);
|
|
4025
4027
|
}
|
|
@@ -4079,7 +4081,7 @@ var getGroupControlValue = (order) => {
|
|
|
4079
4081
|
|
|
4080
4082
|
// src/components/style-sections/layout-section/flex-size-field.tsx
|
|
4081
4083
|
var React50 = __toESM(require("react"));
|
|
4082
|
-
var
|
|
4084
|
+
var import_react25 = require("react");
|
|
4083
4085
|
var import_editor_controls22 = require("@elementor/editor-controls");
|
|
4084
4086
|
var import_editor_props13 = require("@elementor/editor-props");
|
|
4085
4087
|
var import_icons13 = require("@elementor/icons");
|
|
@@ -4115,15 +4117,15 @@ var FlexSizeFieldContent = () => {
|
|
|
4115
4117
|
});
|
|
4116
4118
|
const { placeholder } = (0, import_editor_controls22.useBoundProp)();
|
|
4117
4119
|
const flexValues = extractFlexValues(value);
|
|
4118
|
-
const currentGroup = (0,
|
|
4119
|
-
const [activeGroup, setActiveGroup] = (0,
|
|
4120
|
-
const [customLocked, setCustomLocked] = (0,
|
|
4121
|
-
(0,
|
|
4120
|
+
const currentGroup = (0, import_react25.useMemo)(() => getActiveGroup(flexValues), [flexValues]);
|
|
4121
|
+
const [activeGroup, setActiveGroup] = (0, import_react25.useState)(currentGroup);
|
|
4122
|
+
const [customLocked, setCustomLocked] = (0, import_react25.useState)(false);
|
|
4123
|
+
(0, import_react25.useEffect)(() => {
|
|
4122
4124
|
if (!customLocked) {
|
|
4123
4125
|
setActiveGroup(currentGroup);
|
|
4124
4126
|
}
|
|
4125
4127
|
}, [currentGroup, customLocked]);
|
|
4126
|
-
(0,
|
|
4128
|
+
(0, import_react25.useEffect)(() => {
|
|
4127
4129
|
if (value === null) {
|
|
4128
4130
|
setCustomLocked(false);
|
|
4129
4131
|
}
|
|
@@ -4186,7 +4188,7 @@ var createFlexValueForGroup = (group, flexValue) => {
|
|
|
4186
4188
|
return null;
|
|
4187
4189
|
};
|
|
4188
4190
|
var FlexCustomField = () => {
|
|
4189
|
-
const flexBasisRowRef = (0,
|
|
4191
|
+
const flexBasisRowRef = (0, import_react25.useRef)(null);
|
|
4190
4192
|
const context = (0, import_editor_controls22.useBoundProp)(import_editor_props13.flexPropTypeUtil);
|
|
4191
4193
|
return /* @__PURE__ */ React50.createElement(import_editor_controls22.PropProvider, { ...context }, /* @__PURE__ */ React50.createElement(React50.Fragment, null, /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: (0, import_i18n27.__)("Grow", "elementor") }, /* @__PURE__ */ React50.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexGrow" }, /* @__PURE__ */ React50.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: (0, import_i18n27.__)("Shrink", "elementor") }, /* @__PURE__ */ React50.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexShrink" }, /* @__PURE__ */ React50.createElement(import_editor_controls22.NumberControl, { min: 0, shouldForceInt: true }))), /* @__PURE__ */ React50.createElement(StylesFieldLayout, { label: (0, import_i18n27.__)("Basis", "elementor"), ref: flexBasisRowRef }, /* @__PURE__ */ React50.createElement(import_editor_controls22.PropKeyProvider, { bind: "flexBasis" }, /* @__PURE__ */ React50.createElement(import_editor_controls22.SizeControl, { extendedOptions: ["auto"], anchorRef: flexBasisRowRef })))));
|
|
4192
4194
|
};
|
|
@@ -4293,7 +4295,7 @@ var GridAutoFlowField = () => /* @__PURE__ */ React52.createElement(StylesField,
|
|
|
4293
4295
|
|
|
4294
4296
|
// src/components/style-sections/layout-section/grid-auto-track-fields.tsx
|
|
4295
4297
|
var React53 = __toESM(require("react"));
|
|
4296
|
-
var
|
|
4298
|
+
var import_react26 = require("react");
|
|
4297
4299
|
var import_editor_controls25 = require("@elementor/editor-controls");
|
|
4298
4300
|
var import_ui31 = require("@elementor/ui");
|
|
4299
4301
|
var import_i18n30 = require("@wordpress/i18n");
|
|
@@ -4317,7 +4319,7 @@ var GridAutoTrackField = ({ bind, infoTooltip, label, rowRef }) => /* @__PURE__
|
|
|
4317
4319
|
}
|
|
4318
4320
|
)));
|
|
4319
4321
|
var GridAutoTrackFields = () => {
|
|
4320
|
-
const rowRef = (0,
|
|
4322
|
+
const rowRef = (0, import_react26.useRef)(null);
|
|
4321
4323
|
return /* @__PURE__ */ React53.createElement(import_ui31.Stack, { gap: 2, pt: 2, ref: rowRef }, /* @__PURE__ */ React53.createElement(
|
|
4322
4324
|
GridAutoTrackField,
|
|
4323
4325
|
{
|
|
@@ -4385,7 +4387,7 @@ var GridOutlineField = () => {
|
|
|
4385
4387
|
|
|
4386
4388
|
// src/components/style-sections/layout-section/grid-size-field.tsx
|
|
4387
4389
|
var React56 = __toESM(require("react"));
|
|
4388
|
-
var
|
|
4390
|
+
var import_react27 = require("react");
|
|
4389
4391
|
var import_editor_controls28 = require("@elementor/editor-controls");
|
|
4390
4392
|
var import_ui33 = require("@elementor/ui");
|
|
4391
4393
|
var import_i18n33 = require("@wordpress/i18n");
|
|
@@ -4503,7 +4505,7 @@ var GridTrackFieldContent = ({ cssProp, label }) => {
|
|
|
4503
4505
|
history: { propDisplayName: label }
|
|
4504
4506
|
});
|
|
4505
4507
|
const { placeholder: inheritedPlaceholder } = (0, import_editor_controls28.useBoundProp)();
|
|
4506
|
-
const anchorRef = (0,
|
|
4508
|
+
const anchorRef = (0, import_react27.useRef)(null);
|
|
4507
4509
|
const local = parseValue(value);
|
|
4508
4510
|
const inherited = parseValue(inheritedPlaceholder);
|
|
4509
4511
|
const displayValue = local.kind !== "empty" ? toSizeInput(local) : toSizeInput(EMPTY, unitOf(inherited));
|
|
@@ -4667,14 +4669,14 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
4667
4669
|
|
|
4668
4670
|
// src/components/style-sections/position-section/position-section.tsx
|
|
4669
4671
|
var React65 = __toESM(require("react"));
|
|
4670
|
-
var
|
|
4672
|
+
var import_react30 = require("react");
|
|
4671
4673
|
var import_session7 = require("@elementor/session");
|
|
4672
4674
|
var import_ui38 = require("@elementor/ui");
|
|
4673
4675
|
var import_i18n42 = require("@wordpress/i18n");
|
|
4674
4676
|
|
|
4675
4677
|
// src/components/style-sections/position-section/dimensions-field.tsx
|
|
4676
4678
|
var React61 = __toESM(require("react"));
|
|
4677
|
-
var
|
|
4679
|
+
var import_react28 = require("react");
|
|
4678
4680
|
var import_editor_controls33 = require("@elementor/editor-controls");
|
|
4679
4681
|
var import_icons18 = require("@elementor/icons");
|
|
4680
4682
|
var import_ui36 = require("@elementor/ui");
|
|
@@ -4691,7 +4693,7 @@ var getInlineStartLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n38.__)("Righ
|
|
|
4691
4693
|
var getInlineEndLabel = (isSiteRtl) => isSiteRtl ? (0, import_i18n38.__)("Left", "elementor") : (0, import_i18n38.__)("Right", "elementor");
|
|
4692
4694
|
var DimensionsField = () => {
|
|
4693
4695
|
const { isSiteRtl } = useDirection();
|
|
4694
|
-
const rowRefs = [(0,
|
|
4696
|
+
const rowRefs = [(0, import_react28.useRef)(null), (0, import_react28.useRef)(null)];
|
|
4695
4697
|
return /* @__PURE__ */ React61.createElement(UiProviders, null, /* @__PURE__ */ React61.createElement(import_ui36.Stack, { direction: "row", gap: 2, flexWrap: "nowrap", ref: rowRefs[0] }, /* @__PURE__ */ React61.createElement(DimensionField, { side: "inset-block-start", label: (0, import_i18n38.__)("Top", "elementor"), rowRef: rowRefs[0] }), /* @__PURE__ */ React61.createElement(
|
|
4696
4698
|
DimensionField,
|
|
4697
4699
|
{
|
|
@@ -4724,13 +4726,13 @@ var DimensionField = ({
|
|
|
4724
4726
|
|
|
4725
4727
|
// src/components/style-sections/position-section/offset-field.tsx
|
|
4726
4728
|
var React62 = __toESM(require("react"));
|
|
4727
|
-
var
|
|
4729
|
+
var import_react29 = require("react");
|
|
4728
4730
|
var import_editor_controls34 = require("@elementor/editor-controls");
|
|
4729
4731
|
var import_i18n39 = require("@wordpress/i18n");
|
|
4730
4732
|
var OFFSET_LABEL = (0, import_i18n39.__)("Anchor offset", "elementor");
|
|
4731
4733
|
var UNITS2 = ["px", "em", "rem", "vw", "vh"];
|
|
4732
4734
|
var OffsetField = () => {
|
|
4733
|
-
const rowRef = (0,
|
|
4735
|
+
const rowRef = (0, import_react29.useRef)(null);
|
|
4734
4736
|
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "scroll-margin-top", propDisplayName: OFFSET_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: OFFSET_LABEL, ref: rowRef }, /* @__PURE__ */ React62.createElement(import_editor_controls34.SizeControl, { units: UNITS2, anchorRef: rowRef })));
|
|
4735
4737
|
};
|
|
4736
4738
|
|
|
@@ -4788,10 +4790,10 @@ var DEPENDENT_PROP_NAMES = [
|
|
|
4788
4790
|
];
|
|
4789
4791
|
var PositionSection = () => {
|
|
4790
4792
|
const { value: position } = useStylesField("position", withHistoryLabel(POSITION_LABEL2));
|
|
4791
|
-
const positionPrevRef = (0,
|
|
4793
|
+
const positionPrevRef = (0, import_react30.useRef)(position);
|
|
4792
4794
|
const { values: dependentValues, setValues: setDependentValues } = useStylesFields(DEPENDENT_PROP_NAMES);
|
|
4793
4795
|
const [savedDependentValues, saveToHistory, clearHistory] = usePersistDimensions();
|
|
4794
|
-
(0,
|
|
4796
|
+
(0, import_react30.useEffect)(() => {
|
|
4795
4797
|
if (position && position?.value === POSITION_STATIC && hasDependentValues(dependentValues)) {
|
|
4796
4798
|
saveToHistory(extractDimensions(dependentValues));
|
|
4797
4799
|
}
|
|
@@ -4855,7 +4857,7 @@ var StyledSectionContent = (0, import_ui38.styled)(SectionContent, {
|
|
|
4855
4857
|
|
|
4856
4858
|
// src/components/style-sections/size-section/size-section.tsx
|
|
4857
4859
|
var React68 = __toESM(require("react"));
|
|
4858
|
-
var
|
|
4860
|
+
var import_react31 = require("react");
|
|
4859
4861
|
var import_editor_controls39 = require("@elementor/editor-controls");
|
|
4860
4862
|
var import_ui39 = require("@elementor/ui");
|
|
4861
4863
|
var import_i18n45 = require("@wordpress/i18n");
|
|
@@ -4941,7 +4943,7 @@ var CssSizeProps = [
|
|
|
4941
4943
|
];
|
|
4942
4944
|
var ASPECT_RATIO_LABEL = (0, import_i18n45.__)("Aspect Ratio", "elementor");
|
|
4943
4945
|
var SizeSection = () => {
|
|
4944
|
-
const gridRowRefs = [(0,
|
|
4946
|
+
const gridRowRefs = [(0, import_react31.useRef)(null), (0, import_react31.useRef)(null), (0, import_react31.useRef)(null)];
|
|
4945
4947
|
return /* @__PURE__ */ React68.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React68.createElement(import_ui39.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React68.createElement(import_ui39.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React68.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React68.createElement(PanelDivider, null), /* @__PURE__ */ React68.createElement(import_ui39.Stack, null, /* @__PURE__ */ React68.createElement(OverflowField, null)), /* @__PURE__ */ React68.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React68.createElement(import_ui39.Stack, { gap: 2, pt: 2 }, /* @__PURE__ */ React68.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React68.createElement(import_editor_controls39.AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React68.createElement(PanelDivider, null), /* @__PURE__ */ React68.createElement(ObjectFitField, null), /* @__PURE__ */ React68.createElement(StylesField, { bind: "object-position", propDisplayName: (0, import_i18n45.__)("Object position", "elementor") }, /* @__PURE__ */ React68.createElement(import_ui39.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React68.createElement(import_editor_controls39.PositionControl, null))))));
|
|
4946
4948
|
};
|
|
4947
4949
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
@@ -4980,12 +4982,12 @@ var ColumnCountField = () => {
|
|
|
4980
4982
|
|
|
4981
4983
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
4982
4984
|
var React71 = __toESM(require("react"));
|
|
4983
|
-
var
|
|
4985
|
+
var import_react32 = require("react");
|
|
4984
4986
|
var import_editor_controls42 = require("@elementor/editor-controls");
|
|
4985
4987
|
var import_i18n48 = require("@wordpress/i18n");
|
|
4986
4988
|
var COLUMN_GAP_LABEL = (0, import_i18n48.__)("Column gap", "elementor");
|
|
4987
4989
|
var ColumnGapField = () => {
|
|
4988
|
-
const rowRef = (0,
|
|
4990
|
+
const rowRef = (0, import_react32.useRef)(null);
|
|
4989
4991
|
return /* @__PURE__ */ React71.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React71.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React71.createElement(import_editor_controls42.SizeControl, { anchorRef: rowRef })));
|
|
4990
4992
|
};
|
|
4991
4993
|
|
|
@@ -5013,12 +5015,12 @@ var FontFamilyField = () => {
|
|
|
5013
5015
|
|
|
5014
5016
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
5015
5017
|
var React73 = __toESM(require("react"));
|
|
5016
|
-
var
|
|
5018
|
+
var import_react33 = require("react");
|
|
5017
5019
|
var import_editor_controls44 = require("@elementor/editor-controls");
|
|
5018
5020
|
var import_i18n50 = require("@wordpress/i18n");
|
|
5019
5021
|
var FONT_SIZE_LABEL = (0, import_i18n50.__)("Font size", "elementor");
|
|
5020
5022
|
var FontSizeField = () => {
|
|
5021
|
-
const rowRef = (0,
|
|
5023
|
+
const rowRef = (0, import_react33.useRef)(null);
|
|
5022
5024
|
return /* @__PURE__ */ React73.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React73.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React73.createElement(import_editor_controls44.SizeControl, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
|
|
5023
5025
|
};
|
|
5024
5026
|
|
|
@@ -5068,23 +5070,23 @@ var FontWeightField = () => {
|
|
|
5068
5070
|
|
|
5069
5071
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
5070
5072
|
var React76 = __toESM(require("react"));
|
|
5071
|
-
var
|
|
5073
|
+
var import_react34 = require("react");
|
|
5072
5074
|
var import_editor_controls47 = require("@elementor/editor-controls");
|
|
5073
5075
|
var import_i18n53 = require("@wordpress/i18n");
|
|
5074
5076
|
var LETTER_SPACING_LABEL = (0, import_i18n53.__)("Letter spacing", "elementor");
|
|
5075
5077
|
var LetterSpacingField = () => {
|
|
5076
|
-
const rowRef = (0,
|
|
5078
|
+
const rowRef = (0, import_react34.useRef)(null);
|
|
5077
5079
|
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React76.createElement(import_editor_controls47.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
5078
5080
|
};
|
|
5079
5081
|
|
|
5080
5082
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
5081
5083
|
var React77 = __toESM(require("react"));
|
|
5082
|
-
var
|
|
5084
|
+
var import_react35 = require("react");
|
|
5083
5085
|
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
5084
5086
|
var import_i18n54 = require("@wordpress/i18n");
|
|
5085
5087
|
var LINE_HEIGHT_LABEL = (0, import_i18n54.__)("Line height", "elementor");
|
|
5086
5088
|
var LineHeightField = () => {
|
|
5087
|
-
const rowRef = (0,
|
|
5089
|
+
const rowRef = (0, import_react35.useRef)(null);
|
|
5088
5090
|
return /* @__PURE__ */ React77.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React77.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React77.createElement(import_editor_controls48.SizeControl, { anchorRef: rowRef })));
|
|
5089
5091
|
};
|
|
5090
5092
|
|
|
@@ -5306,12 +5308,12 @@ var TransformField = () => /* @__PURE__ */ React84.createElement(StylesField, {
|
|
|
5306
5308
|
|
|
5307
5309
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
5308
5310
|
var React85 = __toESM(require("react"));
|
|
5309
|
-
var
|
|
5311
|
+
var import_react36 = require("react");
|
|
5310
5312
|
var import_editor_controls55 = require("@elementor/editor-controls");
|
|
5311
5313
|
var import_i18n61 = require("@wordpress/i18n");
|
|
5312
5314
|
var WORD_SPACING_LABEL = (0, import_i18n61.__)("Word spacing", "elementor");
|
|
5313
5315
|
var WordSpacingField = () => {
|
|
5314
|
-
const rowRef = (0,
|
|
5316
|
+
const rowRef = (0, import_react36.useRef)(null);
|
|
5315
5317
|
return /* @__PURE__ */ React85.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React85.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React85.createElement(import_editor_controls55.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
5316
5318
|
};
|
|
5317
5319
|
|
|
@@ -5369,7 +5371,7 @@ var stickyHeaderStyles = {
|
|
|
5369
5371
|
var StyleTab = () => {
|
|
5370
5372
|
const currentClassesProp = useCurrentClassesProp();
|
|
5371
5373
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp ?? "");
|
|
5372
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
5374
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react37.useState)(null);
|
|
5373
5375
|
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
5374
5376
|
if (!currentClassesProp) {
|
|
5375
5377
|
return null;
|
|
@@ -5537,7 +5539,7 @@ var EditingPanelTabs = () => {
|
|
|
5537
5539
|
return (
|
|
5538
5540
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
5539
5541
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
5540
|
-
/* @__PURE__ */ React89.createElement(
|
|
5542
|
+
/* @__PURE__ */ React89.createElement(import_react38.Fragment, { key: element.id }, /* @__PURE__ */ React89.createElement(PanelTabContent, null))
|
|
5541
5543
|
);
|
|
5542
5544
|
};
|
|
5543
5545
|
var PanelTabContent = () => {
|
|
@@ -5592,7 +5594,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
5592
5594
|
var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
|
|
5593
5595
|
|
|
5594
5596
|
// src/hooks/use-open-editor-panel.ts
|
|
5595
|
-
var
|
|
5597
|
+
var import_react39 = require("react");
|
|
5596
5598
|
var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
|
|
5597
5599
|
|
|
5598
5600
|
// src/panel.ts
|
|
@@ -5616,7 +5618,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
5616
5618
|
// src/hooks/use-open-editor-panel.ts
|
|
5617
5619
|
var useOpenEditorPanel = () => {
|
|
5618
5620
|
const { open } = usePanelActions();
|
|
5619
|
-
(0,
|
|
5621
|
+
(0, import_react39.useEffect)(() => {
|
|
5620
5622
|
return (0, import_editor_v1_adapters10.__privateListenTo)((0, import_editor_v1_adapters10.commandStartEvent)("panel/editor/open"), () => {
|
|
5621
5623
|
if (isAtomicWidgetSelected()) {
|
|
5622
5624
|
open();
|
|
@@ -5636,12 +5638,12 @@ var import_editor_controls58 = require("@elementor/editor-controls");
|
|
|
5636
5638
|
|
|
5637
5639
|
// src/components/promotions/custom-css.tsx
|
|
5638
5640
|
var React91 = __toESM(require("react"));
|
|
5639
|
-
var
|
|
5641
|
+
var import_react40 = require("react");
|
|
5640
5642
|
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5641
5643
|
var import_i18n65 = require("@wordpress/i18n");
|
|
5642
5644
|
var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
|
|
5643
5645
|
var CustomCssSection = () => {
|
|
5644
|
-
const triggerRef = (0,
|
|
5646
|
+
const triggerRef = (0, import_react40.useRef)(null);
|
|
5645
5647
|
return /* @__PURE__ */ React91.createElement(
|
|
5646
5648
|
StyleTabSection,
|
|
5647
5649
|
{
|
|
@@ -6059,17 +6061,17 @@ var import_editor_props19 = require("@elementor/editor-props");
|
|
|
6059
6061
|
var import_icons29 = require("@elementor/icons");
|
|
6060
6062
|
|
|
6061
6063
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
6062
|
-
var
|
|
6064
|
+
var import_react43 = require("react");
|
|
6063
6065
|
|
|
6064
6066
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
6065
|
-
var
|
|
6067
|
+
var import_react42 = require("react");
|
|
6066
6068
|
var import_editor_controls61 = require("@elementor/editor-controls");
|
|
6067
6069
|
|
|
6068
6070
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
6069
6071
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
6070
6072
|
|
|
6071
6073
|
// src/hooks/use-license-config.ts
|
|
6072
|
-
var
|
|
6074
|
+
var import_react41 = require("react");
|
|
6073
6075
|
var config = { expired: false };
|
|
6074
6076
|
var listeners = /* @__PURE__ */ new Set();
|
|
6075
6077
|
function setLicenseConfig(newConfig) {
|
|
@@ -6084,7 +6086,7 @@ function subscribe(listener) {
|
|
|
6084
6086
|
return () => listeners.delete(listener);
|
|
6085
6087
|
}
|
|
6086
6088
|
function useLicenseConfig() {
|
|
6087
|
-
return (0,
|
|
6089
|
+
return (0, import_react41.useSyncExternalStore)(subscribe, getLicenseConfig, getLicenseConfig);
|
|
6088
6090
|
}
|
|
6089
6091
|
|
|
6090
6092
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
@@ -6153,7 +6155,7 @@ var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
|
6153
6155
|
categories = propDynamicType?.settings.categories || [];
|
|
6154
6156
|
}
|
|
6155
6157
|
const categoriesKey = categories.join();
|
|
6156
|
-
return (0,
|
|
6158
|
+
return (0, import_react42.useMemo)(
|
|
6157
6159
|
() => getDynamicTagsByCategories(categories, filterByLicense2),
|
|
6158
6160
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6159
6161
|
[categoriesKey, filterByLicense2]
|
|
@@ -6187,7 +6189,7 @@ var getDynamicTagsByCategories = (categories, filterByLicense2) => {
|
|
|
6187
6189
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
6188
6190
|
var useDynamicTag = (tagName) => {
|
|
6189
6191
|
const dynamicTags = useAllPropDynamicTags();
|
|
6190
|
-
return (0,
|
|
6192
|
+
return (0, import_react43.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
6191
6193
|
};
|
|
6192
6194
|
|
|
6193
6195
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
@@ -6229,7 +6231,7 @@ var import_editor_controls63 = require("@elementor/editor-controls");
|
|
|
6229
6231
|
|
|
6230
6232
|
// src/dynamics/components/dynamic-conditional-control.tsx
|
|
6231
6233
|
var React94 = __toESM(require("react"));
|
|
6232
|
-
var
|
|
6234
|
+
var import_react44 = require("react");
|
|
6233
6235
|
var import_editor_props20 = require("@elementor/editor-props");
|
|
6234
6236
|
var DynamicConditionalControl = ({
|
|
6235
6237
|
children,
|
|
@@ -6237,7 +6239,7 @@ var DynamicConditionalControl = ({
|
|
|
6237
6239
|
propsSchema,
|
|
6238
6240
|
dynamicSettings
|
|
6239
6241
|
}) => {
|
|
6240
|
-
const defaults = (0,
|
|
6242
|
+
const defaults = (0, import_react44.useMemo)(() => {
|
|
6241
6243
|
if (!propsSchema) {
|
|
6242
6244
|
return {};
|
|
6243
6245
|
}
|
|
@@ -6247,7 +6249,7 @@ var DynamicConditionalControl = ({
|
|
|
6247
6249
|
return result;
|
|
6248
6250
|
}, {});
|
|
6249
6251
|
}, [propsSchema]);
|
|
6250
|
-
const convertedSettings = (0,
|
|
6252
|
+
const convertedSettings = (0, import_react44.useMemo)(() => {
|
|
6251
6253
|
if (!dynamicSettings) {
|
|
6252
6254
|
return {};
|
|
6253
6255
|
}
|
|
@@ -6266,7 +6268,7 @@ var DynamicConditionalControl = ({
|
|
|
6266
6268
|
{}
|
|
6267
6269
|
);
|
|
6268
6270
|
}, [dynamicSettings]);
|
|
6269
|
-
const effectiveSettings = (0,
|
|
6271
|
+
const effectiveSettings = (0, import_react44.useMemo)(() => {
|
|
6270
6272
|
return { ...defaults, ...convertedSettings };
|
|
6271
6273
|
}, [defaults, convertedSettings]);
|
|
6272
6274
|
if (!propType?.dependencies?.terms.length) {
|
|
@@ -6311,7 +6313,7 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
6311
6313
|
|
|
6312
6314
|
// src/dynamics/components/dynamic-selection.tsx
|
|
6313
6315
|
var React96 = __toESM(require("react"));
|
|
6314
|
-
var
|
|
6316
|
+
var import_react45 = require("react");
|
|
6315
6317
|
var import_editor_controls64 = require("@elementor/editor-controls");
|
|
6316
6318
|
var import_editor_ui9 = require("@elementor/editor-ui");
|
|
6317
6319
|
var import_icons30 = require("@elementor/icons");
|
|
@@ -6322,7 +6324,7 @@ var PROMO_TEXT_WIDTH = 170;
|
|
|
6322
6324
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
6323
6325
|
var RENEW_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-renew-modal/";
|
|
6324
6326
|
var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
6325
|
-
const [searchValue, setSearchValue] = (0,
|
|
6327
|
+
const [searchValue, setSearchValue] = (0, import_react45.useState)("");
|
|
6326
6328
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
6327
6329
|
const theme = (0, import_ui46.useTheme)();
|
|
6328
6330
|
const { value: anyValue } = (0, import_editor_controls64.useBoundProp)();
|
|
@@ -6331,7 +6333,7 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
6331
6333
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
6332
6334
|
const options13 = useFilteredOptions(searchValue);
|
|
6333
6335
|
const hasNoDynamicTags = !options13.length && !searchValue.trim();
|
|
6334
|
-
(0,
|
|
6336
|
+
(0, import_react45.useEffect)(() => {
|
|
6335
6337
|
if (hasNoDynamicTags) {
|
|
6336
6338
|
(0, import_editor_controls64.trackViewPromotion)({ target_name: "dynamic_tags" });
|
|
6337
6339
|
} else if (expired) {
|
|
@@ -6368,7 +6370,7 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
6368
6370
|
if (expired) {
|
|
6369
6371
|
return /* @__PURE__ */ React96.createElement(ExpiredDynamicTags, null);
|
|
6370
6372
|
}
|
|
6371
|
-
return /* @__PURE__ */ React96.createElement(
|
|
6373
|
+
return /* @__PURE__ */ React96.createElement(import_react45.Fragment, null, /* @__PURE__ */ React96.createElement(
|
|
6372
6374
|
import_editor_ui9.SearchField,
|
|
6373
6375
|
{
|
|
6374
6376
|
value: searchValue,
|
|
@@ -6837,22 +6839,22 @@ var import_i18n75 = require("@wordpress/i18n");
|
|
|
6837
6839
|
|
|
6838
6840
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
6839
6841
|
var React103 = __toESM(require("react"));
|
|
6840
|
-
var
|
|
6842
|
+
var import_react47 = require("react");
|
|
6841
6843
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
6842
6844
|
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
6843
6845
|
var import_ui52 = require("@elementor/ui");
|
|
6844
6846
|
var import_i18n74 = require("@wordpress/i18n");
|
|
6845
6847
|
|
|
6846
6848
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
6847
|
-
var
|
|
6849
|
+
var import_react46 = require("react");
|
|
6848
6850
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
6849
6851
|
var import_editor_styles8 = require("@elementor/editor-styles");
|
|
6850
6852
|
var import_editor_styles_repository18 = require("@elementor/editor-styles-repository");
|
|
6851
6853
|
var import_i18n72 = require("@wordpress/i18n");
|
|
6852
6854
|
var MAXIMUM_ITEMS = 2;
|
|
6853
6855
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
6854
|
-
const [items3, setItems] = (0,
|
|
6855
|
-
(0,
|
|
6856
|
+
const [items3, setItems] = (0, import_react46.useState)([]);
|
|
6857
|
+
(0, import_react46.useEffect)(() => {
|
|
6856
6858
|
(async () => {
|
|
6857
6859
|
const normalizedItems = await Promise.all(
|
|
6858
6860
|
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
@@ -6903,7 +6905,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
6903
6905
|
}
|
|
6904
6906
|
});
|
|
6905
6907
|
const value = result?.[bind] ?? result;
|
|
6906
|
-
if ((0,
|
|
6908
|
+
if ((0, import_react46.isValidElement)(value)) {
|
|
6907
6909
|
return value;
|
|
6908
6910
|
}
|
|
6909
6911
|
if (typeof value === "object") {
|
|
@@ -7018,8 +7020,8 @@ var StylesInheritanceInfotip = ({
|
|
|
7018
7020
|
children,
|
|
7019
7021
|
isDisabled
|
|
7020
7022
|
}) => {
|
|
7021
|
-
const [showInfotip, setShowInfotip] = (0,
|
|
7022
|
-
const triggerRef = (0,
|
|
7023
|
+
const [showInfotip, setShowInfotip] = (0, import_react47.useState)(false);
|
|
7024
|
+
const triggerRef = (0, import_react47.useRef)(null);
|
|
7023
7025
|
const toggleInfotip = () => {
|
|
7024
7026
|
if (isDisabled) {
|
|
7025
7027
|
return;
|
|
@@ -7034,7 +7036,7 @@ var StylesInheritanceInfotip = ({
|
|
|
7034
7036
|
};
|
|
7035
7037
|
const key = path.join(".");
|
|
7036
7038
|
const sectionWidth = (0, import_editor_ui11.useSectionWidth)();
|
|
7037
|
-
const resolve = (0,
|
|
7039
|
+
const resolve = (0, import_react47.useMemo)(() => {
|
|
7038
7040
|
return (0, import_editor_canvas5.createPropsResolver)({
|
|
7039
7041
|
transformers: import_editor_canvas5.stylesInheritanceTransformersRegistry,
|
|
7040
7042
|
schema: { [key]: propType }
|
|
@@ -7493,6 +7495,7 @@ var blockV1Panel = () => {
|
|
|
7493
7495
|
injectIntoStyleTab,
|
|
7494
7496
|
isDynamicPropValue,
|
|
7495
7497
|
registerEditingPanelReplacement,
|
|
7498
|
+
registerElementPanelDefaults,
|
|
7496
7499
|
registerFieldIndicator,
|
|
7497
7500
|
registerStyleProviderToColors,
|
|
7498
7501
|
setLicenseConfig,
|