@elementor/editor-controls 4.4.0-1125 → 4.4.0-1127
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 +18 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/email-form-action-control/fields.tsx +27 -2
- package/src/controls/notice-control.tsx +11 -1
package/dist/index.mjs
CHANGED
|
@@ -10777,6 +10777,14 @@ import { Grid as Grid33 } from "@elementor/ui";
|
|
|
10777
10777
|
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React128.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React128.createElement(Grid33, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React128.createElement(Grid33, { item: true }, /* @__PURE__ */ React128.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React128.createElement(Grid33, { item: true }, /* @__PURE__ */ React128.createElement(TextControl, { placeholder }))));
|
|
10778
10778
|
|
|
10779
10779
|
// src/controls/email-form-action-control/fields.tsx
|
|
10780
|
+
var FieldValueMentionField = ({
|
|
10781
|
+
bind,
|
|
10782
|
+
label,
|
|
10783
|
+
placeholder
|
|
10784
|
+
}) => {
|
|
10785
|
+
const suggestions = useFormFieldSuggestions();
|
|
10786
|
+
return /* @__PURE__ */ React129.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React129.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React129.createElement(Grid34, { item: true }, /* @__PURE__ */ React129.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React129.createElement(Grid34, { item: true }, /* @__PURE__ */ React129.createElement(MentionTextAreaControl, { suggestions, rows: 1, placeholder }))));
|
|
10787
|
+
};
|
|
10780
10788
|
var SendToField = ({ placeholder }) => {
|
|
10781
10789
|
const suggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
10782
10790
|
return /* @__PURE__ */ React129.createElement(PropKeyProvider, { bind: "to" }, /* @__PURE__ */ React129.createElement(Stack23, { gap: 0.5 }, /* @__PURE__ */ React129.createElement(
|
|
@@ -10789,7 +10797,7 @@ var SendToField = ({ placeholder }) => {
|
|
|
10789
10797
|
), shouldShowMentionsInfo() && /* @__PURE__ */ React129.createElement(InfoAlert2, null, __66("Type @ or an email field name to insert its submitted value.", "elementor"))));
|
|
10790
10798
|
};
|
|
10791
10799
|
var SubjectField = () => /* @__PURE__ */ React129.createElement(
|
|
10792
|
-
|
|
10800
|
+
FieldValueMentionField,
|
|
10793
10801
|
{
|
|
10794
10802
|
bind: "subject",
|
|
10795
10803
|
label: __66("Email subject", "elementor"),
|
|
@@ -10812,7 +10820,7 @@ var FromEmailField = () => /* @__PURE__ */ React129.createElement(
|
|
|
10812
10820
|
}
|
|
10813
10821
|
);
|
|
10814
10822
|
var FromNameField = () => /* @__PURE__ */ React129.createElement(
|
|
10815
|
-
|
|
10823
|
+
FieldValueMentionField,
|
|
10816
10824
|
{
|
|
10817
10825
|
bind: "from-name",
|
|
10818
10826
|
label: __66("From name", "elementor"),
|
|
@@ -10900,9 +10908,16 @@ var markNoticeAsDismissedInSession = (dismissId) => {
|
|
|
10900
10908
|
dismissedNotices.push(dismissId);
|
|
10901
10909
|
}
|
|
10902
10910
|
};
|
|
10911
|
+
var isNoticeDismissed = (dismissId) => {
|
|
10912
|
+
if (!dismissId) {
|
|
10913
|
+
return false;
|
|
10914
|
+
}
|
|
10915
|
+
const dismissedNotices = window.elementor?.config?.user?.dismissed_editor_notices;
|
|
10916
|
+
return !!dismissedNotices?.includes(dismissId);
|
|
10917
|
+
};
|
|
10903
10918
|
var NoticeControl = createControl(
|
|
10904
10919
|
({ noticeType = "info", heading, content, dismissible, buttonText, buttonUrl }) => {
|
|
10905
|
-
const [isDismissed, setIsDismissed] = useState25(
|
|
10920
|
+
const [isDismissed, setIsDismissed] = useState25(() => isNoticeDismissed(dismissible));
|
|
10906
10921
|
if (isDismissed || !content) {
|
|
10907
10922
|
return null;
|
|
10908
10923
|
}
|