@elementor/editor-editing-panel 1.33.0 → 1.34.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/CHANGELOG.md +29 -0
- package/dist/index.js +40 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/style-sections/layout-section/display-field.tsx +21 -7
- package/src/components/style-sections/position-section/position-section.tsx +9 -2
- package/src/components/style-sections/typography-section/font-family-field.tsx +1 -1
- package/src/components/style-sections/typography-section/hooks/use-font-families.ts +1 -1
- package/src/hooks/use-direction.ts +3 -4
- package/src/styles-inheritance/styles-inheritance-indicator.tsx +2 -2
- package/src/sync/get-elementor-globals.ts +19 -0
- package/src/sync/is-experiment-active.ts +7 -0
- package/src/sync/types.ts +1 -3
- package/src/sync/get-elementor-config.ts +0 -7
- package/src/sync/get-experiments-config.ts +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.34.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 71d9ffe: Added support for split items in toggle button group and an API for checking if an experiment is active
|
|
8
|
+
- 4a2569f: Replaced experiment status check to look for existing experiments
|
|
9
|
+
- 9f16dcb: Added an API to get experimental features' status
|
|
10
|
+
- b150c2b: Wrap font family with Control Action
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 9a098c5: Add a general experiment for 3.30
|
|
15
|
+
- Updated dependencies [ebcf7cc]
|
|
16
|
+
- Updated dependencies [71d9ffe]
|
|
17
|
+
- Updated dependencies [b6131c3]
|
|
18
|
+
- Updated dependencies [810db8d]
|
|
19
|
+
- Updated dependencies [b150c2b]
|
|
20
|
+
- @elementor/editor-controls@0.29.0
|
|
21
|
+
- @elementor/editor-styles-repository@0.8.7
|
|
22
|
+
- @elementor/editor-canvas@0.21.1
|
|
23
|
+
|
|
24
|
+
## 1.33.1
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 6dc8be2: Hide anchor offset control behind CSS ID experiment
|
|
29
|
+
- Updated dependencies [f59eac2]
|
|
30
|
+
- @elementor/editor-canvas@0.21.0
|
|
31
|
+
|
|
3
32
|
## 1.33.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -1590,10 +1590,24 @@ var import_editor_styles_repository7 = require("@elementor/editor-styles-reposit
|
|
|
1590
1590
|
var import_ui16 = require("@elementor/ui");
|
|
1591
1591
|
var import_i18n5 = require("@wordpress/i18n");
|
|
1592
1592
|
|
|
1593
|
-
// src/sync/get-
|
|
1594
|
-
var
|
|
1593
|
+
// src/sync/get-elementor-globals.ts
|
|
1594
|
+
var getElementorConfig = () => {
|
|
1595
|
+
const extendedWindow = window;
|
|
1596
|
+
return extendedWindow.elementor?.config ?? {};
|
|
1597
|
+
};
|
|
1598
|
+
var getElementorFrontendConfig = () => {
|
|
1595
1599
|
const extendedWindow = window;
|
|
1596
|
-
return extendedWindow.
|
|
1600
|
+
return extendedWindow.elementorFrontend?.config ?? {};
|
|
1601
|
+
};
|
|
1602
|
+
var getElementorCommonConfig = () => {
|
|
1603
|
+
const extendedWindow = window;
|
|
1604
|
+
return extendedWindow.elementorCommon?.config ?? {};
|
|
1605
|
+
};
|
|
1606
|
+
|
|
1607
|
+
// src/sync/is-experiment-active.ts
|
|
1608
|
+
var isExperimentActive = (experiment) => {
|
|
1609
|
+
const allFeatures = getElementorCommonConfig()?.experimentalFeatures ?? {};
|
|
1610
|
+
return !!allFeatures?.[experiment];
|
|
1597
1611
|
};
|
|
1598
1612
|
|
|
1599
1613
|
// src/styles-inheritance/styles-inheritance-infotip.tsx
|
|
@@ -1680,7 +1694,7 @@ var StylesInheritanceIndicator = () => {
|
|
|
1680
1694
|
const hasValue = value !== null && value !== void 0;
|
|
1681
1695
|
const label = getLabel({ isFinalValue, hasValue });
|
|
1682
1696
|
const variantType = getVariant({ isFinalValue, hasValue, currentStyleProvider });
|
|
1683
|
-
const
|
|
1697
|
+
const eIndicationsPopover = isExperimentActive("e_indications_popover");
|
|
1684
1698
|
if (!eIndicationsPopover) {
|
|
1685
1699
|
return /* @__PURE__ */ React19.createElement(StyleIndicator, { variant: variantType, "aria-label": label });
|
|
1686
1700
|
}
|
|
@@ -1846,8 +1860,8 @@ var import_i18n8 = require("@wordpress/i18n");
|
|
|
1846
1860
|
// src/hooks/use-direction.ts
|
|
1847
1861
|
var import_ui23 = require("@elementor/ui");
|
|
1848
1862
|
function useDirection() {
|
|
1849
|
-
const theme = (0, import_ui23.useTheme)()
|
|
1850
|
-
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!
|
|
1863
|
+
const theme = (0, import_ui23.useTheme)();
|
|
1864
|
+
const isUiRtl = "rtl" === theme.direction, isSiteRtl = !!getElementorFrontendConfig()?.is_rtl;
|
|
1851
1865
|
return { isSiteRtl, isUiRtl };
|
|
1852
1866
|
}
|
|
1853
1867
|
|
|
@@ -2244,7 +2258,7 @@ var React37 = __toESM(require("react"));
|
|
|
2244
2258
|
var import_editor_controls17 = require("@elementor/editor-controls");
|
|
2245
2259
|
var import_ui30 = require("@elementor/ui");
|
|
2246
2260
|
var import_i18n14 = require("@wordpress/i18n");
|
|
2247
|
-
var
|
|
2261
|
+
var displayFieldItems = [
|
|
2248
2262
|
{
|
|
2249
2263
|
value: "block",
|
|
2250
2264
|
renderContent: () => (0, import_i18n14.__)("Block", "elementor"),
|
|
@@ -2262,17 +2276,27 @@ var displayFieldOptions = [
|
|
|
2262
2276
|
renderContent: () => (0, import_i18n14.__)("In-blk", "elementor"),
|
|
2263
2277
|
label: (0, import_i18n14.__)("Inline-block", "elementor"),
|
|
2264
2278
|
showTooltip: true
|
|
2265
|
-
}
|
|
2266
|
-
|
|
2279
|
+
}
|
|
2280
|
+
];
|
|
2281
|
+
var DisplayField = () => {
|
|
2282
|
+
const isDisplayNoneFeatureActive = isExperimentActive("e_v_3_30");
|
|
2283
|
+
const items3 = [...displayFieldItems];
|
|
2284
|
+
if (isDisplayNoneFeatureActive) {
|
|
2285
|
+
items3.push({
|
|
2286
|
+
value: "none",
|
|
2287
|
+
renderContent: () => (0, import_i18n14.__)("None", "elementor"),
|
|
2288
|
+
label: (0, import_i18n14.__)("None", "elementor"),
|
|
2289
|
+
showTooltip: true
|
|
2290
|
+
});
|
|
2291
|
+
}
|
|
2292
|
+
items3.push({
|
|
2267
2293
|
value: "inline-flex",
|
|
2268
2294
|
renderContent: () => (0, import_i18n14.__)("In-flx", "elementor"),
|
|
2269
2295
|
label: (0, import_i18n14.__)("Inline-flex", "elementor"),
|
|
2270
2296
|
showTooltip: true
|
|
2271
|
-
}
|
|
2272
|
-
];
|
|
2273
|
-
var DisplayField = () => {
|
|
2297
|
+
});
|
|
2274
2298
|
const placeholder = useDisplayPlaceholderValue();
|
|
2275
|
-
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React37.createElement(import_ui30.Stack, { gap: 0.75 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, (0, import_i18n14.__)("Display", "elementor")), /* @__PURE__ */ React37.createElement(import_editor_controls17.ToggleControl, { options:
|
|
2299
|
+
return /* @__PURE__ */ React37.createElement(StylesField, { bind: "display", placeholder }, /* @__PURE__ */ React37.createElement(import_ui30.Stack, { gap: 0.75 }, /* @__PURE__ */ React37.createElement(ControlLabel, null, (0, import_i18n14.__)("Display", "elementor")), /* @__PURE__ */ React37.createElement(import_editor_controls17.ToggleControl, { options: items3, maxItems: 4, fullWidth: true })));
|
|
2276
2300
|
};
|
|
2277
2301
|
var useDisplayPlaceholderValue = () => useStylesInheritanceField("display")[0]?.value ?? void 0;
|
|
2278
2302
|
|
|
@@ -2675,6 +2699,7 @@ var PositionSection = () => {
|
|
|
2675
2699
|
"inset-inline-end"
|
|
2676
2700
|
]);
|
|
2677
2701
|
const [dimensionsValuesFromHistory, updateDimensionsHistory, clearDimensionsHistory] = usePersistDimensions();
|
|
2702
|
+
const isCssIdFeatureActive = isExperimentActive("e_v_3_30");
|
|
2678
2703
|
const onPositionChange = (newPosition, previousPosition) => {
|
|
2679
2704
|
if (newPosition === "static") {
|
|
2680
2705
|
if (dimensionsValues) {
|
|
@@ -2694,7 +2719,7 @@ var PositionSection = () => {
|
|
|
2694
2719
|
}
|
|
2695
2720
|
};
|
|
2696
2721
|
const isNotStatic = positionValue && positionValue?.value !== "static";
|
|
2697
|
-
return /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(DimensionsField, null), /* @__PURE__ */ React49.createElement(ZIndexField, null)) : null, /* @__PURE__ */ React49.createElement(PanelDivider, null), /* @__PURE__ */ React49.createElement(OffsetField, null));
|
|
2722
|
+
return /* @__PURE__ */ React49.createElement(SectionContent, null, /* @__PURE__ */ React49.createElement(PositionField, { onChange: onPositionChange }), isNotStatic ? /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(DimensionsField, null), /* @__PURE__ */ React49.createElement(ZIndexField, null)) : null, isCssIdFeatureActive && /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(PanelDivider, null), /* @__PURE__ */ React49.createElement(OffsetField, null)));
|
|
2698
2723
|
};
|
|
2699
2724
|
var usePersistDimensions = () => {
|
|
2700
2725
|
const { id: styleDefID, meta } = useStyle();
|
|
@@ -2814,14 +2839,6 @@ var import_i18n31 = require("@wordpress/i18n");
|
|
|
2814
2839
|
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2815
2840
|
var import_react22 = require("react");
|
|
2816
2841
|
var import_i18n30 = require("@wordpress/i18n");
|
|
2817
|
-
|
|
2818
|
-
// src/sync/get-elementor-config.ts
|
|
2819
|
-
var getElementorConfig = () => {
|
|
2820
|
-
const extendedWindow = window;
|
|
2821
|
-
return extendedWindow.elementor?.config ?? {};
|
|
2822
|
-
};
|
|
2823
|
-
|
|
2824
|
-
// src/components/style-sections/typography-section/hooks/use-font-families.ts
|
|
2825
2842
|
var supportedCategories = {
|
|
2826
2843
|
system: (0, import_i18n30.__)("System", "elementor"),
|
|
2827
2844
|
custom: (0, import_i18n30.__)("Custom Fonts", "elementor"),
|
|
@@ -2862,7 +2879,7 @@ var FontFamilyField = () => {
|
|
|
2862
2879
|
if (fontFamilies.length === 0) {
|
|
2863
2880
|
return null;
|
|
2864
2881
|
}
|
|
2865
|
-
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React54.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, (0, import_i18n31.__)("Font family", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui44.Grid, { item: true, xs: 6, sx: {
|
|
2882
|
+
return /* @__PURE__ */ React54.createElement(StylesField, { bind: "font-family" }, /* @__PURE__ */ React54.createElement(import_ui44.Grid, { container: true, gap: 2, alignItems: "center", flexWrap: "nowrap" }, /* @__PURE__ */ React54.createElement(import_ui44.Grid, { item: true, xs: 6 }, /* @__PURE__ */ React54.createElement(ControlLabel, null, (0, import_i18n31.__)("Font family", "elementor"))), /* @__PURE__ */ React54.createElement(import_ui44.Grid, { item: true, xs: 6, sx: { minWidth: 0 } }, /* @__PURE__ */ React54.createElement(import_editor_controls32.FontFamilyControl, { fontFamilies }))));
|
|
2866
2883
|
};
|
|
2867
2884
|
|
|
2868
2885
|
// src/components/style-sections/typography-section/font-size-field.tsx
|