@elementor/editor-controls 4.2.0-869 → 4.2.0-870
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 +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +283 -187
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +231 -135
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -15
- package/src/controls/chips-control.tsx +16 -9
- package/src/controls/email-form-action-control/email-chips-field.tsx +104 -0
- package/src/controls/email-form-action-control/email-field.tsx +25 -0
- package/src/controls/email-form-action-control/fields.tsx +138 -0
- package/src/controls/email-form-action-control/index.tsx +60 -0
- package/src/controls/email-form-action-control/utils.ts +24 -0
- package/src/controls/email-form-action-control.tsx +0 -194
package/dist/index.mjs
CHANGED
|
@@ -2521,31 +2521,37 @@ function ChipsList({ getLabel, getTagProps, values }) {
|
|
|
2521
2521
|
|
|
2522
2522
|
// src/controls/chips-control.tsx
|
|
2523
2523
|
var SIZE6 = "tiny";
|
|
2524
|
-
var
|
|
2524
|
+
var toChipsOption = (val, options) => options.find((opt) => opt.value === val) ?? { label: val, value: val };
|
|
2525
|
+
var ChipsControl = createControl(({ options, freeChips }) => {
|
|
2525
2526
|
const { value, setValue, disabled } = useBoundProp(stringArrayPropTypeUtil);
|
|
2526
2527
|
const selectedValues = (value || []).map((item) => stringPropTypeUtil6.extract(item)).filter((val) => val !== null);
|
|
2527
|
-
const selectedOptions = selectedValues.map((val) =>
|
|
2528
|
+
const selectedOptions = selectedValues.map((val) => toChipsOption(val, options));
|
|
2528
2529
|
const handleChange = (_, newValue) => {
|
|
2529
|
-
|
|
2530
|
-
|
|
2530
|
+
setValue(
|
|
2531
|
+
newValue.map(
|
|
2532
|
+
(option) => stringPropTypeUtil6.create(typeof option === "string" ? option : option.value)
|
|
2533
|
+
)
|
|
2534
|
+
);
|
|
2531
2535
|
};
|
|
2532
2536
|
return /* @__PURE__ */ React52.createElement(ControlActions, null, /* @__PURE__ */ React52.createElement(
|
|
2533
2537
|
Autocomplete,
|
|
2534
2538
|
{
|
|
2535
2539
|
fullWidth: true,
|
|
2536
2540
|
multiple: true,
|
|
2541
|
+
freeSolo: freeChips,
|
|
2537
2542
|
size: SIZE6,
|
|
2538
2543
|
disabled,
|
|
2539
2544
|
value: selectedOptions,
|
|
2545
|
+
filterSelectedOptions: true,
|
|
2540
2546
|
onChange: handleChange,
|
|
2541
2547
|
options,
|
|
2542
|
-
getOptionLabel: (option) => option.label,
|
|
2548
|
+
getOptionLabel: (option) => typeof option === "string" ? option : option.label,
|
|
2543
2549
|
isOptionEqualToValue: (option, val) => option.value === val.value,
|
|
2544
2550
|
renderInput: (params) => /* @__PURE__ */ React52.createElement(TextField5, { ...params }),
|
|
2545
2551
|
renderTags: (tagValues, getTagProps) => /* @__PURE__ */ React52.createElement(
|
|
2546
2552
|
ChipsList,
|
|
2547
2553
|
{
|
|
2548
|
-
getLabel: (option) => option.label,
|
|
2554
|
+
getLabel: (option) => typeof option === "string" ? option : option.label,
|
|
2549
2555
|
getTagProps,
|
|
2550
2556
|
values: tagValues
|
|
2551
2557
|
}
|
|
@@ -8095,12 +8101,17 @@ var InlineEditingControl = createControl(
|
|
|
8095
8101
|
}
|
|
8096
8102
|
);
|
|
8097
8103
|
|
|
8098
|
-
// src/controls/email-form-action-control.tsx
|
|
8099
|
-
import * as
|
|
8100
|
-
import {
|
|
8101
|
-
import { CollapsibleContent
|
|
8102
|
-
import { Box as Box26, Divider as Divider5,
|
|
8103
|
-
import {
|
|
8104
|
+
// src/controls/email-form-action-control/index.tsx
|
|
8105
|
+
import * as React119 from "react";
|
|
8106
|
+
import { emailsPropTypeUtil } from "@elementor/editor-props";
|
|
8107
|
+
import { CollapsibleContent } from "@elementor/editor-ui";
|
|
8108
|
+
import { Box as Box26, Divider as Divider5, Stack as Stack20 } from "@elementor/ui";
|
|
8109
|
+
import { __ as __58 } from "@wordpress/i18n";
|
|
8110
|
+
|
|
8111
|
+
// src/controls/email-form-action-control/fields.tsx
|
|
8112
|
+
import * as React118 from "react";
|
|
8113
|
+
import { InfoAlert as InfoAlert2 } from "@elementor/editor-ui";
|
|
8114
|
+
import { Grid as Grid34, Stack as Stack19 } from "@elementor/ui";
|
|
8104
8115
|
import { __ as __57 } from "@wordpress/i18n";
|
|
8105
8116
|
|
|
8106
8117
|
// src/hooks/use-form-field-suggestions.ts
|
|
@@ -8159,18 +8170,20 @@ function useFormFieldSuggestions(options) {
|
|
|
8159
8170
|
);
|
|
8160
8171
|
}
|
|
8161
8172
|
|
|
8162
|
-
// src/controls/email-form-action-control.tsx
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
}
|
|
8172
|
-
);
|
|
8173
|
+
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
8174
|
+
import * as React116 from "react";
|
|
8175
|
+
import { useState as useState19 } from "react";
|
|
8176
|
+
import { stringArrayPropTypeUtil as stringArrayPropTypeUtil2, stringPropTypeUtil as stringPropTypeUtil22 } from "@elementor/editor-props";
|
|
8177
|
+
import { Autocomplete as Autocomplete4, Grid as Grid32, TextField as TextField11 } from "@elementor/ui";
|
|
8178
|
+
|
|
8179
|
+
// src/controls/email-form-action-control/utils.ts
|
|
8180
|
+
import { z } from "@elementor/schema";
|
|
8181
|
+
import { hasProInstalled as hasProInstalled3, isVersionGreaterOrEqual as isVersionGreaterOrEqual2 } from "@elementor/utils";
|
|
8173
8182
|
var MIN_PRO_VERSION_FOR_MENTIONS = "4.1.0";
|
|
8183
|
+
var CHIP_TRIGGER_KEYS = /* @__PURE__ */ new Set([" ", ","]);
|
|
8184
|
+
function isValidEmail(email) {
|
|
8185
|
+
return z.string().email().safeParse(email).success;
|
|
8186
|
+
}
|
|
8174
8187
|
var shouldShowMentionsInfo = () => {
|
|
8175
8188
|
if (!hasProInstalled3()) {
|
|
8176
8189
|
return true;
|
|
@@ -8181,14 +8194,93 @@ var shouldShowMentionsInfo = () => {
|
|
|
8181
8194
|
}
|
|
8182
8195
|
return isVersionGreaterOrEqual2(proVersion, MIN_PRO_VERSION_FOR_MENTIONS);
|
|
8183
8196
|
};
|
|
8197
|
+
|
|
8198
|
+
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
8199
|
+
var EmailChipsField = ({ fieldLabel, placeholder }) => {
|
|
8200
|
+
const { value, setValue, disabled } = useBoundProp(stringArrayPropTypeUtil2);
|
|
8201
|
+
const [inputValue, setInputValue] = useState19("");
|
|
8202
|
+
const items2 = value || [];
|
|
8203
|
+
const selectedValues = items2.map((item) => stringPropTypeUtil22.extract(item)).filter((val) => val !== null);
|
|
8204
|
+
const tryAddChip = (raw) => {
|
|
8205
|
+
const address = raw.trim();
|
|
8206
|
+
if (!address || selectedValues.includes(address) || !isValidEmail(address)) {
|
|
8207
|
+
return;
|
|
8208
|
+
}
|
|
8209
|
+
setValue([...items2, stringPropTypeUtil22.create(address)]);
|
|
8210
|
+
setInputValue("");
|
|
8211
|
+
};
|
|
8212
|
+
const handleChange = (_, newValue) => {
|
|
8213
|
+
const updated = [];
|
|
8214
|
+
for (const entry of newValue) {
|
|
8215
|
+
const address = entry.trim();
|
|
8216
|
+
if (!address || !isValidEmail(address)) {
|
|
8217
|
+
continue;
|
|
8218
|
+
}
|
|
8219
|
+
updated.push(stringPropTypeUtil22.create(address));
|
|
8220
|
+
}
|
|
8221
|
+
setValue(updated);
|
|
8222
|
+
setInputValue("");
|
|
8223
|
+
};
|
|
8224
|
+
const handleBlur = (event) => {
|
|
8225
|
+
const target = event.target;
|
|
8226
|
+
tryAddChip(target.value);
|
|
8227
|
+
setInputValue("");
|
|
8228
|
+
};
|
|
8229
|
+
const handleKeyDown = (event) => {
|
|
8230
|
+
if (CHIP_TRIGGER_KEYS.has(event.key) && inputValue.trim()) {
|
|
8231
|
+
event.preventDefault();
|
|
8232
|
+
tryAddChip(inputValue);
|
|
8233
|
+
}
|
|
8234
|
+
};
|
|
8235
|
+
return /* @__PURE__ */ React116.createElement(Grid32, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React116.createElement(Grid32, { item: true }, /* @__PURE__ */ React116.createElement(ControlFormLabel, null, fieldLabel)), /* @__PURE__ */ React116.createElement(Grid32, { item: true }, /* @__PURE__ */ React116.createElement(
|
|
8236
|
+
Autocomplete4,
|
|
8237
|
+
{
|
|
8238
|
+
fullWidth: true,
|
|
8239
|
+
multiple: true,
|
|
8240
|
+
freeSolo: true,
|
|
8241
|
+
size: "tiny",
|
|
8242
|
+
disabled,
|
|
8243
|
+
inputValue,
|
|
8244
|
+
onInputChange: (_, val, reason) => {
|
|
8245
|
+
if (reason !== "reset") {
|
|
8246
|
+
setInputValue(val);
|
|
8247
|
+
}
|
|
8248
|
+
},
|
|
8249
|
+
value: selectedValues,
|
|
8250
|
+
onChange: handleChange,
|
|
8251
|
+
options: [],
|
|
8252
|
+
onBlur: handleBlur,
|
|
8253
|
+
getOptionLabel: (option) => option,
|
|
8254
|
+
isOptionEqualToValue: (option, val) => option === val,
|
|
8255
|
+
renderInput: (params) => /* @__PURE__ */ React116.createElement(TextField11, { ...params, placeholder, onKeyDown: handleKeyDown }),
|
|
8256
|
+
renderTags: (tagValues, getTagProps) => /* @__PURE__ */ React116.createElement(ChipsList, { getLabel: (option) => option, getTagProps, values: tagValues })
|
|
8257
|
+
}
|
|
8258
|
+
)));
|
|
8259
|
+
};
|
|
8260
|
+
|
|
8261
|
+
// src/controls/email-form-action-control/email-field.tsx
|
|
8262
|
+
import * as React117 from "react";
|
|
8263
|
+
import { Grid as Grid33 } from "@elementor/ui";
|
|
8264
|
+
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React117.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React117.createElement(Grid33, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React117.createElement(Grid33, { item: true }, /* @__PURE__ */ React117.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React117.createElement(Grid33, { item: true }, /* @__PURE__ */ React117.createElement(TextControl, { placeholder }))));
|
|
8265
|
+
|
|
8266
|
+
// src/controls/email-form-action-control/fields.tsx
|
|
8267
|
+
var SendToField = ({ placeholder }) => /* @__PURE__ */ React118.createElement(EmailChipsField, { fieldLabel: __57("Send to", "elementor"), placeholder });
|
|
8268
|
+
var SubjectField = () => /* @__PURE__ */ React118.createElement(
|
|
8269
|
+
EmailField,
|
|
8270
|
+
{
|
|
8271
|
+
bind: "subject",
|
|
8272
|
+
label: __57("Email subject", "elementor"),
|
|
8273
|
+
placeholder: __57("New form submission", "elementor")
|
|
8274
|
+
}
|
|
8275
|
+
);
|
|
8184
8276
|
var MessageField = () => {
|
|
8185
8277
|
const suggestions = useFormFieldSuggestions();
|
|
8186
|
-
return /* @__PURE__ */
|
|
8278
|
+
return /* @__PURE__ */ React118.createElement(PropKeyProvider, { bind: "message" }, /* @__PURE__ */ React118.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React118.createElement(Grid34, { item: true }, /* @__PURE__ */ React118.createElement(ControlFormLabel, null, __57("Message", "elementor"))), /* @__PURE__ */ React118.createElement(Grid34, { item: true }, /* @__PURE__ */ React118.createElement(MentionTextAreaControl, { suggestions })), /* @__PURE__ */ React118.createElement(Grid34, { item: true }, /* @__PURE__ */ React118.createElement(InfoAlert2, null, shouldShowMentionsInfo() ? __57(
|
|
8187
8279
|
"[all-fields] shortcode sends all fields. Type @ to insert specific fields and customize your message.",
|
|
8188
8280
|
"elementor"
|
|
8189
8281
|
) : __57("[all-fields] shortcode sends all fields.", "elementor")))));
|
|
8190
8282
|
};
|
|
8191
|
-
var FromEmailField = () => /* @__PURE__ */
|
|
8283
|
+
var FromEmailField = () => /* @__PURE__ */ React118.createElement(
|
|
8192
8284
|
EmailField,
|
|
8193
8285
|
{
|
|
8194
8286
|
bind: "from",
|
|
@@ -8196,7 +8288,7 @@ var FromEmailField = () => /* @__PURE__ */ React116.createElement(
|
|
|
8196
8288
|
placeholder: __57("What email should appear as the sender?", "elementor")
|
|
8197
8289
|
}
|
|
8198
8290
|
);
|
|
8199
|
-
var FromNameField = () => /* @__PURE__ */
|
|
8291
|
+
var FromNameField = () => /* @__PURE__ */ React118.createElement(
|
|
8200
8292
|
EmailField,
|
|
8201
8293
|
{
|
|
8202
8294
|
bind: "from-name",
|
|
@@ -8206,7 +8298,7 @@ var FromNameField = () => /* @__PURE__ */ React116.createElement(
|
|
|
8206
8298
|
);
|
|
8207
8299
|
var ReplyToField = () => {
|
|
8208
8300
|
const emailSuggestions = useFormFieldSuggestions({ inputType: "email" });
|
|
8209
|
-
return /* @__PURE__ */
|
|
8301
|
+
return /* @__PURE__ */ React118.createElement(PropKeyProvider, { bind: "reply-to" }, /* @__PURE__ */ React118.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React118.createElement(Grid34, { item: true }, /* @__PURE__ */ React118.createElement(ControlFormLabel, null, __57("Reply-to", "elementor"))), /* @__PURE__ */ React118.createElement(Grid34, { item: true }, /* @__PURE__ */ React118.createElement(
|
|
8210
8302
|
MentionTextAreaControl,
|
|
8211
8303
|
{
|
|
8212
8304
|
suggestions: emailSuggestions,
|
|
@@ -8216,9 +8308,9 @@ var ReplyToField = () => {
|
|
|
8216
8308
|
}
|
|
8217
8309
|
))));
|
|
8218
8310
|
};
|
|
8219
|
-
var CcField = () => /* @__PURE__ */
|
|
8220
|
-
var BccField = () => /* @__PURE__ */
|
|
8221
|
-
var MetaDataField = () => /* @__PURE__ */
|
|
8311
|
+
var CcField = () => /* @__PURE__ */ React118.createElement(PropKeyProvider, { bind: "cc" }, /* @__PURE__ */ React118.createElement(EmailChipsField, { fieldLabel: __57("Cc", "elementor") }));
|
|
8312
|
+
var BccField = () => /* @__PURE__ */ React118.createElement(PropKeyProvider, { bind: "bcc" }, /* @__PURE__ */ React118.createElement(EmailChipsField, { fieldLabel: __57("Bcc", "elementor") }));
|
|
8313
|
+
var MetaDataField = () => /* @__PURE__ */ React118.createElement(PropKeyProvider, { bind: "meta-data" }, /* @__PURE__ */ React118.createElement(Stack19, { gap: 0.5 }, /* @__PURE__ */ React118.createElement(ControlFormLabel, null, __57("Metadata", "elementor")), /* @__PURE__ */ React118.createElement(
|
|
8222
8314
|
ChipsControl,
|
|
8223
8315
|
{
|
|
8224
8316
|
options: [
|
|
@@ -8230,7 +8322,7 @@ var MetaDataField = () => /* @__PURE__ */ React116.createElement(PropKeyProvider
|
|
|
8230
8322
|
]
|
|
8231
8323
|
}
|
|
8232
8324
|
)));
|
|
8233
|
-
var SendAsField = () => /* @__PURE__ */
|
|
8325
|
+
var SendAsField = () => /* @__PURE__ */ React118.createElement(PropKeyProvider, { bind: "send-as" }, /* @__PURE__ */ React118.createElement(Grid34, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React118.createElement(Grid34, { item: true }, /* @__PURE__ */ React118.createElement(ControlFormLabel, null, __57("Send as", "elementor"))), /* @__PURE__ */ React118.createElement(Grid34, { item: true }, /* @__PURE__ */ React118.createElement(
|
|
8234
8326
|
SelectControl,
|
|
8235
8327
|
{
|
|
8236
8328
|
options: [
|
|
@@ -8239,28 +8331,32 @@ var SendAsField = () => /* @__PURE__ */ React116.createElement(PropKeyProvider,
|
|
|
8239
8331
|
]
|
|
8240
8332
|
}
|
|
8241
8333
|
))));
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
});
|
|
8334
|
+
|
|
8335
|
+
// src/controls/email-form-action-control/index.tsx
|
|
8336
|
+
var EmailFormActionControl = createControl(
|
|
8337
|
+
({ toPlaceholder, label }) => {
|
|
8338
|
+
const { value, setValue, ...propContext } = useBoundProp(emailsPropTypeUtil);
|
|
8339
|
+
return /* @__PURE__ */ React119.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React119.createElement(Stack20, { gap: 2 }, /* @__PURE__ */ React119.createElement(ControlLabel, null, label ? label + " " + __58("settings", "elementor") : __58("Email settings", "elementor")), /* @__PURE__ */ React119.createElement(PropKeyProvider, { bind: "to" }, /* @__PURE__ */ React119.createElement(SendToField, { placeholder: toPlaceholder })), /* @__PURE__ */ React119.createElement(SubjectField, null), /* @__PURE__ */ React119.createElement(MessageField, null), /* @__PURE__ */ React119.createElement(FromEmailField, null), /* @__PURE__ */ React119.createElement(AdvancedSettings, null)));
|
|
8340
|
+
}
|
|
8341
|
+
);
|
|
8342
|
+
var AdvancedSettings = () => /* @__PURE__ */ React119.createElement(CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React119.createElement(Box26, { sx: { pt: 2 } }, /* @__PURE__ */ React119.createElement(Stack20, { gap: 2 }, /* @__PURE__ */ React119.createElement(FromNameField, null), /* @__PURE__ */ React119.createElement(ReplyToField, null), /* @__PURE__ */ React119.createElement(CcField, null), /* @__PURE__ */ React119.createElement(BccField, null), /* @__PURE__ */ React119.createElement(Divider5, null), /* @__PURE__ */ React119.createElement(MetaDataField, null), /* @__PURE__ */ React119.createElement(SendAsField, null))));
|
|
8247
8343
|
|
|
8248
8344
|
// src/controls/attachment-type-control.tsx
|
|
8249
|
-
import * as
|
|
8345
|
+
import * as React120 from "react";
|
|
8250
8346
|
import { InfoAlert as InfoAlert3 } from "@elementor/editor-ui";
|
|
8251
|
-
import { Grid as
|
|
8252
|
-
import { __ as
|
|
8347
|
+
import { Grid as Grid35 } from "@elementor/ui";
|
|
8348
|
+
import { __ as __59 } from "@wordpress/i18n";
|
|
8253
8349
|
var AttachmentTypeControl = createControl(({ label, options }) => {
|
|
8254
|
-
return /* @__PURE__ */
|
|
8350
|
+
return /* @__PURE__ */ React120.createElement(Grid35, { container: true, direction: "column", gap: 1 }, label && /* @__PURE__ */ React120.createElement(Grid35, { item: true }, /* @__PURE__ */ React120.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React120.createElement(Grid35, { item: true }, /* @__PURE__ */ React120.createElement(SelectControl, { options })), /* @__PURE__ */ React120.createElement(Grid35, { item: true }, /* @__PURE__ */ React120.createElement(InfoAlert3, null, __59(
|
|
8255
8351
|
"Linked uploads are saved to the server. Direct attachments will not appear under Submissions.",
|
|
8256
8352
|
"elementor"
|
|
8257
8353
|
))));
|
|
8258
8354
|
});
|
|
8259
8355
|
|
|
8260
8356
|
// src/controls/grid-span-control.tsx
|
|
8261
|
-
import * as
|
|
8357
|
+
import * as React121 from "react";
|
|
8262
8358
|
import { spanPropTypeUtil } from "@elementor/editor-props";
|
|
8263
|
-
import { TextField as
|
|
8359
|
+
import { TextField as TextField12 } from "@elementor/ui";
|
|
8264
8360
|
var GridSpanControl = createControl(
|
|
8265
8361
|
({
|
|
8266
8362
|
placeholder: propPlaceholder,
|
|
@@ -8274,8 +8370,8 @@ var GridSpanControl = createControl(
|
|
|
8274
8370
|
const { value, setValue, disabled, placeholder: boundPlaceholder } = useBoundProp(spanPropTypeUtil);
|
|
8275
8371
|
const handleChange = (event) => setValue(event.target.value);
|
|
8276
8372
|
const placeholder = propPlaceholder ?? boundPlaceholder ?? `e.g: 'span 2' or '1 / 3'`;
|
|
8277
|
-
return /* @__PURE__ */
|
|
8278
|
-
|
|
8373
|
+
return /* @__PURE__ */ React121.createElement(ControlActions, null, /* @__PURE__ */ React121.createElement(
|
|
8374
|
+
TextField12,
|
|
8279
8375
|
{
|
|
8280
8376
|
size: "tiny",
|
|
8281
8377
|
fullWidth: true,
|
|
@@ -8295,15 +8391,15 @@ var GridSpanControl = createControl(
|
|
|
8295
8391
|
);
|
|
8296
8392
|
|
|
8297
8393
|
// src/components/promotions/display-conditions-control.tsx
|
|
8298
|
-
import * as
|
|
8394
|
+
import * as React123 from "react";
|
|
8299
8395
|
import { useRef as useRef29 } from "react";
|
|
8300
8396
|
import { SitemapIcon } from "@elementor/icons";
|
|
8301
|
-
import { IconButton as IconButton9, Stack as
|
|
8302
|
-
import { __ as
|
|
8397
|
+
import { IconButton as IconButton9, Stack as Stack21, Tooltip as Tooltip9 } from "@elementor/ui";
|
|
8398
|
+
import { __ as __60 } from "@wordpress/i18n";
|
|
8303
8399
|
|
|
8304
8400
|
// src/components/promotions/promotion-trigger.tsx
|
|
8305
|
-
import * as
|
|
8306
|
-
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as
|
|
8401
|
+
import * as React122 from "react";
|
|
8402
|
+
import { forwardRef as forwardRef12, useCallback as useCallback5, useImperativeHandle, useState as useState20 } from "react";
|
|
8307
8403
|
import { PromotionChip as PromotionChip2, PromotionInfotip } from "@elementor/editor-ui";
|
|
8308
8404
|
import { Box as Box27 } from "@elementor/ui";
|
|
8309
8405
|
function getV4Promotion(key) {
|
|
@@ -8311,7 +8407,7 @@ function getV4Promotion(key) {
|
|
|
8311
8407
|
}
|
|
8312
8408
|
var PromotionTrigger = forwardRef12(
|
|
8313
8409
|
({ promotionKey, children, trackingData }, ref) => {
|
|
8314
|
-
const [isOpen, setIsOpen] =
|
|
8410
|
+
const [isOpen, setIsOpen] = useState20(false);
|
|
8315
8411
|
const promotion = getV4Promotion(promotionKey);
|
|
8316
8412
|
const toggle = useCallback5(() => {
|
|
8317
8413
|
setIsOpen((prev) => {
|
|
@@ -8322,7 +8418,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
8322
8418
|
});
|
|
8323
8419
|
}, [trackingData]);
|
|
8324
8420
|
useImperativeHandle(ref, () => ({ toggle }), [toggle]);
|
|
8325
|
-
return /* @__PURE__ */
|
|
8421
|
+
return /* @__PURE__ */ React122.createElement(React122.Fragment, null, promotion && /* @__PURE__ */ React122.createElement(
|
|
8326
8422
|
PromotionInfotip,
|
|
8327
8423
|
{
|
|
8328
8424
|
title: promotion.title,
|
|
@@ -8336,7 +8432,7 @@ var PromotionTrigger = forwardRef12(
|
|
|
8336
8432
|
},
|
|
8337
8433
|
onCtaClick: () => trackUpgradePromotionClick(trackingData)
|
|
8338
8434
|
},
|
|
8339
|
-
/* @__PURE__ */
|
|
8435
|
+
/* @__PURE__ */ React122.createElement(
|
|
8340
8436
|
Box27,
|
|
8341
8437
|
{
|
|
8342
8438
|
onClick: (e) => {
|
|
@@ -8345,19 +8441,19 @@ var PromotionTrigger = forwardRef12(
|
|
|
8345
8441
|
},
|
|
8346
8442
|
sx: { cursor: "pointer", display: "inline-flex" }
|
|
8347
8443
|
},
|
|
8348
|
-
children ?? /* @__PURE__ */
|
|
8444
|
+
children ?? /* @__PURE__ */ React122.createElement(PromotionChip2, null)
|
|
8349
8445
|
)
|
|
8350
8446
|
));
|
|
8351
8447
|
}
|
|
8352
8448
|
);
|
|
8353
8449
|
|
|
8354
8450
|
// src/components/promotions/display-conditions-control.tsx
|
|
8355
|
-
var ARIA_LABEL =
|
|
8451
|
+
var ARIA_LABEL = __60("Display Conditions", "elementor");
|
|
8356
8452
|
var TRACKING_DATA = { target_name: "display_conditions", location_l2: "general" };
|
|
8357
8453
|
var DisplayConditionsControl = createControl(() => {
|
|
8358
8454
|
const triggerRef = useRef29(null);
|
|
8359
|
-
return /* @__PURE__ */
|
|
8360
|
-
|
|
8455
|
+
return /* @__PURE__ */ React123.createElement(
|
|
8456
|
+
Stack21,
|
|
8361
8457
|
{
|
|
8362
8458
|
direction: "row",
|
|
8363
8459
|
spacing: 2,
|
|
@@ -8366,8 +8462,8 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
8366
8462
|
alignItems: "center"
|
|
8367
8463
|
}
|
|
8368
8464
|
},
|
|
8369
|
-
/* @__PURE__ */
|
|
8370
|
-
/* @__PURE__ */
|
|
8465
|
+
/* @__PURE__ */ React123.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "displayConditions", trackingData: TRACKING_DATA }),
|
|
8466
|
+
/* @__PURE__ */ React123.createElement(Tooltip9, { title: ARIA_LABEL, placement: "top" }, /* @__PURE__ */ React123.createElement(
|
|
8371
8467
|
IconButton9,
|
|
8372
8468
|
{
|
|
8373
8469
|
size: "tiny",
|
|
@@ -8380,23 +8476,23 @@ var DisplayConditionsControl = createControl(() => {
|
|
|
8380
8476
|
borderRadius: 1
|
|
8381
8477
|
}
|
|
8382
8478
|
},
|
|
8383
|
-
/* @__PURE__ */
|
|
8479
|
+
/* @__PURE__ */ React123.createElement(SitemapIcon, { fontSize: "tiny", color: "disabled" })
|
|
8384
8480
|
))
|
|
8385
8481
|
);
|
|
8386
8482
|
});
|
|
8387
8483
|
|
|
8388
8484
|
// src/components/promotions/attributes-control.tsx
|
|
8389
|
-
import * as
|
|
8485
|
+
import * as React124 from "react";
|
|
8390
8486
|
import { useRef as useRef30 } from "react";
|
|
8391
8487
|
import { PlusIcon as PlusIcon4 } from "@elementor/icons";
|
|
8392
|
-
import { Stack as
|
|
8393
|
-
import { __ as
|
|
8394
|
-
var ARIA_LABEL2 =
|
|
8488
|
+
import { Stack as Stack22, Tooltip as Tooltip10 } from "@elementor/ui";
|
|
8489
|
+
import { __ as __61 } from "@wordpress/i18n";
|
|
8490
|
+
var ARIA_LABEL2 = __61("Attributes", "elementor");
|
|
8395
8491
|
var TRACKING_DATA2 = { target_name: "attributes", location_l2: "general" };
|
|
8396
8492
|
var AttributesControl = createControl(() => {
|
|
8397
8493
|
const triggerRef = useRef30(null);
|
|
8398
|
-
return /* @__PURE__ */
|
|
8399
|
-
|
|
8494
|
+
return /* @__PURE__ */ React124.createElement(
|
|
8495
|
+
Stack22,
|
|
8400
8496
|
{
|
|
8401
8497
|
direction: "row",
|
|
8402
8498
|
spacing: 2,
|
|
@@ -8405,8 +8501,8 @@ var AttributesControl = createControl(() => {
|
|
|
8405
8501
|
alignItems: "center"
|
|
8406
8502
|
}
|
|
8407
8503
|
},
|
|
8408
|
-
/* @__PURE__ */
|
|
8409
|
-
/* @__PURE__ */
|
|
8504
|
+
/* @__PURE__ */ React124.createElement(PromotionTrigger, { ref: triggerRef, promotionKey: "attributes", trackingData: TRACKING_DATA2 }),
|
|
8505
|
+
/* @__PURE__ */ React124.createElement(Tooltip10, { title: ARIA_LABEL2, placement: "top" }, /* @__PURE__ */ React124.createElement(
|
|
8410
8506
|
PlusIcon4,
|
|
8411
8507
|
{
|
|
8412
8508
|
"aria-label": ARIA_LABEL2,
|
|
@@ -8420,18 +8516,18 @@ var AttributesControl = createControl(() => {
|
|
|
8420
8516
|
});
|
|
8421
8517
|
|
|
8422
8518
|
// src/components/icon-buttons/clear-icon-button.tsx
|
|
8423
|
-
import * as
|
|
8519
|
+
import * as React125 from "react";
|
|
8424
8520
|
import { BrushBigIcon } from "@elementor/icons";
|
|
8425
8521
|
import { IconButton as IconButton10, styled as styled11, Tooltip as Tooltip11 } from "@elementor/ui";
|
|
8426
8522
|
var CustomIconButton = styled11(IconButton10)(({ theme }) => ({
|
|
8427
8523
|
width: theme.spacing(2.5),
|
|
8428
8524
|
height: theme.spacing(2.5)
|
|
8429
8525
|
}));
|
|
8430
|
-
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */
|
|
8526
|
+
var ClearIconButton = ({ tooltipText, onClick, disabled, size = "tiny" }) => /* @__PURE__ */ React125.createElement(Tooltip11, { title: tooltipText, placement: "top", disableInteractive: true }, /* @__PURE__ */ React125.createElement(CustomIconButton, { "aria-label": tooltipText, size, onClick, disabled }, /* @__PURE__ */ React125.createElement(BrushBigIcon, { fontSize: size })));
|
|
8431
8527
|
|
|
8432
8528
|
// src/components/repeater/repeater.tsx
|
|
8433
|
-
import * as
|
|
8434
|
-
import { useEffect as useEffect18, useState as
|
|
8529
|
+
import * as React126 from "react";
|
|
8530
|
+
import { useEffect as useEffect18, useState as useState21 } from "react";
|
|
8435
8531
|
import { CopyIcon as CopyIcon2, EyeIcon as EyeIcon2, EyeOffIcon as EyeOffIcon2, PlusIcon as PlusIcon5, XIcon as XIcon4 } from "@elementor/icons";
|
|
8436
8532
|
import {
|
|
8437
8533
|
bindPopover as bindPopover8,
|
|
@@ -8442,7 +8538,7 @@ import {
|
|
|
8442
8538
|
Tooltip as Tooltip12,
|
|
8443
8539
|
usePopupState as usePopupState10
|
|
8444
8540
|
} from "@elementor/ui";
|
|
8445
|
-
import { __ as
|
|
8541
|
+
import { __ as __62 } from "@wordpress/i18n";
|
|
8446
8542
|
var SIZE12 = "tiny";
|
|
8447
8543
|
var EMPTY_OPEN_ITEM2 = -1;
|
|
8448
8544
|
var Repeater3 = ({
|
|
@@ -8460,7 +8556,7 @@ var Repeater3 = ({
|
|
|
8460
8556
|
openItem: initialOpenItem = EMPTY_OPEN_ITEM2,
|
|
8461
8557
|
isSortable = true
|
|
8462
8558
|
}) => {
|
|
8463
|
-
const [openItem, setOpenItem] =
|
|
8559
|
+
const [openItem, setOpenItem] = useState21(initialOpenItem);
|
|
8464
8560
|
const uniqueKeys = items2.map(
|
|
8465
8561
|
(item, index) => isSortable && "getId" in itemSettings ? itemSettings.getId({ item, index }) : String(index)
|
|
8466
8562
|
);
|
|
@@ -8523,7 +8619,7 @@ var Repeater3 = ({
|
|
|
8523
8619
|
};
|
|
8524
8620
|
const isButtonDisabled = disabled || disableAddItemButton;
|
|
8525
8621
|
const shouldShowInfotip = isButtonDisabled && addButtonInfotipContent;
|
|
8526
|
-
const addButton = /* @__PURE__ */
|
|
8622
|
+
const addButton = /* @__PURE__ */ React126.createElement(
|
|
8527
8623
|
IconButton11,
|
|
8528
8624
|
{
|
|
8529
8625
|
size: SIZE12,
|
|
@@ -8532,11 +8628,11 @@ var Repeater3 = ({
|
|
|
8532
8628
|
},
|
|
8533
8629
|
disabled: isButtonDisabled,
|
|
8534
8630
|
onClick: addRepeaterItem,
|
|
8535
|
-
"aria-label":
|
|
8631
|
+
"aria-label": __62("Add item", "elementor")
|
|
8536
8632
|
},
|
|
8537
|
-
/* @__PURE__ */
|
|
8633
|
+
/* @__PURE__ */ React126.createElement(PlusIcon5, { fontSize: SIZE12 })
|
|
8538
8634
|
);
|
|
8539
|
-
return /* @__PURE__ */
|
|
8635
|
+
return /* @__PURE__ */ React126.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React126.createElement(RepeaterHeader, { label, adornment: ControlAdornments }, shouldShowInfotip ? /* @__PURE__ */ React126.createElement(
|
|
8540
8636
|
Infotip4,
|
|
8541
8637
|
{
|
|
8542
8638
|
placement: "right",
|
|
@@ -8544,20 +8640,20 @@ var Repeater3 = ({
|
|
|
8544
8640
|
color: "secondary",
|
|
8545
8641
|
slotProps: { popper: { sx: { width: 300 } } }
|
|
8546
8642
|
},
|
|
8547
|
-
/* @__PURE__ */
|
|
8548
|
-
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */
|
|
8643
|
+
/* @__PURE__ */ React126.createElement(Box28, { sx: { ...isButtonDisabled ? { cursor: "not-allowed" } : {} } }, addButton)
|
|
8644
|
+
) : addButton), 0 < uniqueKeys.length && /* @__PURE__ */ React126.createElement(SortableProvider, { value: uniqueKeys, onChange: onChangeOrder }, uniqueKeys.map((key) => {
|
|
8549
8645
|
const index = uniqueKeys.indexOf(key);
|
|
8550
8646
|
const value = items2[index];
|
|
8551
8647
|
if (!value) {
|
|
8552
8648
|
return null;
|
|
8553
8649
|
}
|
|
8554
|
-
return /* @__PURE__ */
|
|
8650
|
+
return /* @__PURE__ */ React126.createElement(SortableItem, { id: key, key: `sortable-${key}`, disabled: !isSortable }, /* @__PURE__ */ React126.createElement(
|
|
8555
8651
|
RepeaterItem,
|
|
8556
8652
|
{
|
|
8557
8653
|
disabled,
|
|
8558
8654
|
propDisabled: value?.disabled,
|
|
8559
|
-
label: /* @__PURE__ */
|
|
8560
|
-
startIcon: /* @__PURE__ */
|
|
8655
|
+
label: /* @__PURE__ */ React126.createElement(RepeaterItemLabelSlot, { value }, /* @__PURE__ */ React126.createElement(itemSettings.Label, { value, index })),
|
|
8656
|
+
startIcon: /* @__PURE__ */ React126.createElement(RepeaterItemIconSlot, { value }, /* @__PURE__ */ React126.createElement(itemSettings.Icon, { value })),
|
|
8561
8657
|
removeItem: () => removeRepeaterItem(index),
|
|
8562
8658
|
duplicateItem: () => duplicateRepeaterItem(index),
|
|
8563
8659
|
toggleDisableItem: () => toggleDisableRepeaterItem(index),
|
|
@@ -8571,7 +8667,7 @@ var Repeater3 = ({
|
|
|
8571
8667
|
actions: itemSettings.actions,
|
|
8572
8668
|
value
|
|
8573
8669
|
},
|
|
8574
|
-
(props) => /* @__PURE__ */
|
|
8670
|
+
(props) => /* @__PURE__ */ React126.createElement(
|
|
8575
8671
|
itemSettings.Content,
|
|
8576
8672
|
{
|
|
8577
8673
|
...props,
|
|
@@ -8613,16 +8709,16 @@ var RepeaterItem = ({
|
|
|
8613
8709
|
);
|
|
8614
8710
|
const triggerProps = bindTrigger7(popoverState);
|
|
8615
8711
|
usePopoverDismiss({ isOpen: popoverState.isOpen, onClose: popoverProps.onClose });
|
|
8616
|
-
const duplicateLabel =
|
|
8617
|
-
const toggleLabel = propDisabled ?
|
|
8618
|
-
const removeLabel =
|
|
8619
|
-
return /* @__PURE__ */
|
|
8712
|
+
const duplicateLabel = __62("Duplicate", "elementor");
|
|
8713
|
+
const toggleLabel = propDisabled ? __62("Show", "elementor") : __62("Hide", "elementor");
|
|
8714
|
+
const removeLabel = __62("Remove", "elementor");
|
|
8715
|
+
return /* @__PURE__ */ React126.createElement(Box28, { sx: { display: "contents" } }, /* @__PURE__ */ React126.createElement(
|
|
8620
8716
|
RepeaterTag,
|
|
8621
8717
|
{
|
|
8622
8718
|
disabled,
|
|
8623
8719
|
label,
|
|
8624
8720
|
ref: setRef,
|
|
8625
|
-
"aria-label":
|
|
8721
|
+
"aria-label": __62("Open item", "elementor"),
|
|
8626
8722
|
...triggerProps,
|
|
8627
8723
|
onClick: (e) => {
|
|
8628
8724
|
triggerProps.onClick(e);
|
|
@@ -8631,12 +8727,12 @@ var RepeaterItem = ({
|
|
|
8631
8727
|
}
|
|
8632
8728
|
},
|
|
8633
8729
|
startIcon,
|
|
8634
|
-
actions: /* @__PURE__ */
|
|
8730
|
+
actions: /* @__PURE__ */ React126.createElement(React126.Fragment, null, showDuplicate && /* @__PURE__ */ React126.createElement(Tooltip12, { title: duplicateLabel, placement: "top" }, /* @__PURE__ */ React126.createElement(IconButton11, { size: SIZE12, onClick: duplicateItem, "aria-label": duplicateLabel }, /* @__PURE__ */ React126.createElement(CopyIcon2, { fontSize: SIZE12 }))), showToggle && /* @__PURE__ */ React126.createElement(Tooltip12, { title: toggleLabel, placement: "top" }, /* @__PURE__ */ React126.createElement(IconButton11, { size: SIZE12, onClick: toggleDisableItem, "aria-label": toggleLabel }, propDisabled ? /* @__PURE__ */ React126.createElement(EyeOffIcon2, { fontSize: SIZE12 }) : /* @__PURE__ */ React126.createElement(EyeIcon2, { fontSize: SIZE12 }))), actions?.(value), showRemove && /* @__PURE__ */ React126.createElement(Tooltip12, { title: removeLabel, placement: "top" }, /* @__PURE__ */ React126.createElement(IconButton11, { size: SIZE12, onClick: removeItem, "aria-label": removeLabel }, /* @__PURE__ */ React126.createElement(XIcon4, { fontSize: SIZE12 }))))
|
|
8635
8731
|
}
|
|
8636
|
-
), /* @__PURE__ */
|
|
8732
|
+
), /* @__PURE__ */ React126.createElement(RepeaterPopover, { width: ref?.getBoundingClientRect().width, ...popoverProps, anchorEl: ref }, /* @__PURE__ */ React126.createElement(Box28, null, children({ anchorEl: ref }))));
|
|
8637
8733
|
};
|
|
8638
8734
|
var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
8639
|
-
const [ref, setRef] =
|
|
8735
|
+
const [ref, setRef] = useState21(null);
|
|
8640
8736
|
const popoverState = usePopupState10({ variant: "popover" });
|
|
8641
8737
|
const popoverProps = bindPopover8(popoverState);
|
|
8642
8738
|
useEffect18(() => {
|
|
@@ -8658,8 +8754,8 @@ var usePopover = (openOnMount, onOpen, onPopoverClose) => {
|
|
|
8658
8754
|
};
|
|
8659
8755
|
|
|
8660
8756
|
// src/components/inline-editor-toolbar.tsx
|
|
8661
|
-
import * as
|
|
8662
|
-
import { useEffect as useEffect20, useMemo as useMemo19, useRef as useRef32, useState as
|
|
8757
|
+
import * as React128 from "react";
|
|
8758
|
+
import { useEffect as useEffect20, useMemo as useMemo19, useRef as useRef32, useState as useState22 } from "react";
|
|
8663
8759
|
import { getContainer as getContainer2, getElementSetting } from "@elementor/editor-elements";
|
|
8664
8760
|
import {
|
|
8665
8761
|
BoldIcon,
|
|
@@ -8681,14 +8777,14 @@ import {
|
|
|
8681
8777
|
usePopupState as usePopupState11
|
|
8682
8778
|
} from "@elementor/ui";
|
|
8683
8779
|
import { useEditorState } from "@tiptap/react";
|
|
8684
|
-
import { __ as
|
|
8780
|
+
import { __ as __64 } from "@wordpress/i18n";
|
|
8685
8781
|
|
|
8686
8782
|
// src/components/url-popover.tsx
|
|
8687
|
-
import * as
|
|
8783
|
+
import * as React127 from "react";
|
|
8688
8784
|
import { useEffect as useEffect19, useRef as useRef31 } from "react";
|
|
8689
8785
|
import { ExternalLinkIcon } from "@elementor/icons";
|
|
8690
|
-
import { bindPopover as bindPopover9, Popover as Popover8, Stack as
|
|
8691
|
-
import { __ as
|
|
8786
|
+
import { bindPopover as bindPopover9, Popover as Popover8, Stack as Stack23, TextField as TextField13, ToggleButton as ToggleButton2, Tooltip as Tooltip13 } from "@elementor/ui";
|
|
8787
|
+
import { __ as __63 } from "@wordpress/i18n";
|
|
8692
8788
|
var UrlPopover = ({
|
|
8693
8789
|
popupState,
|
|
8694
8790
|
restoreValue,
|
|
@@ -8708,7 +8804,7 @@ var UrlPopover = ({
|
|
|
8708
8804
|
restoreValue();
|
|
8709
8805
|
popupState.close();
|
|
8710
8806
|
};
|
|
8711
|
-
return /* @__PURE__ */
|
|
8807
|
+
return /* @__PURE__ */ React127.createElement(
|
|
8712
8808
|
Popover8,
|
|
8713
8809
|
{
|
|
8714
8810
|
slotProps: {
|
|
@@ -8719,38 +8815,38 @@ var UrlPopover = ({
|
|
|
8719
8815
|
transformOrigin: { vertical: "top", horizontal: "left" },
|
|
8720
8816
|
onClose: handleClose
|
|
8721
8817
|
},
|
|
8722
|
-
/* @__PURE__ */
|
|
8723
|
-
|
|
8818
|
+
/* @__PURE__ */ React127.createElement(Stack23, { direction: "row", alignItems: "center", gap: 1, sx: { p: 1.5 } }, /* @__PURE__ */ React127.createElement(
|
|
8819
|
+
TextField13,
|
|
8724
8820
|
{
|
|
8725
8821
|
value,
|
|
8726
8822
|
onChange,
|
|
8727
8823
|
size: "tiny",
|
|
8728
8824
|
fullWidth: true,
|
|
8729
|
-
placeholder:
|
|
8825
|
+
placeholder: __63("Type a URL", "elementor"),
|
|
8730
8826
|
inputProps: { ref: inputRef },
|
|
8731
8827
|
color: "secondary",
|
|
8732
8828
|
InputProps: { sx: { borderRadius: "8px" } },
|
|
8733
8829
|
onKeyUp: (event) => event.key === "Enter" && handleClose()
|
|
8734
8830
|
}
|
|
8735
|
-
), /* @__PURE__ */
|
|
8831
|
+
), /* @__PURE__ */ React127.createElement(Tooltip13, { title: __63("Open in a new tab", "elementor") }, /* @__PURE__ */ React127.createElement(
|
|
8736
8832
|
ToggleButton2,
|
|
8737
8833
|
{
|
|
8738
8834
|
size: "tiny",
|
|
8739
8835
|
value: "newTab",
|
|
8740
8836
|
selected: openInNewTab,
|
|
8741
8837
|
onClick: onToggleNewTab,
|
|
8742
|
-
"aria-label":
|
|
8838
|
+
"aria-label": __63("Open in a new tab", "elementor"),
|
|
8743
8839
|
sx: { borderRadius: "8px" }
|
|
8744
8840
|
},
|
|
8745
|
-
/* @__PURE__ */
|
|
8841
|
+
/* @__PURE__ */ React127.createElement(ExternalLinkIcon, { fontSize: "tiny" })
|
|
8746
8842
|
)))
|
|
8747
8843
|
);
|
|
8748
8844
|
};
|
|
8749
8845
|
|
|
8750
8846
|
// src/components/inline-editor-toolbar.tsx
|
|
8751
8847
|
var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
8752
|
-
const [urlValue, setUrlValue] =
|
|
8753
|
-
const [openInNewTab, setOpenInNewTab] =
|
|
8848
|
+
const [urlValue, setUrlValue] = useState22("");
|
|
8849
|
+
const [openInNewTab, setOpenInNewTab] = useState22(false);
|
|
8754
8850
|
const toolbarRef = useRef32(null);
|
|
8755
8851
|
const linkPopupState = usePopupState11({ variant: "popover" });
|
|
8756
8852
|
const isElementClickable = elementId ? checkIfElementIsClickable(elementId) : false;
|
|
@@ -8798,7 +8894,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8798
8894
|
useEffect20(() => {
|
|
8799
8895
|
editor?.commands?.focus();
|
|
8800
8896
|
}, [editor]);
|
|
8801
|
-
return /* @__PURE__ */
|
|
8897
|
+
return /* @__PURE__ */ React128.createElement(
|
|
8802
8898
|
Box29,
|
|
8803
8899
|
{
|
|
8804
8900
|
ref: toolbarRef,
|
|
@@ -8815,8 +8911,8 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8815
8911
|
...sx
|
|
8816
8912
|
}
|
|
8817
8913
|
},
|
|
8818
|
-
/* @__PURE__ */
|
|
8819
|
-
/* @__PURE__ */
|
|
8914
|
+
/* @__PURE__ */ React128.createElement(Tooltip14, { title: clearButton.label, placement: "top", sx: { borderRadius: "8px" } }, /* @__PURE__ */ React128.createElement(IconButton12, { "aria-label": clearButton.label, onClick: () => clearButton.method(editor), size: "tiny" }, clearButton.icon)),
|
|
8915
|
+
/* @__PURE__ */ React128.createElement(
|
|
8820
8916
|
ToggleButtonGroup2,
|
|
8821
8917
|
{
|
|
8822
8918
|
value: editorState,
|
|
@@ -8838,7 +8934,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8838
8934
|
}
|
|
8839
8935
|
}
|
|
8840
8936
|
},
|
|
8841
|
-
formatButtonsList.map((button) => /* @__PURE__ */
|
|
8937
|
+
formatButtonsList.map((button) => /* @__PURE__ */ React128.createElement(Tooltip14, { title: button.label, key: button.action, placement: "top" }, /* @__PURE__ */ React128.createElement(
|
|
8842
8938
|
ToggleButton3,
|
|
8843
8939
|
{
|
|
8844
8940
|
value: button.action,
|
|
@@ -8856,7 +8952,7 @@ var InlineEditorToolbar = ({ editor, elementId, sx = {} }) => {
|
|
|
8856
8952
|
button.icon
|
|
8857
8953
|
)))
|
|
8858
8954
|
),
|
|
8859
|
-
/* @__PURE__ */
|
|
8955
|
+
/* @__PURE__ */ React128.createElement(
|
|
8860
8956
|
UrlPopover,
|
|
8861
8957
|
{
|
|
8862
8958
|
popupState: linkPopupState,
|
|
@@ -8879,64 +8975,64 @@ var checkIfElementIsClickable = (elementId) => {
|
|
|
8879
8975
|
};
|
|
8880
8976
|
var toolbarButtons = {
|
|
8881
8977
|
clear: {
|
|
8882
|
-
label:
|
|
8883
|
-
icon: /* @__PURE__ */
|
|
8978
|
+
label: __64("Clear", "elementor"),
|
|
8979
|
+
icon: /* @__PURE__ */ React128.createElement(MinusIcon2, { fontSize: "tiny" }),
|
|
8884
8980
|
action: "clear",
|
|
8885
8981
|
method: (editor) => {
|
|
8886
8982
|
editor.chain().focus().clearNodes().unsetAllMarks().run();
|
|
8887
8983
|
}
|
|
8888
8984
|
},
|
|
8889
8985
|
bold: {
|
|
8890
|
-
label:
|
|
8891
|
-
icon: /* @__PURE__ */
|
|
8986
|
+
label: __64("Bold", "elementor"),
|
|
8987
|
+
icon: /* @__PURE__ */ React128.createElement(BoldIcon, { fontSize: "tiny" }),
|
|
8892
8988
|
action: "bold",
|
|
8893
8989
|
method: (editor) => {
|
|
8894
8990
|
editor.chain().focus().toggleBold().run();
|
|
8895
8991
|
}
|
|
8896
8992
|
},
|
|
8897
8993
|
italic: {
|
|
8898
|
-
label:
|
|
8899
|
-
icon: /* @__PURE__ */
|
|
8994
|
+
label: __64("Italic", "elementor"),
|
|
8995
|
+
icon: /* @__PURE__ */ React128.createElement(ItalicIcon, { fontSize: "tiny" }),
|
|
8900
8996
|
action: "italic",
|
|
8901
8997
|
method: (editor) => {
|
|
8902
8998
|
editor.chain().focus().toggleItalic().run();
|
|
8903
8999
|
}
|
|
8904
9000
|
},
|
|
8905
9001
|
underline: {
|
|
8906
|
-
label:
|
|
8907
|
-
icon: /* @__PURE__ */
|
|
9002
|
+
label: __64("Underline", "elementor"),
|
|
9003
|
+
icon: /* @__PURE__ */ React128.createElement(UnderlineIcon, { fontSize: "tiny" }),
|
|
8908
9004
|
action: "underline",
|
|
8909
9005
|
method: (editor) => {
|
|
8910
9006
|
editor.chain().focus().toggleUnderline().run();
|
|
8911
9007
|
}
|
|
8912
9008
|
},
|
|
8913
9009
|
strike: {
|
|
8914
|
-
label:
|
|
8915
|
-
icon: /* @__PURE__ */
|
|
9010
|
+
label: __64("Strikethrough", "elementor"),
|
|
9011
|
+
icon: /* @__PURE__ */ React128.createElement(StrikethroughIcon, { fontSize: "tiny" }),
|
|
8916
9012
|
action: "strike",
|
|
8917
9013
|
method: (editor) => {
|
|
8918
9014
|
editor.chain().focus().toggleStrike().run();
|
|
8919
9015
|
}
|
|
8920
9016
|
},
|
|
8921
9017
|
superscript: {
|
|
8922
|
-
label:
|
|
8923
|
-
icon: /* @__PURE__ */
|
|
9018
|
+
label: __64("Superscript", "elementor"),
|
|
9019
|
+
icon: /* @__PURE__ */ React128.createElement(SuperscriptIcon, { fontSize: "tiny" }),
|
|
8924
9020
|
action: "superscript",
|
|
8925
9021
|
method: (editor) => {
|
|
8926
9022
|
editor.chain().focus().toggleSuperscript().run();
|
|
8927
9023
|
}
|
|
8928
9024
|
},
|
|
8929
9025
|
subscript: {
|
|
8930
|
-
label:
|
|
8931
|
-
icon: /* @__PURE__ */
|
|
9026
|
+
label: __64("Subscript", "elementor"),
|
|
9027
|
+
icon: /* @__PURE__ */ React128.createElement(SubscriptIcon, { fontSize: "tiny" }),
|
|
8932
9028
|
action: "subscript",
|
|
8933
9029
|
method: (editor) => {
|
|
8934
9030
|
editor.chain().focus().toggleSubscript().run();
|
|
8935
9031
|
}
|
|
8936
9032
|
},
|
|
8937
9033
|
link: {
|
|
8938
|
-
label:
|
|
8939
|
-
icon: /* @__PURE__ */
|
|
9034
|
+
label: __64("Link", "elementor"),
|
|
9035
|
+
icon: /* @__PURE__ */ React128.createElement(LinkIcon3, { fontSize: "tiny" }),
|
|
8940
9036
|
action: "link",
|
|
8941
9037
|
method: null
|
|
8942
9038
|
}
|
|
@@ -8945,7 +9041,7 @@ var { clear: clearButton, ...formatButtons } = toolbarButtons;
|
|
|
8945
9041
|
var possibleFormats = Object.keys(formatButtons);
|
|
8946
9042
|
|
|
8947
9043
|
// src/components/size/unstable-size-field.tsx
|
|
8948
|
-
import * as
|
|
9044
|
+
import * as React131 from "react";
|
|
8949
9045
|
import { InputAdornment as InputAdornment6 } from "@elementor/ui";
|
|
8950
9046
|
|
|
8951
9047
|
// src/hooks/use-size-value.ts
|
|
@@ -8988,7 +9084,7 @@ var differsFromExternal = (newState, externalState) => {
|
|
|
8988
9084
|
};
|
|
8989
9085
|
|
|
8990
9086
|
// src/components/size/unit-select.tsx
|
|
8991
|
-
import * as
|
|
9087
|
+
import * as React129 from "react";
|
|
8992
9088
|
import { useId as useId4 } from "react";
|
|
8993
9089
|
import { MenuListItem as MenuListItem8 } from "@elementor/editor-ui";
|
|
8994
9090
|
import { bindMenu as bindMenu3, bindTrigger as bindTrigger8, Button as Button7, Menu as Menu4, styled as styled12, usePopupState as usePopupState12 } from "@elementor/ui";
|
|
@@ -9006,7 +9102,7 @@ var UnitSelect = ({ value, showPrimaryColor, onClick, options }) => {
|
|
|
9006
9102
|
onClick(options[index]);
|
|
9007
9103
|
popupState.close();
|
|
9008
9104
|
};
|
|
9009
|
-
return /* @__PURE__ */
|
|
9105
|
+
return /* @__PURE__ */ React129.createElement(React129.Fragment, null, /* @__PURE__ */ React129.createElement(StyledButton3, { isPrimaryColor: showPrimaryColor, size: "small", ...bindTrigger8(popupState) }, value), /* @__PURE__ */ React129.createElement(Menu4, { MenuListProps: { dense: true }, ...bindMenu3(popupState) }, options.map((option, index) => /* @__PURE__ */ React129.createElement(
|
|
9010
9106
|
MenuListItem8,
|
|
9011
9107
|
{
|
|
9012
9108
|
key: option,
|
|
@@ -9035,11 +9131,11 @@ var StyledButton3 = styled12(Button7, {
|
|
|
9035
9131
|
}));
|
|
9036
9132
|
|
|
9037
9133
|
// src/components/size/unstable-size-input.tsx
|
|
9038
|
-
import * as
|
|
9134
|
+
import * as React130 from "react";
|
|
9039
9135
|
import { forwardRef as forwardRef13 } from "react";
|
|
9040
9136
|
var UnstableSizeInput = forwardRef13(
|
|
9041
9137
|
({ type, value, onChange, onKeyDown, onKeyUp, InputProps, onBlur, focused, disabled }, ref) => {
|
|
9042
|
-
return /* @__PURE__ */
|
|
9138
|
+
return /* @__PURE__ */ React130.createElement(
|
|
9043
9139
|
NumberInput,
|
|
9044
9140
|
{
|
|
9045
9141
|
ref,
|
|
@@ -9077,7 +9173,7 @@ var UnstableSizeField = ({
|
|
|
9077
9173
|
const shouldHighlightUnit2 = () => {
|
|
9078
9174
|
return hasValue(size);
|
|
9079
9175
|
};
|
|
9080
|
-
return /* @__PURE__ */
|
|
9176
|
+
return /* @__PURE__ */ React131.createElement(
|
|
9081
9177
|
UnstableSizeInput,
|
|
9082
9178
|
{
|
|
9083
9179
|
type: "number",
|
|
@@ -9086,8 +9182,8 @@ var UnstableSizeField = ({
|
|
|
9086
9182
|
onChange: (event) => setSize(event.target.value),
|
|
9087
9183
|
InputProps: {
|
|
9088
9184
|
...InputProps,
|
|
9089
|
-
startAdornment: startIcon && /* @__PURE__ */
|
|
9090
|
-
endAdornment: /* @__PURE__ */
|
|
9185
|
+
startAdornment: startIcon && /* @__PURE__ */ React131.createElement(InputAdornment6, { position: "start" }, startIcon),
|
|
9186
|
+
endAdornment: /* @__PURE__ */ React131.createElement(InputAdornment6, { position: "end" }, /* @__PURE__ */ React131.createElement(
|
|
9091
9187
|
UnitSelect,
|
|
9092
9188
|
{
|
|
9093
9189
|
options: units2,
|