@elementor/editor-controls 4.1.0-821 → 4.1.0-822
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.mjs
CHANGED
|
@@ -7409,15 +7409,109 @@ var DateTimeControl = createControl(({ inputDisabled }) => {
|
|
|
7409
7409
|
))))));
|
|
7410
7410
|
});
|
|
7411
7411
|
|
|
7412
|
-
// src/controls/
|
|
7412
|
+
// src/controls/date-range-control.tsx
|
|
7413
7413
|
import * as React108 from "react";
|
|
7414
|
+
import { dateRangePropTypeUtil, dateStringPropTypeUtil as dateStringPropTypeUtil2 } from "@elementor/editor-props";
|
|
7415
|
+
import { FormHelperText as FormHelperText2, Grid as Grid29, Stack as Stack17 } from "@elementor/ui";
|
|
7416
|
+
import { __ as __53 } from "@wordpress/i18n";
|
|
7417
|
+
|
|
7418
|
+
// src/controls/date-string-control.tsx
|
|
7419
|
+
import * as React107 from "react";
|
|
7420
|
+
import * as dayjs2 from "dayjs";
|
|
7421
|
+
import { dateStringPropTypeUtil } from "@elementor/editor-props";
|
|
7422
|
+
import { DatePicker as DatePicker2, LocalizationProvider as LocalizationProvider2 } from "@elementor/ui";
|
|
7423
|
+
var DATE_FORMAT2 = "YYYY-MM-DD";
|
|
7424
|
+
var DateStringControl = createControl(({ inputDisabled, ariaLabel, error }) => {
|
|
7425
|
+
const { value, setValue, disabled } = useBoundProp(dateStringPropTypeUtil);
|
|
7426
|
+
const isDisabled = inputDisabled ?? disabled;
|
|
7427
|
+
const slotProps = {
|
|
7428
|
+
textField: {
|
|
7429
|
+
size: "tiny",
|
|
7430
|
+
fullWidth: true,
|
|
7431
|
+
error,
|
|
7432
|
+
inputProps: ariaLabel ? { "aria-label": ariaLabel } : void 0
|
|
7433
|
+
},
|
|
7434
|
+
openPickerButton: { size: "tiny" },
|
|
7435
|
+
openPickerIcon: { fontSize: "tiny" }
|
|
7436
|
+
};
|
|
7437
|
+
const handleChange = (newValue, format) => {
|
|
7438
|
+
if (!newValue) {
|
|
7439
|
+
setValue(null);
|
|
7440
|
+
return;
|
|
7441
|
+
}
|
|
7442
|
+
setValue(newValue.format(format));
|
|
7443
|
+
};
|
|
7444
|
+
return /* @__PURE__ */ React107.createElement(LocalizationProvider2, null, /* @__PURE__ */ React107.createElement(ControlActions, null, /* @__PURE__ */ React107.createElement(
|
|
7445
|
+
DatePicker2,
|
|
7446
|
+
{
|
|
7447
|
+
value: parseDateString(value ?? ""),
|
|
7448
|
+
onChange: (newValue) => handleChange(newValue, DATE_FORMAT2),
|
|
7449
|
+
disabled: isDisabled,
|
|
7450
|
+
slotProps
|
|
7451
|
+
}
|
|
7452
|
+
)));
|
|
7453
|
+
});
|
|
7454
|
+
function parseDateString(raw) {
|
|
7455
|
+
if (!raw) {
|
|
7456
|
+
return null;
|
|
7457
|
+
}
|
|
7458
|
+
const parsed = dayjs2.default(raw);
|
|
7459
|
+
return isValidDayjs(parsed) ? parsed : null;
|
|
7460
|
+
}
|
|
7461
|
+
function isValidDayjs(value) {
|
|
7462
|
+
return !!value && typeof value.isValid === "function" && value.isValid();
|
|
7463
|
+
}
|
|
7464
|
+
|
|
7465
|
+
// src/controls/date-range-control.tsx
|
|
7466
|
+
var RANGE_LABELS = {
|
|
7467
|
+
min: __53("Min date", "elementor"),
|
|
7468
|
+
max: __53("Max date", "elementor")
|
|
7469
|
+
};
|
|
7470
|
+
var isMaxBeforeMin = (minIso, maxIso) => {
|
|
7471
|
+
if (!minIso || !maxIso || [minIso, maxIso].some((v) => v === "Invalid Date")) {
|
|
7472
|
+
return false;
|
|
7473
|
+
}
|
|
7474
|
+
return maxIso < minIso;
|
|
7475
|
+
};
|
|
7476
|
+
var RANGE_ERROR_MESSAGE = __53("Max date must be on or after Min date", "elementor");
|
|
7477
|
+
var DateRangeControl = createControl(() => {
|
|
7478
|
+
const { value, setValue, ...propContext } = useBoundProp(dateRangePropTypeUtil);
|
|
7479
|
+
const minString = dateStringPropTypeUtil2.extract(value?.min);
|
|
7480
|
+
const maxString = dateStringPropTypeUtil2.extract(value?.max);
|
|
7481
|
+
const hasInvalidRange = isMaxBeforeMin(minString, maxString);
|
|
7482
|
+
return /* @__PURE__ */ React108.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React108.createElement(Stack17, { gap: 0.75 }, /* @__PURE__ */ React108.createElement(Stack17, { direction: "row", gap: 2, flexWrap: "nowrap" }, /* @__PURE__ */ React108.createElement(Grid29, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React108.createElement(Grid29, { item: true, xs: 12 }, /* @__PURE__ */ React108.createElement(ControlFormLabel, null, RANGE_LABELS.min)), /* @__PURE__ */ React108.createElement(Grid29, { item: true, xs: 12 }, /* @__PURE__ */ React108.createElement(
|
|
7483
|
+
BoundDateStringControl,
|
|
7484
|
+
{
|
|
7485
|
+
bind: "min",
|
|
7486
|
+
ariaLabel: RANGE_LABELS.min,
|
|
7487
|
+
error: hasInvalidRange
|
|
7488
|
+
}
|
|
7489
|
+
))), /* @__PURE__ */ React108.createElement(Grid29, { container: true, gap: 0.75, alignItems: "center" }, /* @__PURE__ */ React108.createElement(Grid29, { item: true, xs: 12 }, /* @__PURE__ */ React108.createElement(ControlFormLabel, null, RANGE_LABELS.max)), /* @__PURE__ */ React108.createElement(Grid29, { item: true, xs: 12 }, /* @__PURE__ */ React108.createElement(
|
|
7490
|
+
BoundDateStringControl,
|
|
7491
|
+
{
|
|
7492
|
+
bind: "max",
|
|
7493
|
+
ariaLabel: RANGE_LABELS.max,
|
|
7494
|
+
error: hasInvalidRange
|
|
7495
|
+
}
|
|
7496
|
+
)))), hasInvalidRange && /* @__PURE__ */ React108.createElement(FormHelperText2, { error: true }, RANGE_ERROR_MESSAGE)));
|
|
7497
|
+
});
|
|
7498
|
+
var BoundDateStringControl = ({
|
|
7499
|
+
bind,
|
|
7500
|
+
ariaLabel,
|
|
7501
|
+
error
|
|
7502
|
+
}) => {
|
|
7503
|
+
return /* @__PURE__ */ React108.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React108.createElement(DateStringControl, { ariaLabel, error }));
|
|
7504
|
+
};
|
|
7505
|
+
|
|
7506
|
+
// src/controls/inline-editing-control.tsx
|
|
7507
|
+
import * as React110 from "react";
|
|
7414
7508
|
import { useCallback as useCallback4, useEffect as useEffect17, useMemo as useMemo16 } from "react";
|
|
7415
7509
|
import { htmlV3PropTypeUtil, parseHtmlChildren, stringPropTypeUtil as stringPropTypeUtil18 } from "@elementor/editor-props";
|
|
7416
7510
|
import { Box as Box24 } from "@elementor/ui";
|
|
7417
7511
|
import { debounce as debounce4 } from "@elementor/utils";
|
|
7418
7512
|
|
|
7419
7513
|
// src/components/inline-editor.tsx
|
|
7420
|
-
import * as
|
|
7514
|
+
import * as React109 from "react";
|
|
7421
7515
|
import { useEffect as useEffect16, useRef as useRef27 } from "react";
|
|
7422
7516
|
import { Box as Box23 } from "@elementor/ui";
|
|
7423
7517
|
import Bold from "@tiptap/extension-bold";
|
|
@@ -7456,7 +7550,7 @@ function htmlToPlainText(html) {
|
|
|
7456
7550
|
var ITALIC_KEYBOARD_SHORTCUT = "i";
|
|
7457
7551
|
var BOLD_KEYBOARD_SHORTCUT = "b";
|
|
7458
7552
|
var UNDERLINE_KEYBOARD_SHORTCUT = "u";
|
|
7459
|
-
var InlineEditor =
|
|
7553
|
+
var InlineEditor = React109.forwardRef((props, ref) => {
|
|
7460
7554
|
const {
|
|
7461
7555
|
value,
|
|
7462
7556
|
setValue,
|
|
@@ -7567,7 +7661,7 @@ var InlineEditor = React107.forwardRef((props, ref) => {
|
|
|
7567
7661
|
if (mountElement) {
|
|
7568
7662
|
return null;
|
|
7569
7663
|
}
|
|
7570
|
-
return /* @__PURE__ */
|
|
7664
|
+
return /* @__PURE__ */ React109.createElement(Box23, { ref: containerRef, sx, className: wrapperClassName }, /* @__PURE__ */ React109.createElement(EditorContent, { ref, editor }));
|
|
7571
7665
|
});
|
|
7572
7666
|
var useOnUpdate = (callback, dependencies) => {
|
|
7573
7667
|
const hasMounted = useRef27(false);
|
|
@@ -7612,7 +7706,7 @@ var InlineEditingControl = createControl(
|
|
|
7612
7706
|
[setValue, value?.children, debouncedParse]
|
|
7613
7707
|
);
|
|
7614
7708
|
useEffect17(() => () => debouncedParse.cancel(), [debouncedParse]);
|
|
7615
|
-
return /* @__PURE__ */
|
|
7709
|
+
return /* @__PURE__ */ React110.createElement(ControlActions, null, /* @__PURE__ */ React110.createElement(
|
|
7616
7710
|
Box24,
|
|
7617
7711
|
{
|
|
7618
7712
|
sx: {
|
|
@@ -7657,7 +7751,7 @@ var InlineEditingControl = createControl(
|
|
|
7657
7751
|
...attributes,
|
|
7658
7752
|
...props
|
|
7659
7753
|
},
|
|
7660
|
-
/* @__PURE__ */
|
|
7754
|
+
/* @__PURE__ */ React110.createElement(
|
|
7661
7755
|
InlineEditor,
|
|
7662
7756
|
{
|
|
7663
7757
|
value: content,
|
|
@@ -7670,12 +7764,12 @@ var InlineEditingControl = createControl(
|
|
|
7670
7764
|
);
|
|
7671
7765
|
|
|
7672
7766
|
// src/controls/email-form-action-control.tsx
|
|
7673
|
-
import * as
|
|
7767
|
+
import * as React111 from "react";
|
|
7674
7768
|
import { emailPropTypeUtil } from "@elementor/editor-props";
|
|
7675
7769
|
import { CollapsibleContent, InfoAlert as InfoAlert2 } from "@elementor/editor-ui";
|
|
7676
|
-
import { Box as Box25, Divider as Divider5, Grid as
|
|
7770
|
+
import { Box as Box25, Divider as Divider5, Grid as Grid30, Stack as Stack18 } from "@elementor/ui";
|
|
7677
7771
|
import { hasProInstalled as hasProInstalled3, isVersionGreaterOrEqual as isVersionGreaterOrEqual2 } from "@elementor/utils";
|
|
7678
|
-
import { __ as
|
|
7772
|
+
import { __ as __54 } from "@wordpress/i18n";
|
|
7679
7773
|
|
|
7680
7774
|
// src/hooks/use-form-field-suggestions.ts
|
|
7681
7775
|
import { getContainer, getSelectedElements as getSelectedElements3 } from "@elementor/editor-elements";
|
|
@@ -7732,14 +7826,14 @@ function useFormFieldSuggestions(options) {
|
|
|
7732
7826
|
}
|
|
7733
7827
|
|
|
7734
7828
|
// src/controls/email-form-action-control.tsx
|
|
7735
|
-
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */
|
|
7736
|
-
var SendToField = ({ placeholder }) => /* @__PURE__ */
|
|
7737
|
-
var SubjectField = () => /* @__PURE__ */
|
|
7829
|
+
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React111.createElement(Grid30, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React111.createElement(Grid30, { item: true }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React111.createElement(Grid30, { item: true }, /* @__PURE__ */ React111.createElement(TextControl, { placeholder }))));
|
|
7830
|
+
var SendToField = ({ placeholder }) => /* @__PURE__ */ React111.createElement(EmailField, { bind: "to", label: __54("Send to", "elementor"), placeholder });
|
|
7831
|
+
var SubjectField = () => /* @__PURE__ */ React111.createElement(
|
|
7738
7832
|
EmailField,
|
|
7739
7833
|
{
|
|
7740
7834
|
bind: "subject",
|
|
7741
|
-
label:
|
|
7742
|
-
placeholder:
|
|
7835
|
+
label: __54("Email subject", "elementor"),
|
|
7836
|
+
placeholder: __54("New form submission", "elementor")
|
|
7743
7837
|
}
|
|
7744
7838
|
);
|
|
7745
7839
|
var MIN_PRO_VERSION_FOR_MENTIONS = "4.1.0";
|
|
@@ -7755,77 +7849,77 @@ var shouldShowMentionsInfo = () => {
|
|
|
7755
7849
|
};
|
|
7756
7850
|
var MessageField = () => {
|
|
7757
7851
|
const suggestions = useFormFieldSuggestions();
|
|
7758
|
-
return /* @__PURE__ */
|
|
7852
|
+
return /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "message" }, /* @__PURE__ */ React111.createElement(Grid30, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React111.createElement(Grid30, { item: true }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, __54("Message", "elementor"))), /* @__PURE__ */ React111.createElement(Grid30, { item: true }, /* @__PURE__ */ React111.createElement(MentionTextAreaControl, { suggestions })), /* @__PURE__ */ React111.createElement(Grid30, { item: true }, /* @__PURE__ */ React111.createElement(InfoAlert2, null, shouldShowMentionsInfo() ? __54(
|
|
7759
7853
|
"[all-fields] shortcode sends all fields. Type @ to insert specific fields and customize your message.",
|
|
7760
7854
|
"elementor"
|
|
7761
|
-
) :
|
|
7855
|
+
) : __54("[all-fields] shortcode sends all fields.", "elementor")))));
|
|
7762
7856
|
};
|
|
7763
|
-
var FromEmailField = () => /* @__PURE__ */
|
|
7857
|
+
var FromEmailField = () => /* @__PURE__ */ React111.createElement(
|
|
7764
7858
|
EmailField,
|
|
7765
7859
|
{
|
|
7766
7860
|
bind: "from",
|
|
7767
|
-
label:
|
|
7768
|
-
placeholder:
|
|
7861
|
+
label: __54("From email", "elementor"),
|
|
7862
|
+
placeholder: __54("What email should appear as the sender?", "elementor")
|
|
7769
7863
|
}
|
|
7770
7864
|
);
|
|
7771
|
-
var FromNameField = () => /* @__PURE__ */
|
|
7865
|
+
var FromNameField = () => /* @__PURE__ */ React111.createElement(
|
|
7772
7866
|
EmailField,
|
|
7773
7867
|
{
|
|
7774
7868
|
bind: "from-name",
|
|
7775
|
-
label:
|
|
7776
|
-
placeholder:
|
|
7869
|
+
label: __54("From name", "elementor"),
|
|
7870
|
+
placeholder: __54("What name should appear as the sender?", "elementor")
|
|
7777
7871
|
}
|
|
7778
7872
|
);
|
|
7779
7873
|
var ReplyToField = () => {
|
|
7780
7874
|
const emailSuggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
7781
|
-
return /* @__PURE__ */
|
|
7875
|
+
return /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "reply-to" }, /* @__PURE__ */ React111.createElement(Grid30, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React111.createElement(Grid30, { item: true }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, __54("Reply-to", "elementor"))), /* @__PURE__ */ React111.createElement(Grid30, { item: true }, /* @__PURE__ */ React111.createElement(
|
|
7782
7876
|
MentionTextAreaControl,
|
|
7783
7877
|
{
|
|
7784
7878
|
suggestions: emailSuggestions,
|
|
7785
7879
|
rows: 1,
|
|
7786
7880
|
triggerPosition: "start",
|
|
7787
|
-
placeholder:
|
|
7881
|
+
placeholder: __54("You can type @ to insert an email field", "elementor")
|
|
7788
7882
|
}
|
|
7789
7883
|
))));
|
|
7790
7884
|
};
|
|
7791
|
-
var CcField = () => /* @__PURE__ */
|
|
7792
|
-
var BccField = () => /* @__PURE__ */
|
|
7793
|
-
var MetaDataField = () => /* @__PURE__ */
|
|
7885
|
+
var CcField = () => /* @__PURE__ */ React111.createElement(EmailField, { bind: "cc", label: __54("Cc", "elementor") });
|
|
7886
|
+
var BccField = () => /* @__PURE__ */ React111.createElement(EmailField, { bind: "bcc", label: __54("Bcc", "elementor") });
|
|
7887
|
+
var MetaDataField = () => /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "meta-data" }, /* @__PURE__ */ React111.createElement(Stack18, { gap: 0.5 }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, __54("Metadata", "elementor")), /* @__PURE__ */ React111.createElement(
|
|
7794
7888
|
ChipsControl,
|
|
7795
7889
|
{
|
|
7796
7890
|
options: [
|
|
7797
|
-
{ label:
|
|
7798
|
-
{ label:
|
|
7799
|
-
{ label:
|
|
7800
|
-
{ label:
|
|
7801
|
-
{ label:
|
|
7891
|
+
{ label: __54("Date", "elementor"), value: "date" },
|
|
7892
|
+
{ label: __54("Time", "elementor"), value: "time" },
|
|
7893
|
+
{ label: __54("Page URL", "elementor"), value: "page-url" },
|
|
7894
|
+
{ label: __54("User agent", "elementor"), value: "user-agent" },
|
|
7895
|
+
{ label: __54("Credit", "elementor"), value: "credit" }
|
|
7802
7896
|
]
|
|
7803
7897
|
}
|
|
7804
7898
|
)));
|
|
7805
|
-
var SendAsField = () => /* @__PURE__ */
|
|
7899
|
+
var SendAsField = () => /* @__PURE__ */ React111.createElement(PropKeyProvider, { bind: "send-as" }, /* @__PURE__ */ React111.createElement(Grid30, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React111.createElement(Grid30, { item: true }, /* @__PURE__ */ React111.createElement(ControlFormLabel, null, __54("Send as", "elementor"))), /* @__PURE__ */ React111.createElement(Grid30, { item: true }, /* @__PURE__ */ React111.createElement(
|
|
7806
7900
|
SelectControl,
|
|
7807
7901
|
{
|
|
7808
7902
|
options: [
|
|
7809
|
-
{ label:
|
|
7810
|
-
{ label:
|
|
7903
|
+
{ label: __54("HTML", "elementor"), value: "html" },
|
|
7904
|
+
{ label: __54("Plain Text", "elementor"), value: "plain" }
|
|
7811
7905
|
]
|
|
7812
7906
|
}
|
|
7813
7907
|
))));
|
|
7814
|
-
var AdvancedSettings = () => /* @__PURE__ */
|
|
7908
|
+
var AdvancedSettings = () => /* @__PURE__ */ React111.createElement(CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React111.createElement(Box25, { sx: { pt: 2 } }, /* @__PURE__ */ React111.createElement(Stack18, { 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(Divider5, null), /* @__PURE__ */ React111.createElement(MetaDataField, null), /* @__PURE__ */ React111.createElement(SendAsField, null))));
|
|
7815
7909
|
var EmailFormActionControl = createControl(({ toPlaceholder }) => {
|
|
7816
7910
|
const { value, setValue, ...propContext } = useBoundProp(emailPropTypeUtil);
|
|
7817
|
-
return /* @__PURE__ */
|
|
7911
|
+
return /* @__PURE__ */ React111.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React111.createElement(Stack18, { gap: 2 }, /* @__PURE__ */ React111.createElement(ControlLabel, null, __54("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)));
|
|
7818
7912
|
});
|
|
7819
7913
|
|
|
7820
7914
|
// src/components/promotions/display-conditions-control.tsx
|
|
7821
|
-
import * as
|
|
7915
|
+
import * as React113 from "react";
|
|
7822
7916
|
import { useRef as useRef28 } from "react";
|
|
7823
7917
|
import { SitemapIcon } from "@elementor/icons";
|
|
7824
|
-
import { IconButton as IconButton8, Stack as
|
|
7825
|
-
import { __ as
|
|
7918
|
+
import { IconButton as IconButton8, Stack as Stack19, Tooltip as Tooltip9 } from "@elementor/ui";
|
|
7919
|
+
import { __ as __55 } from "@wordpress/i18n";
|
|
7826
7920
|
|
|
7827
7921
|
// src/components/promotions/promotion-trigger.tsx
|
|
7828
|
-
import * as
|
|
7922
|
+
import * as React112 from "react";
|
|
7829
7923
|
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as useState19 } from "react";
|
|
7830
7924
|
import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
|
|
7831
7925
|
import { Box as Box26 } from "@elementor/ui";
|
|
@@ -7845,7 +7939,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
7845
7939
|
});
|
|
7846
7940
|
}, [trackingData]);
|
|
7847
7941
|
useImperativeHandle(ref, () => ({ toggle }), [toggle]);
|
|
7848
|
-
return /* @__PURE__ */
|
|
7942
|
+
return /* @__PURE__ */ React112.createElement(React112.Fragment, null, promotion && /* @__PURE__ */ React112.createElement(
|
|
7849
7943
|
PromotionInfotip,
|
|
7850
7944
|
{
|
|
7851
7945
|
title: promotion.title,
|
|
@@ -7859,7 +7953,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
7859
7953
|
},
|
|
7860
7954
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
7861
7955
|
},
|
|
7862
|
-
/* @__PURE__ */
|
|
7956
|
+
/* @__PURE__ */ React112.createElement(
|
|
7863
7957
|
Box26,
|
|
7864
7958
|
{
|
|
7865
7959
|
onClick: (e) => {
|
|
@@ -7868,19 +7962,19 @@ var PromotionTrigger = forwardRef12(
|
|
|
7868
7962
|
},
|
|
7869
7963
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
7870
7964
|
},
|
|
7871
|
-
children ?? /* @__PURE__ */
|
|
7965
|
+
children ?? /* @__PURE__ */ React112.createElement(PromotionChip2, null)
|
|
7872
7966
|
)
|
|
7873
7967
|
));
|
|
7874
7968
|
}
|
|
7875
7969
|
);
|
|
7876
7970
|
|
|
7877
7971
|
// src/components/promotions/display-conditions-control.tsx
|
|
7878
|
-
var ARIA_LABEL =
|
|
7972
|
+
var ARIA_LABEL = __55("Display Conditions", "elementor");
|
|
7879
7973
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
7880
7974
|
var DisplayConditionsControl = createControl(() => {
|
|
7881
7975
|
const triggerRef = useRef28(null);
|
|
7882
|
-
return /* @__PURE__ */
|
|
7883
|
-
|
|
7976
|
+
return /* @__PURE__ */ React113.createElement(
|
|
7977
|
+
Stack19,
|
|
7884
7978
|
{
|
|
7885
7979
|
direction: "row",
|
|
7886
7980
|
spacing: 2,
|
|
@@ -7889,8 +7983,8 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
7889
7983
|
alignItems: "center"
|
|
7890
7984
|
}
|
|
7891
7985
|
},
|
|
7892
|
-
/* @__PURE__ */
|
|
7893
|
-
/* @__PURE__ */
|
|
7986
|
+
/* @__PURE__ */ React113.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
7987
|
+
/* @__PURE__ */ React113.createElement(Tooltip9, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React113.createElement(
|
|
7894
7988
|
IconButton8,
|
|
7895
7989
|
{
|
|
7896
7990
|
size: "tiny",
|
|
@@ -7903,23 +7997,23 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
7903
7997
|
borderRadius: 1
|
|
7904
7998
|
}
|
|
7905
7999
|
},
|
|
7906
|
-
/* @__PURE__ */
|
|
8000
|
+
/* @__PURE__ */ React113.createElement(SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
7907
8001
|
))
|
|
7908
8002
|
);
|
|
7909
8003
|
});
|
|
7910
8004
|
|
|
7911
8005
|
// src/components/promotions/attributes-control.tsx
|
|
7912
|
-
import * as
|
|
8006
|
+
import * as React114 from "react";
|
|
7913
8007
|
import { useRef as useRef29 } from "react";
|
|
7914
8008
|
import { PlusIcon as PlusIcon3 } from "@elementor/icons";
|
|
7915
|
-
import { Stack as
|
|
7916
|
-
import { __ as
|
|
7917
|
-
var ARIA_LABEL2 =
|
|
8009
|
+
import { Stack as Stack20, Tooltip as Tooltip10 } from "@elementor/ui";
|
|
8010
|
+
import { __ as __56 } from "@wordpress/i18n";
|
|
8011
|
+
var ARIA_LABEL2 = __56("Attributes", "elementor");
|
|
7918
8012
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
7919
8013
|
var AttributesControl = createControl(() => {
|
|
7920
8014
|
const triggerRef = useRef29(null);
|
|
7921
|
-
return /* @__PURE__ */
|
|
7922
|
-
|
|
8015
|
+
return /* @__PURE__ */ React114.createElement(
|
|
8016
|
+
Stack20,
|
|
7923
8017
|
{
|
|
7924
8018
|
direction: "row",
|
|
7925
8019
|
spacing: 2,
|
|
@@ -7928,8 +8022,8 @@ var AttributesControl = createControl(() => {
|
|
|
7928
8022
|
alignItems: "center"
|
|
7929
8023
|
}
|
|
7930
8024
|
},
|
|
7931
|
-
/* @__PURE__ */
|
|
7932
|
-
/* @__PURE__ */
|
|
8025
|
+
/* @__PURE__ */ React114.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
8026
|
+
/* @__PURE__ */ React114.createElement(Tooltip10, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React114.createElement(
|
|
7933
8027
|
PlusIcon3,
|
|
7934
8028
|
{
|
|
7935
8029
|
"aria-label": ARIA_LABEL2,
|
|
@@ -7943,17 +8037,17 @@ var AttributesControl = createControl(() => {
|
|
|
7943
8037
|
});
|
|
7944
8038
|
|
|
7945
8039
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
7946
|
-
import * as
|
|
8040
|
+
import * as React115 from "react";
|
|
7947
8041
|
import { BrushBigIcon } from "@elementor/icons";
|
|
7948
8042
|
import { IconButton as IconButton9, styled as styled11, Tooltip as Tooltip11 } from "@elementor/ui";
|
|
7949
8043
|
var CustomIconButton = styled11(IconButton9)(({ theme }) => ({
|
|
7950
8044
|
width: theme.spacing(2.5),
|
|
7951
8045
|
height: theme.spacing(2.5)
|
|
7952
8046
|
}));
|
|
7953
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
8047
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React115.createElement(Tooltip11, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React115.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React115.createElement(BrushBigIcon, { fontSize: size })));
|
|
7954
8048
|
|
|
7955
8049
|
// src/components/repeater/repeater.tsx
|
|
7956
|
-
import * as
|
|
8050
|
+
import * as React116 from "react";
|
|
7957
8051
|
import { useEffect as useEffect18, useState as useState20 } from "react";
|
|
7958
8052
|
import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon4, XIcon as XIcon4 } from "@elementor/icons";
|
|
7959
8053
|
import {
|
|
@@ -7965,7 +8059,7 @@ import {
|
|
|
7965
8059
|
Tooltip as Tooltip12,
|
|
7966
8060
|
usePopupState as usePopupState10
|
|
7967
8061
|
} from "@elementor/ui";
|
|
7968
|
-
import { __ as
|
|
8062
|
+
import { __ as __57 } from "@wordpress/i18n";
|
|
7969
8063
|
var SIZE11 = "tiny";
|
|
7970
8064
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
7971
8065
|
var Repeater3 = ({
|
|
@@ -8046,7 +8140,7 @@ var Repeater3 = ({
|
|
|
8046
8140
|
};
|
|
8047
8141
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
8048
8142
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
8049
|
-
const addButton = /* @__PURE__ */
|
|
8143
|
+
const addButton = /* @__PURE__ */ React116.createElement(
|
|
8050
8144
|
IconButton10,
|
|
8051
8145
|
{
|
|
8052
8146
|
size: SIZE11,
|
|
@@ -8055,11 +8149,11 @@ var Repeater3 = ({
|
|
|
8055
8149
|
},
|
|
8056
8150
|
disabled: isButtonDisabled,
|
|
8057
8151
|
onClick: addRepeaterItem,
|
|
8058
|
-
"aria-label":
|
|
8152
|
+
"aria-label": __57("Add item", "elementor")
|
|
8059
8153
|
},
|
|
8060
|
-
/* @__PURE__ */
|
|
8154
|
+
/* @__PURE__ */ React116.createElement(PlusIcon4, { fontSize: SIZE11 })
|
|
8061
8155
|
);
|
|
8062
|
-
return /* @__PURE__ */
|
|
8156
|
+
return /* @__PURE__ */ React116.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React116.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React116.createElement(
|
|
8063
8157
|
Infotip4,
|
|
8064
8158
|
{
|
|
8065
8159
|
placement: "right",
|
|
@@ -8067,20 +8161,20 @@ var Repeater3 = ({
|
|
|
8067
8161
|
color: "secondary",
|
|
8068
8162
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
8069
8163
|
},
|
|
8070
|
-
/* @__PURE__ */
|
|
8071
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
8164
|
+
/* @__PURE__ */ React116.createElement(Box27, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
8165
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React116.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
8072
8166
|
const index = uniqueKeys.indexOf(key);
|
|
8073
8167
|
const value = items2[index];
|
|
8074
8168
|
if (!value) {
|
|
8075
8169
|
return null;
|
|
8076
8170
|
}
|
|
8077
|
-
return /* @__PURE__ */
|
|
8171
|
+
return /* @__PURE__ */ React116.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React116.createElement(
|
|
8078
8172
|
RepeaterItem,
|
|
8079
8173
|
{
|
|
8080
8174
|
disabled,
|
|
8081
8175
|
propDisabled: value?.disabled,
|
|
8082
|
-
label: /* @__PURE__ */
|
|
8083
|
-
startIcon: /* @__PURE__ */
|
|
8176
|
+
label: /* @__PURE__ */ React116.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React116.createElement(itemSettings.Label, { value, index })),
|
|
8177
|
+
startIcon: /* @__PURE__ */ React116.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React116.createElement(itemSettings.Icon, { value })),
|
|
8084
8178
|
removeItem: () => removeRepeaterItem(index),
|
|
8085
8179
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
8086
8180
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -8094,7 +8188,7 @@ var Repeater3 = ({
|
|
|
8094
8188
|
actions: itemSettings.actions,
|
|
8095
8189
|
value
|
|
8096
8190
|
},
|
|
8097
|
-
(props) => /* @__PURE__ */
|
|
8191
|
+
(props) => /* @__PURE__ */ React116.createElement(
|
|
8098
8192
|
itemSettings.Content,
|
|
8099
8193
|
{
|
|
8100
8194
|
...props,
|
|
@@ -8136,16 +8230,16 @@ var RepeaterItem = ({
|
|
|
8136
8230
|
);
|
|
8137
8231
|
const triggerProps = bindTrigger7(popoverState);
|
|
8138
8232
|
usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
|
|
8139
|
-
const duplicateLabel =
|
|
8140
|
-
const toggleLabel = propDisabled ?
|
|
8141
|
-
const removeLabel =
|
|
8142
|
-
return /* @__PURE__ */
|
|
8233
|
+
const duplicateLabel = __57("Duplicate", "elementor");
|
|
8234
|
+
const toggleLabel = propDisabled ? __57("Show", "elementor") : __57("Hide", "elementor");
|
|
8235
|
+
const removeLabel = __57("Remove", "elementor");
|
|
8236
|
+
return /* @__PURE__ */ React116.createElement(Box27, { sx: { display: "contents" } }, /* @__PURE__ */ React116.createElement(
|
|
8143
8237
|
RepeaterTag,
|
|
8144
8238
|
{
|
|
8145
8239
|
disabled,
|
|
8146
8240
|
label,
|
|
8147
8241
|
ref: setRef,
|
|
8148
|
-
"aria-label":
|
|
8242
|
+
"aria-label": __57("Open item", "elementor"),
|
|
8149
8243
|
...triggerProps,
|
|
8150
8244
|
onClick: (e) => {
|
|
8151
8245
|
triggerProps.onClick(e);
|
|
@@ -8154,9 +8248,9 @@ var RepeaterItem = ({
|
|
|
8154
8248
|
}
|
|
8155
8249
|
},
|
|
8156
8250
|
startIcon,
|
|
8157
|
-
actions: /* @__PURE__ */
|
|
8251
|
+
actions: /* @__PURE__ */ React116.createElement(React116.Fragment, null, showDuplicate && /* @__PURE__ */ React116.createElement(Tooltip12, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React116.createElement(IconButton10, { size: SIZE11, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React116.createElement(CopyIcon2, { fontSize: SIZE11 }))), showToggle && /* @__PURE__ */ React116.createElement(Tooltip12, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React116.createElement(IconButton10, { size: SIZE11, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React116.createElement(EyeOffIcon2, { fontSize: SIZE11 }) : /* @__PURE__ */ React116.createElement(EyeIcon2, { fontSize: SIZE11 }))), actions?.(value), showRemove && /* @__PURE__ */ React116.createElement(Tooltip12, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React116.createElement(IconButton10, { size: SIZE11, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React116.createElement(XIcon4, { fontSize: SIZE11 }))))
|
|
8158
8252
|
}
|
|
8159
|
-
), /* @__PURE__ */
|
|
8253
|
+
), /* @__PURE__ */ React116.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React116.createElement(Box27, null, children({ anchorEl: ref }))));
|
|
8160
8254
|
};
|
|
8161
8255
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
8162
8256
|
const [ref, setRef] = useState20(null);
|
|
@@ -8181,7 +8275,7 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
8181
8275
|
};
|
|
8182
8276
|
|
|
8183
8277
|
// src/components/inline-editor-toolbar.tsx
|
|
8184
|
-
import * as
|
|
8278
|
+
import * as React118 from "react";
|
|
8185
8279
|
import { useEffect as useEffect20, useMemo as useMemo17, useRef as useRef31, useState as useState21 } from "react";
|
|
8186
8280
|
import { getContainer as getContainer2, getElementSetting } from "@elementor/editor-elements";
|
|
8187
8281
|
import {
|
|
@@ -8204,14 +8298,14 @@ import {
|
|
|
8204
8298
|
usePopupState as usePopupState11
|
|
8205
8299
|
} from "@elementor/ui";
|
|
8206
8300
|
import { useEditorState } from "@tiptap/react";
|
|
8207
|
-
import { __ as
|
|
8301
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
8208
8302
|
|
|
8209
8303
|
// src/components/url-popover.tsx
|
|
8210
|
-
import * as
|
|
8304
|
+
import * as React117 from "react";
|
|
8211
8305
|
import { useEffect as useEffect19, useRef as useRef30 } from "react";
|
|
8212
8306
|
import { ExternalLinkIcon } from "@elementor/icons";
|
|
8213
|
-
import { bindPopover as bindPopover9, Popover as Popover8, Stack as
|
|
8214
|
-
import { __ as
|
|
8307
|
+
import { bindPopover as bindPopover9, Popover as Popover8, Stack as Stack21, TextField as TextField10, ToggleButton as ToggleButton2, Tooltip as Tooltip13 } from "@elementor/ui";
|
|
8308
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
8215
8309
|
var UrlPopover = ({
|
|
8216
8310
|
popupState,
|
|
8217
8311
|
restoreValue,
|
|
@@ -8231,7 +8325,7 @@ var UrlPopover = ({
|
|
|
8231
8325
|
restoreValue();
|
|
8232
8326
|
popupState.close();
|
|
8233
8327
|
};
|
|
8234
|
-
return /* @__PURE__ */
|
|
8328
|
+
return /* @__PURE__ */ React117.createElement(
|
|
8235
8329
|
Popover8,
|
|
8236
8330
|
{
|
|
8237
8331
|
slotProps: {
|
|
@@ -8242,30 +8336,30 @@ var UrlPopover = ({
|
|
|
8242
8336
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
8243
8337
|
onClose: handleClose
|
|
8244
8338
|
},
|
|
8245
|
-
/* @__PURE__ */
|
|
8339
|
+
/* @__PURE__ */ React117.createElement(Stack21, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React117.createElement(
|
|
8246
8340
|
TextField10,
|
|
8247
8341
|
{
|
|
8248
8342
|
value,
|
|
8249
8343
|
onChange,
|
|
8250
8344
|
size: "tiny",
|
|
8251
8345
|
fullWidth: true,
|
|
8252
|
-
placeholder:
|
|
8346
|
+
placeholder: __58("Type a URL", "elementor"),
|
|
8253
8347
|
inputProps: { ref: inputRef },
|
|
8254
8348
|
color: "secondary",
|
|
8255
8349
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
8256
8350
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
8257
8351
|
}
|
|
8258
|
-
), /* @__PURE__ */
|
|
8352
|
+
), /* @__PURE__ */ React117.createElement(Tooltip13, { title: __58("Open in a new tab", "elementor") }, /* @__PURE__ */ React117.createElement(
|
|
8259
8353
|
ToggleButton2,
|
|
8260
8354
|
{
|
|
8261
8355
|
size: "tiny",
|
|
8262
8356
|
value: "newTab",
|
|
8263
8357
|
selected: openInNewTab,
|
|
8264
8358
|
onClick: onToggleNewTab,
|
|
8265
|
-
"aria-label":
|
|
8359
|
+
"aria-label": __58("Open in a new tab", "elementor"),
|
|
8266
8360
|
sx: { borderRadius: "8px" }
|
|
8267
8361
|
},
|
|
8268
|
-
/* @__PURE__ */
|
|
8362
|
+
/* @__PURE__ */ React117.createElement(ExternalLinkIcon, { fontSize: "tiny" })
|
|
8269
8363
|
)))
|
|
8270
8364
|
);
|
|
8271
8365
|
};
|
|
@@ -8321,7 +8415,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8321
8415
|
useEffect20(() => {
|
|
8322
8416
|
editor?.commands?.focus();
|
|
8323
8417
|
}, [editor]);
|
|
8324
|
-
return /* @__PURE__ */
|
|
8418
|
+
return /* @__PURE__ */ React118.createElement(
|
|
8325
8419
|
Box28,
|
|
8326
8420
|
{
|
|
8327
8421
|
ref: toolbarRef,
|
|
@@ -8338,8 +8432,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8338
8432
|
...sx
|
|
8339
8433
|
}
|
|
8340
8434
|
},
|
|
8341
|
-
/* @__PURE__ */
|
|
8342
|
-
/* @__PURE__ */
|
|
8435
|
+
/* @__PURE__ */ React118.createElement(Tooltip14, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React118.createElement(IconButton11, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
8436
|
+
/* @__PURE__ */ React118.createElement(
|
|
8343
8437
|
ToggleButtonGroup2,
|
|
8344
8438
|
{
|
|
8345
8439
|
value: editorState,
|
|
@@ -8361,7 +8455,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8361
8455
|
}
|
|
8362
8456
|
}
|
|
8363
8457
|
},
|
|
8364
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
8458
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React118.createElement(Tooltip14, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React118.createElement(
|
|
8365
8459
|
ToggleButton3,
|
|
8366
8460
|
{
|
|
8367
8461
|
value: button.action,
|
|
@@ -8379,7 +8473,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8379
8473
|
button.icon
|
|
8380
8474
|
)))
|
|
8381
8475
|
),
|
|
8382
|
-
/* @__PURE__ */
|
|
8476
|
+
/* @__PURE__ */ React118.createElement(
|
|
8383
8477
|
UrlPopover,
|
|
8384
8478
|
{
|
|
8385
8479
|
popupState: linkPopupState,
|
|
@@ -8402,64 +8496,64 @@ var checkIfElementIsClickable = (elementId) => {
|
|
|
8402
8496
|
};
|
|
8403
8497
|
var toolbarButtons = {
|
|
8404
8498
|
clear: {
|
|
8405
|
-
label:
|
|
8406
|
-
icon: /* @__PURE__ */
|
|
8499
|
+
label: __59("Clear", "elementor"),
|
|
8500
|
+
icon: /* @__PURE__ */ React118.createElement(MinusIcon2, { fontSize: "tiny" }),
|
|
8407
8501
|
action: "clear",
|
|
8408
8502
|
method: (editor) => {
|
|
8409
8503
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
8410
8504
|
}
|
|
8411
8505
|
},
|
|
8412
8506
|
bold: {
|
|
8413
|
-
label:
|
|
8414
|
-
icon: /* @__PURE__ */
|
|
8507
|
+
label: __59("Bold", "elementor"),
|
|
8508
|
+
icon: /* @__PURE__ */ React118.createElement(BoldIcon, { fontSize: "tiny" }),
|
|
8415
8509
|
action: "bold",
|
|
8416
8510
|
method: (editor) => {
|
|
8417
8511
|
editor.chain().focus().toggleBold().run();
|
|
8418
8512
|
}
|
|
8419
8513
|
},
|
|
8420
8514
|
italic: {
|
|
8421
|
-
label:
|
|
8422
|
-
icon: /* @__PURE__ */
|
|
8515
|
+
label: __59("Italic", "elementor"),
|
|
8516
|
+
icon: /* @__PURE__ */ React118.createElement(ItalicIcon, { fontSize: "tiny" }),
|
|
8423
8517
|
action: "italic",
|
|
8424
8518
|
method: (editor) => {
|
|
8425
8519
|
editor.chain().focus().toggleItalic().run();
|
|
8426
8520
|
}
|
|
8427
8521
|
},
|
|
8428
8522
|
underline: {
|
|
8429
|
-
label:
|
|
8430
|
-
icon: /* @__PURE__ */
|
|
8523
|
+
label: __59("Underline", "elementor"),
|
|
8524
|
+
icon: /* @__PURE__ */ React118.createElement(UnderlineIcon, { fontSize: "tiny" }),
|
|
8431
8525
|
action: "underline",
|
|
8432
8526
|
method: (editor) => {
|
|
8433
8527
|
editor.chain().focus().toggleUnderline().run();
|
|
8434
8528
|
}
|
|
8435
8529
|
},
|
|
8436
8530
|
strike: {
|
|
8437
|
-
label:
|
|
8438
|
-
icon: /* @__PURE__ */
|
|
8531
|
+
label: __59("Strikethrough", "elementor"),
|
|
8532
|
+
icon: /* @__PURE__ */ React118.createElement(StrikethroughIcon, { fontSize: "tiny" }),
|
|
8439
8533
|
action: "strike",
|
|
8440
8534
|
method: (editor) => {
|
|
8441
8535
|
editor.chain().focus().toggleStrike().run();
|
|
8442
8536
|
}
|
|
8443
8537
|
},
|
|
8444
8538
|
superscript: {
|
|
8445
|
-
label:
|
|
8446
|
-
icon: /* @__PURE__ */
|
|
8539
|
+
label: __59("Superscript", "elementor"),
|
|
8540
|
+
icon: /* @__PURE__ */ React118.createElement(SuperscriptIcon, { fontSize: "tiny" }),
|
|
8447
8541
|
action: "superscript",
|
|
8448
8542
|
method: (editor) => {
|
|
8449
8543
|
editor.chain().focus().toggleSuperscript().run();
|
|
8450
8544
|
}
|
|
8451
8545
|
},
|
|
8452
8546
|
subscript: {
|
|
8453
|
-
label:
|
|
8454
|
-
icon: /* @__PURE__ */
|
|
8547
|
+
label: __59("Subscript", "elementor"),
|
|
8548
|
+
icon: /* @__PURE__ */ React118.createElement(SubscriptIcon, { fontSize: "tiny" }),
|
|
8455
8549
|
action: "subscript",
|
|
8456
8550
|
method: (editor) => {
|
|
8457
8551
|
editor.chain().focus().toggleSubscript().run();
|
|
8458
8552
|
}
|
|
8459
8553
|
},
|
|
8460
8554
|
link: {
|
|
8461
|
-
label:
|
|
8462
|
-
icon: /* @__PURE__ */
|
|
8555
|
+
label: __59("Link", "elementor"),
|
|
8556
|
+
icon: /* @__PURE__ */ React118.createElement(LinkIcon3, { fontSize: "tiny" }),
|
|
8463
8557
|
action: "link",
|
|
8464
8558
|
method: null
|
|
8465
8559
|
}
|
|
@@ -8468,7 +8562,7 @@ var { clear: clearButton, ...formatButtons } = toolbarButtons;
|
|
|
8468
8562
|
var possibleFormats = Object.keys(formatButtons);
|
|
8469
8563
|
|
|
8470
8564
|
// src/components/size/unstable-size-field.tsx
|
|
8471
|
-
import * as
|
|
8565
|
+
import * as React121 from "react";
|
|
8472
8566
|
import { InputAdornment as InputAdornment6 } from "@elementor/ui";
|
|
8473
8567
|
|
|
8474
8568
|
// src/hooks/use-size-value.ts
|
|
@@ -8511,7 +8605,7 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
8511
8605
|
};
|
|
8512
8606
|
|
|
8513
8607
|
// src/components/size/unit-select.tsx
|
|
8514
|
-
import * as
|
|
8608
|
+
import * as React119 from "react";
|
|
8515
8609
|
import { useId as useId4 } from "react";
|
|
8516
8610
|
import { MenuListItem as MenuListItem8 } from "@elementor/editor-ui";
|
|
8517
8611
|
import { bindMenu as bindMenu3, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu4, styled as styled12, usePopupState as usePopupState12 } from "@elementor/ui";
|
|
@@ -8529,7 +8623,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
8529
8623
|
onClick(options[index]);
|
|
8530
8624
|
popupState.close();
|
|
8531
8625
|
};
|
|
8532
|
-
return /* @__PURE__ */
|
|
8626
|
+
return /* @__PURE__ */ React119.createElement(React119.Fragment, null, /* @__PURE__ */ React119.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...bindTrigger8(popupState) }, value), /* @__PURE__ */ React119.createElement(Menu4, { MenuListProps: { dense: true }, ...bindMenu3(popupState) }, options.map((option, index) => /* @__PURE__ */ React119.createElement(
|
|
8533
8627
|
MenuListItem8,
|
|
8534
8628
|
{
|
|
8535
8629
|
key: option,
|
|
@@ -8558,11 +8652,11 @@ var StyledButton3 = styled12(Button7, {
|
|
|
8558
8652
|
}));
|
|
8559
8653
|
|
|
8560
8654
|
// src/components/size/unstable-size-input.tsx
|
|
8561
|
-
import * as
|
|
8655
|
+
import * as React120 from "react";
|
|
8562
8656
|
import { forwardRef as forwardRef13 } from "react";
|
|
8563
8657
|
var UnstableSizeInput = forwardRef13(
|
|
8564
8658
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
8565
|
-
return /* @__PURE__ */
|
|
8659
|
+
return /* @__PURE__ */ React120.createElement(
|
|
8566
8660
|
NumberInput,
|
|
8567
8661
|
{
|
|
8568
8662
|
ref,
|
|
@@ -8600,7 +8694,7 @@ var UnstableSizeField = ({
|
|
|
8600
8694
|
const shouldHighlightUnit2 = () => {
|
|
8601
8695
|
return hasValue(size);
|
|
8602
8696
|
};
|
|
8603
|
-
return /* @__PURE__ */
|
|
8697
|
+
return /* @__PURE__ */ React121.createElement(
|
|
8604
8698
|
UnstableSizeInput,
|
|
8605
8699
|
{
|
|
8606
8700
|
type: "number",
|
|
@@ -8609,8 +8703,8 @@ var UnstableSizeField = ({
|
|
|
8609
8703
|
onChange: (event) => setSize(event.target.value),
|
|
8610
8704
|
InputProps: {
|
|
8611
8705
|
...InputProps,
|
|
8612
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
8613
|
-
endAdornment: /* @__PURE__ */
|
|
8706
|
+
startAdornment: startIcon && /* @__PURE__ */ React121.createElement(InputAdornment6, { position: "start" }, startIcon),
|
|
8707
|
+
endAdornment: /* @__PURE__ */ React121.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React121.createElement(
|
|
8614
8708
|
UnitSelect,
|
|
8615
8709
|
{
|
|
8616
8710
|
options: units2,
|
|
@@ -8672,6 +8766,7 @@ export {
|
|
|
8672
8766
|
ControlFormLabel,
|
|
8673
8767
|
ControlReplacementsProvider,
|
|
8674
8768
|
ControlToggleButtonGroup,
|
|
8769
|
+
DateRangeControl,
|
|
8675
8770
|
DateTimeControl,
|
|
8676
8771
|
DisplayConditionsControl,
|
|
8677
8772
|
EmailFormActionControl,
|