@elementor/editor-components 4.0.0-552 → 4.0.0-564
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
- package/src/components/component-panel-header/component-panel-header.tsx +1 -1
- package/src/components/create-component-form/create-component-form.tsx +1 -0
- package/src/components/instance-editing-panel/instance-editing-panel.tsx +38 -36
- package/src/components/overridable-props/indicator.tsx +10 -7
- package/src/components/overridable-props/overridable-prop-form.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -1619,7 +1619,7 @@ function OverridablePropForm({ onSubmit, groups, currentValue, existingLabels =
|
|
|
1619
1619
|
}
|
|
1620
1620
|
onSubmit({ label: propLabel ?? "", group });
|
|
1621
1621
|
};
|
|
1622
|
-
return /* @__PURE__ */ React3.createElement(import_editor_ui2.Form, { onSubmit: handleSubmit }, /* @__PURE__ */ React3.createElement(import_ui3.Stack, { alignItems: "start", sx: { width: "268px", ...sx } }, /* @__PURE__ */ React3.createElement(
|
|
1622
|
+
return /* @__PURE__ */ React3.createElement(import_editor_ui2.Form, { onSubmit: handleSubmit, "data-testid": "overridable-prop-form" }, /* @__PURE__ */ React3.createElement(import_ui3.Stack, { alignItems: "start", sx: { width: "268px", ...sx } }, /* @__PURE__ */ React3.createElement(
|
|
1623
1623
|
import_ui3.Stack,
|
|
1624
1624
|
{
|
|
1625
1625
|
direction: "row",
|
|
@@ -2312,7 +2312,7 @@ var ComponentPanelHeader = () => {
|
|
|
2312
2312
|
properties_count: overridablePropsCount
|
|
2313
2313
|
});
|
|
2314
2314
|
};
|
|
2315
|
-
return /* @__PURE__ */ React10.createElement(import_ui10.Box,
|
|
2315
|
+
return /* @__PURE__ */ React10.createElement(import_ui10.Box, { "data-testid": "component-panel-header" }, /* @__PURE__ */ React10.createElement(import_editor_panels3.PanelHeader, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React10.createElement(import_ui10.Tooltip, { title: (0, import_i18n13.__)("Back", "elementor") }, /* @__PURE__ */ React10.createElement(import_ui10.IconButton, { size: "tiny", onClick: onBack, "aria-label": (0, import_i18n13.__)("Back", "elementor") }, /* @__PURE__ */ React10.createElement(import_icons7.ArrowLeftIcon, { fontSize: "tiny" }))), /* @__PURE__ */ React10.createElement(import_icons7.ComponentsFilledIcon, { fontSize: "tiny", stroke: "currentColor" }), /* @__PURE__ */ React10.createElement(
|
|
2316
2316
|
import_editor_ui6.EllipsisWithTooltip,
|
|
2317
2317
|
{
|
|
2318
2318
|
title: componentName,
|
|
@@ -3483,7 +3483,8 @@ function CreateComponentForm() {
|
|
|
3483
3483
|
open: element !== null,
|
|
3484
3484
|
onClose: cancelSave,
|
|
3485
3485
|
anchorReference: "anchorPosition",
|
|
3486
|
-
anchorPosition
|
|
3486
|
+
anchorPosition,
|
|
3487
|
+
"data-testid": "create-component-form"
|
|
3487
3488
|
},
|
|
3488
3489
|
element !== null && /* @__PURE__ */ React19.createElement(
|
|
3489
3490
|
Form2,
|
|
@@ -4448,7 +4449,7 @@ function InstanceEditingPanel() {
|
|
|
4448
4449
|
const isNonEmptyGroup = (group) => group !== null && group.props.length > 0;
|
|
4449
4450
|
const groups = overridableProps.groups.order.map((groupId) => overridableProps.groups.items[groupId] ?? null).filter(isNonEmptyGroup);
|
|
4450
4451
|
const isEmpty = groups.length === 0 || Object.keys(overridableProps.props).length === 0;
|
|
4451
|
-
return /* @__PURE__ */ React29.createElement(
|
|
4452
|
+
return /* @__PURE__ */ React29.createElement(import_ui22.Box, { "data-testid": "instance-editing-panel" }, /* @__PURE__ */ React29.createElement(
|
|
4452
4453
|
ComponentInstanceProvider,
|
|
4453
4454
|
{
|
|
4454
4455
|
componentId,
|
|
@@ -4457,7 +4458,7 @@ function InstanceEditingPanel() {
|
|
|
4457
4458
|
},
|
|
4458
4459
|
/* @__PURE__ */ React29.createElement(import_editor_panels4.PanelHeader, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React29.createElement(import_ui22.Stack, { direction: "row", alignItems: "center", flexGrow: 1, gap: 1, maxWidth: "100%" }, /* @__PURE__ */ React29.createElement(import_icons14.ComponentsIcon, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React29.createElement(import_editor_ui14.EllipsisWithTooltip, { title: component.name, as: import_editor_panels4.PanelHeaderTitle, sx: { flexGrow: 1 } }), canEdit && /* @__PURE__ */ React29.createElement(import_ui22.Tooltip, { title: panelTitle }, /* @__PURE__ */ React29.createElement(import_ui22.IconButton, { size: "tiny", onClick: handleEditComponent, "aria-label": panelTitle }, /* @__PURE__ */ React29.createElement(import_icons14.PencilIcon, { fontSize: "tiny" }))))),
|
|
4459
4460
|
/* @__PURE__ */ React29.createElement(import_editor_panels4.PanelBody, null, /* @__PURE__ */ React29.createElement(import_editor_controls4.ControlAdornmentsProvider, { items: (0, import_editor_editing_panel5.getFieldIndicators)("settings") }, isEmpty ? /* @__PURE__ */ React29.createElement(EmptyState2, { onEditComponent: handleEditComponent }) : /* @__PURE__ */ React29.createElement(import_ui22.Stack, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React29.createElement(React29.Fragment, { key: group.id + componentInstanceId }, /* @__PURE__ */ React29.createElement(OverridePropsGroup, { group }), /* @__PURE__ */ React29.createElement(import_ui22.Divider, null))))))
|
|
4460
|
-
);
|
|
4461
|
+
));
|
|
4461
4462
|
}
|
|
4462
4463
|
|
|
4463
4464
|
// src/components/overridable-props/overridable-prop-control.tsx
|
|
@@ -4679,14 +4680,17 @@ var Content = (0, import_ui23.styled)(import_ui23.Box)`
|
|
|
4679
4680
|
}
|
|
4680
4681
|
}
|
|
4681
4682
|
`;
|
|
4682
|
-
var Indicator2 = (0, import_react17.forwardRef)(({ isOpen, isOverridable, ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
|
4683
|
-
|
|
4683
|
+
var Indicator2 = (0, import_react17.forwardRef)(({ isOpen, isOverridable, ...props }, ref) => /* @__PURE__ */ React31.createElement(
|
|
4684
|
+
Content,
|
|
4684
4685
|
{
|
|
4685
|
-
|
|
4686
|
+
role: "button",
|
|
4687
|
+
ref,
|
|
4688
|
+
...props,
|
|
4689
|
+
className: isOpen || isOverridable ? "enlarged" : "",
|
|
4686
4690
|
"aria-label": isOverridable ? (0, import_i18n28.__)("Overridable property", "elementor") : (0, import_i18n28.__)("Make prop overridable", "elementor")
|
|
4687
4691
|
},
|
|
4688
|
-
isOverridable ? /* @__PURE__ */ React31.createElement(import_icons15.CheckIcon, { fontSize: SIZE2 }) : /* @__PURE__ */ React31.createElement(import_icons15.PlusIcon, { fontSize: SIZE2 })
|
|
4689
|
-
))
|
|
4692
|
+
/* @__PURE__ */ React31.createElement(IconContainer, { className: "icon" }, isOverridable ? /* @__PURE__ */ React31.createElement(import_icons15.CheckIcon, { fontSize: SIZE2 }) : /* @__PURE__ */ React31.createElement(import_icons15.PlusIcon, { fontSize: SIZE2 }))
|
|
4693
|
+
));
|
|
4690
4694
|
|
|
4691
4695
|
// src/components/overridable-props/overridable-prop-indicator.tsx
|
|
4692
4696
|
function OverridablePropIndicator() {
|