@elementor/editor-controls 4.1.0-760 → 4.1.0-762
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/controls/email-form-action-control.tsx +4 -8
- package/src/controls/size-control/hooks/use-unit-sync.ts +9 -1
- package/src/controls/size-control/utils/resolve-bound-prop-value.ts +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -413,7 +413,9 @@ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props,
|
|
|
413
413
|
props?: ComponentProps<"div">;
|
|
414
414
|
}) => React$1.JSX.Element>;
|
|
415
415
|
|
|
416
|
-
declare const EmailFormActionControl: ControlComponent$1<(
|
|
416
|
+
declare const EmailFormActionControl: ControlComponent$1<({ toPlaceholder }: {
|
|
417
|
+
toPlaceholder?: string;
|
|
418
|
+
}) => React$1.JSX.Element>;
|
|
417
419
|
|
|
418
420
|
type Action = {
|
|
419
421
|
type: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -413,7 +413,9 @@ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props,
|
|
|
413
413
|
props?: ComponentProps<"div">;
|
|
414
414
|
}) => React$1.JSX.Element>;
|
|
415
415
|
|
|
416
|
-
declare const EmailFormActionControl: ControlComponent$1<(
|
|
416
|
+
declare const EmailFormActionControl: ControlComponent$1<({ toPlaceholder }: {
|
|
417
|
+
toPlaceholder?: string;
|
|
418
|
+
}) => React$1.JSX.Element>;
|
|
417
419
|
|
|
418
420
|
type Action = {
|
|
419
421
|
type: string;
|
package/dist/index.js
CHANGED
|
@@ -6772,14 +6772,7 @@ var import_editor_ui13 = require("@elementor/editor-ui");
|
|
|
6772
6772
|
var import_ui88 = require("@elementor/ui");
|
|
6773
6773
|
var import_i18n51 = require("@wordpress/i18n");
|
|
6774
6774
|
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React102.createElement(import_ui88.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React102.createElement(import_ui88.Grid, { item: true }, /* @__PURE__ */ React102.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React102.createElement(import_ui88.Grid, { item: true }, /* @__PURE__ */ React102.createElement(TextControl, { placeholder }))));
|
|
6775
|
-
var SendToField = () => /* @__PURE__ */ React102.createElement(
|
|
6776
|
-
EmailField,
|
|
6777
|
-
{
|
|
6778
|
-
bind: "to",
|
|
6779
|
-
label: (0, import_i18n51.__)("Send to", "elementor"),
|
|
6780
|
-
placeholder: (0, import_i18n51.__)("Where should we send new submissions?", "elementor")
|
|
6781
|
-
}
|
|
6782
|
-
);
|
|
6775
|
+
var SendToField = ({ placeholder }) => /* @__PURE__ */ React102.createElement(EmailField, { bind: "to", label: (0, import_i18n51.__)("Send to", "elementor"), placeholder });
|
|
6783
6776
|
var SubjectField = () => /* @__PURE__ */ React102.createElement(
|
|
6784
6777
|
EmailField,
|
|
6785
6778
|
{
|
|
@@ -6838,9 +6831,9 @@ var SendAsField = () => /* @__PURE__ */ React102.createElement(PropKeyProvider,
|
|
|
6838
6831
|
}
|
|
6839
6832
|
))));
|
|
6840
6833
|
var AdvancedSettings = () => /* @__PURE__ */ React102.createElement(import_editor_ui13.CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React102.createElement(import_ui88.Box, { sx: { pt: 2 } }, /* @__PURE__ */ React102.createElement(import_ui88.Stack, { gap: 2 }, /* @__PURE__ */ React102.createElement(FromNameField, null), /* @__PURE__ */ React102.createElement(ReplyToField, null), /* @__PURE__ */ React102.createElement(CcField, null), /* @__PURE__ */ React102.createElement(BccField, null), /* @__PURE__ */ React102.createElement(import_ui88.Divider, null), /* @__PURE__ */ React102.createElement(MetaDataField, null), /* @__PURE__ */ React102.createElement(SendAsField, null))));
|
|
6841
|
-
var EmailFormActionControl = createControl(() => {
|
|
6834
|
+
var EmailFormActionControl = createControl(({ toPlaceholder }) => {
|
|
6842
6835
|
const { value, setValue, ...propContext } = useBoundProp(import_editor_props54.emailPropTypeUtil);
|
|
6843
|
-
return /* @__PURE__ */ React102.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React102.createElement(import_ui88.Stack, { gap: 2 }, /* @__PURE__ */ React102.createElement(ControlLabel, null, (0, import_i18n51.__)("Email settings", "elementor")), /* @__PURE__ */ React102.createElement(SendToField,
|
|
6836
|
+
return /* @__PURE__ */ React102.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React102.createElement(import_ui88.Stack, { gap: 2 }, /* @__PURE__ */ React102.createElement(ControlLabel, null, (0, import_i18n51.__)("Email settings", "elementor")), /* @__PURE__ */ React102.createElement(SendToField, { placeholder: toPlaceholder }), /* @__PURE__ */ React102.createElement(SubjectField, null), /* @__PURE__ */ React102.createElement(MessageField, null), /* @__PURE__ */ React102.createElement(FromEmailField, null), /* @__PURE__ */ React102.createElement(AdvancedSettings, null)));
|
|
6844
6837
|
});
|
|
6845
6838
|
|
|
6846
6839
|
// src/controls/size-control/unstable-size-control.tsx
|
|
@@ -6980,9 +6973,12 @@ var useUnitSync = ({ unit, setUnit, persistWhen }) => {
|
|
|
6980
6973
|
setState(unit);
|
|
6981
6974
|
}
|
|
6982
6975
|
}, [unit]);
|
|
6976
|
+
const isExtendedUnit2 = (value) => {
|
|
6977
|
+
return Object.values(EXTENDED_UNITS).includes(value);
|
|
6978
|
+
};
|
|
6983
6979
|
const setInternalValue = (newUnit) => {
|
|
6984
6980
|
setState(newUnit);
|
|
6985
|
-
if (persistWhen()) {
|
|
6981
|
+
if (isExtendedUnit2(newUnit) || persistWhen()) {
|
|
6986
6982
|
setUnit(newUnit);
|
|
6987
6983
|
}
|
|
6988
6984
|
};
|
|
@@ -7373,9 +7369,10 @@ var resolveBoundPropValue = (value, boundPropPlaceholder, propPlaceholder) => {
|
|
|
7373
7369
|
{ candidate: boundPropPlaceholder, resolve: toUnitPlaceholder }
|
|
7374
7370
|
]);
|
|
7375
7371
|
const placeholderSource = propPlaceholder ?? boundPropPlaceholder;
|
|
7372
|
+
const hasValue2 = Boolean(value);
|
|
7376
7373
|
return {
|
|
7377
7374
|
sizeValue,
|
|
7378
|
-
placeholder: resolvePlaceholder(placeholderSource)
|
|
7375
|
+
placeholder: hasValue2 ? void 0 : resolvePlaceholder(placeholderSource)
|
|
7379
7376
|
};
|
|
7380
7377
|
};
|
|
7381
7378
|
var toUnitPlaceholder = (v) => ({ ...v, size: "" });
|