@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.mjs
CHANGED
|
@@ -6753,14 +6753,7 @@ import { CollapsibleContent } from "@elementor/editor-ui";
|
|
|
6753
6753
|
import { Box as Box24, Divider as Divider5, Grid as Grid29, Stack as Stack17 } from "@elementor/ui";
|
|
6754
6754
|
import { __ as __51 } from "@wordpress/i18n";
|
|
6755
6755
|
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React102.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React102.createElement(Grid29, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React102.createElement(Grid29, { item: true }, /* @__PURE__ */ React102.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React102.createElement(Grid29, { item: true }, /* @__PURE__ */ React102.createElement(TextControl, { placeholder }))));
|
|
6756
|
-
var SendToField = () => /* @__PURE__ */ React102.createElement(
|
|
6757
|
-
EmailField,
|
|
6758
|
-
{
|
|
6759
|
-
bind: "to",
|
|
6760
|
-
label: __51("Send to", "elementor"),
|
|
6761
|
-
placeholder: __51("Where should we send new submissions?", "elementor")
|
|
6762
|
-
}
|
|
6763
|
-
);
|
|
6756
|
+
var SendToField = ({ placeholder }) => /* @__PURE__ */ React102.createElement(EmailField, { bind: "to", label: __51("Send to", "elementor"), placeholder });
|
|
6764
6757
|
var SubjectField = () => /* @__PURE__ */ React102.createElement(
|
|
6765
6758
|
EmailField,
|
|
6766
6759
|
{
|
|
@@ -6819,9 +6812,9 @@ var SendAsField = () => /* @__PURE__ */ React102.createElement(PropKeyProvider,
|
|
|
6819
6812
|
}
|
|
6820
6813
|
))));
|
|
6821
6814
|
var AdvancedSettings = () => /* @__PURE__ */ React102.createElement(CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React102.createElement(Box24, { sx: { pt: 2 } }, /* @__PURE__ */ React102.createElement(Stack17, { 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(Divider5, null), /* @__PURE__ */ React102.createElement(MetaDataField, null), /* @__PURE__ */ React102.createElement(SendAsField, null))));
|
|
6822
|
-
var EmailFormActionControl = createControl(() => {
|
|
6815
|
+
var EmailFormActionControl = createControl(({ toPlaceholder }) => {
|
|
6823
6816
|
const { value, setValue, ...propContext } = useBoundProp(emailPropTypeUtil);
|
|
6824
|
-
return /* @__PURE__ */ React102.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React102.createElement(Stack17, { gap: 2 }, /* @__PURE__ */ React102.createElement(ControlLabel, null, __51("Email settings", "elementor")), /* @__PURE__ */ React102.createElement(SendToField,
|
|
6817
|
+
return /* @__PURE__ */ React102.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React102.createElement(Stack17, { gap: 2 }, /* @__PURE__ */ React102.createElement(ControlLabel, null, __51("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)));
|
|
6825
6818
|
});
|
|
6826
6819
|
|
|
6827
6820
|
// src/controls/size-control/unstable-size-control.tsx
|
|
@@ -6961,9 +6954,12 @@ var useUnitSync = ({ unit, setUnit, persistWhen }) => {
|
|
|
6961
6954
|
setState(unit);
|
|
6962
6955
|
}
|
|
6963
6956
|
}, [unit]);
|
|
6957
|
+
const isExtendedUnit2 = (value) => {
|
|
6958
|
+
return Object.values(EXTENDED_UNITS).includes(value);
|
|
6959
|
+
};
|
|
6964
6960
|
const setInternalValue = (newUnit) => {
|
|
6965
6961
|
setState(newUnit);
|
|
6966
|
-
if (persistWhen()) {
|
|
6962
|
+
if (isExtendedUnit2(newUnit) || persistWhen()) {
|
|
6967
6963
|
setUnit(newUnit);
|
|
6968
6964
|
}
|
|
6969
6965
|
};
|
|
@@ -7354,9 +7350,10 @@ var resolveBoundPropValue = (value, boundPropPlaceholder, propPlaceholder) => {
|
|
|
7354
7350
|
{ candidate: boundPropPlaceholder, resolve: toUnitPlaceholder }
|
|
7355
7351
|
]);
|
|
7356
7352
|
const placeholderSource = propPlaceholder ?? boundPropPlaceholder;
|
|
7353
|
+
const hasValue2 = Boolean(value);
|
|
7357
7354
|
return {
|
|
7358
7355
|
sizeValue,
|
|
7359
|
-
placeholder: resolvePlaceholder(placeholderSource)
|
|
7356
|
+
placeholder: hasValue2 ? void 0 : resolvePlaceholder(placeholderSource)
|
|
7360
7357
|
};
|
|
7361
7358
|
};
|
|
7362
7359
|
var toUnitPlaceholder = (v) => ({ ...v, size: "" });
|