@elementor/editor-components 3.35.0-431 → 3.35.0-433
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 +343 -182
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +338 -173
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -22
- package/src/components/component-properties-panel/properties-group.tsx +1 -0
- package/src/components/component-properties-panel/property-item.tsx +3 -0
- package/src/components/consts.ts +1 -0
- package/src/components/instance-editing-panel/override-prop-control.tsx +125 -51
- package/src/components/overridable-props/overridable-prop-control.tsx +16 -8
- package/src/components/overridable-props/overridable-prop-form.tsx +35 -4
- package/src/components/overridable-props/overridable-prop-indicator.tsx +9 -4
- package/src/components/overridable-props/utils/validate-prop-label.ts +38 -0
- package/src/init.ts +2 -1
- package/src/prop-types/component-instance-overrides-prop-type.ts +2 -0
- package/src/prop-types/component-overridable-prop-type.ts +3 -1
- package/src/provider/overridable-prop-context.tsx +5 -1
- package/src/store/actions/update-overridable-prop.ts +5 -2
- package/src/types.ts +1 -1
- package/src/utils/get-prop-type-for-component-override.ts +2 -1
- package/src/utils/resolve-override-prop-value.ts +51 -0
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import { __registerPanel as registerPanel } from "@elementor/editor-panels";
|
|
|
17
17
|
import { stylesRepository } from "@elementor/editor-styles-repository";
|
|
18
18
|
import { registerDataHook as registerDataHook2 } from "@elementor/editor-v1-adapters";
|
|
19
19
|
import { __registerSlice as registerSlice } from "@elementor/store";
|
|
20
|
-
import { __ as
|
|
20
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
21
21
|
|
|
22
22
|
// src/component-instance-transformer.ts
|
|
23
23
|
import { createTransformer } from "@elementor/editor-canvas";
|
|
@@ -356,7 +356,7 @@ import { getV1DocumentsManager as getV1DocumentsManager3 } from "@elementor/edit
|
|
|
356
356
|
import { ArrowLeftIcon, ComponentsFilledIcon } from "@elementor/icons";
|
|
357
357
|
import { __getState as getState9 } from "@elementor/store";
|
|
358
358
|
import { Box as Box7, Divider as Divider2, IconButton as IconButton4, Stack as Stack6, Tooltip as Tooltip3, Typography as Typography6 } from "@elementor/ui";
|
|
359
|
-
import { __ as
|
|
359
|
+
import { __ as __12 } from "@wordpress/i18n";
|
|
360
360
|
|
|
361
361
|
// src/hooks/use-navigate-back.ts
|
|
362
362
|
import { useCallback } from "react";
|
|
@@ -440,7 +440,7 @@ import { useSelectedElement } from "@elementor/editor-elements";
|
|
|
440
440
|
import { __createPanel as createPanel, Panel } from "@elementor/editor-panels";
|
|
441
441
|
import { ThemeProvider } from "@elementor/editor-ui";
|
|
442
442
|
import { Alert, Box as Box5, ErrorBoundary } from "@elementor/ui";
|
|
443
|
-
import { __ as
|
|
443
|
+
import { __ as __10 } from "@wordpress/i18n";
|
|
444
444
|
|
|
445
445
|
// src/components/component-properties-panel/component-properties-panel-content.tsx
|
|
446
446
|
import * as React7 from "react";
|
|
@@ -450,7 +450,7 @@ import { PanelBody, PanelHeader, PanelHeaderTitle } from "@elementor/editor-pane
|
|
|
450
450
|
import { ComponentPropListIcon as ComponentPropListIcon2, FolderPlusIcon, XIcon as XIcon2 } from "@elementor/icons";
|
|
451
451
|
import { Divider, IconButton as IconButton3, List as List2, Stack as Stack5, Tooltip as Tooltip2 } from "@elementor/ui";
|
|
452
452
|
import { generateUniqueId as generateUniqueId2 } from "@elementor/utils";
|
|
453
|
-
import { __ as
|
|
453
|
+
import { __ as __9 } from "@wordpress/i18n";
|
|
454
454
|
|
|
455
455
|
// src/store/actions/add-overridable-group.ts
|
|
456
456
|
import { __dispatch as dispatch, __getState as getState2 } from "@elementor/store";
|
|
@@ -914,7 +914,7 @@ import {
|
|
|
914
914
|
Typography as Typography5,
|
|
915
915
|
usePopupState as usePopupState2
|
|
916
916
|
} from "@elementor/ui";
|
|
917
|
-
import { __ as
|
|
917
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
918
918
|
|
|
919
919
|
// src/components/component-properties-panel/property-item.tsx
|
|
920
920
|
import * as React5 from "react";
|
|
@@ -927,18 +927,55 @@ import * as React3 from "react";
|
|
|
927
927
|
import { useState as useState2 } from "react";
|
|
928
928
|
import { Form, MenuListItem } from "@elementor/editor-ui";
|
|
929
929
|
import { Button as Button2, FormLabel, Grid, Select, Stack as Stack3, TextField, Typography as Typography3 } from "@elementor/ui";
|
|
930
|
+
import { __ as __5 } from "@wordpress/i18n";
|
|
931
|
+
|
|
932
|
+
// src/components/overridable-props/utils/validate-prop-label.ts
|
|
930
933
|
import { __ as __4 } from "@wordpress/i18n";
|
|
934
|
+
var ERROR_MESSAGES = {
|
|
935
|
+
EMPTY_NAME: __4("Property name is required", "elementor"),
|
|
936
|
+
DUPLICATE_NAME: __4("Property name already exists", "elementor")
|
|
937
|
+
};
|
|
938
|
+
function validatePropLabel(label, existingLabels, currentLabel) {
|
|
939
|
+
const trimmedLabel = label.trim();
|
|
940
|
+
if (!trimmedLabel) {
|
|
941
|
+
return { isValid: false, errorMessage: ERROR_MESSAGES.EMPTY_NAME };
|
|
942
|
+
}
|
|
943
|
+
const normalizedLabel = trimmedLabel.toLowerCase();
|
|
944
|
+
const normalizedCurrentLabel = currentLabel?.trim().toLowerCase();
|
|
945
|
+
const isDuplicate = existingLabels.some((existingLabel) => {
|
|
946
|
+
const normalizedExisting = existingLabel.trim().toLowerCase();
|
|
947
|
+
if (normalizedCurrentLabel && normalizedExisting === normalizedCurrentLabel) {
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
return normalizedExisting === normalizedLabel;
|
|
951
|
+
});
|
|
952
|
+
if (isDuplicate) {
|
|
953
|
+
return { isValid: false, errorMessage: ERROR_MESSAGES.DUPLICATE_NAME };
|
|
954
|
+
}
|
|
955
|
+
return { isValid: true, errorMessage: null };
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
// src/components/overridable-props/overridable-prop-form.tsx
|
|
931
959
|
var SIZE = "tiny";
|
|
932
|
-
var DEFAULT_GROUP = { value: null, label:
|
|
933
|
-
function OverridablePropForm({ onSubmit, groups, currentValue, sx }) {
|
|
960
|
+
var DEFAULT_GROUP = { value: null, label: __5("Default", "elementor") };
|
|
961
|
+
function OverridablePropForm({ onSubmit, groups, currentValue, existingLabels = [], sx }) {
|
|
934
962
|
const [propLabel, setPropLabel] = useState2(currentValue?.label ?? null);
|
|
935
963
|
const [group, setGroup] = useState2(currentValue?.groupId ?? groups?.[0]?.value ?? null);
|
|
936
|
-
const
|
|
937
|
-
const
|
|
964
|
+
const [error, setError] = useState2(null);
|
|
965
|
+
const name = __5("Name", "elementor");
|
|
966
|
+
const groupName = __5("Group Name", "elementor");
|
|
938
967
|
const isCreate = currentValue === void 0;
|
|
939
|
-
const title = isCreate ?
|
|
940
|
-
const ctaLabel = isCreate ?
|
|
941
|
-
|
|
968
|
+
const title = isCreate ? __5("Create new property", "elementor") : __5("Update property", "elementor");
|
|
969
|
+
const ctaLabel = isCreate ? __5("Create", "elementor") : __5("Update", "elementor");
|
|
970
|
+
const handleSubmit = () => {
|
|
971
|
+
const validationResult = validatePropLabel(propLabel ?? "", existingLabels, currentValue?.label);
|
|
972
|
+
if (!validationResult.isValid) {
|
|
973
|
+
setError(validationResult.errorMessage);
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
976
|
+
onSubmit({ label: propLabel ?? "", group });
|
|
977
|
+
};
|
|
978
|
+
return /* @__PURE__ */ React3.createElement(Form, { onSubmit: handleSubmit }, /* @__PURE__ */ React3.createElement(Stack3, { alignItems: "start", sx: { width: "268px", ...sx } }, /* @__PURE__ */ React3.createElement(
|
|
942
979
|
Stack3,
|
|
943
980
|
{
|
|
944
981
|
direction: "row",
|
|
@@ -954,9 +991,20 @@ function OverridablePropForm({ onSubmit, groups, currentValue, sx }) {
|
|
|
954
991
|
name,
|
|
955
992
|
size: SIZE,
|
|
956
993
|
fullWidth: true,
|
|
957
|
-
placeholder:
|
|
994
|
+
placeholder: __5("Enter value", "elementor"),
|
|
958
995
|
value: propLabel ?? "",
|
|
959
|
-
onChange: (e) =>
|
|
996
|
+
onChange: (e) => {
|
|
997
|
+
const newValue = e.target.value;
|
|
998
|
+
setPropLabel(newValue);
|
|
999
|
+
const validationResult = validatePropLabel(
|
|
1000
|
+
newValue,
|
|
1001
|
+
existingLabels,
|
|
1002
|
+
currentValue?.label
|
|
1003
|
+
);
|
|
1004
|
+
setError(validationResult.errorMessage);
|
|
1005
|
+
},
|
|
1006
|
+
error: Boolean(error),
|
|
1007
|
+
helperText: error
|
|
960
1008
|
}
|
|
961
1009
|
))), /* @__PURE__ */ React3.createElement(Grid, { container: true, gap: 0.75, alignItems: "start", px: 1.5, mb: 1.5 }, /* @__PURE__ */ React3.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React3.createElement(FormLabel, { size: "tiny" }, groupName)), /* @__PURE__ */ React3.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React3.createElement(
|
|
962
1010
|
Select,
|
|
@@ -976,7 +1024,17 @@ function OverridablePropForm({ onSubmit, groups, currentValue, sx }) {
|
|
|
976
1024
|
}
|
|
977
1025
|
},
|
|
978
1026
|
(groups ?? [DEFAULT_GROUP]).map(({ label: groupLabel, ...props }) => /* @__PURE__ */ React3.createElement(MenuListItem, { key: props.value, ...props, value: props.value ?? "" }, groupLabel))
|
|
979
|
-
))), /* @__PURE__ */ React3.createElement(Stack3, { direction: "row", justifyContent: "flex-end", alignSelf: "end", mt: 1.5, py: 1, px: 1.5 }, /* @__PURE__ */ React3.createElement(
|
|
1027
|
+
))), /* @__PURE__ */ React3.createElement(Stack3, { direction: "row", justifyContent: "flex-end", alignSelf: "end", mt: 1.5, py: 1, px: 1.5 }, /* @__PURE__ */ React3.createElement(
|
|
1028
|
+
Button2,
|
|
1029
|
+
{
|
|
1030
|
+
type: "submit",
|
|
1031
|
+
disabled: !propLabel || Boolean(error),
|
|
1032
|
+
variant: "contained",
|
|
1033
|
+
color: "primary",
|
|
1034
|
+
size: "small"
|
|
1035
|
+
},
|
|
1036
|
+
ctaLabel
|
|
1037
|
+
))));
|
|
980
1038
|
}
|
|
981
1039
|
|
|
982
1040
|
// src/components/component-properties-panel/sortable.tsx
|
|
@@ -1054,6 +1112,7 @@ function PropertyItem({
|
|
|
1054
1112
|
sortableTriggerProps,
|
|
1055
1113
|
isDragPlaceholder,
|
|
1056
1114
|
groups,
|
|
1115
|
+
existingLabels,
|
|
1057
1116
|
onDelete,
|
|
1058
1117
|
onUpdate
|
|
1059
1118
|
}) {
|
|
@@ -1129,6 +1188,7 @@ function PropertyItem({
|
|
|
1129
1188
|
onSubmit: handleSubmit,
|
|
1130
1189
|
currentValue: prop,
|
|
1131
1190
|
groups,
|
|
1191
|
+
existingLabels,
|
|
1132
1192
|
sx: { width: "100%" }
|
|
1133
1193
|
}
|
|
1134
1194
|
)
|
|
@@ -1239,7 +1299,7 @@ function PropertiesGroup({
|
|
|
1239
1299
|
className: "group-menu",
|
|
1240
1300
|
size: "tiny",
|
|
1241
1301
|
sx: { p: 0.25, visibility: isThisGroupEditing ? "visible" : void 0 },
|
|
1242
|
-
"aria-label":
|
|
1302
|
+
"aria-label": __6("Group actions", "elementor"),
|
|
1243
1303
|
...bindTrigger2(popupState)
|
|
1244
1304
|
},
|
|
1245
1305
|
/* @__PURE__ */ React6.createElement(DotsVerticalIcon, { fontSize: "tiny" })
|
|
@@ -1251,6 +1311,7 @@ function PropertiesGroup({
|
|
|
1251
1311
|
sortableTriggerProps: { ...triggerProps, style: triggerStyle },
|
|
1252
1312
|
isDragPlaceholder: isItemDragPlaceholder,
|
|
1253
1313
|
groups: allGroups,
|
|
1314
|
+
existingLabels: Object.values(props).map((p) => p.label),
|
|
1254
1315
|
onDelete: onPropertyDelete,
|
|
1255
1316
|
onUpdate: (data) => onPropertyUpdate(prop.overrideKey, data)
|
|
1256
1317
|
}
|
|
@@ -1262,11 +1323,11 @@ function PropertiesGroup({
|
|
|
1262
1323
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
1263
1324
|
transformOrigin: { vertical: "top", horizontal: "right" }
|
|
1264
1325
|
},
|
|
1265
|
-
/* @__PURE__ */ React6.createElement(MenuListItem2, { sx: { minWidth: "160px" }, onClick: handleRenameClick }, /* @__PURE__ */ React6.createElement(Typography5, { variant: "caption", sx: { color: "text.primary" } },
|
|
1326
|
+
/* @__PURE__ */ React6.createElement(MenuListItem2, { sx: { minWidth: "160px" }, onClick: handleRenameClick }, /* @__PURE__ */ React6.createElement(Typography5, { variant: "caption", sx: { color: "text.primary" } }, __6("Rename", "elementor"))),
|
|
1266
1327
|
/* @__PURE__ */ React6.createElement(
|
|
1267
1328
|
Tooltip,
|
|
1268
1329
|
{
|
|
1269
|
-
title: hasProperties ?
|
|
1330
|
+
title: hasProperties ? __6("To delete the group, first remove all the properties", "elementor") : "",
|
|
1270
1331
|
placement: "right"
|
|
1271
1332
|
},
|
|
1272
1333
|
/* @__PURE__ */ React6.createElement("span", null, /* @__PURE__ */ React6.createElement(MenuListItem2, { onClick: handleDeleteClick, disabled: hasProperties }, /* @__PURE__ */ React6.createElement(
|
|
@@ -1275,7 +1336,7 @@ function PropertiesGroup({
|
|
|
1275
1336
|
variant: "caption",
|
|
1276
1337
|
sx: { color: hasProperties ? "text.disabled" : "error.light" }
|
|
1277
1338
|
},
|
|
1278
|
-
|
|
1339
|
+
__6("Delete", "elementor")
|
|
1279
1340
|
)))
|
|
1280
1341
|
)
|
|
1281
1342
|
)
|
|
@@ -1286,7 +1347,7 @@ function PropertiesGroup({
|
|
|
1286
1347
|
import { useState as useState3 } from "react";
|
|
1287
1348
|
import { setDocumentModifiedStatus } from "@elementor/editor-documents";
|
|
1288
1349
|
import { useEditable } from "@elementor/editor-ui";
|
|
1289
|
-
import { __ as
|
|
1350
|
+
import { __ as __8 } from "@wordpress/i18n";
|
|
1290
1351
|
|
|
1291
1352
|
// src/store/actions/rename-overridable-group.ts
|
|
1292
1353
|
import { __dispatch as dispatch7, __getState as getState8 } from "@elementor/store";
|
|
@@ -1313,19 +1374,19 @@ function renameOverridableGroup({ componentId, groupId, label }) {
|
|
|
1313
1374
|
}
|
|
1314
1375
|
|
|
1315
1376
|
// src/components/component-properties-panel/utils/validate-group-label.ts
|
|
1316
|
-
import { __ as
|
|
1317
|
-
var
|
|
1318
|
-
EMPTY_NAME:
|
|
1319
|
-
DUPLICATE_NAME:
|
|
1377
|
+
import { __ as __7 } from "@wordpress/i18n";
|
|
1378
|
+
var ERROR_MESSAGES2 = {
|
|
1379
|
+
EMPTY_NAME: __7("Group name is required", "elementor"),
|
|
1380
|
+
DUPLICATE_NAME: __7("Group name already exists", "elementor")
|
|
1320
1381
|
};
|
|
1321
1382
|
function validateGroupLabel(label, existingGroups) {
|
|
1322
1383
|
const trimmedLabel = label.trim();
|
|
1323
1384
|
if (!trimmedLabel) {
|
|
1324
|
-
return
|
|
1385
|
+
return ERROR_MESSAGES2.EMPTY_NAME;
|
|
1325
1386
|
}
|
|
1326
1387
|
const isDuplicate = Object.values(existingGroups).some((group) => group.label === trimmedLabel);
|
|
1327
1388
|
if (isDuplicate) {
|
|
1328
|
-
return
|
|
1389
|
+
return ERROR_MESSAGES2.DUPLICATE_NAME;
|
|
1329
1390
|
}
|
|
1330
1391
|
return "";
|
|
1331
1392
|
}
|
|
@@ -1345,7 +1406,7 @@ function useCurrentEditableItem() {
|
|
|
1345
1406
|
};
|
|
1346
1407
|
const handleSubmit = (newLabel) => {
|
|
1347
1408
|
if (!editingGroupId || !currentComponentId) {
|
|
1348
|
-
throw new Error(
|
|
1409
|
+
throw new Error(__8("Group ID or component ID is missing", "elementor"));
|
|
1349
1410
|
}
|
|
1350
1411
|
renameOverridableGroup({
|
|
1351
1412
|
componentId: currentComponentId,
|
|
@@ -1453,20 +1514,20 @@ function ComponentPropertiesPanelContent({ onClose }) {
|
|
|
1453
1514
|
deleteOverridableGroup({ componentId: currentComponentId, groupId });
|
|
1454
1515
|
setDocumentModifiedStatus2(true);
|
|
1455
1516
|
};
|
|
1456
|
-
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(PanelHeader, { sx: { justifyContent: "start", pl: 1.5, pr: 1, py: 1 } }, /* @__PURE__ */ React7.createElement(Stack5, { direction: "row", alignItems: "center", gap: 0.5, flexGrow: 1 }, /* @__PURE__ */ React7.createElement(ComponentPropListIcon2, { fontSize: "tiny" }), /* @__PURE__ */ React7.createElement(PanelHeaderTitle, { variant: "subtitle2" },
|
|
1517
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(PanelHeader, { sx: { justifyContent: "start", pl: 1.5, pr: 1, py: 1 } }, /* @__PURE__ */ React7.createElement(Stack5, { direction: "row", alignItems: "center", gap: 0.5, flexGrow: 1 }, /* @__PURE__ */ React7.createElement(ComponentPropListIcon2, { fontSize: "tiny" }), /* @__PURE__ */ React7.createElement(PanelHeaderTitle, { variant: "subtitle2" }, __9("Component properties", "elementor"))), !showEmptyState && /* @__PURE__ */ React7.createElement(Tooltip2, { title: __9("Add new group", "elementor") }, /* @__PURE__ */ React7.createElement(
|
|
1457
1518
|
IconButton3,
|
|
1458
1519
|
{
|
|
1459
1520
|
size: "tiny",
|
|
1460
|
-
"aria-label":
|
|
1521
|
+
"aria-label": __9("Add new group", "elementor"),
|
|
1461
1522
|
onClick: handleAddGroupClick
|
|
1462
1523
|
},
|
|
1463
1524
|
/* @__PURE__ */ React7.createElement(FolderPlusIcon, { fontSize: "tiny" })
|
|
1464
|
-
)), /* @__PURE__ */ React7.createElement(Tooltip2, { title:
|
|
1525
|
+
)), /* @__PURE__ */ React7.createElement(Tooltip2, { title: __9("Close panel", "elementor") }, /* @__PURE__ */ React7.createElement(
|
|
1465
1526
|
IconButton3,
|
|
1466
1527
|
{
|
|
1467
1528
|
ref: introductionRef,
|
|
1468
1529
|
size: "tiny",
|
|
1469
|
-
"aria-label":
|
|
1530
|
+
"aria-label": __9("Close panel", "elementor"),
|
|
1470
1531
|
onClick: onClose
|
|
1471
1532
|
},
|
|
1472
1533
|
/* @__PURE__ */ React7.createElement(XIcon2, { fontSize: "tiny" })
|
|
@@ -1512,14 +1573,14 @@ function ComponentPropertiesPanel() {
|
|
|
1512
1573
|
}
|
|
1513
1574
|
)))));
|
|
1514
1575
|
}
|
|
1515
|
-
var ErrorBoundaryFallback = () => /* @__PURE__ */ React8.createElement(Box5, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React8.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React8.createElement("strong", null,
|
|
1576
|
+
var ErrorBoundaryFallback = () => /* @__PURE__ */ React8.createElement(Box5, { role: "alert", sx: { minHeight: "100%", p: 2 } }, /* @__PURE__ */ React8.createElement(Alert, { severity: "error", sx: { mb: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React8.createElement("strong", null, __10("Something went wrong", "elementor"))));
|
|
1516
1577
|
|
|
1517
1578
|
// src/components/component-panel-header/component-badge.tsx
|
|
1518
1579
|
import * as React9 from "react";
|
|
1519
1580
|
import { useEffect, useRef as useRef2 } from "react";
|
|
1520
1581
|
import { ComponentPropListIcon as ComponentPropListIcon3 } from "@elementor/icons";
|
|
1521
1582
|
import { Badge, Box as Box6, keyframes, styled as styled2, ToggleButton } from "@elementor/ui";
|
|
1522
|
-
import { __ as
|
|
1583
|
+
import { __ as __11 } from "@wordpress/i18n";
|
|
1523
1584
|
var ComponentsBadge = React9.forwardRef(
|
|
1524
1585
|
({ overridesCount, onClick }, ref) => {
|
|
1525
1586
|
const prevCount = usePrevious(overridesCount);
|
|
@@ -1541,7 +1602,7 @@ var ComponentsBadge = React9.forwardRef(
|
|
|
1541
1602
|
value: "overrides",
|
|
1542
1603
|
size: "tiny",
|
|
1543
1604
|
onClick,
|
|
1544
|
-
"aria-label":
|
|
1605
|
+
"aria-label": __11("View overrides", "elementor")
|
|
1545
1606
|
},
|
|
1546
1607
|
/* @__PURE__ */ React9.createElement(ComponentPropListIcon3, { fontSize: "tiny" })
|
|
1547
1608
|
)
|
|
@@ -1604,7 +1665,7 @@ var ComponentPanelHeader = () => {
|
|
|
1604
1665
|
justifyContent: "space-between",
|
|
1605
1666
|
sx: { height: 48, pl: 1.5, pr: 2, py: 1 }
|
|
1606
1667
|
},
|
|
1607
|
-
/* @__PURE__ */ React10.createElement(Stack6, { direction: "row", alignItems: "center" }, /* @__PURE__ */ React10.createElement(Tooltip3, { title:
|
|
1668
|
+
/* @__PURE__ */ React10.createElement(Stack6, { direction: "row", alignItems: "center" }, /* @__PURE__ */ React10.createElement(Tooltip3, { title: __12("Back", "elementor") }, /* @__PURE__ */ React10.createElement(IconButton4, { size: "tiny", onClick: onBack, "aria-label": __12("Back", "elementor") }, /* @__PURE__ */ React10.createElement(ArrowLeftIcon, { fontSize: "tiny" }))), /* @__PURE__ */ React10.createElement(Stack6, { direction: "row", alignItems: "center", gap: 0.5 }, /* @__PURE__ */ React10.createElement(ComponentsFilledIcon, { fontSize: "tiny", stroke: "currentColor" }), /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", sx: { fontWeight: 500 } }, componentName))),
|
|
1608
1669
|
/* @__PURE__ */ React10.createElement(ComponentsBadge, { overridesCount, ref: anchorRef, onClick: openPropertiesPanel })
|
|
1609
1670
|
), /* @__PURE__ */ React10.createElement(Divider2, null), /* @__PURE__ */ React10.createElement(
|
|
1610
1671
|
ComponentIntroduction,
|
|
@@ -1643,7 +1704,7 @@ var useComponents = () => {
|
|
|
1643
1704
|
import * as React12 from "react";
|
|
1644
1705
|
import { SearchIcon } from "@elementor/icons";
|
|
1645
1706
|
import { Box as Box8, InputAdornment, Stack as Stack7, TextField as TextField2 } from "@elementor/ui";
|
|
1646
|
-
import { __ as
|
|
1707
|
+
import { __ as __13 } from "@wordpress/i18n";
|
|
1647
1708
|
|
|
1648
1709
|
// src/components/components-tab/search-provider.tsx
|
|
1649
1710
|
import * as React11 from "react";
|
|
@@ -1678,7 +1739,7 @@ var ComponentSearch = () => {
|
|
|
1678
1739
|
fullWidth: true,
|
|
1679
1740
|
size: "tiny",
|
|
1680
1741
|
value: inputValue,
|
|
1681
|
-
placeholder:
|
|
1742
|
+
placeholder: __13("Search", "elementor"),
|
|
1682
1743
|
onChange: (e) => handleChange(e.target.value),
|
|
1683
1744
|
InputProps: {
|
|
1684
1745
|
startAdornment: /* @__PURE__ */ React12.createElement(InputAdornment, { position: "start" }, /* @__PURE__ */ React12.createElement(SearchIcon, { fontSize: "tiny" }))
|
|
@@ -1693,7 +1754,7 @@ import { useState as useState7 } from "react";
|
|
|
1693
1754
|
import { getAngieSdk } from "@elementor/editor-mcp";
|
|
1694
1755
|
import { AIIcon, ComponentsIcon as ComponentsIcon2 } from "@elementor/icons";
|
|
1695
1756
|
import { Box as Box11, Button as Button4, Divider as Divider3, Link as Link3, List as List3, Stack as Stack10, Typography as Typography9 } from "@elementor/ui";
|
|
1696
|
-
import { __ as
|
|
1757
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1697
1758
|
|
|
1698
1759
|
// src/store/actions/rename-component.ts
|
|
1699
1760
|
import { getV1DocumentsManager as getV1DocumentsManager4, setDocumentModifiedStatus as setDocumentModifiedStatus3 } from "@elementor/editor-documents";
|
|
@@ -1706,7 +1767,7 @@ import {
|
|
|
1706
1767
|
} from "@elementor/editor-canvas";
|
|
1707
1768
|
import { getCurrentDocument } from "@elementor/editor-documents";
|
|
1708
1769
|
import { __getState as getState11 } from "@elementor/store";
|
|
1709
|
-
import { __ as
|
|
1770
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
1710
1771
|
|
|
1711
1772
|
// src/utils/tracking.ts
|
|
1712
1773
|
import { getMixpanel } from "@elementor/mixpanel";
|
|
@@ -1859,7 +1920,7 @@ function createComponentView(options) {
|
|
|
1859
1920
|
action: {
|
|
1860
1921
|
name: "edit component",
|
|
1861
1922
|
icon: "eicon-edit",
|
|
1862
|
-
title: () =>
|
|
1923
|
+
title: () => __14("Edit Component", "elementor"),
|
|
1863
1924
|
isEnabled: () => true,
|
|
1864
1925
|
callback: (_, eventData) => this.editComponent(eventData)
|
|
1865
1926
|
}
|
|
@@ -2020,7 +2081,7 @@ import {
|
|
|
2020
2081
|
Infotip,
|
|
2021
2082
|
Typography as Typography7
|
|
2022
2083
|
} from "@elementor/ui";
|
|
2023
|
-
import { __ as
|
|
2084
|
+
import { __ as __15 } from "@wordpress/i18n";
|
|
2024
2085
|
var ANGIE_INSTALL_URL = "/wp-admin/plugin-install.php?tab=plugin-information&plugin=angie";
|
|
2025
2086
|
var PLACEHOLDER_IMAGE_URL = "https://assets.elementor.com/packages/v1/images/components-angie-promo.svg";
|
|
2026
2087
|
var AngiePromotionModal = ({ children, open, onClose }) => {
|
|
@@ -2034,7 +2095,7 @@ function AngiePromotionCard({ onClose }) {
|
|
|
2034
2095
|
return /* @__PURE__ */ React13.createElement(ClickAwayListener, { disableReactTree: true, mouseEvent: "onMouseDown", touchEvent: "onTouchStart", onClickAway: onClose }, /* @__PURE__ */ React13.createElement(Card, { elevation: 0, sx: { maxWidth: 296 } }, /* @__PURE__ */ React13.createElement(
|
|
2035
2096
|
CardHeader,
|
|
2036
2097
|
{
|
|
2037
|
-
title:
|
|
2098
|
+
title: __15("Add new component with AI", "elementor"),
|
|
2038
2099
|
titleTypographyProps: { variant: "subtitle2" },
|
|
2039
2100
|
action: /* @__PURE__ */ React13.createElement(CloseButton, { slotProps: { icon: { fontSize: "tiny" } }, onClick: onClose })
|
|
2040
2101
|
}
|
|
@@ -2046,10 +2107,10 @@ function AngiePromotionCard({ onClose }) {
|
|
|
2046
2107
|
alt: "",
|
|
2047
2108
|
sx: { width: "100%", aspectRatio: "16 / 9" }
|
|
2048
2109
|
}
|
|
2049
|
-
), /* @__PURE__ */ React13.createElement(CardContent, null, /* @__PURE__ */ React13.createElement(Typography7, { variant: "body2", color: "text.secondary" },
|
|
2110
|
+
), /* @__PURE__ */ React13.createElement(CardContent, null, /* @__PURE__ */ React13.createElement(Typography7, { variant: "body2", color: "text.secondary" }, __15(
|
|
2050
2111
|
"Angie our AI assistant can easily create new components and save you the hassle of doing it yourself",
|
|
2051
2112
|
"elementor"
|
|
2052
|
-
))), /* @__PURE__ */ React13.createElement(CardActions, { sx: { justifyContent: "flex-end" } }, /* @__PURE__ */ React13.createElement(Button3, { size: "medium", variant: "contained", color: "accent", onClick: handleCtaClick },
|
|
2113
|
+
))), /* @__PURE__ */ React13.createElement(CardActions, { sx: { justifyContent: "flex-end" } }, /* @__PURE__ */ React13.createElement(Button3, { size: "medium", variant: "contained", color: "accent", onClick: handleCtaClick }, __15("Get Angie", "elementor")))));
|
|
2053
2114
|
}
|
|
2054
2115
|
|
|
2055
2116
|
// src/components/components-tab/components-item.tsx
|
|
@@ -2072,17 +2133,17 @@ import {
|
|
|
2072
2133
|
Typography as Typography8,
|
|
2073
2134
|
usePopupState as usePopupState3
|
|
2074
2135
|
} from "@elementor/ui";
|
|
2075
|
-
import { __ as
|
|
2136
|
+
import { __ as __19 } from "@wordpress/i18n";
|
|
2076
2137
|
|
|
2077
2138
|
// src/store/actions/archive-component.ts
|
|
2078
2139
|
import { setDocumentModifiedStatus as setDocumentModifiedStatus4 } from "@elementor/editor-documents";
|
|
2079
2140
|
import { notify } from "@elementor/editor-notifications";
|
|
2080
2141
|
import { __dispatch as dispatch9 } from "@elementor/store";
|
|
2081
|
-
import { __ as
|
|
2142
|
+
import { __ as __16 } from "@wordpress/i18n";
|
|
2082
2143
|
var successNotification = (componentId, componentName) => ({
|
|
2083
2144
|
type: "success",
|
|
2084
2145
|
/* translators: %s: component name */
|
|
2085
|
-
message:
|
|
2146
|
+
message: __16("Successfully deleted component %s", "elementor").replace("%s", componentName),
|
|
2086
2147
|
id: `success-archived-components-notification-${componentId}`
|
|
2087
2148
|
});
|
|
2088
2149
|
var archiveComponent = (componentId, componentName) => {
|
|
@@ -2204,14 +2265,14 @@ import { __getState as getState14 } from "@elementor/store";
|
|
|
2204
2265
|
|
|
2205
2266
|
// src/components/create-component-form/utils/component-form-schema.ts
|
|
2206
2267
|
import { z } from "@elementor/schema";
|
|
2207
|
-
import { __ as
|
|
2268
|
+
import { __ as __17 } from "@wordpress/i18n";
|
|
2208
2269
|
var MIN_NAME_LENGTH = 2;
|
|
2209
2270
|
var MAX_NAME_LENGTH = 50;
|
|
2210
|
-
var baseComponentSchema = z.string().trim().max(MAX_NAME_LENGTH,
|
|
2271
|
+
var baseComponentSchema = z.string().trim().max(MAX_NAME_LENGTH, __17("Component name is too long. Please keep it under 50 characters.", "elementor"));
|
|
2211
2272
|
var createBaseComponentSchema = (existingNames) => {
|
|
2212
2273
|
return z.object({
|
|
2213
2274
|
componentName: baseComponentSchema.refine((value) => !existingNames.includes(value), {
|
|
2214
|
-
message:
|
|
2275
|
+
message: __17("Component name already exists", "elementor")
|
|
2215
2276
|
})
|
|
2216
2277
|
});
|
|
2217
2278
|
};
|
|
@@ -2219,9 +2280,9 @@ var createSubmitComponentSchema = (existingNames) => {
|
|
|
2219
2280
|
const baseSchema = createBaseComponentSchema(existingNames);
|
|
2220
2281
|
return baseSchema.extend({
|
|
2221
2282
|
componentName: baseSchema.shape.componentName.refine((value) => value.length > 0, {
|
|
2222
|
-
message:
|
|
2283
|
+
message: __17("Component name is required.", "elementor")
|
|
2223
2284
|
}).refine((value) => value.length >= MIN_NAME_LENGTH, {
|
|
2224
|
-
message:
|
|
2285
|
+
message: __17("Component name is too short. Please enter at least 2 characters.", "elementor")
|
|
2225
2286
|
})
|
|
2226
2287
|
});
|
|
2227
2288
|
};
|
|
@@ -2319,9 +2380,9 @@ var createComponentModel2 = (component) => {
|
|
|
2319
2380
|
// src/components/components-tab/delete-confirmation-dialog.tsx
|
|
2320
2381
|
import * as React14 from "react";
|
|
2321
2382
|
import { ConfirmationDialog } from "@elementor/editor-ui";
|
|
2322
|
-
import { __ as
|
|
2383
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
2323
2384
|
function DeleteConfirmationDialog({ open, onClose, onConfirm }) {
|
|
2324
|
-
return /* @__PURE__ */ React14.createElement(ConfirmationDialog, { open, onClose }, /* @__PURE__ */ React14.createElement(ConfirmationDialog.Title, null,
|
|
2385
|
+
return /* @__PURE__ */ React14.createElement(ConfirmationDialog, { open, onClose }, /* @__PURE__ */ React14.createElement(ConfirmationDialog.Title, null, __18("Delete this component?", "elementor")), /* @__PURE__ */ React14.createElement(ConfirmationDialog.Content, null, /* @__PURE__ */ React14.createElement(ConfirmationDialog.ContentText, null, __18(
|
|
2325
2386
|
"Existing instances on your pages will remain functional. You will no longer find this component in your list.",
|
|
2326
2387
|
"elementor"
|
|
2327
2388
|
))), /* @__PURE__ */ React14.createElement(ConfirmationDialog.Actions, { onClose, onConfirm }));
|
|
@@ -2449,9 +2510,9 @@ var ComponentItem = ({ component, renameComponent: renameComponent2 }) => {
|
|
|
2449
2510
|
openEditMode();
|
|
2450
2511
|
}
|
|
2451
2512
|
},
|
|
2452
|
-
|
|
2513
|
+
__19("Rename", "elementor")
|
|
2453
2514
|
),
|
|
2454
|
-
/* @__PURE__ */ React15.createElement(MenuListItem3, { sx: { minWidth: "160px" }, onClick: handleDeleteClick }, /* @__PURE__ */ React15.createElement(Typography8, { variant: "caption", sx: { color: "error.light" } },
|
|
2515
|
+
/* @__PURE__ */ React15.createElement(MenuListItem3, { sx: { minWidth: "160px" }, onClick: handleDeleteClick }, /* @__PURE__ */ React15.createElement(Typography8, { variant: "caption", sx: { color: "error.light" } }, __19("Delete", "elementor")))
|
|
2455
2516
|
), /* @__PURE__ */ React15.createElement(
|
|
2456
2517
|
DeleteConfirmationDialog,
|
|
2457
2518
|
{
|
|
@@ -2577,7 +2638,7 @@ var EmptyState = () => {
|
|
|
2577
2638
|
const sdk = getAngieSdk();
|
|
2578
2639
|
if (sdk.isAngieReady()) {
|
|
2579
2640
|
sdk.triggerAngie({
|
|
2580
|
-
prompt:
|
|
2641
|
+
prompt: __20(
|
|
2581
2642
|
"Create a [hero/testimonial/product card/CTA/feature] component for my [business type]. Include [describe what you want]",
|
|
2582
2643
|
"elementor"
|
|
2583
2644
|
),
|
|
@@ -2597,7 +2658,7 @@ var EmptyState = () => {
|
|
|
2597
2658
|
gap: 2,
|
|
2598
2659
|
overflow: "hidden"
|
|
2599
2660
|
},
|
|
2600
|
-
/* @__PURE__ */ React17.createElement(Stack10, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React17.createElement(ComponentsIcon2, { fontSize: "large", sx: { color: "text.secondary" } }), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX },
|
|
2661
|
+
/* @__PURE__ */ React17.createElement(Stack10, { alignItems: "center", gap: 1 }, /* @__PURE__ */ React17.createElement(ComponentsIcon2, { fontSize: "large", sx: { color: "text.secondary" } }), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, __20("No components yet", "elementor")), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "secondary", sx: { maxWidth: 200 } }, __20("Components are reusable blocks that sync across your site.", "elementor"), /* @__PURE__ */ React17.createElement("br", null), __20("Create once, use everywhere.", "elementor")), /* @__PURE__ */ React17.createElement(
|
|
2601
2662
|
Link3,
|
|
2602
2663
|
{
|
|
2603
2664
|
href: LEARN_MORE_URL,
|
|
@@ -2606,13 +2667,13 @@ var EmptyState = () => {
|
|
|
2606
2667
|
variant: "caption",
|
|
2607
2668
|
color: "info.main"
|
|
2608
2669
|
},
|
|
2609
|
-
|
|
2670
|
+
__20("Learn more about components", "elementor")
|
|
2610
2671
|
)),
|
|
2611
2672
|
/* @__PURE__ */ React17.createElement(Divider3, { sx: { width: "100%" } }),
|
|
2612
|
-
/* @__PURE__ */ React17.createElement(Stack10, { alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX },
|
|
2673
|
+
/* @__PURE__ */ React17.createElement(Stack10, { alignItems: "center", gap: 1, width: "100%" }, /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "subtitle2", color: "text.secondary", sx: SUBTITLE_OVERRIDE_SX }, __20("Create your first one:", "elementor")), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "secondary", sx: { maxWidth: 228 } }, __20(
|
|
2613
2674
|
'Right-click any div-block or flexbox on your canvas or structure and select "Create component"',
|
|
2614
2675
|
"elementor"
|
|
2615
|
-
)), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "secondary" },
|
|
2676
|
+
)), /* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "secondary" }, __20("Or", "elementor")), /* @__PURE__ */ React17.createElement(AngiePromotionModal, { open: isAngieModalOpen, onClose: () => setIsAngieModalOpen(false) }, /* @__PURE__ */ React17.createElement(
|
|
2616
2677
|
Button4,
|
|
2617
2678
|
{
|
|
2618
2679
|
color: "secondary",
|
|
@@ -2621,7 +2682,7 @@ var EmptyState = () => {
|
|
|
2621
2682
|
onClick: handleCreateWithAI,
|
|
2622
2683
|
endIcon: /* @__PURE__ */ React17.createElement(AIIcon, null)
|
|
2623
2684
|
},
|
|
2624
|
-
|
|
2685
|
+
__20("Create component with AI", "elementor")
|
|
2625
2686
|
)))
|
|
2626
2687
|
);
|
|
2627
2688
|
};
|
|
@@ -2645,7 +2706,7 @@ var EmptySearchResult = () => {
|
|
|
2645
2706
|
width: "100%"
|
|
2646
2707
|
}
|
|
2647
2708
|
},
|
|
2648
|
-
/* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "subtitle2", color: "inherit", sx: SUBTITLE_OVERRIDE_SX },
|
|
2709
|
+
/* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "subtitle2", color: "inherit", sx: SUBTITLE_OVERRIDE_SX }, __20("Sorry, nothing matched", "elementor")),
|
|
2649
2710
|
searchValue && /* @__PURE__ */ React17.createElement(
|
|
2650
2711
|
Typography9,
|
|
2651
2712
|
{
|
|
@@ -2673,8 +2734,8 @@ var EmptySearchResult = () => {
|
|
|
2673
2734
|
/* @__PURE__ */ React17.createElement("span", null, "\u201D.")
|
|
2674
2735
|
)
|
|
2675
2736
|
),
|
|
2676
|
-
/* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "inherit" },
|
|
2677
|
-
/* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "inherit" }, /* @__PURE__ */ React17.createElement(Link3, { color: "secondary", variant: "caption", component: "button", onClick: clearSearch },
|
|
2737
|
+
/* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "inherit" }, __20("Try something else.", "elementor")),
|
|
2738
|
+
/* @__PURE__ */ React17.createElement(Typography9, { align: "center", variant: "caption", color: "inherit" }, /* @__PURE__ */ React17.createElement(Link3, { color: "secondary", variant: "caption", component: "button", onClick: clearSearch }, __20("Clear & try again", "elementor")))
|
|
2678
2739
|
);
|
|
2679
2740
|
};
|
|
2680
2741
|
var useFilteredComponents = () => {
|
|
@@ -2701,6 +2762,7 @@ var Components = () => {
|
|
|
2701
2762
|
|
|
2702
2763
|
// src/components/consts.ts
|
|
2703
2764
|
var COMPONENT_DOCUMENT_TYPE = "elementor_component";
|
|
2765
|
+
var OVERRIDABLE_PROP_REPLACEMENT_ID = "overridable-prop";
|
|
2704
2766
|
|
|
2705
2767
|
// src/components/create-component-form/create-component-form.tsx
|
|
2706
2768
|
import * as React19 from "react";
|
|
@@ -2711,7 +2773,7 @@ import { Form as FormElement, ThemeProvider as ThemeProvider3 } from "@elementor
|
|
|
2711
2773
|
import { ComponentsIcon as ComponentsIcon3 } from "@elementor/icons";
|
|
2712
2774
|
import { __getState as getState15 } from "@elementor/store";
|
|
2713
2775
|
import { Button as Button5, FormLabel as FormLabel2, Grid as Grid2, Popover as Popover3, Stack as Stack11, TextField as TextField3, Typography as Typography10 } from "@elementor/ui";
|
|
2714
|
-
import { __ as
|
|
2776
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
2715
2777
|
|
|
2716
2778
|
// src/prevent-non-atomic-nesting.ts
|
|
2717
2779
|
import { isAtomicWidget } from "@elementor/editor-canvas";
|
|
@@ -2719,10 +2781,10 @@ import { getAllDescendants as getAllDescendants2, getElementType } from "@elemen
|
|
|
2719
2781
|
import { notify as notify2 } from "@elementor/editor-notifications";
|
|
2720
2782
|
import { blockCommand } from "@elementor/editor-v1-adapters";
|
|
2721
2783
|
import { __getStore as getStore } from "@elementor/store";
|
|
2722
|
-
import { __ as
|
|
2784
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
2723
2785
|
var NON_ATOMIC_ELEMENT_ALERT = {
|
|
2724
2786
|
type: "default",
|
|
2725
|
-
message:
|
|
2787
|
+
message: __21("This widget isn't compatible with components. Use atomic elements instead.", "elementor"),
|
|
2726
2788
|
id: "non-atomic-element-blocked"
|
|
2727
2789
|
};
|
|
2728
2790
|
function initNonAtomicNestingPrevention() {
|
|
@@ -2942,7 +3004,7 @@ function CreateComponentForm() {
|
|
|
2942
3004
|
if (nonAtomicElements.length > 0) {
|
|
2943
3005
|
notify3({
|
|
2944
3006
|
type: "default",
|
|
2945
|
-
message:
|
|
3007
|
+
message: __22(
|
|
2946
3008
|
"Components require atomic elements only. Remove widgets to create this component.",
|
|
2947
3009
|
"elementor"
|
|
2948
3010
|
),
|
|
@@ -2981,12 +3043,12 @@ function CreateComponentForm() {
|
|
|
2981
3043
|
}
|
|
2982
3044
|
notify3({
|
|
2983
3045
|
type: "success",
|
|
2984
|
-
message:
|
|
3046
|
+
message: __22("Component created successfully.", "elementor"),
|
|
2985
3047
|
id: `component-saved-successfully-${uid}`
|
|
2986
3048
|
});
|
|
2987
3049
|
resetAndClosePopup();
|
|
2988
3050
|
} catch {
|
|
2989
|
-
const errorMessage =
|
|
3051
|
+
const errorMessage = __22("Failed to create component. Please try again.", "elementor");
|
|
2990
3052
|
notify3({
|
|
2991
3053
|
type: "error",
|
|
2992
3054
|
message: errorMessage,
|
|
@@ -3049,10 +3111,10 @@ var Form2 = ({
|
|
|
3049
3111
|
}
|
|
3050
3112
|
};
|
|
3051
3113
|
const texts = {
|
|
3052
|
-
heading:
|
|
3053
|
-
name:
|
|
3054
|
-
cancel:
|
|
3055
|
-
create:
|
|
3114
|
+
heading: __22("Create component", "elementor"),
|
|
3115
|
+
name: __22("Name", "elementor"),
|
|
3116
|
+
cancel: __22("Cancel", "elementor"),
|
|
3117
|
+
create: __22("Create", "elementor")
|
|
3056
3118
|
};
|
|
3057
3119
|
const nameInputId = "component-name";
|
|
3058
3120
|
return /* @__PURE__ */ React19.createElement(FormElement, { onSubmit: handleSubmit }, /* @__PURE__ */ React19.createElement(Stack11, { alignItems: "start", width: "268px" }, /* @__PURE__ */ React19.createElement(
|
|
@@ -3108,7 +3170,7 @@ function updateCurrentComponent({
|
|
|
3108
3170
|
import * as React20 from "react";
|
|
3109
3171
|
import { useEffect as useEffect4 } from "react";
|
|
3110
3172
|
import { createPortal } from "react-dom";
|
|
3111
|
-
import { __ as
|
|
3173
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
3112
3174
|
|
|
3113
3175
|
// src/hooks/use-canvas-document.ts
|
|
3114
3176
|
import { getCanvasIframeDocument } from "@elementor/editor-canvas";
|
|
@@ -3230,7 +3292,7 @@ function Backdrop({ canvas, element, onClose }) {
|
|
|
3230
3292
|
onKeyDown: handleKeyDown,
|
|
3231
3293
|
role: "button",
|
|
3232
3294
|
tabIndex: 0,
|
|
3233
|
-
"aria-label":
|
|
3295
|
+
"aria-label": __23("Exit component editing mode", "elementor")
|
|
3234
3296
|
}
|
|
3235
3297
|
);
|
|
3236
3298
|
}
|
|
@@ -3361,29 +3423,29 @@ import * as React22 from "react";
|
|
|
3361
3423
|
import { closeDialog, openDialog } from "@elementor/editor-ui";
|
|
3362
3424
|
import { InfoCircleFilledIcon } from "@elementor/icons";
|
|
3363
3425
|
import { Box as Box12, Button as Button6, DialogActions, DialogContent, DialogHeader, Icon, Stack as Stack12, Typography as Typography11 } from "@elementor/ui";
|
|
3364
|
-
import { __ as
|
|
3426
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
3365
3427
|
var openEditModeDialog = (lockedBy) => {
|
|
3366
3428
|
openDialog({
|
|
3367
3429
|
component: /* @__PURE__ */ React22.createElement(EditModeDialog, { lockedBy })
|
|
3368
3430
|
});
|
|
3369
3431
|
};
|
|
3370
3432
|
var EditModeDialog = ({ lockedBy }) => {
|
|
3371
|
-
const content =
|
|
3372
|
-
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React22.createElement(Box12, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React22.createElement(Icon, { color: "secondary" }, /* @__PURE__ */ React22.createElement(InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React22.createElement(Typography11, { variant: "subtitle1" }, content))), /* @__PURE__ */ React22.createElement(DialogContent, null, /* @__PURE__ */ React22.createElement(Stack12, { spacing: 2, direction: "column" }, /* @__PURE__ */ React22.createElement(Typography11, { variant: "body2" },
|
|
3433
|
+
const content = __24("%s is currently editing this document", "elementor").replace("%s", lockedBy);
|
|
3434
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(DialogHeader, { logo: false }, /* @__PURE__ */ React22.createElement(Box12, { display: "flex", alignItems: "center", gap: 1 }, /* @__PURE__ */ React22.createElement(Icon, { color: "secondary" }, /* @__PURE__ */ React22.createElement(InfoCircleFilledIcon, { fontSize: "medium" })), /* @__PURE__ */ React22.createElement(Typography11, { variant: "subtitle1" }, content))), /* @__PURE__ */ React22.createElement(DialogContent, null, /* @__PURE__ */ React22.createElement(Stack12, { spacing: 2, direction: "column" }, /* @__PURE__ */ React22.createElement(Typography11, { variant: "body2" }, __24(
|
|
3373
3435
|
"You can wait for them to finish or reach out to coordinate your changes together.",
|
|
3374
3436
|
"elementor"
|
|
3375
|
-
)), /* @__PURE__ */ React22.createElement(DialogActions, null, /* @__PURE__ */ React22.createElement(Button6, { color: "secondary", variant: "contained", onClick: closeDialog },
|
|
3437
|
+
)), /* @__PURE__ */ React22.createElement(DialogActions, null, /* @__PURE__ */ React22.createElement(Button6, { color: "secondary", variant: "contained", onClick: closeDialog }, __24("Close", "elementor"))))));
|
|
3376
3438
|
};
|
|
3377
3439
|
|
|
3378
3440
|
// src/components/instance-editing-panel/instance-editing-panel.tsx
|
|
3379
|
-
import * as
|
|
3441
|
+
import * as React28 from "react";
|
|
3380
3442
|
import { ControlAdornmentsProvider } from "@elementor/editor-controls";
|
|
3381
3443
|
import { getFieldIndicators } from "@elementor/editor-editing-panel";
|
|
3382
3444
|
import { useSelectedElement as useSelectedElement2 } from "@elementor/editor-elements";
|
|
3383
3445
|
import { PanelBody as PanelBody2, PanelHeader as PanelHeader2, PanelHeaderTitle as PanelHeaderTitle2 } from "@elementor/editor-panels";
|
|
3384
3446
|
import { ComponentsIcon as ComponentsIcon4, PencilIcon as PencilIcon2 } from "@elementor/icons";
|
|
3385
3447
|
import { IconButton as IconButton6, Stack as Stack17, Tooltip as Tooltip4 } from "@elementor/ui";
|
|
3386
|
-
import { __ as
|
|
3448
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
3387
3449
|
|
|
3388
3450
|
// src/hooks/use-component-instance-settings.ts
|
|
3389
3451
|
import { useElement } from "@elementor/editor-editing-panel";
|
|
@@ -3452,7 +3514,7 @@ function useComponentInstanceSettings() {
|
|
|
3452
3514
|
import * as React23 from "react";
|
|
3453
3515
|
import { ComponentPropListIcon as ComponentPropListIcon4, PencilIcon } from "@elementor/icons";
|
|
3454
3516
|
import { Button as Button7, Stack as Stack13, Typography as Typography12 } from "@elementor/ui";
|
|
3455
|
-
import { __ as
|
|
3517
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
3456
3518
|
var EmptyState2 = ({ onEditComponent }) => {
|
|
3457
3519
|
return /* @__PURE__ */ React23.createElement(
|
|
3458
3520
|
Stack13,
|
|
@@ -3465,30 +3527,35 @@ var EmptyState2 = ({ onEditComponent }) => {
|
|
|
3465
3527
|
gap: 1.5
|
|
3466
3528
|
},
|
|
3467
3529
|
/* @__PURE__ */ React23.createElement(ComponentPropListIcon4, { fontSize: "large" }),
|
|
3468
|
-
/* @__PURE__ */ React23.createElement(Typography12, { align: "center", variant: "subtitle2" },
|
|
3469
|
-
/* @__PURE__ */ React23.createElement(Typography12, { align: "center", variant: "caption", maxWidth: "170px" },
|
|
3530
|
+
/* @__PURE__ */ React23.createElement(Typography12, { align: "center", variant: "subtitle2" }, __25("No properties yet", "elementor")),
|
|
3531
|
+
/* @__PURE__ */ React23.createElement(Typography12, { align: "center", variant: "caption", maxWidth: "170px" }, __25(
|
|
3470
3532
|
"Edit the component to add properties, manage them or update the design across all instances.",
|
|
3471
3533
|
"elementor"
|
|
3472
3534
|
)),
|
|
3473
|
-
/* @__PURE__ */ React23.createElement(Button7, { variant: "outlined", color: "secondary", size: "small", sx: { mt: 1 }, onClick: onEditComponent }, /* @__PURE__ */ React23.createElement(PencilIcon, { fontSize: "small" }),
|
|
3535
|
+
/* @__PURE__ */ React23.createElement(Button7, { variant: "outlined", color: "secondary", size: "small", sx: { mt: 1 }, onClick: onEditComponent }, /* @__PURE__ */ React23.createElement(PencilIcon, { fontSize: "small" }), __25("Edit component", "elementor"))
|
|
3474
3536
|
);
|
|
3475
3537
|
};
|
|
3476
3538
|
|
|
3477
3539
|
// src/components/instance-editing-panel/override-props-group.tsx
|
|
3478
|
-
import * as
|
|
3540
|
+
import * as React27 from "react";
|
|
3479
3541
|
import { useId } from "react";
|
|
3480
3542
|
import { useStateByElement } from "@elementor/editor-editing-panel";
|
|
3481
3543
|
import { CollapseIcon } from "@elementor/editor-ui";
|
|
3482
3544
|
import { Box as Box13, Collapse, ListItemButton as ListItemButton3, ListItemText, Stack as Stack16 } from "@elementor/ui";
|
|
3483
3545
|
|
|
3484
3546
|
// src/components/instance-editing-panel/override-prop-control.tsx
|
|
3485
|
-
import * as
|
|
3486
|
-
import { PropKeyProvider, PropProvider, useBoundProp } from "@elementor/editor-controls";
|
|
3547
|
+
import * as React26 from "react";
|
|
3548
|
+
import { ControlReplacementsProvider, PropKeyProvider, PropProvider, useBoundProp } from "@elementor/editor-controls";
|
|
3487
3549
|
import {
|
|
3550
|
+
BaseControl,
|
|
3488
3551
|
controlsRegistry,
|
|
3489
3552
|
createTopLevelObjectType,
|
|
3490
|
-
|
|
3553
|
+
ElementProvider as ElementProvider2,
|
|
3554
|
+
getControlReplacements,
|
|
3555
|
+
SettingsField,
|
|
3556
|
+
useElement as useElement2
|
|
3491
3557
|
} from "@elementor/editor-editing-panel";
|
|
3558
|
+
import { getElementType as getElementType3 } from "@elementor/editor-elements";
|
|
3492
3559
|
import { Stack as Stack15 } from "@elementor/ui";
|
|
3493
3560
|
|
|
3494
3561
|
// src/hooks/use-controls-by-widget-type.ts
|
|
@@ -3522,8 +3589,51 @@ function getControlsByBind(controls) {
|
|
|
3522
3589
|
);
|
|
3523
3590
|
}
|
|
3524
3591
|
|
|
3592
|
+
// src/provider/overridable-prop-context.tsx
|
|
3593
|
+
import * as React24 from "react";
|
|
3594
|
+
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
3595
|
+
var OverridablePropContext = createContext2(null);
|
|
3596
|
+
function OverridablePropProvider({ children, ...props }) {
|
|
3597
|
+
return /* @__PURE__ */ React24.createElement(OverridablePropContext.Provider, { value: props }, children);
|
|
3598
|
+
}
|
|
3599
|
+
var useOverridablePropValue = () => useContext2(OverridablePropContext)?.value;
|
|
3600
|
+
var useComponentInstanceElement = () => useContext2(OverridablePropContext)?.componentInstanceElement;
|
|
3601
|
+
|
|
3525
3602
|
// src/store/actions/update-overridable-prop.ts
|
|
3526
3603
|
import { __dispatch as dispatch13, __getState as getState16 } from "@elementor/store";
|
|
3604
|
+
|
|
3605
|
+
// src/utils/resolve-override-prop-value.ts
|
|
3606
|
+
var resolveOverridePropValue = (originalPropValue) => {
|
|
3607
|
+
const isOverridable = componentOverridablePropTypeUtil.isValid(originalPropValue);
|
|
3608
|
+
if (isOverridable) {
|
|
3609
|
+
return getOverridableValue(originalPropValue);
|
|
3610
|
+
}
|
|
3611
|
+
const isOverride = componentInstanceOverridePropTypeUtil.isValid(originalPropValue);
|
|
3612
|
+
if (isOverride) {
|
|
3613
|
+
return getOverrideValue(originalPropValue);
|
|
3614
|
+
}
|
|
3615
|
+
return originalPropValue;
|
|
3616
|
+
};
|
|
3617
|
+
function getOverridableValue(overridableProp) {
|
|
3618
|
+
const overridableValue = componentOverridablePropTypeUtil.extract(overridableProp);
|
|
3619
|
+
if (!overridableValue) {
|
|
3620
|
+
return null;
|
|
3621
|
+
}
|
|
3622
|
+
const isOverride = componentInstanceOverridePropTypeUtil.isValid(overridableValue.origin_value);
|
|
3623
|
+
if (isOverride) {
|
|
3624
|
+
return getOverrideValue(overridableValue.origin_value);
|
|
3625
|
+
}
|
|
3626
|
+
return overridableValue.origin_value;
|
|
3627
|
+
}
|
|
3628
|
+
function getOverrideValue(overrideProp) {
|
|
3629
|
+
const overrideValue = componentInstanceOverridePropTypeUtil.extract(overrideProp);
|
|
3630
|
+
if (!overrideValue) {
|
|
3631
|
+
return null;
|
|
3632
|
+
}
|
|
3633
|
+
return overrideValue.override_value;
|
|
3634
|
+
}
|
|
3635
|
+
|
|
3636
|
+
// src/store/actions/update-overridable-prop.ts
|
|
3527
3637
|
function updateOverridableProp(componentId, propValue, originPropFields) {
|
|
3528
3638
|
const overridableProps = selectOverridableProps(getState16(), componentId);
|
|
3529
3639
|
if (!overridableProps) {
|
|
@@ -3533,11 +3643,12 @@ function updateOverridableProp(componentId, propValue, originPropFields) {
|
|
|
3533
3643
|
if (!existingOverridableProp) {
|
|
3534
3644
|
return;
|
|
3535
3645
|
}
|
|
3646
|
+
const originValue = resolveOverridePropValue(propValue.origin_value);
|
|
3536
3647
|
const newOverridableProp = originPropFields ? {
|
|
3537
|
-
originValue
|
|
3648
|
+
originValue,
|
|
3538
3649
|
originPropFields
|
|
3539
3650
|
} : {
|
|
3540
|
-
originValue
|
|
3651
|
+
originValue
|
|
3541
3652
|
};
|
|
3542
3653
|
const newOverridableProps = {
|
|
3543
3654
|
...overridableProps,
|
|
@@ -3563,11 +3674,12 @@ var getPropTypeForComponentOverride = (overridableProp) => {
|
|
|
3563
3674
|
if (overridableProp.originPropFields) {
|
|
3564
3675
|
return getPropType(overridableProp.originPropFields);
|
|
3565
3676
|
}
|
|
3566
|
-
const { elType, widgetType, propKey } = overridableProp;
|
|
3677
|
+
const { elType, widgetType, propKey, elementId } = overridableProp;
|
|
3567
3678
|
return getPropType({
|
|
3568
3679
|
elType,
|
|
3569
3680
|
widgetType,
|
|
3570
|
-
propKey
|
|
3681
|
+
propKey,
|
|
3682
|
+
elementId
|
|
3571
3683
|
});
|
|
3572
3684
|
};
|
|
3573
3685
|
function getPropType({ widgetType, propKey }) {
|
|
@@ -3576,23 +3688,25 @@ function getPropType({ widgetType, propKey }) {
|
|
|
3576
3688
|
}
|
|
3577
3689
|
|
|
3578
3690
|
// src/components/control-label.tsx
|
|
3579
|
-
import * as
|
|
3691
|
+
import * as React25 from "react";
|
|
3580
3692
|
import { ControlAdornments, ControlFormLabel } from "@elementor/editor-controls";
|
|
3581
3693
|
import { Stack as Stack14 } from "@elementor/ui";
|
|
3582
3694
|
var ControlLabel = ({ children, ...props }) => {
|
|
3583
|
-
return /* @__PURE__ */
|
|
3695
|
+
return /* @__PURE__ */ React25.createElement(Stack14, { direction: "row", alignItems: "center", justifyItems: "start", gap: 0.25 }, /* @__PURE__ */ React25.createElement(ControlFormLabel, { ...props }, children), /* @__PURE__ */ React25.createElement(ControlAdornments, null));
|
|
3584
3696
|
};
|
|
3585
3697
|
|
|
3586
3698
|
// src/components/instance-editing-panel/override-prop-control.tsx
|
|
3587
3699
|
function OverridePropControl({ overridableProp, overrides }) {
|
|
3588
|
-
return /* @__PURE__ */
|
|
3700
|
+
return /* @__PURE__ */ React26.createElement(SettingsField, { bind: "component_instance", propDisplayName: overridableProp.label }, /* @__PURE__ */ React26.createElement(OverrideControl, { overridableProp, overrides }));
|
|
3589
3701
|
}
|
|
3590
3702
|
function OverrideControl({ overridableProp, overrides }) {
|
|
3703
|
+
const componentInstanceElement = useElement2();
|
|
3591
3704
|
const componentId = useCurrentComponentId();
|
|
3592
3705
|
const { value: instanceValue, setValue: setInstanceValue } = useBoundProp(componentInstancePropTypeUtil);
|
|
3593
3706
|
const controls = useControlsByWidgetType(
|
|
3594
3707
|
overridableProp?.originPropFields?.widgetType ?? overridableProp.widgetType
|
|
3595
3708
|
);
|
|
3709
|
+
const controlReplacements = getControlReplacements();
|
|
3596
3710
|
const propType = getPropTypeForComponentOverride(overridableProp);
|
|
3597
3711
|
if (!propType) {
|
|
3598
3712
|
return null;
|
|
@@ -3607,13 +3721,18 @@ function OverrideControl({ overridableProp, overrides }) {
|
|
|
3607
3721
|
throw new Error("Component ID is required");
|
|
3608
3722
|
}
|
|
3609
3723
|
const matchingOverride = getMatchingOverride(overrides, overridableProp.overrideKey);
|
|
3610
|
-
const propValue = matchingOverride ?
|
|
3724
|
+
const propValue = matchingOverride ? resolveOverridePropValue(matchingOverride) : overridableProp.originValue;
|
|
3611
3725
|
const value = {
|
|
3612
3726
|
[overridableProp.overrideKey]: propValue
|
|
3613
3727
|
};
|
|
3614
3728
|
const setValue = (newValue) => {
|
|
3615
3729
|
const newPropValue = newValue[overridableProp.overrideKey];
|
|
3616
|
-
const newOverrideValue = createOverrideValue(
|
|
3730
|
+
const newOverrideValue = createOverrideValue({
|
|
3731
|
+
matchingOverride,
|
|
3732
|
+
overrideKey: overridableProp.overrideKey,
|
|
3733
|
+
overrideValue: newPropValue,
|
|
3734
|
+
componentId: componentInstanceId
|
|
3735
|
+
});
|
|
3617
3736
|
let newOverrides = overrides?.map((override) => override === matchingOverride ? newOverrideValue : override) ?? [];
|
|
3618
3737
|
if (!matchingOverride) {
|
|
3619
3738
|
newOverrides = [...newOverrides, newOverrideValue];
|
|
@@ -3628,33 +3747,41 @@ function OverrideControl({ overridableProp, overrides }) {
|
|
|
3628
3747
|
updateOverridableProp(componentId, overridableValue, overridableProp.originPropFields);
|
|
3629
3748
|
return;
|
|
3630
3749
|
}
|
|
3631
|
-
const { elType, widgetType, propKey } = overridableProp;
|
|
3632
|
-
updateOverridableProp(componentId, overridableValue, { elType, widgetType, propKey });
|
|
3750
|
+
const { elType: elType2, widgetType: widgetType2, propKey: propKey2, elementId: elementId2 } = overridableProp;
|
|
3751
|
+
updateOverridableProp(componentId, overridableValue, { elType: elType2, widgetType: widgetType2, propKey: propKey2, elementId: elementId2 });
|
|
3633
3752
|
}
|
|
3634
3753
|
};
|
|
3635
|
-
|
|
3636
|
-
|
|
3754
|
+
const { control, controlProps, layout } = getControlParams(
|
|
3755
|
+
controls,
|
|
3756
|
+
overridableProp?.originPropFields ?? overridableProp,
|
|
3757
|
+
overridableProp.label
|
|
3758
|
+
);
|
|
3759
|
+
const { elementId, widgetType, elType, propKey } = overridableProp.originPropFields ?? overridableProp;
|
|
3760
|
+
const type = elType === "widget" ? widgetType : elType;
|
|
3761
|
+
const elementType = getElementType3(type);
|
|
3762
|
+
if (!elementType) {
|
|
3763
|
+
return null;
|
|
3764
|
+
}
|
|
3765
|
+
return /* @__PURE__ */ React26.createElement(
|
|
3766
|
+
OverridablePropProvider,
|
|
3637
3767
|
{
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
setValue,
|
|
3641
|
-
isDisabled: () => {
|
|
3642
|
-
return false;
|
|
3643
|
-
}
|
|
3768
|
+
value: componentOverridablePropTypeUtil.extract(matchingOverride) ?? void 0,
|
|
3769
|
+
componentInstanceElement
|
|
3644
3770
|
},
|
|
3645
|
-
/* @__PURE__ */
|
|
3771
|
+
/* @__PURE__ */ React26.createElement(ElementProvider2, { element: { id: elementId, type }, elementType }, /* @__PURE__ */ React26.createElement(SettingsField, { bind: propKey, propDisplayName: overridableProp.label }, /* @__PURE__ */ React26.createElement(
|
|
3772
|
+
PropProvider,
|
|
3773
|
+
{
|
|
3774
|
+
propType: propTypeSchema,
|
|
3775
|
+
value,
|
|
3776
|
+
setValue,
|
|
3777
|
+
isDisabled: () => {
|
|
3778
|
+
return false;
|
|
3779
|
+
}
|
|
3780
|
+
},
|
|
3781
|
+
/* @__PURE__ */ React26.createElement(PropKeyProvider, { bind: overridableProp.overrideKey }, /* @__PURE__ */ React26.createElement(ControlReplacementsProvider, { replacements: controlReplacements }, /* @__PURE__ */ React26.createElement(Stack15, { direction: "column", gap: 1, mb: 1.5 }, layout !== "custom" && /* @__PURE__ */ React26.createElement(ControlLabel, null, overridableProp.label), /* @__PURE__ */ React26.createElement(OriginalControl, { control, controlProps }))))
|
|
3782
|
+
)))
|
|
3646
3783
|
);
|
|
3647
3784
|
}
|
|
3648
|
-
function getPropValue(value) {
|
|
3649
|
-
const overridableValue = componentOverridablePropTypeUtil.extract(value);
|
|
3650
|
-
if (overridableValue) {
|
|
3651
|
-
return value;
|
|
3652
|
-
}
|
|
3653
|
-
if (componentInstanceOverridePropTypeUtil.isValid(value)) {
|
|
3654
|
-
return value.value.override_value;
|
|
3655
|
-
}
|
|
3656
|
-
return null;
|
|
3657
|
-
}
|
|
3658
3785
|
function getMatchingOverride(overrides, overrideKey) {
|
|
3659
3786
|
return overrides?.find((override) => {
|
|
3660
3787
|
const overridableValue = componentOverridablePropTypeUtil.extract(override);
|
|
@@ -3667,19 +3794,26 @@ function getMatchingOverride(overrides, overrideKey) {
|
|
|
3667
3794
|
return comparedOverrideKey === overrideKey;
|
|
3668
3795
|
}) ?? null;
|
|
3669
3796
|
}
|
|
3670
|
-
function createOverrideValue(
|
|
3671
|
-
|
|
3672
|
-
|
|
3797
|
+
function createOverrideValue({
|
|
3798
|
+
matchingOverride,
|
|
3799
|
+
overrideKey,
|
|
3800
|
+
overrideValue,
|
|
3801
|
+
componentId
|
|
3802
|
+
}) {
|
|
3803
|
+
const overridableValue = componentOverridablePropTypeUtil.extract(matchingOverride);
|
|
3804
|
+
const newOverridableValue = componentOverridablePropTypeUtil.extract(overrideValue);
|
|
3805
|
+
const anyOverridable = newOverridableValue ?? overridableValue;
|
|
3806
|
+
if (anyOverridable) {
|
|
3673
3807
|
const innerOverride = componentInstanceOverridePropTypeUtil.create({
|
|
3674
3808
|
override_key: overrideKey,
|
|
3675
|
-
override_value:
|
|
3809
|
+
override_value: resolveOverridePropValue(overrideValue),
|
|
3676
3810
|
schema_source: {
|
|
3677
3811
|
type: "component",
|
|
3678
3812
|
id: componentId
|
|
3679
3813
|
}
|
|
3680
3814
|
});
|
|
3681
3815
|
return componentOverridablePropTypeUtil.create({
|
|
3682
|
-
override_key:
|
|
3816
|
+
override_key: anyOverridable.override_key,
|
|
3683
3817
|
origin_value: innerOverride
|
|
3684
3818
|
});
|
|
3685
3819
|
}
|
|
@@ -3692,10 +3826,41 @@ function createOverrideValue(overrideKey, overrideValue, componentId) {
|
|
|
3692
3826
|
}
|
|
3693
3827
|
});
|
|
3694
3828
|
}
|
|
3695
|
-
function
|
|
3696
|
-
const
|
|
3697
|
-
const
|
|
3698
|
-
|
|
3829
|
+
function getControlParams(controls, originPropFields, label) {
|
|
3830
|
+
const control = controls[originPropFields.propKey];
|
|
3831
|
+
const { value } = control;
|
|
3832
|
+
const layout = getControlLayout(control);
|
|
3833
|
+
const controlProps = populateChildControlProps(value.props);
|
|
3834
|
+
if (layout === "custom") {
|
|
3835
|
+
controlProps.label = label ?? value.label;
|
|
3836
|
+
}
|
|
3837
|
+
return {
|
|
3838
|
+
control,
|
|
3839
|
+
controlProps,
|
|
3840
|
+
layout
|
|
3841
|
+
};
|
|
3842
|
+
}
|
|
3843
|
+
function OriginalControl({ control, controlProps }) {
|
|
3844
|
+
const { value } = control;
|
|
3845
|
+
return /* @__PURE__ */ React26.createElement(BaseControl, { type: value.type, props: controlProps });
|
|
3846
|
+
}
|
|
3847
|
+
function getControlLayout(control) {
|
|
3848
|
+
return control.value.meta?.layout || controlsRegistry.getLayout(control.value.type);
|
|
3849
|
+
}
|
|
3850
|
+
function populateChildControlProps(props) {
|
|
3851
|
+
if (props.childControlType) {
|
|
3852
|
+
const childComponent = controlsRegistry.get(props.childControlType);
|
|
3853
|
+
const childPropType = controlsRegistry.getPropTypeUtil(props.childControlType);
|
|
3854
|
+
props = {
|
|
3855
|
+
...props,
|
|
3856
|
+
childControlConfig: {
|
|
3857
|
+
component: childComponent,
|
|
3858
|
+
props: props.childControlProps || {},
|
|
3859
|
+
propTypeUtil: childPropType
|
|
3860
|
+
}
|
|
3861
|
+
};
|
|
3862
|
+
}
|
|
3863
|
+
return props;
|
|
3699
3864
|
}
|
|
3700
3865
|
|
|
3701
3866
|
// src/components/instance-editing-panel/override-props-group.tsx
|
|
@@ -3708,7 +3873,7 @@ function OverridePropsGroup({ group, props, overrides }) {
|
|
|
3708
3873
|
const labelId = `label-${id2}`;
|
|
3709
3874
|
const contentId = `content-${id2}`;
|
|
3710
3875
|
const title = group.label;
|
|
3711
|
-
return /* @__PURE__ */
|
|
3876
|
+
return /* @__PURE__ */ React27.createElement(Box13, { "aria-label": `${title} section` }, /* @__PURE__ */ React27.createElement(
|
|
3712
3877
|
ListItemButton3,
|
|
3713
3878
|
{
|
|
3714
3879
|
id: labelId,
|
|
@@ -3718,7 +3883,7 @@ function OverridePropsGroup({ group, props, overrides }) {
|
|
|
3718
3883
|
p: 0,
|
|
3719
3884
|
sx: { "&:hover": { backgroundColor: "transparent" } }
|
|
3720
3885
|
},
|
|
3721
|
-
/* @__PURE__ */
|
|
3886
|
+
/* @__PURE__ */ React27.createElement(Stack16, { direction: "row", alignItems: "center", justifyItems: "start", flexGrow: 1, gap: 0.5 }, /* @__PURE__ */ React27.createElement(
|
|
3722
3887
|
ListItemText,
|
|
3723
3888
|
{
|
|
3724
3889
|
secondary: title,
|
|
@@ -3726,8 +3891,8 @@ function OverridePropsGroup({ group, props, overrides }) {
|
|
|
3726
3891
|
sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
|
|
3727
3892
|
}
|
|
3728
3893
|
)),
|
|
3729
|
-
/* @__PURE__ */
|
|
3730
|
-
), /* @__PURE__ */
|
|
3894
|
+
/* @__PURE__ */ React27.createElement(CollapseIcon, { open: isOpen, color: "secondary", fontSize: "tiny" })
|
|
3895
|
+
), /* @__PURE__ */ React27.createElement(Collapse, { id: contentId, "aria-labelledby": labelId, in: isOpen, timeout: "auto" }, /* @__PURE__ */ React27.createElement(Stack16, { direction: "column", gap: 1, p: 2 }, group.props.map((overrideKey) => /* @__PURE__ */ React27.createElement(
|
|
3731
3896
|
OverridePropControl,
|
|
3732
3897
|
{
|
|
3733
3898
|
key: overrideKey,
|
|
@@ -3748,12 +3913,12 @@ function InstanceEditingPanel() {
|
|
|
3748
3913
|
if (!componentId || !overridableProps || !component) {
|
|
3749
3914
|
return null;
|
|
3750
3915
|
}
|
|
3751
|
-
const panelTitle =
|
|
3916
|
+
const panelTitle = __26("Edit %s", "elementor").replace("%s", component.name);
|
|
3752
3917
|
const handleEditComponent = () => switchToComponent(componentId, componentInstanceId);
|
|
3753
3918
|
const isNonEmptyGroup = (group) => group !== null && group.props.length > 0;
|
|
3754
3919
|
const groups = overridableProps.groups.order.map((groupId) => overridableProps.groups.items[groupId] ?? null).filter(isNonEmptyGroup);
|
|
3755
3920
|
const isEmpty = groups.length === 0 || Object.keys(overridableProps.props).length === 0;
|
|
3756
|
-
return /* @__PURE__ */
|
|
3921
|
+
return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(PanelHeader2, { sx: { justifyContent: "start", px: 2 } }, /* @__PURE__ */ React28.createElement(Stack17, { direction: "row", alignContent: "space-between", flexGrow: 1 }, /* @__PURE__ */ React28.createElement(Stack17, { direction: "row", alignItems: "center", justifyContent: "start", gap: 1, flexGrow: 1 }, /* @__PURE__ */ React28.createElement(ComponentsIcon4, { fontSize: "small", sx: { color: "text.tertiary" } }), /* @__PURE__ */ React28.createElement(PanelHeaderTitle2, null, component.name)), /* @__PURE__ */ React28.createElement(Tooltip4, { title: panelTitle }, /* @__PURE__ */ React28.createElement(IconButton6, { size: "tiny", onClick: handleEditComponent, "aria-label": panelTitle }, /* @__PURE__ */ React28.createElement(PencilIcon2, { fontSize: "tiny" }))))), /* @__PURE__ */ React28.createElement(PanelBody2, null, /* @__PURE__ */ React28.createElement(ControlAdornmentsProvider, { items: getFieldIndicators("settings") }, isEmpty ? /* @__PURE__ */ React28.createElement(EmptyState2, { onEditComponent: handleEditComponent }) : /* @__PURE__ */ React28.createElement(Stack17, { direction: "column", alignItems: "stretch" }, groups.map((group) => /* @__PURE__ */ React28.createElement(
|
|
3757
3922
|
OverridePropsGroup,
|
|
3758
3923
|
{
|
|
3759
3924
|
key: group.id,
|
|
@@ -3766,27 +3931,19 @@ function InstanceEditingPanel() {
|
|
|
3766
3931
|
|
|
3767
3932
|
// src/components/overridable-props/overridable-prop-control.tsx
|
|
3768
3933
|
import * as React29 from "react";
|
|
3769
|
-
import { ControlReplacementsProvider, PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2, useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
3770
|
-
import { createTopLevelObjectType as createTopLevelObjectType2, useElement as
|
|
3771
|
-
|
|
3772
|
-
// src/provider/overridable-prop-context.tsx
|
|
3773
|
-
import * as React28 from "react";
|
|
3774
|
-
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
3775
|
-
var OverridablePropContext = createContext2(null);
|
|
3776
|
-
function OverridablePropProvider({ children, ...props }) {
|
|
3777
|
-
return /* @__PURE__ */ React28.createElement(OverridablePropContext.Provider, { value: props }, children);
|
|
3778
|
-
}
|
|
3779
|
-
var useOverridablePropValue = () => useContext2(OverridablePropContext)?.value;
|
|
3780
|
-
|
|
3781
|
-
// src/components/overridable-props/overridable-prop-control.tsx
|
|
3934
|
+
import { ControlReplacementsProvider as ControlReplacementsProvider2, PropKeyProvider as PropKeyProvider2, PropProvider as PropProvider2, useBoundProp as useBoundProp2 } from "@elementor/editor-controls";
|
|
3935
|
+
import { createTopLevelObjectType as createTopLevelObjectType2, getControlReplacements as getControlReplacements2, useElement as useElement3 } from "@elementor/editor-editing-panel";
|
|
3782
3936
|
function OverridablePropControl({
|
|
3783
|
-
OriginalControl,
|
|
3937
|
+
OriginalControl: OriginalControl2,
|
|
3784
3938
|
...props
|
|
3785
3939
|
}) {
|
|
3786
|
-
const { elementType } =
|
|
3940
|
+
const { elementType } = useElement3();
|
|
3787
3941
|
const { value, bind, setValue, placeholder, ...propContext } = useBoundProp2(componentOverridablePropTypeUtil);
|
|
3788
3942
|
const componentId = useCurrentComponentId();
|
|
3789
3943
|
const overridableProps = useOverridableProps(componentId);
|
|
3944
|
+
const filteredReplacements = getControlReplacements2().filter(
|
|
3945
|
+
(r) => !r.id || r.id !== OVERRIDABLE_PROP_REPLACEMENT_ID
|
|
3946
|
+
);
|
|
3790
3947
|
if (!componentId) {
|
|
3791
3948
|
return null;
|
|
3792
3949
|
}
|
|
@@ -3794,6 +3951,7 @@ function OverridablePropControl({
|
|
|
3794
3951
|
throw new Error("Override key is required");
|
|
3795
3952
|
}
|
|
3796
3953
|
const isComponentInstance2 = elementType.key === "e-component";
|
|
3954
|
+
const overridablePropData = overridableProps?.props?.[value.override_key];
|
|
3797
3955
|
const setOverridableValue = (newValue) => {
|
|
3798
3956
|
const propValue2 = {
|
|
3799
3957
|
...value,
|
|
@@ -3801,14 +3959,18 @@ function OverridablePropControl({
|
|
|
3801
3959
|
};
|
|
3802
3960
|
setValue(propValue2);
|
|
3803
3961
|
if (!isComponentInstance2) {
|
|
3804
|
-
|
|
3805
|
-
updateOverridableProp(componentId, propValue2, existingProp?.originPropFields);
|
|
3962
|
+
updateOverridableProp(componentId, propValue2, overridablePropData?.originPropFields);
|
|
3806
3963
|
}
|
|
3807
3964
|
};
|
|
3808
3965
|
const defaultPropType = elementType.propsSchema[bind];
|
|
3966
|
+
const overridePropType = overridablePropData ? getPropTypeForComponentOverride(overridablePropData) : void 0;
|
|
3967
|
+
const resolvedPropType = overridePropType ?? defaultPropType;
|
|
3968
|
+
if (!resolvedPropType) {
|
|
3969
|
+
return null;
|
|
3970
|
+
}
|
|
3809
3971
|
const propType = createTopLevelObjectType2({
|
|
3810
3972
|
schema: {
|
|
3811
|
-
[bind]:
|
|
3973
|
+
[bind]: resolvedPropType
|
|
3812
3974
|
}
|
|
3813
3975
|
});
|
|
3814
3976
|
const propValue = isComponentInstance2 ? (value.origin_value?.value).override_value : value.origin_value;
|
|
@@ -3824,17 +3986,17 @@ function OverridablePropControl({
|
|
|
3824
3986
|
},
|
|
3825
3987
|
placeholder: objectPlaceholder
|
|
3826
3988
|
},
|
|
3827
|
-
/* @__PURE__ */ React29.createElement(PropKeyProvider2, { bind }, /* @__PURE__ */ React29.createElement(
|
|
3989
|
+
/* @__PURE__ */ React29.createElement(PropKeyProvider2, { bind }, /* @__PURE__ */ React29.createElement(ControlReplacementsProvider2, { replacements: filteredReplacements }, /* @__PURE__ */ React29.createElement(OriginalControl2, { ...props })))
|
|
3828
3990
|
));
|
|
3829
3991
|
}
|
|
3830
3992
|
|
|
3831
3993
|
// src/components/overridable-props/overridable-prop-indicator.tsx
|
|
3832
3994
|
import * as React31 from "react";
|
|
3833
3995
|
import { useBoundProp as useBoundProp3 } from "@elementor/editor-controls";
|
|
3834
|
-
import { useElement as
|
|
3996
|
+
import { useElement as useElement4 } from "@elementor/editor-editing-panel";
|
|
3835
3997
|
import { getWidgetsCache as getWidgetsCache3 } from "@elementor/editor-elements";
|
|
3836
3998
|
import { bindPopover as bindPopover2, bindTrigger as bindTrigger4, Popover as Popover4, Tooltip as Tooltip5, usePopupState as usePopupState4 } from "@elementor/ui";
|
|
3837
|
-
import { __ as
|
|
3999
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
3838
4000
|
|
|
3839
4001
|
// src/store/actions/set-overridable-prop.ts
|
|
3840
4002
|
import { __dispatch as dispatch14, __getState as getState17 } from "@elementor/store";
|
|
@@ -3905,7 +4067,7 @@ import * as React30 from "react";
|
|
|
3905
4067
|
import { forwardRef as forwardRef2 } from "react";
|
|
3906
4068
|
import { CheckIcon, PlusIcon } from "@elementor/icons";
|
|
3907
4069
|
import { Box as Box14, styled as styled4 } from "@elementor/ui";
|
|
3908
|
-
import { __ as
|
|
4070
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
3909
4071
|
var SIZE2 = "tiny";
|
|
3910
4072
|
var IconContainer = styled4(Box14)`
|
|
3911
4073
|
pointer-events: none;
|
|
@@ -3965,7 +4127,7 @@ var Indicator2 = forwardRef2(({ isOpen, isOverridable, ...props }, ref) => /* @_
|
|
|
3965
4127
|
IconContainer,
|
|
3966
4128
|
{
|
|
3967
4129
|
className: "icon",
|
|
3968
|
-
"aria-label": isOverridable ?
|
|
4130
|
+
"aria-label": isOverridable ? __27("Overridable property", "elementor") : __27("Make prop overridable", "elementor")
|
|
3969
4131
|
},
|
|
3970
4132
|
isOverridable ? /* @__PURE__ */ React30.createElement(CheckIcon, { fontSize: SIZE2 }) : /* @__PURE__ */ React30.createElement(PlusIcon, { fontSize: SIZE2 })
|
|
3971
4133
|
)));
|
|
@@ -3998,9 +4160,10 @@ function Content2({ componentId, overridableProps }) {
|
|
|
3998
4160
|
const {
|
|
3999
4161
|
element: { id: elementId },
|
|
4000
4162
|
elementType
|
|
4001
|
-
} =
|
|
4163
|
+
} = useElement4();
|
|
4002
4164
|
const { value, bind, propType } = useBoundProp3();
|
|
4003
4165
|
const contextOverridableValue = useOverridablePropValue();
|
|
4166
|
+
const componentInstanceElement = useComponentInstanceElement();
|
|
4004
4167
|
const { value: boundPropOverridableValue, setValue: setOverridableValue } = useBoundProp3(
|
|
4005
4168
|
componentOverridablePropTypeUtil
|
|
4006
4169
|
);
|
|
@@ -4013,17 +4176,17 @@ function Content2({ componentId, overridableProps }) {
|
|
|
4013
4176
|
const { elType } = getWidgetsCache3()?.[elementType.key] ?? { elType: "widget" };
|
|
4014
4177
|
const handleSubmit = ({ label, group }) => {
|
|
4015
4178
|
const propTypeDefault = propType.default ?? {};
|
|
4016
|
-
const originValue = (
|
|
4179
|
+
const originValue = resolveOverridePropValue(overridableValue?.origin_value) ?? value ?? propTypeDefault;
|
|
4017
4180
|
const matchingOverridableProp = overridableValue ? overridableProps?.props?.[overridableValue.override_key] : void 0;
|
|
4018
4181
|
const overridablePropConfig = setOverridableProp({
|
|
4019
4182
|
componentId,
|
|
4020
4183
|
overrideKey: overridableValue?.override_key ?? null,
|
|
4021
|
-
elementId,
|
|
4184
|
+
elementId: componentInstanceElement?.element.id ?? elementId,
|
|
4022
4185
|
label,
|
|
4023
4186
|
groupId: group,
|
|
4024
4187
|
propKey: bind,
|
|
4025
4188
|
elType: elType ?? "widget",
|
|
4026
|
-
widgetType: elementType.key,
|
|
4189
|
+
widgetType: componentInstanceElement?.elementType.key ?? elementType.key,
|
|
4027
4190
|
originValue,
|
|
4028
4191
|
originPropFields: matchingOverridableProp?.originPropFields
|
|
4029
4192
|
});
|
|
@@ -4036,7 +4199,7 @@ function Content2({ componentId, overridableProps }) {
|
|
|
4036
4199
|
popupState.close();
|
|
4037
4200
|
};
|
|
4038
4201
|
const overridableConfig = overridableValue ? getOverridableProp({ componentId, overrideKey: overridableValue.override_key }) : void 0;
|
|
4039
|
-
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(Tooltip5, { placement: "top", title:
|
|
4202
|
+
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(Tooltip5, { placement: "top", title: __28("Override Property", "elementor") }, /* @__PURE__ */ React31.createElement(Indicator2, { ...triggerProps, isOpen: !!popoverProps.open, isOverridable: !!overridableValue })), /* @__PURE__ */ React31.createElement(
|
|
4040
4203
|
Popover4,
|
|
4041
4204
|
{
|
|
4042
4205
|
disableScrollLock: true,
|
|
@@ -4061,6 +4224,7 @@ function Content2({ componentId, overridableProps }) {
|
|
|
4061
4224
|
value: groupId,
|
|
4062
4225
|
label: overridableProps.groups.items[groupId].label
|
|
4063
4226
|
})),
|
|
4227
|
+
existingLabels: Object.values(overridableProps?.props ?? {}).map((prop) => prop.label),
|
|
4064
4228
|
currentValue: overridableConfig
|
|
4065
4229
|
}
|
|
4066
4230
|
)
|
|
@@ -4154,7 +4318,7 @@ import { getMCPByDomain as getMCPByDomain2 } from "@elementor/editor-mcp";
|
|
|
4154
4318
|
|
|
4155
4319
|
// src/mcp/save-as-component-tool.ts
|
|
4156
4320
|
import { DOCUMENT_STRUCTURE_URI, WIDGET_SCHEMA_URI } from "@elementor/editor-canvas";
|
|
4157
|
-
import { getContainer as getContainer4, getElementType as
|
|
4321
|
+
import { getContainer as getContainer4, getElementType as getElementType4, getWidgetsCache as getWidgetsCache4 } from "@elementor/editor-elements";
|
|
4158
4322
|
import { getMCPByDomain, toolPrompts } from "@elementor/editor-mcp";
|
|
4159
4323
|
import { AxiosError } from "@elementor/http-client";
|
|
4160
4324
|
import { z as z6 } from "@elementor/schema";
|
|
@@ -4184,7 +4348,7 @@ var OutputSchema = {
|
|
|
4184
4348
|
message: z6.string().optional().describe("Additional information about the operation result"),
|
|
4185
4349
|
component_uid: z6.string().optional().describe("The unique identifier of the newly created component (only present on success)")
|
|
4186
4350
|
};
|
|
4187
|
-
var
|
|
4351
|
+
var ERROR_MESSAGES3 = {
|
|
4188
4352
|
ELEMENT_NOT_FOUND: "Element not found. Use 'list-elements' to get valid element IDs.",
|
|
4189
4353
|
ELEMENT_NOT_ONE_OF_TYPES: (validTypes) => `Element is not one of the following types: ${validTypes.join(", ")}`,
|
|
4190
4354
|
ELEMENT_IS_LOCKED: "Cannot save a locked element as a component."
|
|
@@ -4194,15 +4358,15 @@ var handleSaveAsComponent = async (params) => {
|
|
|
4194
4358
|
const validElementTypes = getValidElementTypes();
|
|
4195
4359
|
const container = getContainer4(elementId);
|
|
4196
4360
|
if (!container) {
|
|
4197
|
-
throw new Error(
|
|
4361
|
+
throw new Error(ERROR_MESSAGES3.ELEMENT_NOT_FOUND);
|
|
4198
4362
|
}
|
|
4199
4363
|
const elType = container.model.get("elType");
|
|
4200
4364
|
if (!validElementTypes.includes(elType)) {
|
|
4201
|
-
throw new Error(
|
|
4365
|
+
throw new Error(ERROR_MESSAGES3.ELEMENT_NOT_ONE_OF_TYPES(validElementTypes));
|
|
4202
4366
|
}
|
|
4203
4367
|
const element = container.model.toJSON({ remove: ["default"] });
|
|
4204
4368
|
if (element?.isLocked) {
|
|
4205
|
-
throw new Error(
|
|
4369
|
+
throw new Error(ERROR_MESSAGES3.ELEMENT_IS_LOCKED);
|
|
4206
4370
|
}
|
|
4207
4371
|
const overridableProps = overridablePropsInput ? enrichOverridableProps(overridablePropsInput, element) : void 0;
|
|
4208
4372
|
if (overridableProps) {
|
|
@@ -4239,7 +4403,7 @@ function enrichOverridableProps(input, rootElement) {
|
|
|
4239
4403
|
}
|
|
4240
4404
|
const elType = element.elType;
|
|
4241
4405
|
const widgetType = element.widgetType || element.elType;
|
|
4242
|
-
const elementType =
|
|
4406
|
+
const elementType = getElementType4(widgetType);
|
|
4243
4407
|
if (!elementType) {
|
|
4244
4408
|
throw new Error(
|
|
4245
4409
|
`Element type "${widgetType}" is not atomic or does not have a settings schema. Cannot expose property "${propKey}" for element "${elementId}".`
|
|
@@ -4499,11 +4663,11 @@ import { getAllDescendants as getAllDescendants4 } from "@elementor/editor-eleme
|
|
|
4499
4663
|
import { notify as notify4 } from "@elementor/editor-notifications";
|
|
4500
4664
|
import { blockCommand as blockCommand2 } from "@elementor/editor-v1-adapters";
|
|
4501
4665
|
import { __getState as getState19 } from "@elementor/store";
|
|
4502
|
-
import { __ as
|
|
4666
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
4503
4667
|
var COMPONENT_TYPE = "e-component";
|
|
4504
4668
|
var COMPONENT_CIRCULAR_NESTING_ALERT = {
|
|
4505
4669
|
type: "default",
|
|
4506
|
-
message:
|
|
4670
|
+
message: __29("Can't add this component - components that contain each other can't be nested.", "elementor"),
|
|
4507
4671
|
id: "circular-component-nesting-blocked"
|
|
4508
4672
|
};
|
|
4509
4673
|
function initCircularNestingPrevention() {
|
|
@@ -4835,7 +4999,7 @@ function init() {
|
|
|
4835
4999
|
window.elementorCommon.__beforeSave = beforeSave;
|
|
4836
5000
|
injectTab({
|
|
4837
5001
|
id: "components",
|
|
4838
|
-
label:
|
|
5002
|
+
label: __30("Components", "elementor"),
|
|
4839
5003
|
component: Components,
|
|
4840
5004
|
position: 1
|
|
4841
5005
|
});
|
|
@@ -4869,6 +5033,7 @@ function init() {
|
|
|
4869
5033
|
indicator: OverridablePropIndicator
|
|
4870
5034
|
});
|
|
4871
5035
|
registerControlReplacement({
|
|
5036
|
+
id: OVERRIDABLE_PROP_REPLACEMENT_ID,
|
|
4872
5037
|
component: OverridablePropControl,
|
|
4873
5038
|
condition: ({ value }) => componentOverridablePropTypeUtil.isValid(value)
|
|
4874
5039
|
});
|