@elementor/editor-editing-panel 4.5.0-1180 → 4.5.0-1181
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 +33 -21
- package/dist/index.d.ts +33 -21
- package/dist/index.js +113 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +25 -25
- package/src/components/css-classes/css-class-selector.tsx +3 -0
- package/src/components/custom-css-header-location.tsx +11 -0
- package/src/components/section.tsx +19 -1
- package/src/components/style-section-header-location.tsx +29 -0
- package/src/components/style-tab-header-location.tsx +12 -0
- package/src/components/style-tab-section.tsx +6 -0
- package/src/controls-registry/controls-registry.tsx +1 -1
- package/src/index.ts +7 -0
- package/src/init.ts +3 -0
package/dist/index.mjs
CHANGED
|
@@ -507,7 +507,7 @@ import {
|
|
|
507
507
|
} from "@elementor/editor-styles-repository";
|
|
508
508
|
import { InfoAlert, WarningInfotip } from "@elementor/editor-ui";
|
|
509
509
|
import { ColorSwatchIcon, MapPinIcon } from "@elementor/icons";
|
|
510
|
-
import { createLocation as
|
|
510
|
+
import { createLocation as createLocation3 } from "@elementor/locations";
|
|
511
511
|
import {
|
|
512
512
|
Box as Box2,
|
|
513
513
|
Button,
|
|
@@ -560,6 +560,14 @@ var trackStyles = (provider, event, data) => {
|
|
|
560
560
|
providerInstance?.actions.tracking?.({ event, ...data });
|
|
561
561
|
};
|
|
562
562
|
|
|
563
|
+
// src/components/style-tab-header-location.tsx
|
|
564
|
+
import { createLocation as createLocation2 } from "@elementor/locations";
|
|
565
|
+
var {
|
|
566
|
+
Slot: StyleTabHeaderSlot,
|
|
567
|
+
inject: injectIntoStyleTabHeader,
|
|
568
|
+
useInjections: useStyleTabHeaderInjections
|
|
569
|
+
} = createLocation2();
|
|
570
|
+
|
|
563
571
|
// src/components/css-classes/css-class-item.tsx
|
|
564
572
|
import * as React11 from "react";
|
|
565
573
|
import { useEffect, useMemo as useMemo3, useState as useState3 } from "react";
|
|
@@ -1343,8 +1351,9 @@ var EMPTY_OPTION = {
|
|
|
1343
1351
|
icon: /* @__PURE__ */ React13.createElement(MapPinIcon, null),
|
|
1344
1352
|
provider: null
|
|
1345
1353
|
};
|
|
1346
|
-
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } =
|
|
1354
|
+
var { Slot: ClassSelectorActionsSlot, inject: injectIntoClassSelectorActions } = createLocation3();
|
|
1347
1355
|
function CssClassSelector() {
|
|
1356
|
+
const { element } = useElement();
|
|
1348
1357
|
const options13 = useOptions();
|
|
1349
1358
|
const { id: activeId, setId: setActiveId } = useStyle();
|
|
1350
1359
|
const autocompleteRef = useRef(null);
|
|
@@ -1362,7 +1371,7 @@ function CssClassSelector() {
|
|
|
1362
1371
|
const clearMissingClasses = useCallback2(() => {
|
|
1363
1372
|
unapplyClasses(missingClassesIds);
|
|
1364
1373
|
}, [missingClassesIds, unapplyClasses]);
|
|
1365
|
-
return /* @__PURE__ */ React13.createElement(Stack4, { p: 2 }, /* @__PURE__ */ React13.createElement(Stack4, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React13.createElement(FormLabel, { htmlFor: ID, size: "small" }, __8("Classes", "elementor")), /* @__PURE__ */ React13.createElement(Stack4, { direction: "row", gap: 1 }, /* @__PURE__ */ React13.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React13.createElement(
|
|
1374
|
+
return /* @__PURE__ */ React13.createElement(Stack4, { p: 2 }, /* @__PURE__ */ React13.createElement(Stack4, { direction: "row", gap: 1, alignItems: "center", justifyContent: "space-between" }, /* @__PURE__ */ React13.createElement(FormLabel, { htmlFor: ID, size: "small" }, __8("Classes", "elementor")), /* @__PURE__ */ React13.createElement(Stack4, { direction: "row", gap: 1 }, /* @__PURE__ */ React13.createElement(StyleTabHeaderSlot, { elementId: element.id }), /* @__PURE__ */ React13.createElement(ClassSelectorActionsSlot, null))), /* @__PURE__ */ React13.createElement(
|
|
1366
1375
|
WarningInfotip,
|
|
1367
1376
|
{
|
|
1368
1377
|
open: Boolean(renameError),
|
|
@@ -1934,7 +1943,7 @@ import { useSelectedElementSettings } from "@elementor/editor-elements";
|
|
|
1934
1943
|
import { Panel, PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-panels";
|
|
1935
1944
|
import { ThemeProvider as ThemeProvider3 } from "@elementor/editor-ui";
|
|
1936
1945
|
import { AtomIcon } from "@elementor/icons";
|
|
1937
|
-
import { createLocation as
|
|
1946
|
+
import { createLocation as createLocation7 } from "@elementor/locations";
|
|
1938
1947
|
import { controlActionsMenu } from "@elementor/menus";
|
|
1939
1948
|
import { SessionStorageProvider as SessionStorageProvider3 } from "@elementor/session";
|
|
1940
1949
|
import { ErrorBoundary } from "@elementor/ui";
|
|
@@ -2378,7 +2387,15 @@ import * as React21 from "react";
|
|
|
2378
2387
|
import { useId as useId2, useRef as useRef3 } from "react";
|
|
2379
2388
|
import { CollapseIcon, getCollapsibleValue, SectionRefContext } from "@elementor/editor-ui";
|
|
2380
2389
|
import { Collapse, Divider as Divider2, ListItemButton, ListItemText, Stack as Stack5 } from "@elementor/ui";
|
|
2381
|
-
function Section({
|
|
2390
|
+
function Section({
|
|
2391
|
+
title,
|
|
2392
|
+
children,
|
|
2393
|
+
defaultExpanded = false,
|
|
2394
|
+
titleEnd,
|
|
2395
|
+
titleActions,
|
|
2396
|
+
unmountOnExit = true,
|
|
2397
|
+
action
|
|
2398
|
+
}) {
|
|
2382
2399
|
const [isOpen, setIsOpen] = useStateByElement(title, !!defaultExpanded);
|
|
2383
2400
|
const ref = useRef3(null);
|
|
2384
2401
|
const isDisabled = !!action;
|
|
@@ -2408,7 +2425,15 @@ function Section({ title, children, defaultExpanded = false, titleEnd, unmountOn
|
|
|
2408
2425
|
secondaryTypographyProps: { color: "text.primary", variant: "caption", fontWeight: "bold" },
|
|
2409
2426
|
sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
|
|
2410
2427
|
}
|
|
2411
|
-
), getCollapsibleValue(titleEnd, isOpen)
|
|
2428
|
+
), getCollapsibleValue(titleEnd, isOpen), titleActions && /* @__PURE__ */ React21.createElement(
|
|
2429
|
+
Stack5,
|
|
2430
|
+
{
|
|
2431
|
+
direction: "row",
|
|
2432
|
+
alignItems: "center",
|
|
2433
|
+
onClick: (event) => event.stopPropagation()
|
|
2434
|
+
},
|
|
2435
|
+
titleActions
|
|
2436
|
+
)),
|
|
2412
2437
|
action?.component,
|
|
2413
2438
|
/* @__PURE__ */ React21.createElement(
|
|
2414
2439
|
CollapseIcon,
|
|
@@ -2518,7 +2543,7 @@ var controlTypes = {
|
|
|
2518
2543
|
toggle: { component: ToggleControl, layout: "full", propTypeUtil: stringPropTypeUtil2 },
|
|
2519
2544
|
"date-time": { component: DateTimeControl, layout: "full", propTypeUtil: DateTimePropTypeUtil },
|
|
2520
2545
|
video: { component: VideoMediaControl, layout: "full", propTypeUtil: videoSrcPropTypeUtil },
|
|
2521
|
-
"inline-editing": { component: InlineEditingControl, layout: "
|
|
2546
|
+
"inline-editing": { component: InlineEditingControl, layout: "custom", propTypeUtil: escapedHtmlPropTypeUtil },
|
|
2522
2547
|
email: { component: EmailFormActionControl, layout: "custom", propTypeUtil: emailsPropTypeUtil },
|
|
2523
2548
|
"date-range": {
|
|
2524
2549
|
component: DateRangeControl,
|
|
@@ -2884,7 +2909,7 @@ import * as React91 from "react";
|
|
|
2884
2909
|
import { useState as useState10 } from "react";
|
|
2885
2910
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
2886
2911
|
import { useActiveBreakpoint as useActiveBreakpoint2 } from "@elementor/editor-responsive";
|
|
2887
|
-
import { createLocation as
|
|
2912
|
+
import { createLocation as createLocation6 } from "@elementor/locations";
|
|
2888
2913
|
import { SessionStorageProvider as SessionStorageProvider2 } from "@elementor/session";
|
|
2889
2914
|
import { Box as Box8, Divider as Divider5, Stack as Stack13 } from "@elementor/ui";
|
|
2890
2915
|
|
|
@@ -3734,7 +3759,7 @@ var EffectsSection = () => {
|
|
|
3734
3759
|
import * as React62 from "react";
|
|
3735
3760
|
import { ControlFormLabel as ControlFormLabel2 } from "@elementor/editor-controls";
|
|
3736
3761
|
import { useParentElement } from "@elementor/editor-elements";
|
|
3737
|
-
import { createLocation as
|
|
3762
|
+
import { createLocation as createLocation4 } from "@elementor/locations";
|
|
3738
3763
|
import { __ as __39 } from "@wordpress/i18n";
|
|
3739
3764
|
|
|
3740
3765
|
// src/hooks/use-computed-style.ts
|
|
@@ -4941,7 +4966,7 @@ var WrapField = () => {
|
|
|
4941
4966
|
var DISPLAY_LABEL2 = __39("Display", "elementor");
|
|
4942
4967
|
var FLEX_WRAP_LABEL2 = __39("Flex wrap", "elementor");
|
|
4943
4968
|
var DEFAULT_PARENT_FLOW_DIRECTION = "row";
|
|
4944
|
-
var { Slot: GridFieldsSlot, inject: injectIntoGridFields } =
|
|
4969
|
+
var { Slot: GridFieldsSlot, inject: injectIntoGridFields } = createLocation4();
|
|
4945
4970
|
var LayoutSection = () => {
|
|
4946
4971
|
const { value: display } = useStylesField("display", {
|
|
4947
4972
|
history: { propDisplayName: DISPLAY_LABEL2 }
|
|
@@ -5757,8 +5782,25 @@ var STYLE_SECTION_NAMES = STYLE_SECTIONS.map((section) => section.name);
|
|
|
5757
5782
|
|
|
5758
5783
|
// src/components/style-tab-section.tsx
|
|
5759
5784
|
import * as React89 from "react";
|
|
5785
|
+
|
|
5786
|
+
// src/components/style-section-header-location.tsx
|
|
5787
|
+
import { createElement as createElement89 } from "react";
|
|
5788
|
+
import { createLocation as createLocation5 } from "@elementor/locations";
|
|
5789
|
+
var { Slot: StyleSectionHeaderSlot, inject: injectStyleSectionHeader } = createLocation5();
|
|
5790
|
+
var injectIntoStyleSectionHeader = ({ id, component, sections, options: options13 }) => {
|
|
5791
|
+
const filteredComponent = (props) => {
|
|
5792
|
+
if (sections && !sections.includes(props.sectionName)) {
|
|
5793
|
+
return null;
|
|
5794
|
+
}
|
|
5795
|
+
return createElement89(component, props);
|
|
5796
|
+
};
|
|
5797
|
+
injectStyleSectionHeader({ id, component: filteredComponent, options: options13 });
|
|
5798
|
+
};
|
|
5799
|
+
|
|
5800
|
+
// src/components/style-tab-section.tsx
|
|
5760
5801
|
var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
5761
5802
|
const { component, name, title, action } = section;
|
|
5803
|
+
const { element } = useElement();
|
|
5762
5804
|
const tabDefaults = useDefaultPanelSettings();
|
|
5763
5805
|
const SectionComponent = component || (() => /* @__PURE__ */ React89.createElement(React89.Fragment, null));
|
|
5764
5806
|
const isExpanded = tabDefaults.defaultSectionsExpanded.style?.includes(name);
|
|
@@ -5768,6 +5810,7 @@ var StyleTabSection = ({ section, fields = [], unmountOnExit = true }) => {
|
|
|
5768
5810
|
title,
|
|
5769
5811
|
defaultExpanded: isExpanded,
|
|
5770
5812
|
titleEnd: getStylesInheritanceIndicators(fields),
|
|
5813
|
+
titleActions: element ? /* @__PURE__ */ React89.createElement(StyleSectionHeaderSlot, { elementId: element.id, sectionName: name }) : void 0,
|
|
5771
5814
|
unmountOnExit,
|
|
5772
5815
|
action
|
|
5773
5816
|
},
|
|
@@ -5793,7 +5836,7 @@ var StyleSections = () => {
|
|
|
5793
5836
|
|
|
5794
5837
|
// src/components/style-tab.tsx
|
|
5795
5838
|
var TABS_HEADER_HEIGHT = "37px";
|
|
5796
|
-
var { Slot: StyleTabSlot, inject: injectIntoStyleTab } =
|
|
5839
|
+
var { Slot: StyleTabSlot, inject: injectIntoStyleTab } = createLocation6();
|
|
5797
5840
|
var stickyHeaderStyles = {
|
|
5798
5841
|
position: "sticky",
|
|
5799
5842
|
zIndex: 1100,
|
|
@@ -5924,7 +5967,7 @@ var resolveCurrentTab = ({
|
|
|
5924
5967
|
};
|
|
5925
5968
|
|
|
5926
5969
|
// src/components/editing-panel.tsx
|
|
5927
|
-
var { Slot: PanelHeaderTopSlot, inject: injectIntoPanelHeaderTop } =
|
|
5970
|
+
var { Slot: PanelHeaderTopSlot, inject: injectIntoPanelHeaderTop } = createLocation7();
|
|
5928
5971
|
var { useMenuItems } = controlActionsMenu;
|
|
5929
5972
|
var EditingPanel = () => {
|
|
5930
5973
|
const { element, elementType, settings } = useSelectedElementSettings();
|
|
@@ -5974,8 +6017,17 @@ function PseudoStateMenuItems({ states, activeState, onSelectState, onClose }) {
|
|
|
5974
6017
|
)));
|
|
5975
6018
|
}
|
|
5976
6019
|
|
|
6020
|
+
// src/components/custom-css-header-location.tsx
|
|
6021
|
+
import { createLocation as createLocation8 } from "@elementor/locations";
|
|
6022
|
+
var {
|
|
6023
|
+
Slot: CustomCssHeaderSlot,
|
|
6024
|
+
inject: injectIntoCustomCssHeader,
|
|
6025
|
+
useInjections: useCustomCssHeaderInjections
|
|
6026
|
+
} = createLocation8();
|
|
6027
|
+
|
|
5977
6028
|
// src/init.ts
|
|
5978
6029
|
import { injectIntoLogic } from "@elementor/editor";
|
|
6030
|
+
import { init as initEditorControls } from "@elementor/editor-controls";
|
|
5979
6031
|
import { registerPanel } from "@elementor/editor-panels";
|
|
5980
6032
|
import { blockCommand } from "@elementor/editor-v1-adapters";
|
|
5981
6033
|
|
|
@@ -8816,6 +8868,7 @@ var init3 = () => {
|
|
|
8816
8868
|
|
|
8817
8869
|
// src/init.ts
|
|
8818
8870
|
function init4() {
|
|
8871
|
+
initEditorControls();
|
|
8819
8872
|
registerPanel(panel);
|
|
8820
8873
|
blockV1Panel();
|
|
8821
8874
|
injectIntoLogic({
|
|
@@ -8840,6 +8893,7 @@ export {
|
|
|
8840
8893
|
ControlLabel,
|
|
8841
8894
|
ControlTypeContainer,
|
|
8842
8895
|
CreatableAutocomplete,
|
|
8896
|
+
CustomCssHeaderSlot,
|
|
8843
8897
|
CustomCssIndicator,
|
|
8844
8898
|
DEFAULT_PSEUDO_STATES,
|
|
8845
8899
|
EditingPanelTabs,
|
|
@@ -8875,9 +8929,12 @@ export {
|
|
|
8875
8929
|
init4 as init,
|
|
8876
8930
|
injectIntoClassSelectorActions,
|
|
8877
8931
|
injectIntoCssClassConvert,
|
|
8932
|
+
injectIntoCustomCssHeader,
|
|
8878
8933
|
injectIntoGridFields,
|
|
8879
8934
|
injectIntoPanelHeaderTop,
|
|
8935
|
+
injectIntoStyleSectionHeader,
|
|
8880
8936
|
injectIntoStyleTab,
|
|
8937
|
+
injectIntoStyleTabHeader,
|
|
8881
8938
|
isDynamicPropValue,
|
|
8882
8939
|
registerEditingPanelReplacement,
|
|
8883
8940
|
registerElementPanelDefaults,
|