@elementor/editor-editing-panel 4.0.0-manual → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +44 -40
- package/dist/index.d.ts +44 -40
- package/dist/index.js +153 -111
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +138 -97
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -21
- package/src/components/promotions/custom-css.tsx +5 -1
- package/src/components/style-sections/position-section/position-section.tsx +58 -21
- package/src/controls-registry/settings-field.tsx +7 -14
- package/src/dynamics/components/dynamic-selection.tsx +21 -4
- package/src/index.ts +1 -0
- package/src/styles-inheritance/components/infotip/value-component.tsx +20 -17
- package/src/styles-inheritance/components/styles-inheritance-infotip.tsx +8 -10
- package/src/styles-inheritance/init-styles-inheritance-transformers.ts +1 -1
- package/src/styles-inheritance/transformers/array-transformer.tsx +13 -5
- package/src/styles-inheritance/transformers/box-shadow-transformer.tsx +5 -7
- package/src/styles-inheritance/transformers/repeater-to-items-transformer.tsx +2 -16
- package/src/utils/prop-dependency-utils.ts +12 -0
package/dist/index.js
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
BaseControl: () => Control,
|
|
34
|
+
ControlTypeContainer: () => ControlTypeContainer,
|
|
34
35
|
CustomCssIndicator: () => CustomCssIndicator,
|
|
35
36
|
ElementProvider: () => ElementProvider,
|
|
36
37
|
FIELD_TYPE: () => FIELD_TYPE,
|
|
@@ -1772,7 +1773,7 @@ function EditorPanelErrorFallback() {
|
|
|
1772
1773
|
}
|
|
1773
1774
|
|
|
1774
1775
|
// src/components/editing-panel-tabs.tsx
|
|
1775
|
-
var
|
|
1776
|
+
var import_react34 = require("react");
|
|
1776
1777
|
var React80 = __toESM(require("react"));
|
|
1777
1778
|
var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
|
|
1778
1779
|
var import_ui35 = require("@elementor/ui");
|
|
@@ -2066,6 +2067,15 @@ var import_i18n7 = require("@wordpress/i18n");
|
|
|
2066
2067
|
// src/utils/prop-dependency-utils.ts
|
|
2067
2068
|
var import_editor_props5 = require("@elementor/editor-props");
|
|
2068
2069
|
var import_session4 = require("@elementor/session");
|
|
2070
|
+
function getElementSettingsWithDefaults(propsSchema, elementSettings) {
|
|
2071
|
+
const elementSettingsWithDefaults = { ...elementSettings };
|
|
2072
|
+
Object.keys(propsSchema).forEach((key) => {
|
|
2073
|
+
if (elementSettingsWithDefaults[key] === null && propsSchema[key].default !== null) {
|
|
2074
|
+
elementSettingsWithDefaults[key] = propsSchema[key].default;
|
|
2075
|
+
}
|
|
2076
|
+
});
|
|
2077
|
+
return elementSettingsWithDefaults;
|
|
2078
|
+
}
|
|
2069
2079
|
function extractOrderedDependencies(dependenciesPerTargetMapping) {
|
|
2070
2080
|
return Object.values(dependenciesPerTargetMapping).flat().filter((dependent, index, self) => self.indexOf(dependent) === index);
|
|
2071
2081
|
}
|
|
@@ -2211,19 +2221,8 @@ var createTopLevelObjectType = ({ schema }) => {
|
|
|
2211
2221
|
|
|
2212
2222
|
// src/controls-registry/settings-field.tsx
|
|
2213
2223
|
var HISTORY_DEBOUNCE_WAIT2 = 800;
|
|
2214
|
-
var getElementSettigsWithDefaults = (propsSchema, elementSettings) => {
|
|
2215
|
-
const elementSettingsWithDefaults = { ...elementSettings };
|
|
2216
|
-
Object.keys(propsSchema).forEach((key) => {
|
|
2217
|
-
if (!(key in elementSettingsWithDefaults)) {
|
|
2218
|
-
if (propsSchema[key].default !== null) {
|
|
2219
|
-
elementSettingsWithDefaults[key] = propsSchema[key].default;
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
});
|
|
2223
|
-
return elementSettingsWithDefaults;
|
|
2224
|
-
};
|
|
2225
2224
|
var extractDependencyEffect = (bind, propsSchema, currentElementSettings) => {
|
|
2226
|
-
const elementSettingsForDepCheck =
|
|
2225
|
+
const elementSettingsForDepCheck = getElementSettingsWithDefaults(propsSchema, currentElementSettings);
|
|
2227
2226
|
const propType = propsSchema[bind];
|
|
2228
2227
|
const depCheck = (0, import_editor_props6.isDependencyMet)(propType?.dependencies, elementSettingsForDepCheck);
|
|
2229
2228
|
const isHidden = !depCheck.isMet && !(0, import_editor_props6.isDependency)(depCheck.failingDependencies[0]) && depCheck.failingDependencies[0]?.effect === "hide";
|
|
@@ -2406,7 +2405,7 @@ function isControl(control) {
|
|
|
2406
2405
|
|
|
2407
2406
|
// src/components/style-tab.tsx
|
|
2408
2407
|
var React79 = __toESM(require("react"));
|
|
2409
|
-
var
|
|
2408
|
+
var import_react33 = require("react");
|
|
2410
2409
|
var import_editor_props14 = require("@elementor/editor-props");
|
|
2411
2410
|
var import_editor_responsive3 = require("@elementor/editor-responsive");
|
|
2412
2411
|
var import_locations3 = require("@elementor/locations");
|
|
@@ -3812,6 +3811,7 @@ var shouldDisplayFlexFields = (display, local) => {
|
|
|
3812
3811
|
|
|
3813
3812
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3814
3813
|
var React54 = __toESM(require("react"));
|
|
3814
|
+
var import_react26 = require("react");
|
|
3815
3815
|
var import_session6 = require("@elementor/session");
|
|
3816
3816
|
var import_i18n32 = require("@wordpress/i18n");
|
|
3817
3817
|
|
|
@@ -3903,42 +3903,65 @@ var ZIndexField = () => {
|
|
|
3903
3903
|
};
|
|
3904
3904
|
|
|
3905
3905
|
// src/components/style-sections/position-section/position-section.tsx
|
|
3906
|
+
var POSITION_STATIC = "static";
|
|
3906
3907
|
var POSITION_LABEL2 = (0, import_i18n32.__)("Position", "elementor");
|
|
3907
3908
|
var DIMENSIONS_LABEL = (0, import_i18n32.__)("Dimensions", "elementor");
|
|
3909
|
+
var POSITION_DEPENDENT_PROP_NAMES = [
|
|
3910
|
+
"inset-block-start",
|
|
3911
|
+
"inset-block-end",
|
|
3912
|
+
"inset-inline-start",
|
|
3913
|
+
"inset-inline-end",
|
|
3914
|
+
"z-index"
|
|
3915
|
+
];
|
|
3916
|
+
var CLEARED_POSITION_DEPENDENT_VALUES = {
|
|
3917
|
+
"inset-block-start": void 0,
|
|
3918
|
+
"inset-block-end": void 0,
|
|
3919
|
+
"inset-inline-start": void 0,
|
|
3920
|
+
"inset-inline-end": void 0,
|
|
3921
|
+
"z-index": void 0
|
|
3922
|
+
};
|
|
3908
3923
|
var PositionSection = () => {
|
|
3909
3924
|
const { value: positionValue } = useStylesField("position", {
|
|
3910
3925
|
history: { propDisplayName: POSITION_LABEL2 }
|
|
3911
3926
|
});
|
|
3912
|
-
const { values:
|
|
3913
|
-
"inset-block-start",
|
|
3914
|
-
"inset-block-end",
|
|
3915
|
-
"inset-inline-start",
|
|
3916
|
-
"inset-inline-end"
|
|
3917
|
-
]);
|
|
3927
|
+
const { values: positionDependentValues, setValues: setPositionDependentValues } = useStylesFields([...POSITION_DEPENDENT_PROP_NAMES]);
|
|
3918
3928
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
3929
|
+
const clearPositionDependentProps = (0, import_react26.useCallback)(() => {
|
|
3930
|
+
const dimensions = {
|
|
3931
|
+
"inset-block-start": positionDependentValues?.["inset-block-start"],
|
|
3932
|
+
"inset-block-end": positionDependentValues?.["inset-block-end"],
|
|
3933
|
+
"inset-inline-start": positionDependentValues?.["inset-inline-start"],
|
|
3934
|
+
"inset-inline-end": positionDependentValues?.["inset-inline-end"]
|
|
3935
|
+
};
|
|
3936
|
+
const meta = { history: { propDisplayName: DIMENSIONS_LABEL } };
|
|
3937
|
+
const hasValuesToClear = Object.values(dimensions).some((v) => v !== null) || positionDependentValues?.["z-index"] !== null;
|
|
3938
|
+
if (hasValuesToClear) {
|
|
3939
|
+
updateDimensionsHistory(dimensions);
|
|
3940
|
+
setPositionDependentValues(CLEARED_POSITION_DEPENDENT_VALUES, meta);
|
|
3941
|
+
}
|
|
3942
|
+
}, [positionDependentValues, updateDimensionsHistory, setPositionDependentValues]);
|
|
3943
|
+
const clearPositionDependentPropsRef = (0, import_react26.useRef)(clearPositionDependentProps);
|
|
3944
|
+
clearPositionDependentPropsRef.current = clearPositionDependentProps;
|
|
3945
|
+
(0, import_react26.useEffect)(() => {
|
|
3946
|
+
if (positionValue?.value === POSITION_STATIC || positionValue === null) {
|
|
3947
|
+
clearPositionDependentPropsRef.current();
|
|
3948
|
+
}
|
|
3949
|
+
}, [positionValue]);
|
|
3919
3950
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
3920
3951
|
const meta = { history: { propDisplayName: DIMENSIONS_LABEL } };
|
|
3921
|
-
if (newPosition ===
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
"inset-block-end": void 0,
|
|
3928
|
-
"inset-inline-start": void 0,
|
|
3929
|
-
"inset-inline-end": void 0
|
|
3930
|
-
},
|
|
3952
|
+
if (newPosition === POSITION_STATIC) {
|
|
3953
|
+
clearPositionDependentProps();
|
|
3954
|
+
} else if (previousPosition === POSITION_STATIC) {
|
|
3955
|
+
if (dimensionsValuesFromHistory) {
|
|
3956
|
+
setPositionDependentValues(
|
|
3957
|
+
{ ...dimensionsValuesFromHistory, "z-index": void 0 },
|
|
3931
3958
|
meta
|
|
3932
3959
|
);
|
|
3933
|
-
}
|
|
3934
|
-
} else if (previousPosition === "static") {
|
|
3935
|
-
if (dimensionsValuesFromHistory) {
|
|
3936
|
-
setDimensions(dimensionsValuesFromHistory, meta);
|
|
3937
3960
|
clearDimensionsHistory();
|
|
3938
3961
|
}
|
|
3939
3962
|
}
|
|
3940
3963
|
};
|
|
3941
|
-
const isNotStatic = positionValue && positionValue?.value !==
|
|
3964
|
+
const isNotStatic = positionValue && positionValue?.value !== POSITION_STATIC;
|
|
3942
3965
|
return /* @__PURE__ */ React54.createElement(SectionContent, null, /* @__PURE__ */ React54.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React54.createElement(React54.Fragment, null, /* @__PURE__ */ React54.createElement(DimensionsField, null), /* @__PURE__ */ React54.createElement(ZIndexField, null)) : null, /* @__PURE__ */ React54.createElement(PanelDivider, null), /* @__PURE__ */ React54.createElement(OffsetField, null));
|
|
3943
3966
|
};
|
|
3944
3967
|
var usePersistDimensions = () => {
|
|
@@ -3950,7 +3973,7 @@ var usePersistDimensions = () => {
|
|
|
3950
3973
|
|
|
3951
3974
|
// src/components/style-sections/size-section/size-section.tsx
|
|
3952
3975
|
var React59 = __toESM(require("react"));
|
|
3953
|
-
var
|
|
3976
|
+
var import_react27 = require("react");
|
|
3954
3977
|
var import_editor_controls32 = require("@elementor/editor-controls");
|
|
3955
3978
|
var import_ui31 = require("@elementor/ui");
|
|
3956
3979
|
var import_i18n36 = require("@wordpress/i18n");
|
|
@@ -4117,7 +4140,7 @@ var CssSizeProps = [
|
|
|
4117
4140
|
];
|
|
4118
4141
|
var ASPECT_RATIO_LABEL = (0, import_i18n36.__)("Aspect Ratio", "elementor");
|
|
4119
4142
|
var SizeSection = () => {
|
|
4120
|
-
const gridRowRefs = [(0,
|
|
4143
|
+
const gridRowRefs = [(0, import_react27.useRef)(null), (0, import_react27.useRef)(null), (0, import_react27.useRef)(null)];
|
|
4121
4144
|
return /* @__PURE__ */ React59.createElement(SectionContent, null, CssSizeProps.map((row, rowIndex) => /* @__PURE__ */ React59.createElement(import_ui31.Grid, { key: rowIndex, container: true, gap: 2, flexWrap: "nowrap", ref: gridRowRefs[rowIndex] }, row.map((props) => /* @__PURE__ */ React59.createElement(import_ui31.Grid, { item: true, xs: 6, key: props.bind }, /* @__PURE__ */ React59.createElement(SizeField, { ...props, rowRef: gridRowRefs[rowIndex], extendedOptions: ["auto"] }))))), /* @__PURE__ */ React59.createElement(PanelDivider, null), /* @__PURE__ */ React59.createElement(import_ui31.Stack, null, /* @__PURE__ */ React59.createElement(OverflowField, null)), /* @__PURE__ */ React59.createElement(StyleTabCollapsibleContent, { fields: ["aspect-ratio", "object-fit"] }, /* @__PURE__ */ React59.createElement(import_ui31.Stack, { gap: 2, pt: 2 }, /* @__PURE__ */ React59.createElement(StylesField, { bind: "aspect-ratio", propDisplayName: ASPECT_RATIO_LABEL }, /* @__PURE__ */ React59.createElement(import_editor_controls32.AspectRatioControl, { label: ASPECT_RATIO_LABEL })), /* @__PURE__ */ React59.createElement(PanelDivider, null), /* @__PURE__ */ React59.createElement(ObjectFitField, null), /* @__PURE__ */ React59.createElement(StylesField, { bind: "object-position", propDisplayName: (0, import_i18n36.__)("Object position", "elementor") }, /* @__PURE__ */ React59.createElement(import_ui31.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React59.createElement(import_editor_controls32.PositionControl, null))))));
|
|
4122
4145
|
};
|
|
4123
4146
|
var SizeField = ({ label, bind, rowRef, extendedOptions }) => {
|
|
@@ -4157,12 +4180,12 @@ var ColumnCountField = () => {
|
|
|
4157
4180
|
|
|
4158
4181
|
// src/components/style-sections/typography-section/column-gap-field.tsx
|
|
4159
4182
|
var React62 = __toESM(require("react"));
|
|
4160
|
-
var
|
|
4183
|
+
var import_react28 = require("react");
|
|
4161
4184
|
var import_editor_controls35 = require("@elementor/editor-controls");
|
|
4162
4185
|
var import_i18n39 = require("@wordpress/i18n");
|
|
4163
4186
|
var COLUMN_GAP_LABEL = (0, import_i18n39.__)("Column gap", "elementor");
|
|
4164
4187
|
var ColumnGapField = () => {
|
|
4165
|
-
const rowRef = (0,
|
|
4188
|
+
const rowRef = (0, import_react28.useRef)(null);
|
|
4166
4189
|
return /* @__PURE__ */ React62.createElement(StylesField, { bind: "column-gap", propDisplayName: COLUMN_GAP_LABEL }, /* @__PURE__ */ React62.createElement(StylesFieldLayout, { label: COLUMN_GAP_LABEL, ref: rowRef }, /* @__PURE__ */ React62.createElement(import_editor_controls35.SizeControl, { anchorRef: rowRef })));
|
|
4167
4190
|
};
|
|
4168
4191
|
|
|
@@ -4190,12 +4213,12 @@ var FontFamilyField = () => {
|
|
|
4190
4213
|
|
|
4191
4214
|
// src/components/style-sections/typography-section/font-size-field.tsx
|
|
4192
4215
|
var React64 = __toESM(require("react"));
|
|
4193
|
-
var
|
|
4216
|
+
var import_react29 = require("react");
|
|
4194
4217
|
var import_editor_controls37 = require("@elementor/editor-controls");
|
|
4195
4218
|
var import_i18n41 = require("@wordpress/i18n");
|
|
4196
4219
|
var FONT_SIZE_LABEL = (0, import_i18n41.__)("Font size", "elementor");
|
|
4197
4220
|
var FontSizeField = () => {
|
|
4198
|
-
const rowRef = (0,
|
|
4221
|
+
const rowRef = (0, import_react29.useRef)(null);
|
|
4199
4222
|
return /* @__PURE__ */ React64.createElement(StylesField, { bind: "font-size", propDisplayName: FONT_SIZE_LABEL }, /* @__PURE__ */ React64.createElement(StylesFieldLayout, { label: FONT_SIZE_LABEL, ref: rowRef }, /* @__PURE__ */ React64.createElement(import_editor_controls37.SizeControl, { anchorRef: rowRef, ariaLabel: FONT_SIZE_LABEL })));
|
|
4200
4223
|
};
|
|
4201
4224
|
|
|
@@ -4245,23 +4268,23 @@ var FontWeightField = () => {
|
|
|
4245
4268
|
|
|
4246
4269
|
// src/components/style-sections/typography-section/letter-spacing-field.tsx
|
|
4247
4270
|
var React67 = __toESM(require("react"));
|
|
4248
|
-
var
|
|
4271
|
+
var import_react30 = require("react");
|
|
4249
4272
|
var import_editor_controls40 = require("@elementor/editor-controls");
|
|
4250
4273
|
var import_i18n44 = require("@wordpress/i18n");
|
|
4251
4274
|
var LETTER_SPACING_LABEL = (0, import_i18n44.__)("Letter spacing", "elementor");
|
|
4252
4275
|
var LetterSpacingField = () => {
|
|
4253
|
-
const rowRef = (0,
|
|
4276
|
+
const rowRef = (0, import_react30.useRef)(null);
|
|
4254
4277
|
return /* @__PURE__ */ React67.createElement(StylesField, { bind: "letter-spacing", propDisplayName: LETTER_SPACING_LABEL }, /* @__PURE__ */ React67.createElement(StylesFieldLayout, { label: LETTER_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React67.createElement(import_editor_controls40.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4255
4278
|
};
|
|
4256
4279
|
|
|
4257
4280
|
// src/components/style-sections/typography-section/line-height-field.tsx
|
|
4258
4281
|
var React68 = __toESM(require("react"));
|
|
4259
|
-
var
|
|
4282
|
+
var import_react31 = require("react");
|
|
4260
4283
|
var import_editor_controls41 = require("@elementor/editor-controls");
|
|
4261
4284
|
var import_i18n45 = require("@wordpress/i18n");
|
|
4262
4285
|
var LINE_HEIGHT_LABEL = (0, import_i18n45.__)("Line height", "elementor");
|
|
4263
4286
|
var LineHeightField = () => {
|
|
4264
|
-
const rowRef = (0,
|
|
4287
|
+
const rowRef = (0, import_react31.useRef)(null);
|
|
4265
4288
|
return /* @__PURE__ */ React68.createElement(StylesField, { bind: "line-height", propDisplayName: LINE_HEIGHT_LABEL }, /* @__PURE__ */ React68.createElement(StylesFieldLayout, { label: LINE_HEIGHT_LABEL, ref: rowRef }, /* @__PURE__ */ React68.createElement(import_editor_controls41.SizeControl, { anchorRef: rowRef })));
|
|
4266
4289
|
};
|
|
4267
4290
|
|
|
@@ -4483,12 +4506,12 @@ var TransformField = () => /* @__PURE__ */ React75.createElement(StylesField, {
|
|
|
4483
4506
|
|
|
4484
4507
|
// src/components/style-sections/typography-section/word-spacing-field.tsx
|
|
4485
4508
|
var React76 = __toESM(require("react"));
|
|
4486
|
-
var
|
|
4509
|
+
var import_react32 = require("react");
|
|
4487
4510
|
var import_editor_controls48 = require("@elementor/editor-controls");
|
|
4488
4511
|
var import_i18n52 = require("@wordpress/i18n");
|
|
4489
4512
|
var WORD_SPACING_LABEL = (0, import_i18n52.__)("Word spacing", "elementor");
|
|
4490
4513
|
var WordSpacingField = () => {
|
|
4491
|
-
const rowRef = (0,
|
|
4514
|
+
const rowRef = (0, import_react32.useRef)(null);
|
|
4492
4515
|
return /* @__PURE__ */ React76.createElement(StylesField, { bind: "word-spacing", propDisplayName: WORD_SPACING_LABEL }, /* @__PURE__ */ React76.createElement(StylesFieldLayout, { label: WORD_SPACING_LABEL, ref: rowRef }, /* @__PURE__ */ React76.createElement(import_editor_controls48.SizeControl, { anchorRef: rowRef, min: -Number.MAX_SAFE_INTEGER })));
|
|
4493
4516
|
};
|
|
4494
4517
|
|
|
@@ -4546,7 +4569,7 @@ var stickyHeaderStyles = {
|
|
|
4546
4569
|
var StyleTab = () => {
|
|
4547
4570
|
const currentClassesProp = useCurrentClassesProp();
|
|
4548
4571
|
const [activeStyleDefId, setActiveStyleDefId] = useActiveStyleDefId(currentClassesProp ?? "");
|
|
4549
|
-
const [activeStyleState, setActiveStyleState] = (0,
|
|
4572
|
+
const [activeStyleState, setActiveStyleState] = (0, import_react33.useState)(null);
|
|
4550
4573
|
const breakpoint = (0, import_editor_responsive3.useActiveBreakpoint)();
|
|
4551
4574
|
if (!currentClassesProp) {
|
|
4552
4575
|
return null;
|
|
@@ -4709,7 +4732,7 @@ var EditingPanelTabs = () => {
|
|
|
4709
4732
|
return (
|
|
4710
4733
|
// When switching between elements, the local states should be reset. We are using key to rerender the tabs.
|
|
4711
4734
|
// Reference: https://react.dev/learn/preserving-and-resetting-state#resetting-a-form-with-a-key
|
|
4712
|
-
/* @__PURE__ */ React80.createElement(
|
|
4735
|
+
/* @__PURE__ */ React80.createElement(import_react34.Fragment, { key: element.id }, /* @__PURE__ */ React80.createElement(PanelTabContent, null))
|
|
4713
4736
|
);
|
|
4714
4737
|
};
|
|
4715
4738
|
var PanelTabContent = () => {
|
|
@@ -4761,7 +4784,7 @@ var import_editor_panels3 = require("@elementor/editor-panels");
|
|
|
4761
4784
|
var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
|
|
4762
4785
|
|
|
4763
4786
|
// src/hooks/use-open-editor-panel.ts
|
|
4764
|
-
var
|
|
4787
|
+
var import_react35 = require("react");
|
|
4765
4788
|
var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
|
|
4766
4789
|
|
|
4767
4790
|
// src/panel.ts
|
|
@@ -4785,7 +4808,7 @@ var isAtomicWidgetSelected = () => {
|
|
|
4785
4808
|
// src/hooks/use-open-editor-panel.ts
|
|
4786
4809
|
var useOpenEditorPanel = () => {
|
|
4787
4810
|
const { open } = usePanelActions();
|
|
4788
|
-
(0,
|
|
4811
|
+
(0, import_react35.useEffect)(() => {
|
|
4789
4812
|
return (0, import_editor_v1_adapters8.__privateListenTo)((0, import_editor_v1_adapters8.commandStartEvent)("panel/editor/open"), () => {
|
|
4790
4813
|
if (isAtomicWidgetSelected()) {
|
|
4791
4814
|
open();
|
|
@@ -4805,11 +4828,12 @@ var import_editor_controls51 = require("@elementor/editor-controls");
|
|
|
4805
4828
|
|
|
4806
4829
|
// src/components/promotions/custom-css.tsx
|
|
4807
4830
|
var React82 = __toESM(require("react"));
|
|
4808
|
-
var
|
|
4831
|
+
var import_react36 = require("react");
|
|
4809
4832
|
var import_editor_controls50 = require("@elementor/editor-controls");
|
|
4810
4833
|
var import_i18n56 = require("@wordpress/i18n");
|
|
4834
|
+
var TRACKING_DATA = { target_name: "custom_css", location_l2: "style" };
|
|
4811
4835
|
var CustomCssSection = () => {
|
|
4812
|
-
const triggerRef = (0,
|
|
4836
|
+
const triggerRef = (0, import_react36.useRef)(null);
|
|
4813
4837
|
return /* @__PURE__ */ React82.createElement(
|
|
4814
4838
|
StyleTabSection,
|
|
4815
4839
|
{
|
|
@@ -4817,7 +4841,7 @@ var CustomCssSection = () => {
|
|
|
4817
4841
|
name: "Custom CSS",
|
|
4818
4842
|
title: (0, import_i18n56.__)("Custom CSS", "elementor"),
|
|
4819
4843
|
action: {
|
|
4820
|
-
component: /* @__PURE__ */ React82.createElement(import_editor_controls50.PromotionTrigger, { ref: triggerRef, promotionKey: "customCss" }),
|
|
4844
|
+
component: /* @__PURE__ */ React82.createElement(import_editor_controls50.PromotionTrigger, { ref: triggerRef, promotionKey: "customCss", trackingData: TRACKING_DATA }),
|
|
4821
4845
|
onClick: () => triggerRef.current?.toggle()
|
|
4822
4846
|
}
|
|
4823
4847
|
}
|
|
@@ -5227,17 +5251,17 @@ var import_editor_props18 = require("@elementor/editor-props");
|
|
|
5227
5251
|
var import_icons23 = require("@elementor/icons");
|
|
5228
5252
|
|
|
5229
5253
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5230
|
-
var
|
|
5254
|
+
var import_react39 = require("react");
|
|
5231
5255
|
|
|
5232
5256
|
// src/dynamics/hooks/use-prop-dynamic-tags.ts
|
|
5233
|
-
var
|
|
5257
|
+
var import_react38 = require("react");
|
|
5234
5258
|
var import_editor_controls54 = require("@elementor/editor-controls");
|
|
5235
5259
|
|
|
5236
5260
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
5237
5261
|
var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
|
|
5238
5262
|
|
|
5239
5263
|
// src/hooks/use-license-config.ts
|
|
5240
|
-
var
|
|
5264
|
+
var import_react37 = require("react");
|
|
5241
5265
|
var config = { expired: false };
|
|
5242
5266
|
var listeners = /* @__PURE__ */ new Set();
|
|
5243
5267
|
function setLicenseConfig(newConfig) {
|
|
@@ -5252,7 +5276,7 @@ function subscribe(listener) {
|
|
|
5252
5276
|
return () => listeners.delete(listener);
|
|
5253
5277
|
}
|
|
5254
5278
|
function useLicenseConfig() {
|
|
5255
|
-
return (0,
|
|
5279
|
+
return (0, import_react37.useSyncExternalStore)(subscribe, getLicenseConfig, getLicenseConfig);
|
|
5256
5280
|
}
|
|
5257
5281
|
|
|
5258
5282
|
// src/dynamics/sync/get-atomic-dynamic-tags.ts
|
|
@@ -5321,7 +5345,7 @@ var usePropDynamicTagsInternal = (filterByLicense2) => {
|
|
|
5321
5345
|
categories = propDynamicType?.settings.categories || [];
|
|
5322
5346
|
}
|
|
5323
5347
|
const categoriesKey = categories.join();
|
|
5324
|
-
return (0,
|
|
5348
|
+
return (0, import_react38.useMemo)(
|
|
5325
5349
|
() => getDynamicTagsByCategories(categories, filterByLicense2),
|
|
5326
5350
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5327
5351
|
[categoriesKey, filterByLicense2]
|
|
@@ -5355,7 +5379,7 @@ var getDynamicTagsByCategories = (categories, filterByLicense2) => {
|
|
|
5355
5379
|
// src/dynamics/hooks/use-dynamic-tag.ts
|
|
5356
5380
|
var useDynamicTag = (tagName) => {
|
|
5357
5381
|
const dynamicTags = useAllPropDynamicTags();
|
|
5358
|
-
return (0,
|
|
5382
|
+
return (0, import_react39.useMemo)(() => dynamicTags.find((tag) => tag.name === tagName) ?? null, [dynamicTags, tagName]);
|
|
5359
5383
|
};
|
|
5360
5384
|
|
|
5361
5385
|
// src/dynamics/components/background-control-dynamic-tag.tsx
|
|
@@ -5477,8 +5501,8 @@ var DynamicControl = ({ bind, children }) => {
|
|
|
5477
5501
|
};
|
|
5478
5502
|
|
|
5479
5503
|
// src/dynamics/components/dynamic-selection.tsx
|
|
5480
|
-
var import_react39 = require("react");
|
|
5481
5504
|
var React87 = __toESM(require("react"));
|
|
5505
|
+
var import_react40 = require("react");
|
|
5482
5506
|
var import_editor_controls57 = require("@elementor/editor-controls");
|
|
5483
5507
|
var import_editor_ui8 = require("@elementor/editor-ui");
|
|
5484
5508
|
var import_icons24 = require("@elementor/icons");
|
|
@@ -5489,7 +5513,7 @@ var PROMO_TEXT_WIDTH = 170;
|
|
|
5489
5513
|
var PRO_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-modal/";
|
|
5490
5514
|
var RENEW_DYNAMIC_TAGS_URL = "https://go.elementor.com/go-pro-dynamic-tags-renew-modal/";
|
|
5491
5515
|
var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
5492
|
-
const [searchValue, setSearchValue] = (0,
|
|
5516
|
+
const [searchValue, setSearchValue] = (0, import_react40.useState)("");
|
|
5493
5517
|
const { groups: dynamicGroups } = getAtomicDynamicTags() || {};
|
|
5494
5518
|
const theme = (0, import_ui38.useTheme)();
|
|
5495
5519
|
const { value: anyValue } = (0, import_editor_controls57.useBoundProp)();
|
|
@@ -5498,6 +5522,13 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5498
5522
|
const isCurrentValueDynamic = !!dynamicValue;
|
|
5499
5523
|
const options12 = useFilteredOptions(searchValue);
|
|
5500
5524
|
const hasNoDynamicTags = !options12.length && !searchValue.trim();
|
|
5525
|
+
(0, import_react40.useEffect)(() => {
|
|
5526
|
+
if (hasNoDynamicTags) {
|
|
5527
|
+
(0, import_editor_controls57.trackViewPromotion)({ target_name: "dynamic_tags" });
|
|
5528
|
+
} else if (expired) {
|
|
5529
|
+
(0, import_editor_controls57.trackViewPromotion)({ target_name: "dynamic_tags" });
|
|
5530
|
+
}
|
|
5531
|
+
}, [hasNoDynamicTags, expired]);
|
|
5501
5532
|
const handleSearch = (value) => {
|
|
5502
5533
|
setSearchValue(value);
|
|
5503
5534
|
};
|
|
@@ -5528,7 +5559,7 @@ var DynamicSelection = ({ close: closePopover, expired = false }) => {
|
|
|
5528
5559
|
if (expired) {
|
|
5529
5560
|
return /* @__PURE__ */ React87.createElement(ExpiredDynamicTags, null);
|
|
5530
5561
|
}
|
|
5531
|
-
return /* @__PURE__ */ React87.createElement(
|
|
5562
|
+
return /* @__PURE__ */ React87.createElement(import_react40.Fragment, null, /* @__PURE__ */ React87.createElement(
|
|
5532
5563
|
import_editor_ui8.SearchField,
|
|
5533
5564
|
{
|
|
5534
5565
|
value: searchValue,
|
|
@@ -5585,7 +5616,14 @@ var NoDynamicTags = () => /* @__PURE__ */ React87.createElement(React87.Fragment
|
|
|
5585
5616
|
/* @__PURE__ */ React87.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
5586
5617
|
/* @__PURE__ */ React87.createElement(import_ui38.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n59.__)("Streamline your workflow with dynamic tags", "elementor")),
|
|
5587
5618
|
/* @__PURE__ */ React87.createElement(import_ui38.Typography, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, (0, import_i18n59.__)("Upgrade now to display your content dynamically.", "elementor")),
|
|
5588
|
-
/* @__PURE__ */ React87.createElement(
|
|
5619
|
+
/* @__PURE__ */ React87.createElement(
|
|
5620
|
+
import_editor_ui8.CtaButton,
|
|
5621
|
+
{
|
|
5622
|
+
size: "small",
|
|
5623
|
+
href: PRO_DYNAMIC_TAGS_URL,
|
|
5624
|
+
onClick: () => (0, import_editor_controls57.trackUpgradePromotionClick)({ target_name: "dynamic_tags" })
|
|
5625
|
+
}
|
|
5626
|
+
)
|
|
5589
5627
|
));
|
|
5590
5628
|
var ExpiredDynamicTags = () => /* @__PURE__ */ React87.createElement(React87.Fragment, null, /* @__PURE__ */ React87.createElement(import_ui38.Divider, null), /* @__PURE__ */ React87.createElement(
|
|
5591
5629
|
import_ui38.Stack,
|
|
@@ -5601,7 +5639,15 @@ var ExpiredDynamicTags = () => /* @__PURE__ */ React87.createElement(React87.Fra
|
|
|
5601
5639
|
/* @__PURE__ */ React87.createElement(import_icons24.DatabaseIcon, { fontSize: "large" }),
|
|
5602
5640
|
/* @__PURE__ */ React87.createElement(import_ui38.Typography, { align: "center", variant: "subtitle2" }, (0, import_i18n59.__)("Unlock your Dynamic tags again", "elementor")),
|
|
5603
5641
|
/* @__PURE__ */ React87.createElement(import_ui38.Typography, { align: "center", variant: "caption", width: PROMO_TEXT_WIDTH }, (0, import_i18n59.__)("Dynamic tags need Elementor Pro. Renew now to keep them active.", "elementor")),
|
|
5604
|
-
/* @__PURE__ */ React87.createElement(
|
|
5642
|
+
/* @__PURE__ */ React87.createElement(
|
|
5643
|
+
import_editor_ui8.CtaButton,
|
|
5644
|
+
{
|
|
5645
|
+
size: "small",
|
|
5646
|
+
href: RENEW_DYNAMIC_TAGS_URL,
|
|
5647
|
+
onClick: () => (0, import_editor_controls57.trackUpgradePromotionClick)({ target_name: "dynamic_tags" }),
|
|
5648
|
+
children: (0, import_i18n59.__)("Renew Now", "elementor")
|
|
5649
|
+
}
|
|
5650
|
+
)
|
|
5605
5651
|
));
|
|
5606
5652
|
var useFilteredOptions = (searchValue) => {
|
|
5607
5653
|
const dynamicTags = usePropDynamicTags();
|
|
@@ -5979,22 +6025,22 @@ var import_i18n66 = require("@wordpress/i18n");
|
|
|
5979
6025
|
|
|
5980
6026
|
// src/styles-inheritance/components/styles-inheritance-infotip.tsx
|
|
5981
6027
|
var React94 = __toESM(require("react"));
|
|
5982
|
-
var
|
|
6028
|
+
var import_react42 = require("react");
|
|
5983
6029
|
var import_editor_canvas5 = require("@elementor/editor-canvas");
|
|
5984
6030
|
var import_editor_ui10 = require("@elementor/editor-ui");
|
|
5985
6031
|
var import_ui44 = require("@elementor/ui");
|
|
5986
6032
|
var import_i18n65 = require("@wordpress/i18n");
|
|
5987
6033
|
|
|
5988
6034
|
// src/styles-inheritance/hooks/use-normalized-inheritance-chain-items.tsx
|
|
5989
|
-
var
|
|
6035
|
+
var import_react41 = require("react");
|
|
5990
6036
|
var import_editor_canvas4 = require("@elementor/editor-canvas");
|
|
5991
6037
|
var import_editor_styles8 = require("@elementor/editor-styles");
|
|
5992
6038
|
var import_editor_styles_repository14 = require("@elementor/editor-styles-repository");
|
|
5993
6039
|
var import_i18n63 = require("@wordpress/i18n");
|
|
5994
6040
|
var MAXIMUM_ITEMS = 2;
|
|
5995
6041
|
var useNormalizedInheritanceChainItems = (inheritanceChain, bind, resolve) => {
|
|
5996
|
-
const [items3, setItems] = (0,
|
|
5997
|
-
(0,
|
|
6042
|
+
const [items3, setItems] = (0, import_react41.useState)([]);
|
|
6043
|
+
(0, import_react41.useEffect)(() => {
|
|
5998
6044
|
(async () => {
|
|
5999
6045
|
const normalizedItems = await Promise.all(
|
|
6000
6046
|
inheritanceChain.filter(({ style }) => style).map((item, index) => normalizeInheritanceItem(item, index, bind, resolve))
|
|
@@ -6045,7 +6091,7 @@ var getTransformedValue = async (item, bind, resolve) => {
|
|
|
6045
6091
|
}
|
|
6046
6092
|
});
|
|
6047
6093
|
const value = result?.[bind] ?? result;
|
|
6048
|
-
if ((0,
|
|
6094
|
+
if ((0, import_react41.isValidElement)(value)) {
|
|
6049
6095
|
return value;
|
|
6050
6096
|
}
|
|
6051
6097
|
if (typeof value === "object") {
|
|
@@ -6123,7 +6169,7 @@ var LabelChip = ({ displayLabel, provider }) => {
|
|
|
6123
6169
|
var React92 = __toESM(require("react"));
|
|
6124
6170
|
var import_ui42 = require("@elementor/ui");
|
|
6125
6171
|
var ValueComponent = ({ index, value }) => {
|
|
6126
|
-
return /* @__PURE__ */ React92.createElement(
|
|
6172
|
+
return /* @__PURE__ */ React92.createElement(import_ui42.Tooltip, { title: value, placement: "top" }, /* @__PURE__ */ React92.createElement(
|
|
6127
6173
|
import_ui42.Typography,
|
|
6128
6174
|
{
|
|
6129
6175
|
variant: "caption",
|
|
@@ -6132,15 +6178,16 @@ var ValueComponent = ({ index, value }) => {
|
|
|
6132
6178
|
mt: "1px",
|
|
6133
6179
|
textDecoration: index === 0 ? "none" : "line-through",
|
|
6134
6180
|
overflow: "hidden",
|
|
6135
|
-
|
|
6136
|
-
|
|
6181
|
+
display: "-webkit-box",
|
|
6182
|
+
WebkitLineClamp: 1,
|
|
6183
|
+
WebkitBoxOrient: "vertical",
|
|
6137
6184
|
pl: 2.5,
|
|
6138
6185
|
minWidth: 0,
|
|
6139
6186
|
maxWidth: "100%"
|
|
6140
6187
|
}
|
|
6141
6188
|
},
|
|
6142
6189
|
value
|
|
6143
|
-
);
|
|
6190
|
+
));
|
|
6144
6191
|
};
|
|
6145
6192
|
|
|
6146
6193
|
// src/styles-inheritance/components/infotip/action-icons.tsx
|
|
@@ -6166,8 +6213,8 @@ var StylesInheritanceInfotip = ({
|
|
|
6166
6213
|
children,
|
|
6167
6214
|
isDisabled
|
|
6168
6215
|
}) => {
|
|
6169
|
-
const [showInfotip, setShowInfotip] = (0,
|
|
6170
|
-
const triggerRef = (0,
|
|
6216
|
+
const [showInfotip, setShowInfotip] = (0, import_react42.useState)(false);
|
|
6217
|
+
const triggerRef = (0, import_react42.useRef)(null);
|
|
6171
6218
|
const toggleInfotip = () => {
|
|
6172
6219
|
if (isDisabled) {
|
|
6173
6220
|
return;
|
|
@@ -6182,7 +6229,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6182
6229
|
};
|
|
6183
6230
|
const key = path.join(".");
|
|
6184
6231
|
const sectionWidth = (0, import_editor_ui10.useSectionWidth)();
|
|
6185
|
-
const resolve = (0,
|
|
6232
|
+
const resolve = (0, import_react42.useMemo)(() => {
|
|
6186
6233
|
return (0, import_editor_canvas5.createPropsResolver)({
|
|
6187
6234
|
transformers: import_editor_canvas5.stylesInheritanceTransformersRegistry,
|
|
6188
6235
|
schema: { [key]: propType }
|
|
@@ -6228,7 +6275,7 @@ var StylesInheritanceInfotip = ({
|
|
|
6228
6275
|
}
|
|
6229
6276
|
}
|
|
6230
6277
|
},
|
|
6231
|
-
/* @__PURE__ */ React94.createElement(import_ui44.Stack, { gap: 1.5, sx: { pl:
|
|
6278
|
+
/* @__PURE__ */ React94.createElement(import_ui44.Stack, { gap: 1.5, sx: { pl: 2, pr: 1, pt: 1.5, pb: 1.5 }, role: "list" }, items3.map((item, index) => {
|
|
6232
6279
|
return /* @__PURE__ */ React94.createElement(
|
|
6233
6280
|
import_ui44.Box,
|
|
6234
6281
|
{
|
|
@@ -6323,15 +6370,13 @@ function TooltipOrInfotip({
|
|
|
6323
6370
|
sx: { mx: 2 }
|
|
6324
6371
|
}
|
|
6325
6372
|
},
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
]
|
|
6334
|
-
}
|
|
6373
|
+
PopperProps: {
|
|
6374
|
+
modifiers: [
|
|
6375
|
+
{
|
|
6376
|
+
name: "offset",
|
|
6377
|
+
options: { offset: [offsetX, 0] }
|
|
6378
|
+
}
|
|
6379
|
+
]
|
|
6335
6380
|
}
|
|
6336
6381
|
},
|
|
6337
6382
|
children
|
|
@@ -6408,23 +6453,26 @@ var excludePropTypeTransformers = /* @__PURE__ */ new Set([
|
|
|
6408
6453
|
// src/styles-inheritance/transformers/array-transformer.tsx
|
|
6409
6454
|
var React96 = __toESM(require("react"));
|
|
6410
6455
|
var import_editor_canvas6 = require("@elementor/editor-canvas");
|
|
6411
|
-
var import_ui45 = require("@elementor/ui");
|
|
6412
6456
|
var arrayTransformer = (0, import_editor_canvas6.createTransformer)((values) => {
|
|
6413
6457
|
if (!values || values.length === 0) {
|
|
6414
6458
|
return null;
|
|
6415
6459
|
}
|
|
6416
|
-
|
|
6460
|
+
const allStrings = values.every((item) => typeof item === "string" || typeof item === "number");
|
|
6461
|
+
if (allStrings) {
|
|
6462
|
+
return values.join(" ");
|
|
6463
|
+
}
|
|
6464
|
+
return /* @__PURE__ */ React96.createElement(React96.Fragment, null, values.map((item, index) => /* @__PURE__ */ React96.createElement(React96.Fragment, { key: index }, index > 0 && " ", item)));
|
|
6417
6465
|
});
|
|
6418
6466
|
|
|
6419
6467
|
// src/styles-inheritance/transformers/background-color-overlay-transformer.tsx
|
|
6420
6468
|
var React97 = __toESM(require("react"));
|
|
6421
6469
|
var import_editor_canvas7 = require("@elementor/editor-canvas");
|
|
6422
|
-
var
|
|
6423
|
-
var backgroundColorOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React97.createElement(
|
|
6470
|
+
var import_ui45 = require("@elementor/ui");
|
|
6471
|
+
var backgroundColorOverlayTransformer = (0, import_editor_canvas7.createTransformer)((value) => /* @__PURE__ */ React97.createElement(import_ui45.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React97.createElement(ItemLabelColor, { value })));
|
|
6424
6472
|
var ItemLabelColor = ({ value: { color } }) => {
|
|
6425
6473
|
return /* @__PURE__ */ React97.createElement("span", null, color);
|
|
6426
6474
|
};
|
|
6427
|
-
var StyledUnstableColorIndicator = (0,
|
|
6475
|
+
var StyledUnstableColorIndicator = (0, import_ui45.styled)(import_ui45.UnstableColorIndicator)(({ theme }) => ({
|
|
6428
6476
|
width: "1em",
|
|
6429
6477
|
height: "1em",
|
|
6430
6478
|
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
@@ -6435,9 +6483,9 @@ var StyledUnstableColorIndicator = (0, import_ui46.styled)(import_ui46.UnstableC
|
|
|
6435
6483
|
// src/styles-inheritance/transformers/background-gradient-overlay-transformer.tsx
|
|
6436
6484
|
var React98 = __toESM(require("react"));
|
|
6437
6485
|
var import_editor_canvas8 = require("@elementor/editor-canvas");
|
|
6438
|
-
var
|
|
6486
|
+
var import_ui46 = require("@elementor/ui");
|
|
6439
6487
|
var import_i18n67 = require("@wordpress/i18n");
|
|
6440
|
-
var backgroundGradientOverlayTransformer = (0, import_editor_canvas8.createTransformer)((value) => /* @__PURE__ */ React98.createElement(
|
|
6488
|
+
var backgroundGradientOverlayTransformer = (0, import_editor_canvas8.createTransformer)((value) => /* @__PURE__ */ React98.createElement(import_ui46.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React98.createElement(ItemIconGradient, { value }), /* @__PURE__ */ React98.createElement(ItemLabelGradient, { value })));
|
|
6441
6489
|
var ItemIconGradient = ({ value }) => {
|
|
6442
6490
|
const gradient = getGradientValue(value);
|
|
6443
6491
|
return /* @__PURE__ */ React98.createElement(StyledUnstableColorIndicator, { size: "inherit", component: "span", value: gradient });
|
|
@@ -6460,13 +6508,13 @@ var getGradientValue = (gradient) => {
|
|
|
6460
6508
|
var React99 = __toESM(require("react"));
|
|
6461
6509
|
var import_editor_canvas9 = require("@elementor/editor-canvas");
|
|
6462
6510
|
var import_editor_ui11 = require("@elementor/editor-ui");
|
|
6463
|
-
var
|
|
6511
|
+
var import_ui47 = require("@elementor/ui");
|
|
6464
6512
|
var import_wp_media = require("@elementor/wp-media");
|
|
6465
|
-
var backgroundImageOverlayTransformer = (0, import_editor_canvas9.createTransformer)((value) => /* @__PURE__ */ React99.createElement(
|
|
6513
|
+
var backgroundImageOverlayTransformer = (0, import_editor_canvas9.createTransformer)((value) => /* @__PURE__ */ React99.createElement(import_ui47.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React99.createElement(ItemIconImage, { value }), /* @__PURE__ */ React99.createElement(ItemLabelImage, { value })));
|
|
6466
6514
|
var ItemIconImage = ({ value }) => {
|
|
6467
6515
|
const { imageUrl } = useImage(value);
|
|
6468
6516
|
return /* @__PURE__ */ React99.createElement(
|
|
6469
|
-
|
|
6517
|
+
import_ui47.CardMedia,
|
|
6470
6518
|
{
|
|
6471
6519
|
image: imageUrl,
|
|
6472
6520
|
sx: (theme) => ({
|
|
@@ -6508,7 +6556,6 @@ var getFileExtensionFromFilename = (filename) => {
|
|
|
6508
6556
|
// src/styles-inheritance/transformers/box-shadow-transformer.tsx
|
|
6509
6557
|
var React100 = __toESM(require("react"));
|
|
6510
6558
|
var import_editor_canvas10 = require("@elementor/editor-canvas");
|
|
6511
|
-
var import_ui49 = require("@elementor/ui");
|
|
6512
6559
|
var boxShadowTransformer = (0, import_editor_canvas10.createTransformer)((value) => {
|
|
6513
6560
|
if (!value) {
|
|
6514
6561
|
return null;
|
|
@@ -6517,20 +6564,20 @@ var boxShadowTransformer = (0, import_editor_canvas10.createTransformer)((value)
|
|
|
6517
6564
|
const colorValue = color || "#000000";
|
|
6518
6565
|
const sizes = [hOffset || "0px", vOffset || "0px", blur || "10px", spread || "0px"].join(" ");
|
|
6519
6566
|
const positionValue = position || "outset";
|
|
6520
|
-
return /* @__PURE__ */ React100.createElement(
|
|
6567
|
+
return /* @__PURE__ */ React100.createElement(React100.Fragment, null, colorValue, " ", positionValue, ", ", sizes);
|
|
6521
6568
|
});
|
|
6522
6569
|
|
|
6523
6570
|
// src/styles-inheritance/transformers/color-transformer.tsx
|
|
6524
6571
|
var React101 = __toESM(require("react"));
|
|
6525
6572
|
var import_editor_canvas11 = require("@elementor/editor-canvas");
|
|
6526
|
-
var
|
|
6573
|
+
var import_ui48 = require("@elementor/ui");
|
|
6527
6574
|
function isValidCSSColor(value) {
|
|
6528
6575
|
if (!value.trim()) {
|
|
6529
6576
|
return false;
|
|
6530
6577
|
}
|
|
6531
6578
|
return CSS.supports("color", value.trim());
|
|
6532
6579
|
}
|
|
6533
|
-
var StyledColorIndicator = (0,
|
|
6580
|
+
var StyledColorIndicator = (0, import_ui48.styled)(import_ui48.UnstableColorIndicator)(({ theme }) => ({
|
|
6534
6581
|
width: "1em",
|
|
6535
6582
|
height: "1em",
|
|
6536
6583
|
borderRadius: `${theme.shape.borderRadius / 2}px`,
|
|
@@ -6541,24 +6588,18 @@ var colorTransformer = (0, import_editor_canvas11.createTransformer)((value) =>
|
|
|
6541
6588
|
if (!isValidCSSColor(value)) {
|
|
6542
6589
|
return value;
|
|
6543
6590
|
}
|
|
6544
|
-
return /* @__PURE__ */ React101.createElement(
|
|
6591
|
+
return /* @__PURE__ */ React101.createElement(import_ui48.Stack, { direction: "row", gap: 1, alignItems: "center" }, /* @__PURE__ */ React101.createElement(StyledColorIndicator, { size: "inherit", component: "span", value }), /* @__PURE__ */ React101.createElement("span", null, value));
|
|
6545
6592
|
});
|
|
6546
6593
|
|
|
6547
6594
|
// src/styles-inheritance/transformers/repeater-to-items-transformer.tsx
|
|
6548
|
-
var React102 = __toESM(require("react"));
|
|
6549
6595
|
var import_editor_canvas12 = require("@elementor/editor-canvas");
|
|
6550
|
-
var
|
|
6551
|
-
var createRepeaterToItemsTransformer = (originalTransformer, separator = " ") => {
|
|
6596
|
+
var createRepeaterToItemsTransformer = (originalTransformer) => {
|
|
6552
6597
|
return (0, import_editor_canvas12.createTransformer)((value, options12) => {
|
|
6553
6598
|
const stringResult = originalTransformer(value, options12);
|
|
6554
6599
|
if (!stringResult || typeof stringResult !== "string") {
|
|
6555
6600
|
return stringResult;
|
|
6556
6601
|
}
|
|
6557
|
-
|
|
6558
|
-
if (parts.length <= 1) {
|
|
6559
|
-
return stringResult;
|
|
6560
|
-
}
|
|
6561
|
-
return /* @__PURE__ */ React102.createElement(import_ui51.Stack, { direction: "column", gap: 0.5 }, parts.map((part, index) => /* @__PURE__ */ React102.createElement(import_ui51.Stack, { key: index }, part.trim())));
|
|
6602
|
+
return stringResult;
|
|
6562
6603
|
});
|
|
6563
6604
|
};
|
|
6564
6605
|
|
|
@@ -6597,7 +6638,7 @@ function registerCustomTransformers(originalStyleTransformers) {
|
|
|
6597
6638
|
);
|
|
6598
6639
|
import_editor_canvas13.stylesInheritanceTransformersRegistry.register(
|
|
6599
6640
|
"transition",
|
|
6600
|
-
createRepeaterToItemsTransformer(originalStyleTransformers.transition
|
|
6641
|
+
createRepeaterToItemsTransformer(originalStyleTransformers.transition)
|
|
6601
6642
|
);
|
|
6602
6643
|
["background-overlay", "box-shadow", "transform-functions"].forEach(
|
|
6603
6644
|
(propType) => import_editor_canvas13.stylesInheritanceTransformersRegistry.register(propType, arrayTransformer)
|
|
@@ -6638,6 +6679,7 @@ var blockV1Panel = () => {
|
|
|
6638
6679
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6639
6680
|
0 && (module.exports = {
|
|
6640
6681
|
BaseControl,
|
|
6682
|
+
ControlTypeContainer,
|
|
6641
6683
|
CustomCssIndicator,
|
|
6642
6684
|
ElementProvider,
|
|
6643
6685
|
FIELD_TYPE,
|