@elementor/editor-controls 4.1.0-821 → 4.1.0-823
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 +254 -158
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +214 -119
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/controls/date-range-control.tsx +83 -0
- package/src/controls/date-string-control.tsx +70 -0
- package/src/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -43,6 +43,7 @@ __export(index_exports, {
|
|
|
43
43
|
ControlFormLabel: () => ControlFormLabel,
|
|
44
44
|
ControlReplacementsProvider: () => ControlReplacementsProvider,
|
|
45
45
|
ControlToggleButtonGroup: () => ControlToggleButtonGroup,
|
|
46
|
+
DateRangeControl: () => DateRangeControl,
|
|
46
47
|
DateTimeControl: () => DateTimeControl,
|
|
47
48
|
DisplayConditionsControl: () => DisplayConditionsControl,
|
|
48
49
|
EmailFormActionControl: () => EmailFormActionControl,
|
|
@@ -7423,17 +7424,111 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7423
7424
|
))))));
|
|
7424
7425
|
});
|
|
7425
7426
|
|
|
7426
|
-
// src/controls/
|
|
7427
|
+
// src/controls/date-range-control.tsx
|
|
7427
7428
|
var React108 = __toESM(require("react"));
|
|
7428
|
-
var
|
|
7429
|
-
var import_editor_props56 = require("@elementor/editor-props");
|
|
7429
|
+
var import_editor_props57 = require("@elementor/editor-props");
|
|
7430
7430
|
var import_ui92 = require("@elementor/ui");
|
|
7431
|
+
var import_i18n53 = require("@wordpress/i18n");
|
|
7432
|
+
|
|
7433
|
+
// src/controls/date-string-control.tsx
|
|
7434
|
+
var React107 = __toESM(require("react"));
|
|
7435
|
+
var dayjs2 = __toESM(require("dayjs"));
|
|
7436
|
+
var import_editor_props56 = require("@elementor/editor-props");
|
|
7437
|
+
var import_ui91 = require("@elementor/ui");
|
|
7438
|
+
var DATE_FORMAT2 = "YYYY-MM-DD";
|
|
7439
|
+
var DateStringControl = createControl(({ inputDisabled, ariaLabel, error }) => {
|
|
7440
|
+
const { value, setValue, disabled } = useBoundProp(import_editor_props56.dateStringPropTypeUtil);
|
|
7441
|
+
const isDisabled = inputDisabled ?? disabled;
|
|
7442
|
+
const slotProps = {
|
|
7443
|
+
textField: {
|
|
7444
|
+
size: "tiny",
|
|
7445
|
+
fullWidth: true,
|
|
7446
|
+
error,
|
|
7447
|
+
inputProps: ariaLabel ? { "aria-label": ariaLabel } : void 0
|
|
7448
|
+
},
|
|
7449
|
+
openPickerButton: { size: "tiny" },
|
|
7450
|
+
openPickerIcon: { fontSize: "tiny" }
|
|
7451
|
+
};
|
|
7452
|
+
const handleChange = (newValue, format) => {
|
|
7453
|
+
if (!newValue) {
|
|
7454
|
+
setValue(null);
|
|
7455
|
+
return;
|
|
7456
|
+
}
|
|
7457
|
+
setValue(newValue.format(format));
|
|
7458
|
+
};
|
|
7459
|
+
return /* @__PURE__ */ React107.createElement(import_ui91.LocalizationProvider, null, /* @__PURE__ */ React107.createElement(ControlActions, null, /* @__PURE__ */ React107.createElement(
|
|
7460
|
+
import_ui91.DatePicker,
|
|
7461
|
+
{
|
|
7462
|
+
value: parseDateString(value ?? ""),
|
|
7463
|
+
onChange: (newValue) => handleChange(newValue, DATE_FORMAT2),
|
|
7464
|
+
disabled: isDisabled,
|
|
7465
|
+
slotProps
|
|
7466
|
+
}
|
|
7467
|
+
)));
|
|
7468
|
+
});
|
|
7469
|
+
function parseDateString(raw) {
|
|
7470
|
+
if (!raw) {
|
|
7471
|
+
return null;
|
|
7472
|
+
}
|
|
7473
|
+
const parsed = dayjs2.default(raw);
|
|
7474
|
+
return isValidDayjs(parsed) ? parsed : null;
|
|
7475
|
+
}
|
|
7476
|
+
function isValidDayjs(value) {
|
|
7477
|
+
return !!value && typeof value.isValid === "function" && value.isValid();
|
|
7478
|
+
}
|
|
7479
|
+
|
|
7480
|
+
// src/controls/date-range-control.tsx
|
|
7481
|
+
var RANGE_LABELS = {
|
|
7482
|
+
min: (0, import_i18n53.__)("Min date", "elementor"),
|
|
7483
|
+
max: (0, import_i18n53.__)("Max date", "elementor")
|
|
7484
|
+
};
|
|
7485
|
+
var isMaxBeforeMin = (minIso, maxIso) => {
|
|
7486
|
+
if (!minIso || !maxIso || [minIso, maxIso].some((v) => v === "Invalid Date")) {
|
|
7487
|
+
return false;
|
|
7488
|
+
}
|
|
7489
|
+
return maxIso < minIso;
|
|
7490
|
+
};
|
|
7491
|
+
var RANGE_ERROR_MESSAGE = (0, import_i18n53.__)("Max date must be on or after Min date", "elementor");
|
|
7492
|
+
var DateRangeControl = createControl(() => {
|
|
7493
|
+
const { value, setValue, ...propContext } = useBoundProp(import_editor_props57.dateRangePropTypeUtil);
|
|
7494
|
+
const minString = import_editor_props57.dateStringPropTypeUtil.extract(value?.min);
|
|
7495
|
+
const maxString = import_editor_props57.dateStringPropTypeUtil.extract(value?.max);
|
|
7496
|
+
const hasInvalidRange = isMaxBeforeMin(minString, maxString);
|
|
7497
|
+
return /* @__PURE__ */ React108.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React108.createElement(import_ui92.Stack, { gap: 0.75 }, /* @__PURE__ */ React108.createElement(import_ui92.Stack, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React108.createElement(import_ui92.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React108.createElement(import_ui92.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React108.createElement(ControlFormLabel, null, RANGE_LABELS.min)), /* @__PURE__ */ React108.createElement(import_ui92.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React108.createElement(
|
|
7498
|
+
BoundDateStringControl,
|
|
7499
|
+
{
|
|
7500
|
+
bind: "min",
|
|
7501
|
+
ariaLabel: RANGE_LABELS.min,
|
|
7502
|
+
error: hasInvalidRange
|
|
7503
|
+
}
|
|
7504
|
+
))), /* @__PURE__ */ React108.createElement(import_ui92.Grid, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React108.createElement(import_ui92.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React108.createElement(ControlFormLabel, null, RANGE_LABELS.max)), /* @__PURE__ */ React108.createElement(import_ui92.Grid, { item: true, xs: 12 }, /* @__PURE__ */ React108.createElement(
|
|
7505
|
+
BoundDateStringControl,
|
|
7506
|
+
{
|
|
7507
|
+
bind: "max",
|
|
7508
|
+
ariaLabel: RANGE_LABELS.max,
|
|
7509
|
+
error: hasInvalidRange
|
|
7510
|
+
}
|
|
7511
|
+
)))), hasInvalidRange && /* @__PURE__ */ React108.createElement(import_ui92.FormHelperText, { error: true }, RANGE_ERROR_MESSAGE)));
|
|
7512
|
+
});
|
|
7513
|
+
var BoundDateStringControl = ({
|
|
7514
|
+
bind,
|
|
7515
|
+
ariaLabel,
|
|
7516
|
+
error
|
|
7517
|
+
}) => {
|
|
7518
|
+
return /* @__PURE__ */ React108.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React108.createElement(DateStringControl, { ariaLabel, error }));
|
|
7519
|
+
};
|
|
7520
|
+
|
|
7521
|
+
// src/controls/inline-editing-control.tsx
|
|
7522
|
+
var React110 = __toESM(require("react"));
|
|
7523
|
+
var import_react66 = require("react");
|
|
7524
|
+
var import_editor_props58 = require("@elementor/editor-props");
|
|
7525
|
+
var import_ui94 = require("@elementor/ui");
|
|
7431
7526
|
var import_utils8 = require("@elementor/utils");
|
|
7432
7527
|
|
|
7433
7528
|
// src/components/inline-editor.tsx
|
|
7434
|
-
var
|
|
7529
|
+
var React109 = __toESM(require("react"));
|
|
7435
7530
|
var import_react64 = require("react");
|
|
7436
|
-
var
|
|
7531
|
+
var import_ui93 = require("@elementor/ui");
|
|
7437
7532
|
var import_extension_bold = __toESM(require("@tiptap/extension-bold"));
|
|
7438
7533
|
var import_extension_document = __toESM(require("@tiptap/extension-document"));
|
|
7439
7534
|
var import_extension_hard_break = __toESM(require("@tiptap/extension-hard-break"));
|
|
@@ -7470,7 +7565,7 @@ function htmlToPlainText(html) {
|
|
|
7470
7565
|
var ITALIC_KEYBOARD_SHORTCUT = "i";
|
|
7471
7566
|
var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
7472
7567
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
7473
|
-
var InlineEditor =
|
|
7568
|
+
var InlineEditor = React109.forwardRef((props, ref) => {
|
|
7474
7569
|
const {
|
|
7475
7570
|
value,
|
|
7476
7571
|
setValue,
|
|
@@ -7581,7 +7676,7 @@ var InlineEditor = React107.forwardRef((props, ref) => {
|
|
|
7581
7676
|
if (mountElement) {
|
|
7582
7677
|
return null;
|
|
7583
7678
|
}
|
|
7584
|
-
return /* @__PURE__ */
|
|
7679
|
+
return /* @__PURE__ */ React109.createElement(import_ui93.Box, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React109.createElement(import_react65.EditorContent, { ref, editor }));
|
|
7585
7680
|
});
|
|
7586
7681
|
var useOnUpdate = (callback, dependencies) => {
|
|
7587
7682
|
const hasMounted = (0, import_react64.useRef)(false);
|
|
@@ -7602,13 +7697,13 @@ var InlineEditingControl = createControl(
|
|
|
7602
7697
|
attributes,
|
|
7603
7698
|
props
|
|
7604
7699
|
}) => {
|
|
7605
|
-
const { value, setValue, placeholder } = useBoundProp(
|
|
7606
|
-
const content =
|
|
7700
|
+
const { value, setValue, placeholder } = useBoundProp(import_editor_props58.htmlV3PropTypeUtil);
|
|
7701
|
+
const content = import_editor_props58.stringPropTypeUtil.extract(value?.content ?? null) ?? "";
|
|
7607
7702
|
const debouncedParse = (0, import_react66.useMemo)(
|
|
7608
7703
|
() => (0, import_utils8.debounce)((html) => {
|
|
7609
|
-
const parsed = (0,
|
|
7704
|
+
const parsed = (0, import_editor_props58.parseHtmlChildren)(html);
|
|
7610
7705
|
setValue({
|
|
7611
|
-
content: parsed.content ?
|
|
7706
|
+
content: parsed.content ? import_editor_props58.stringPropTypeUtil.create(parsed.content) : null,
|
|
7612
7707
|
children: parsed.children
|
|
7613
7708
|
});
|
|
7614
7709
|
}, CHILDREN_PARSE_DEBOUNCE_MS),
|
|
@@ -7618,7 +7713,7 @@ var InlineEditingControl = createControl(
|
|
|
7618
7713
|
(newValue) => {
|
|
7619
7714
|
const html = newValue ?? "";
|
|
7620
7715
|
setValue({
|
|
7621
|
-
content: html ?
|
|
7716
|
+
content: html ? import_editor_props58.stringPropTypeUtil.create(html) : null,
|
|
7622
7717
|
children: value?.children ?? []
|
|
7623
7718
|
});
|
|
7624
7719
|
debouncedParse(html);
|
|
@@ -7626,8 +7721,8 @@ var InlineEditingControl = createControl(
|
|
|
7626
7721
|
[setValue, value?.children, debouncedParse]
|
|
7627
7722
|
);
|
|
7628
7723
|
(0, import_react66.useEffect)(() => () => debouncedParse.cancel(), [debouncedParse]);
|
|
7629
|
-
return /* @__PURE__ */
|
|
7630
|
-
|
|
7724
|
+
return /* @__PURE__ */ React110.createElement(ControlActions, null, /* @__PURE__ */ React110.createElement(
|
|
7725
|
+
import_ui94.Box,
|
|
7631
7726
|
{
|
|
7632
7727
|
sx: {
|
|
7633
7728
|
p: 0.8,
|
|
@@ -7671,7 +7766,7 @@ var InlineEditingControl = createControl(
|
|
|
7671
7766
|
...attributes,
|
|
7672
7767
|
...props
|
|
7673
7768
|
},
|
|
7674
|
-
/* @__PURE__ */
|
|
7769
|
+
/* @__PURE__ */ React110.createElement(
|
|
7675
7770
|
InlineEditor,
|
|
7676
7771
|
{
|
|
7677
7772
|
value: content,
|
|
@@ -7684,16 +7779,16 @@ var InlineEditingControl = createControl(
|
|
|
7684
7779
|
);
|
|
7685
7780
|
|
|
7686
7781
|
// src/controls/email-form-action-control.tsx
|
|
7687
|
-
var
|
|
7688
|
-
var
|
|
7782
|
+
var React111 = __toESM(require("react"));
|
|
7783
|
+
var import_editor_props60 = require("@elementor/editor-props");
|
|
7689
7784
|
var import_editor_ui15 = require("@elementor/editor-ui");
|
|
7690
|
-
var
|
|
7785
|
+
var import_ui95 = require("@elementor/ui");
|
|
7691
7786
|
var import_utils9 = require("@elementor/utils");
|
|
7692
|
-
var
|
|
7787
|
+
var import_i18n54 = require("@wordpress/i18n");
|
|
7693
7788
|
|
|
7694
7789
|
// src/hooks/use-form-field-suggestions.ts
|
|
7695
7790
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
7696
|
-
var
|
|
7791
|
+
var import_editor_props59 = require("@elementor/editor-props");
|
|
7697
7792
|
var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
|
|
7698
7793
|
var FORM_FIELD_WIDGET_TYPES = [
|
|
7699
7794
|
"e-form-input",
|
|
@@ -7728,13 +7823,13 @@ function useFormFieldSuggestions(options) {
|
|
|
7728
7823
|
}
|
|
7729
7824
|
if (options?.inputType) {
|
|
7730
7825
|
const typeProp = child.settings.get("type");
|
|
7731
|
-
const typeValue = (0,
|
|
7826
|
+
const typeValue = (0, import_editor_props59.isTransformable)(typeProp) ? typeProp.value : typeProp;
|
|
7732
7827
|
if (typeValue !== options.inputType) {
|
|
7733
7828
|
return;
|
|
7734
7829
|
}
|
|
7735
7830
|
}
|
|
7736
7831
|
const cssIdProp = child.settings.get("_cssid");
|
|
7737
|
-
const fieldId = (0,
|
|
7832
|
+
const fieldId = (0, import_editor_props59.isTransformable)(cssIdProp) ? cssIdProp.value : cssIdProp;
|
|
7738
7833
|
if (fieldId && typeof fieldId === "string") {
|
|
7739
7834
|
suggestions.push({ label: fieldId, value: fieldId });
|
|
7740
7835
|
}
|
|
@@ -7746,14 +7841,14 @@ function useFormFieldSuggestions(options) {
|
|
|
7746
7841
|
}
|
|
7747
7842
|
|
|
7748
7843
|
// src/controls/email-form-action-control.tsx
|
|
7749
|
-
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */
|
|
7750
|
-
var SendToField = ({ placeholder }) => /* @__PURE__ */
|
|
7751
|
-
var SubjectField = () => /* @__PURE__ */
|
|
7844
|
+
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true }, /* @__PURE__ */ React111.createElement(TextControl, { placeholder }))));
|
|
7845
|
+
var SendToField = ({ placeholder }) => /* @__PURE__ */ React111.createElement(EmailField, { bind: "to", label: (0, import_i18n54.__)("Send to", "elementor"), placeholder });
|
|
7846
|
+
var SubjectField = () => /* @__PURE__ */ React111.createElement(
|
|
7752
7847
|
EmailField,
|
|
7753
7848
|
{
|
|
7754
7849
|
bind: "subject",
|
|
7755
|
-
label: (0,
|
|
7756
|
-
placeholder: (0,
|
|
7850
|
+
label: (0, import_i18n54.__)("Email subject", "elementor"),
|
|
7851
|
+
placeholder: (0, import_i18n54.__)("New form submission", "elementor")
|
|
7757
7852
|
}
|
|
7758
7853
|
);
|
|
7759
7854
|
var MIN_PRO_VERSION_FOR_MENTIONS = "4.1.0";
|
|
@@ -7769,80 +7864,80 @@ var shouldShowMentionsInfo = () => {
|
|
|
7769
7864
|
};
|
|
7770
7865
|
var MessageField = () => {
|
|
7771
7866
|
const suggestions = useFormFieldSuggestions();
|
|
7772
|
-
return /* @__PURE__ */
|
|
7867
|
+
return /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "message" }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, (0, import_i18n54.__)("Message", "elementor"))), /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true }, /* @__PURE__ */ React111.createElement(MentionTextAreaControl, { suggestions })), /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true }, /* @__PURE__ */ React111.createElement(import_editor_ui15.InfoAlert, null, shouldShowMentionsInfo() ? (0, import_i18n54.__)(
|
|
7773
7868
|
"[all-fields] shortcode sends all fields. Type @ to insert specific fields and customize your message.",
|
|
7774
7869
|
"elementor"
|
|
7775
|
-
) : (0,
|
|
7870
|
+
) : (0, import_i18n54.__)("[all-fields] shortcode sends all fields.", "elementor")))));
|
|
7776
7871
|
};
|
|
7777
|
-
var FromEmailField = () => /* @__PURE__ */
|
|
7872
|
+
var FromEmailField = () => /* @__PURE__ */ React111.createElement(
|
|
7778
7873
|
EmailField,
|
|
7779
7874
|
{
|
|
7780
7875
|
bind: "from",
|
|
7781
|
-
label: (0,
|
|
7782
|
-
placeholder: (0,
|
|
7876
|
+
label: (0, import_i18n54.__)("From email", "elementor"),
|
|
7877
|
+
placeholder: (0, import_i18n54.__)("What email should appear as the sender?", "elementor")
|
|
7783
7878
|
}
|
|
7784
7879
|
);
|
|
7785
|
-
var FromNameField = () => /* @__PURE__ */
|
|
7880
|
+
var FromNameField = () => /* @__PURE__ */ React111.createElement(
|
|
7786
7881
|
EmailField,
|
|
7787
7882
|
{
|
|
7788
7883
|
bind: "from-name",
|
|
7789
|
-
label: (0,
|
|
7790
|
-
placeholder: (0,
|
|
7884
|
+
label: (0, import_i18n54.__)("From name", "elementor"),
|
|
7885
|
+
placeholder: (0, import_i18n54.__)("What name should appear as the sender?", "elementor")
|
|
7791
7886
|
}
|
|
7792
7887
|
);
|
|
7793
7888
|
var ReplyToField = () => {
|
|
7794
7889
|
const emailSuggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
7795
|
-
return /* @__PURE__ */
|
|
7890
|
+
return /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "reply-to" }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, (0, import_i18n54.__)("Reply-to", "elementor"))), /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true }, /* @__PURE__ */ React111.createElement(
|
|
7796
7891
|
MentionTextAreaControl,
|
|
7797
7892
|
{
|
|
7798
7893
|
suggestions: emailSuggestions,
|
|
7799
7894
|
rows: 1,
|
|
7800
7895
|
triggerPosition: "start",
|
|
7801
|
-
placeholder: (0,
|
|
7896
|
+
placeholder: (0, import_i18n54.__)("You can type @ to insert an email field", "elementor")
|
|
7802
7897
|
}
|
|
7803
7898
|
))));
|
|
7804
7899
|
};
|
|
7805
|
-
var CcField = () => /* @__PURE__ */
|
|
7806
|
-
var BccField = () => /* @__PURE__ */
|
|
7807
|
-
var MetaDataField = () => /* @__PURE__ */
|
|
7900
|
+
var CcField = () => /* @__PURE__ */ React111.createElement(EmailField, { bind: "cc", label: (0, import_i18n54.__)("Cc", "elementor") });
|
|
7901
|
+
var BccField = () => /* @__PURE__ */ React111.createElement(EmailField, { bind: "bcc", label: (0, import_i18n54.__)("Bcc", "elementor") });
|
|
7902
|
+
var MetaDataField = () => /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "meta-data" }, /* @__PURE__ */ React111.createElement(import_ui95.Stack, { gap: 0.5 }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, (0, import_i18n54.__)("Metadata", "elementor")), /* @__PURE__ */ React111.createElement(
|
|
7808
7903
|
ChipsControl,
|
|
7809
7904
|
{
|
|
7810
7905
|
options: [
|
|
7811
|
-
{ label: (0,
|
|
7812
|
-
{ label: (0,
|
|
7813
|
-
{ label: (0,
|
|
7814
|
-
{ label: (0,
|
|
7815
|
-
{ label: (0,
|
|
7906
|
+
{ label: (0, import_i18n54.__)("Date", "elementor"), value: "date" },
|
|
7907
|
+
{ label: (0, import_i18n54.__)("Time", "elementor"), value: "time" },
|
|
7908
|
+
{ label: (0, import_i18n54.__)("Page URL", "elementor"), value: "page-url" },
|
|
7909
|
+
{ label: (0, import_i18n54.__)("User agent", "elementor"), value: "user-agent" },
|
|
7910
|
+
{ label: (0, import_i18n54.__)("Credit", "elementor"), value: "credit" }
|
|
7816
7911
|
]
|
|
7817
7912
|
}
|
|
7818
7913
|
)));
|
|
7819
|
-
var SendAsField = () => /* @__PURE__ */
|
|
7914
|
+
var SendAsField = () => /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "send-as" }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, (0, import_i18n54.__)("Send as", "elementor"))), /* @__PURE__ */ React111.createElement(import_ui95.Grid, { item: true }, /* @__PURE__ */ React111.createElement(
|
|
7820
7915
|
SelectControl,
|
|
7821
7916
|
{
|
|
7822
7917
|
options: [
|
|
7823
|
-
{ label: (0,
|
|
7824
|
-
{ label: (0,
|
|
7918
|
+
{ label: (0, import_i18n54.__)("HTML", "elementor"), value: "html" },
|
|
7919
|
+
{ label: (0, import_i18n54.__)("Plain Text", "elementor"), value: "plain" }
|
|
7825
7920
|
]
|
|
7826
7921
|
}
|
|
7827
7922
|
))));
|
|
7828
|
-
var AdvancedSettings = () => /* @__PURE__ */
|
|
7923
|
+
var AdvancedSettings = () => /* @__PURE__ */ React111.createElement(import_editor_ui15.CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React111.createElement(import_ui95.Box, { sx: { pt: 2 } }, /* @__PURE__ */ React111.createElement(import_ui95.Stack, { gap: 2 }, /* @__PURE__ */ React111.createElement(FromNameField, null), /* @__PURE__ */ React111.createElement(ReplyToField, null), /* @__PURE__ */ React111.createElement(CcField, null), /* @__PURE__ */ React111.createElement(BccField, null), /* @__PURE__ */ React111.createElement(import_ui95.Divider, null), /* @__PURE__ */ React111.createElement(MetaDataField, null), /* @__PURE__ */ React111.createElement(SendAsField, null))));
|
|
7829
7924
|
var EmailFormActionControl = createControl(({ toPlaceholder }) => {
|
|
7830
|
-
const { value, setValue, ...propContext } = useBoundProp(
|
|
7831
|
-
return /* @__PURE__ */
|
|
7925
|
+
const { value, setValue, ...propContext } = useBoundProp(import_editor_props60.emailPropTypeUtil);
|
|
7926
|
+
return /* @__PURE__ */ React111.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React111.createElement(import_ui95.Stack, { gap: 2 }, /* @__PURE__ */ React111.createElement(ControlLabel, null, (0, import_i18n54.__)("Email settings", "elementor")), /* @__PURE__ */ React111.createElement(SendToField, { placeholder: toPlaceholder }), /* @__PURE__ */ React111.createElement(SubjectField, null), /* @__PURE__ */ React111.createElement(MessageField, null), /* @__PURE__ */ React111.createElement(FromEmailField, null), /* @__PURE__ */ React111.createElement(AdvancedSettings, null)));
|
|
7832
7927
|
});
|
|
7833
7928
|
|
|
7834
7929
|
// src/components/promotions/display-conditions-control.tsx
|
|
7835
|
-
var
|
|
7930
|
+
var React113 = __toESM(require("react"));
|
|
7836
7931
|
var import_react68 = require("react");
|
|
7837
7932
|
var import_icons36 = require("@elementor/icons");
|
|
7838
|
-
var
|
|
7839
|
-
var
|
|
7933
|
+
var import_ui97 = require("@elementor/ui");
|
|
7934
|
+
var import_i18n55 = require("@wordpress/i18n");
|
|
7840
7935
|
|
|
7841
7936
|
// src/components/promotions/promotion-trigger.tsx
|
|
7842
|
-
var
|
|
7937
|
+
var React112 = __toESM(require("react"));
|
|
7843
7938
|
var import_react67 = require("react");
|
|
7844
7939
|
var import_editor_ui16 = require("@elementor/editor-ui");
|
|
7845
|
-
var
|
|
7940
|
+
var import_ui96 = require("@elementor/ui");
|
|
7846
7941
|
function getV4Promotion(key) {
|
|
7847
7942
|
return window.elementor?.config?.v4Promotions?.[key];
|
|
7848
7943
|
}
|
|
@@ -7859,7 +7954,7 @@ var PromotionTrigger = (0, import_react67.forwardRef)(
|
|
|
7859
7954
|
});
|
|
7860
7955
|
}, [trackingData]);
|
|
7861
7956
|
(0, import_react67.useImperativeHandle)(ref, () => ({ toggle }), [toggle]);
|
|
7862
|
-
return /* @__PURE__ */
|
|
7957
|
+
return /* @__PURE__ */ React112.createElement(React112.Fragment, null, promotion && /* @__PURE__ */ React112.createElement(
|
|
7863
7958
|
import_editor_ui16.PromotionInfotip,
|
|
7864
7959
|
{
|
|
7865
7960
|
title: promotion.title,
|
|
@@ -7873,8 +7968,8 @@ var PromotionTrigger = (0, import_react67.forwardRef)(
|
|
|
7873
7968
|
},
|
|
7874
7969
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
7875
7970
|
},
|
|
7876
|
-
/* @__PURE__ */
|
|
7877
|
-
|
|
7971
|
+
/* @__PURE__ */ React112.createElement(
|
|
7972
|
+
import_ui96.Box,
|
|
7878
7973
|
{
|
|
7879
7974
|
onClick: (e) => {
|
|
7880
7975
|
e.stopPropagation();
|
|
@@ -7882,19 +7977,19 @@ var PromotionTrigger = (0, import_react67.forwardRef)(
|
|
|
7882
7977
|
},
|
|
7883
7978
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
7884
7979
|
},
|
|
7885
|
-
children ?? /* @__PURE__ */
|
|
7980
|
+
children ?? /* @__PURE__ */ React112.createElement(import_editor_ui16.PromotionChip, null)
|
|
7886
7981
|
)
|
|
7887
7982
|
));
|
|
7888
7983
|
}
|
|
7889
7984
|
);
|
|
7890
7985
|
|
|
7891
7986
|
// src/components/promotions/display-conditions-control.tsx
|
|
7892
|
-
var ARIA_LABEL = (0,
|
|
7987
|
+
var ARIA_LABEL = (0, import_i18n55.__)("Display Conditions", "elementor");
|
|
7893
7988
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
7894
7989
|
var DisplayConditionsControl = createControl(() => {
|
|
7895
7990
|
const triggerRef = (0, import_react68.useRef)(null);
|
|
7896
|
-
return /* @__PURE__ */
|
|
7897
|
-
|
|
7991
|
+
return /* @__PURE__ */ React113.createElement(
|
|
7992
|
+
import_ui97.Stack,
|
|
7898
7993
|
{
|
|
7899
7994
|
direction: "row",
|
|
7900
7995
|
spacing: 2,
|
|
@@ -7903,9 +7998,9 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
7903
7998
|
alignItems: "center"
|
|
7904
7999
|
}
|
|
7905
8000
|
},
|
|
7906
|
-
/* @__PURE__ */
|
|
7907
|
-
/* @__PURE__ */
|
|
7908
|
-
|
|
8001
|
+
/* @__PURE__ */ React113.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
8002
|
+
/* @__PURE__ */ React113.createElement(import_ui97.Tooltip, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React113.createElement(
|
|
8003
|
+
import_ui97.IconButton,
|
|
7909
8004
|
{
|
|
7910
8005
|
size: "tiny",
|
|
7911
8006
|
"aria-label": ARIA_LABEL,
|
|
@@ -7917,23 +8012,23 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
7917
8012
|
borderRadius: 1
|
|
7918
8013
|
}
|
|
7919
8014
|
},
|
|
7920
|
-
/* @__PURE__ */
|
|
8015
|
+
/* @__PURE__ */ React113.createElement(import_icons36.SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
7921
8016
|
))
|
|
7922
8017
|
);
|
|
7923
8018
|
});
|
|
7924
8019
|
|
|
7925
8020
|
// src/components/promotions/attributes-control.tsx
|
|
7926
|
-
var
|
|
8021
|
+
var React114 = __toESM(require("react"));
|
|
7927
8022
|
var import_react69 = require("react");
|
|
7928
8023
|
var import_icons37 = require("@elementor/icons");
|
|
7929
|
-
var
|
|
7930
|
-
var
|
|
7931
|
-
var ARIA_LABEL2 = (0,
|
|
8024
|
+
var import_ui98 = require("@elementor/ui");
|
|
8025
|
+
var import_i18n56 = require("@wordpress/i18n");
|
|
8026
|
+
var ARIA_LABEL2 = (0, import_i18n56.__)("Attributes", "elementor");
|
|
7932
8027
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
7933
8028
|
var AttributesControl = createControl(() => {
|
|
7934
8029
|
const triggerRef = (0, import_react69.useRef)(null);
|
|
7935
|
-
return /* @__PURE__ */
|
|
7936
|
-
|
|
8030
|
+
return /* @__PURE__ */ React114.createElement(
|
|
8031
|
+
import_ui98.Stack,
|
|
7937
8032
|
{
|
|
7938
8033
|
direction: "row",
|
|
7939
8034
|
spacing: 2,
|
|
@@ -7942,8 +8037,8 @@ var AttributesControl = createControl(() => {
|
|
|
7942
8037
|
alignItems: "center"
|
|
7943
8038
|
}
|
|
7944
8039
|
},
|
|
7945
|
-
/* @__PURE__ */
|
|
7946
|
-
/* @__PURE__ */
|
|
8040
|
+
/* @__PURE__ */ React114.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
8041
|
+
/* @__PURE__ */ React114.createElement(import_ui98.Tooltip, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React114.createElement(
|
|
7947
8042
|
import_icons37.PlusIcon,
|
|
7948
8043
|
{
|
|
7949
8044
|
"aria-label": ARIA_LABEL2,
|
|
@@ -7957,21 +8052,21 @@ var AttributesControl = createControl(() => {
|
|
|
7957
8052
|
});
|
|
7958
8053
|
|
|
7959
8054
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
7960
|
-
var
|
|
8055
|
+
var React115 = __toESM(require("react"));
|
|
7961
8056
|
var import_icons38 = require("@elementor/icons");
|
|
7962
|
-
var
|
|
7963
|
-
var CustomIconButton = (0,
|
|
8057
|
+
var import_ui99 = require("@elementor/ui");
|
|
8058
|
+
var CustomIconButton = (0, import_ui99.styled)(import_ui99.IconButton)(({ theme }) => ({
|
|
7964
8059
|
width: theme.spacing(2.5),
|
|
7965
8060
|
height: theme.spacing(2.5)
|
|
7966
8061
|
}));
|
|
7967
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
8062
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React115.createElement(import_ui99.Tooltip, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React115.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React115.createElement(import_icons38.BrushBigIcon, { fontSize: size })));
|
|
7968
8063
|
|
|
7969
8064
|
// src/components/repeater/repeater.tsx
|
|
7970
|
-
var
|
|
8065
|
+
var React116 = __toESM(require("react"));
|
|
7971
8066
|
var import_react70 = require("react");
|
|
7972
8067
|
var import_icons39 = require("@elementor/icons");
|
|
7973
|
-
var
|
|
7974
|
-
var
|
|
8068
|
+
var import_ui100 = require("@elementor/ui");
|
|
8069
|
+
var import_i18n57 = require("@wordpress/i18n");
|
|
7975
8070
|
var SIZE11 = "tiny";
|
|
7976
8071
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
7977
8072
|
var Repeater3 = ({
|
|
@@ -8052,8 +8147,8 @@ var Repeater3 = ({
|
|
|
8052
8147
|
};
|
|
8053
8148
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
8054
8149
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
8055
|
-
const addButton = /* @__PURE__ */
|
|
8056
|
-
|
|
8150
|
+
const addButton = /* @__PURE__ */ React116.createElement(
|
|
8151
|
+
import_ui100.IconButton,
|
|
8057
8152
|
{
|
|
8058
8153
|
size: SIZE11,
|
|
8059
8154
|
sx: {
|
|
@@ -8061,32 +8156,32 @@ var Repeater3 = ({
|
|
|
8061
8156
|
},
|
|
8062
8157
|
disabled: isButtonDisabled,
|
|
8063
8158
|
onClick: addRepeaterItem,
|
|
8064
|
-
"aria-label": (0,
|
|
8159
|
+
"aria-label": (0, import_i18n57.__)("Add item", "elementor")
|
|
8065
8160
|
},
|
|
8066
|
-
/* @__PURE__ */
|
|
8161
|
+
/* @__PURE__ */ React116.createElement(import_icons39.PlusIcon, { fontSize: SIZE11 })
|
|
8067
8162
|
);
|
|
8068
|
-
return /* @__PURE__ */
|
|
8069
|
-
|
|
8163
|
+
return /* @__PURE__ */ React116.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React116.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React116.createElement(
|
|
8164
|
+
import_ui100.Infotip,
|
|
8070
8165
|
{
|
|
8071
8166
|
placement: "right",
|
|
8072
8167
|
content: addButtonInfotipContent,
|
|
8073
8168
|
color: "secondary",
|
|
8074
8169
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
8075
8170
|
},
|
|
8076
|
-
/* @__PURE__ */
|
|
8077
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
8171
|
+
/* @__PURE__ */ React116.createElement(import_ui100.Box, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
8172
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React116.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
8078
8173
|
const index = uniqueKeys.indexOf(key);
|
|
8079
8174
|
const value = items2[index];
|
|
8080
8175
|
if (!value) {
|
|
8081
8176
|
return null;
|
|
8082
8177
|
}
|
|
8083
|
-
return /* @__PURE__ */
|
|
8178
|
+
return /* @__PURE__ */ React116.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React116.createElement(
|
|
8084
8179
|
RepeaterItem,
|
|
8085
8180
|
{
|
|
8086
8181
|
disabled,
|
|
8087
8182
|
propDisabled: value?.disabled,
|
|
8088
|
-
label: /* @__PURE__ */
|
|
8089
|
-
startIcon: /* @__PURE__ */
|
|
8183
|
+
label: /* @__PURE__ */ React116.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React116.createElement(itemSettings.Label, { value, index })),
|
|
8184
|
+
startIcon: /* @__PURE__ */ React116.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React116.createElement(itemSettings.Icon, { value })),
|
|
8090
8185
|
removeItem: () => removeRepeaterItem(index),
|
|
8091
8186
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
8092
8187
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -8100,7 +8195,7 @@ var Repeater3 = ({
|
|
|
8100
8195
|
actions: itemSettings.actions,
|
|
8101
8196
|
value
|
|
8102
8197
|
},
|
|
8103
|
-
(props) => /* @__PURE__ */
|
|
8198
|
+
(props) => /* @__PURE__ */ React116.createElement(
|
|
8104
8199
|
itemSettings.Content,
|
|
8105
8200
|
{
|
|
8106
8201
|
...props,
|
|
@@ -8140,18 +8235,18 @@ var RepeaterItem = ({
|
|
|
8140
8235
|
},
|
|
8141
8236
|
wrappedOnPopoverClose
|
|
8142
8237
|
);
|
|
8143
|
-
const triggerProps = (0,
|
|
8238
|
+
const triggerProps = (0, import_ui100.bindTrigger)(popoverState);
|
|
8144
8239
|
usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
|
|
8145
|
-
const duplicateLabel = (0,
|
|
8146
|
-
const toggleLabel = propDisabled ? (0,
|
|
8147
|
-
const removeLabel = (0,
|
|
8148
|
-
return /* @__PURE__ */
|
|
8240
|
+
const duplicateLabel = (0, import_i18n57.__)("Duplicate", "elementor");
|
|
8241
|
+
const toggleLabel = propDisabled ? (0, import_i18n57.__)("Show", "elementor") : (0, import_i18n57.__)("Hide", "elementor");
|
|
8242
|
+
const removeLabel = (0, import_i18n57.__)("Remove", "elementor");
|
|
8243
|
+
return /* @__PURE__ */ React116.createElement(import_ui100.Box, { sx: { display: "contents" } }, /* @__PURE__ */ React116.createElement(
|
|
8149
8244
|
RepeaterTag,
|
|
8150
8245
|
{
|
|
8151
8246
|
disabled,
|
|
8152
8247
|
label,
|
|
8153
8248
|
ref: setRef,
|
|
8154
|
-
"aria-label": (0,
|
|
8249
|
+
"aria-label": (0, import_i18n57.__)("Open item", "elementor"),
|
|
8155
8250
|
...triggerProps,
|
|
8156
8251
|
onClick: (e) => {
|
|
8157
8252
|
triggerProps.onClick(e);
|
|
@@ -8160,14 +8255,14 @@ var RepeaterItem = ({
|
|
|
8160
8255
|
}
|
|
8161
8256
|
},
|
|
8162
8257
|
startIcon,
|
|
8163
|
-
actions: /* @__PURE__ */
|
|
8258
|
+
actions: /* @__PURE__ */ React116.createElement(React116.Fragment, null, showDuplicate && /* @__PURE__ */ React116.createElement(import_ui100.Tooltip, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React116.createElement(import_ui100.IconButton, { size: SIZE11, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React116.createElement(import_icons39.CopyIcon, { fontSize: SIZE11 }))), showToggle && /* @__PURE__ */ React116.createElement(import_ui100.Tooltip, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React116.createElement(import_ui100.IconButton, { size: SIZE11, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React116.createElement(import_icons39.EyeOffIcon, { fontSize: SIZE11 }) : /* @__PURE__ */ React116.createElement(import_icons39.EyeIcon, { fontSize: SIZE11 }))), actions?.(value), showRemove && /* @__PURE__ */ React116.createElement(import_ui100.Tooltip, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React116.createElement(import_ui100.IconButton, { size: SIZE11, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React116.createElement(import_icons39.XIcon, { fontSize: SIZE11 }))))
|
|
8164
8259
|
}
|
|
8165
|
-
), /* @__PURE__ */
|
|
8260
|
+
), /* @__PURE__ */ React116.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React116.createElement(import_ui100.Box, null, children({ anchorEl: ref }))));
|
|
8166
8261
|
};
|
|
8167
8262
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
8168
8263
|
const [ref, setRef] = (0, import_react70.useState)(null);
|
|
8169
|
-
const popoverState = (0,
|
|
8170
|
-
const popoverProps = (0,
|
|
8264
|
+
const popoverState = (0, import_ui100.usePopupState)({ variant: "popover" });
|
|
8265
|
+
const popoverProps = (0, import_ui100.bindPopover)(popoverState);
|
|
8171
8266
|
(0, import_react70.useEffect)(() => {
|
|
8172
8267
|
if (openOnMount && ref) {
|
|
8173
8268
|
popoverState.open(ref);
|
|
@@ -8187,20 +8282,20 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
8187
8282
|
};
|
|
8188
8283
|
|
|
8189
8284
|
// src/components/inline-editor-toolbar.tsx
|
|
8190
|
-
var
|
|
8285
|
+
var React118 = __toESM(require("react"));
|
|
8191
8286
|
var import_react72 = require("react");
|
|
8192
8287
|
var import_editor_elements7 = require("@elementor/editor-elements");
|
|
8193
8288
|
var import_icons41 = require("@elementor/icons");
|
|
8194
|
-
var
|
|
8289
|
+
var import_ui102 = require("@elementor/ui");
|
|
8195
8290
|
var import_react73 = require("@tiptap/react");
|
|
8196
|
-
var
|
|
8291
|
+
var import_i18n59 = require("@wordpress/i18n");
|
|
8197
8292
|
|
|
8198
8293
|
// src/components/url-popover.tsx
|
|
8199
|
-
var
|
|
8294
|
+
var React117 = __toESM(require("react"));
|
|
8200
8295
|
var import_react71 = require("react");
|
|
8201
8296
|
var import_icons40 = require("@elementor/icons");
|
|
8202
|
-
var
|
|
8203
|
-
var
|
|
8297
|
+
var import_ui101 = require("@elementor/ui");
|
|
8298
|
+
var import_i18n58 = require("@wordpress/i18n");
|
|
8204
8299
|
var UrlPopover = ({
|
|
8205
8300
|
popupState,
|
|
8206
8301
|
restoreValue,
|
|
@@ -8220,41 +8315,41 @@ var UrlPopover = ({
|
|
|
8220
8315
|
restoreValue();
|
|
8221
8316
|
popupState.close();
|
|
8222
8317
|
};
|
|
8223
|
-
return /* @__PURE__ */
|
|
8224
|
-
|
|
8318
|
+
return /* @__PURE__ */ React117.createElement(
|
|
8319
|
+
import_ui101.Popover,
|
|
8225
8320
|
{
|
|
8226
8321
|
slotProps: {
|
|
8227
8322
|
paper: { sx: { borderRadius: "16px", width: anchorRef.current?.offsetWidth + "px", marginTop: -1 } }
|
|
8228
8323
|
},
|
|
8229
|
-
...(0,
|
|
8324
|
+
...(0, import_ui101.bindPopover)(popupState),
|
|
8230
8325
|
anchorOrigin: { vertical: "top", horizontal: "left" },
|
|
8231
8326
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
8232
8327
|
onClose: handleClose
|
|
8233
8328
|
},
|
|
8234
|
-
/* @__PURE__ */
|
|
8235
|
-
|
|
8329
|
+
/* @__PURE__ */ React117.createElement(import_ui101.Stack, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React117.createElement(
|
|
8330
|
+
import_ui101.TextField,
|
|
8236
8331
|
{
|
|
8237
8332
|
value,
|
|
8238
8333
|
onChange,
|
|
8239
8334
|
size: "tiny",
|
|
8240
8335
|
fullWidth: true,
|
|
8241
|
-
placeholder: (0,
|
|
8336
|
+
placeholder: (0, import_i18n58.__)("Type a URL", "elementor"),
|
|
8242
8337
|
inputProps: { ref: inputRef },
|
|
8243
8338
|
color: "secondary",
|
|
8244
8339
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
8245
8340
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
8246
8341
|
}
|
|
8247
|
-
), /* @__PURE__ */
|
|
8248
|
-
|
|
8342
|
+
), /* @__PURE__ */ React117.createElement(import_ui101.Tooltip, { title: (0, import_i18n58.__)("Open in a new tab", "elementor") }, /* @__PURE__ */ React117.createElement(
|
|
8343
|
+
import_ui101.ToggleButton,
|
|
8249
8344
|
{
|
|
8250
8345
|
size: "tiny",
|
|
8251
8346
|
value: "newTab",
|
|
8252
8347
|
selected: openInNewTab,
|
|
8253
8348
|
onClick: onToggleNewTab,
|
|
8254
|
-
"aria-label": (0,
|
|
8349
|
+
"aria-label": (0, import_i18n58.__)("Open in a new tab", "elementor"),
|
|
8255
8350
|
sx: { borderRadius: "8px" }
|
|
8256
8351
|
},
|
|
8257
|
-
/* @__PURE__ */
|
|
8352
|
+
/* @__PURE__ */ React117.createElement(import_icons40.ExternalLinkIcon, { fontSize: "tiny" })
|
|
8258
8353
|
)))
|
|
8259
8354
|
);
|
|
8260
8355
|
};
|
|
@@ -8264,7 +8359,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8264
8359
|
const [urlValue, setUrlValue] = (0, import_react72.useState)("");
|
|
8265
8360
|
const [openInNewTab, setOpenInNewTab] = (0, import_react72.useState)(false);
|
|
8266
8361
|
const toolbarRef = (0, import_react72.useRef)(null);
|
|
8267
|
-
const linkPopupState = (0,
|
|
8362
|
+
const linkPopupState = (0, import_ui102.usePopupState)({ variant: "popover" });
|
|
8268
8363
|
const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
|
|
8269
8364
|
const editorState = (0, import_react73.useEditorState)({
|
|
8270
8365
|
editor,
|
|
@@ -8310,8 +8405,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8310
8405
|
(0, import_react72.useEffect)(() => {
|
|
8311
8406
|
editor?.commands?.focus();
|
|
8312
8407
|
}, [editor]);
|
|
8313
|
-
return /* @__PURE__ */
|
|
8314
|
-
|
|
8408
|
+
return /* @__PURE__ */ React118.createElement(
|
|
8409
|
+
import_ui102.Box,
|
|
8315
8410
|
{
|
|
8316
8411
|
ref: toolbarRef,
|
|
8317
8412
|
sx: {
|
|
@@ -8327,9 +8422,9 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8327
8422
|
...sx
|
|
8328
8423
|
}
|
|
8329
8424
|
},
|
|
8330
|
-
/* @__PURE__ */
|
|
8331
|
-
/* @__PURE__ */
|
|
8332
|
-
|
|
8425
|
+
/* @__PURE__ */ React118.createElement(import_ui102.Tooltip, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React118.createElement(import_ui102.IconButton, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
8426
|
+
/* @__PURE__ */ React118.createElement(
|
|
8427
|
+
import_ui102.ToggleButtonGroup,
|
|
8333
8428
|
{
|
|
8334
8429
|
value: editorState,
|
|
8335
8430
|
size: "tiny",
|
|
@@ -8337,7 +8432,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8337
8432
|
display: "flex",
|
|
8338
8433
|
gap: 0.5,
|
|
8339
8434
|
border: "none",
|
|
8340
|
-
[`& .${
|
|
8435
|
+
[`& .${import_ui102.toggleButtonGroupClasses.firstButton}, & .${import_ui102.toggleButtonGroupClasses.middleButton}, & .${import_ui102.toggleButtonGroupClasses.lastButton}`]: {
|
|
8341
8436
|
borderRadius: "8px",
|
|
8342
8437
|
border: "none",
|
|
8343
8438
|
marginLeft: 0,
|
|
@@ -8350,8 +8445,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8350
8445
|
}
|
|
8351
8446
|
}
|
|
8352
8447
|
},
|
|
8353
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
8354
|
-
|
|
8448
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React118.createElement(import_ui102.Tooltip, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React118.createElement(
|
|
8449
|
+
import_ui102.ToggleButton,
|
|
8355
8450
|
{
|
|
8356
8451
|
value: button.action,
|
|
8357
8452
|
"aria-label": button.label,
|
|
@@ -8368,7 +8463,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8368
8463
|
button.icon
|
|
8369
8464
|
)))
|
|
8370
8465
|
),
|
|
8371
|
-
/* @__PURE__ */
|
|
8466
|
+
/* @__PURE__ */ React118.createElement(
|
|
8372
8467
|
UrlPopover,
|
|
8373
8468
|
{
|
|
8374
8469
|
popupState: linkPopupState,
|
|
@@ -8391,64 +8486,64 @@ var checkIfElementIsClickable = (elementId) => {
|
|
|
8391
8486
|
};
|
|
8392
8487
|
var toolbarButtons = {
|
|
8393
8488
|
clear: {
|
|
8394
|
-
label: (0,
|
|
8395
|
-
icon: /* @__PURE__ */
|
|
8489
|
+
label: (0, import_i18n59.__)("Clear", "elementor"),
|
|
8490
|
+
icon: /* @__PURE__ */ React118.createElement(import_icons41.MinusIcon, { fontSize: "tiny" }),
|
|
8396
8491
|
action: "clear",
|
|
8397
8492
|
method: (editor) => {
|
|
8398
8493
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
8399
8494
|
}
|
|
8400
8495
|
},
|
|
8401
8496
|
bold: {
|
|
8402
|
-
label: (0,
|
|
8403
|
-
icon: /* @__PURE__ */
|
|
8497
|
+
label: (0, import_i18n59.__)("Bold", "elementor"),
|
|
8498
|
+
icon: /* @__PURE__ */ React118.createElement(import_icons41.BoldIcon, { fontSize: "tiny" }),
|
|
8404
8499
|
action: "bold",
|
|
8405
8500
|
method: (editor) => {
|
|
8406
8501
|
editor.chain().focus().toggleBold().run();
|
|
8407
8502
|
}
|
|
8408
8503
|
},
|
|
8409
8504
|
italic: {
|
|
8410
|
-
label: (0,
|
|
8411
|
-
icon: /* @__PURE__ */
|
|
8505
|
+
label: (0, import_i18n59.__)("Italic", "elementor"),
|
|
8506
|
+
icon: /* @__PURE__ */ React118.createElement(import_icons41.ItalicIcon, { fontSize: "tiny" }),
|
|
8412
8507
|
action: "italic",
|
|
8413
8508
|
method: (editor) => {
|
|
8414
8509
|
editor.chain().focus().toggleItalic().run();
|
|
8415
8510
|
}
|
|
8416
8511
|
},
|
|
8417
8512
|
underline: {
|
|
8418
|
-
label: (0,
|
|
8419
|
-
icon: /* @__PURE__ */
|
|
8513
|
+
label: (0, import_i18n59.__)("Underline", "elementor"),
|
|
8514
|
+
icon: /* @__PURE__ */ React118.createElement(import_icons41.UnderlineIcon, { fontSize: "tiny" }),
|
|
8420
8515
|
action: "underline",
|
|
8421
8516
|
method: (editor) => {
|
|
8422
8517
|
editor.chain().focus().toggleUnderline().run();
|
|
8423
8518
|
}
|
|
8424
8519
|
},
|
|
8425
8520
|
strike: {
|
|
8426
|
-
label: (0,
|
|
8427
|
-
icon: /* @__PURE__ */
|
|
8521
|
+
label: (0, import_i18n59.__)("Strikethrough", "elementor"),
|
|
8522
|
+
icon: /* @__PURE__ */ React118.createElement(import_icons41.StrikethroughIcon, { fontSize: "tiny" }),
|
|
8428
8523
|
action: "strike",
|
|
8429
8524
|
method: (editor) => {
|
|
8430
8525
|
editor.chain().focus().toggleStrike().run();
|
|
8431
8526
|
}
|
|
8432
8527
|
},
|
|
8433
8528
|
superscript: {
|
|
8434
|
-
label: (0,
|
|
8435
|
-
icon: /* @__PURE__ */
|
|
8529
|
+
label: (0, import_i18n59.__)("Superscript", "elementor"),
|
|
8530
|
+
icon: /* @__PURE__ */ React118.createElement(import_icons41.SuperscriptIcon, { fontSize: "tiny" }),
|
|
8436
8531
|
action: "superscript",
|
|
8437
8532
|
method: (editor) => {
|
|
8438
8533
|
editor.chain().focus().toggleSuperscript().run();
|
|
8439
8534
|
}
|
|
8440
8535
|
},
|
|
8441
8536
|
subscript: {
|
|
8442
|
-
label: (0,
|
|
8443
|
-
icon: /* @__PURE__ */
|
|
8537
|
+
label: (0, import_i18n59.__)("Subscript", "elementor"),
|
|
8538
|
+
icon: /* @__PURE__ */ React118.createElement(import_icons41.SubscriptIcon, { fontSize: "tiny" }),
|
|
8444
8539
|
action: "subscript",
|
|
8445
8540
|
method: (editor) => {
|
|
8446
8541
|
editor.chain().focus().toggleSubscript().run();
|
|
8447
8542
|
}
|
|
8448
8543
|
},
|
|
8449
8544
|
link: {
|
|
8450
|
-
label: (0,
|
|
8451
|
-
icon: /* @__PURE__ */
|
|
8545
|
+
label: (0, import_i18n59.__)("Link", "elementor"),
|
|
8546
|
+
icon: /* @__PURE__ */ React118.createElement(import_icons41.LinkIcon, { fontSize: "tiny" }),
|
|
8452
8547
|
action: "link",
|
|
8453
8548
|
method: null
|
|
8454
8549
|
}
|
|
@@ -8457,8 +8552,8 @@ var { clear: clearButton, ...formatButtons } = toolbarButtons;
|
|
|
8457
8552
|
var possibleFormats = Object.keys(formatButtons);
|
|
8458
8553
|
|
|
8459
8554
|
// src/components/size/unstable-size-field.tsx
|
|
8460
|
-
var
|
|
8461
|
-
var
|
|
8555
|
+
var React121 = __toESM(require("react"));
|
|
8556
|
+
var import_ui104 = require("@elementor/ui");
|
|
8462
8557
|
|
|
8463
8558
|
// src/hooks/use-size-value.ts
|
|
8464
8559
|
var DEFAULT_UNIT2 = "px";
|
|
@@ -8500,17 +8595,17 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
8500
8595
|
};
|
|
8501
8596
|
|
|
8502
8597
|
// src/components/size/unit-select.tsx
|
|
8503
|
-
var
|
|
8598
|
+
var React119 = __toESM(require("react"));
|
|
8504
8599
|
var import_react74 = require("react");
|
|
8505
8600
|
var import_editor_ui17 = require("@elementor/editor-ui");
|
|
8506
|
-
var
|
|
8601
|
+
var import_ui103 = require("@elementor/ui");
|
|
8507
8602
|
var menuItemContentStyles2 = {
|
|
8508
8603
|
display: "flex",
|
|
8509
8604
|
flexDirection: "column",
|
|
8510
8605
|
justifyContent: "center"
|
|
8511
8606
|
};
|
|
8512
8607
|
var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
8513
|
-
const popupState = (0,
|
|
8608
|
+
const popupState = (0, import_ui103.usePopupState)({
|
|
8514
8609
|
variant: "popover",
|
|
8515
8610
|
popupId: (0, import_react74.useId)()
|
|
8516
8611
|
});
|
|
@@ -8518,7 +8613,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
8518
8613
|
onClick(options[index]);
|
|
8519
8614
|
popupState.close();
|
|
8520
8615
|
};
|
|
8521
|
-
return /* @__PURE__ */
|
|
8616
|
+
return /* @__PURE__ */ React119.createElement(React119.Fragment, null, /* @__PURE__ */ React119.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...(0, import_ui103.bindTrigger)(popupState) }, value), /* @__PURE__ */ React119.createElement(import_ui103.Menu, { MenuListProps: { dense: true }, ...(0, import_ui103.bindMenu)(popupState) }, options.map((option, index) => /* @__PURE__ */ React119.createElement(
|
|
8522
8617
|
import_editor_ui17.MenuListItem,
|
|
8523
8618
|
{
|
|
8524
8619
|
key: option,
|
|
@@ -8537,7 +8632,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
8537
8632
|
option.toUpperCase()
|
|
8538
8633
|
))));
|
|
8539
8634
|
};
|
|
8540
|
-
var StyledButton3 = (0,
|
|
8635
|
+
var StyledButton3 = (0, import_ui103.styled)(import_ui103.Button, {
|
|
8541
8636
|
shouldForwardProp: (prop) => prop !== "isPrimaryColor"
|
|
8542
8637
|
})(({ isPrimaryColor, theme }) => ({
|
|
8543
8638
|
color: isPrimaryColor ? theme.palette.text.primary : theme.palette.text.tertiary,
|
|
@@ -8547,11 +8642,11 @@ var StyledButton3 = (0, import_ui101.styled)(import_ui101.Button, {
|
|
|
8547
8642
|
}));
|
|
8548
8643
|
|
|
8549
8644
|
// src/components/size/unstable-size-input.tsx
|
|
8550
|
-
var
|
|
8645
|
+
var React120 = __toESM(require("react"));
|
|
8551
8646
|
var import_react75 = require("react");
|
|
8552
8647
|
var UnstableSizeInput = (0, import_react75.forwardRef)(
|
|
8553
8648
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
8554
|
-
return /* @__PURE__ */
|
|
8649
|
+
return /* @__PURE__ */ React120.createElement(
|
|
8555
8650
|
NumberInput,
|
|
8556
8651
|
{
|
|
8557
8652
|
ref,
|
|
@@ -8589,7 +8684,7 @@ var UnstableSizeField = ({
|
|
|
8589
8684
|
const shouldHighlightUnit2 = () => {
|
|
8590
8685
|
return hasValue(size);
|
|
8591
8686
|
};
|
|
8592
|
-
return /* @__PURE__ */
|
|
8687
|
+
return /* @__PURE__ */ React121.createElement(
|
|
8593
8688
|
UnstableSizeInput,
|
|
8594
8689
|
{
|
|
8595
8690
|
type: "number",
|
|
@@ -8598,8 +8693,8 @@ var UnstableSizeField = ({
|
|
|
8598
8693
|
onChange: (event) => setSize(event.target.value),
|
|
8599
8694
|
InputProps: {
|
|
8600
8695
|
...InputProps,
|
|
8601
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
8602
|
-
endAdornment: /* @__PURE__ */
|
|
8696
|
+
startAdornment: startIcon && /* @__PURE__ */ React121.createElement(import_ui104.InputAdornment, { position: "start" }, startIcon),
|
|
8697
|
+
endAdornment: /* @__PURE__ */ React121.createElement(import_ui104.InputAdornment, { position: "end" }, /* @__PURE__ */ React121.createElement(
|
|
8603
8698
|
UnitSelect,
|
|
8604
8699
|
{
|
|
8605
8700
|
options: units2,
|
|
@@ -8662,6 +8757,7 @@ var useFontFamilies = () => {
|
|
|
8662
8757
|
ControlFormLabel,
|
|
8663
8758
|
ControlReplacementsProvider,
|
|
8664
8759
|
ControlToggleButtonGroup,
|
|
8760
|
+
DateRangeControl,
|
|
8665
8761
|
DateTimeControl,
|
|
8666
8762
|
DisplayConditionsControl,
|
|
8667
8763
|
EmailFormActionControl,
|