@elementor/editor-controls 4.2.0-beta2 → 4.3.0-1001
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 +10 -16
- package/dist/index.d.ts +10 -16
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/components/repeater/repeater.tsx +28 -32
- package/src/controls/email-form-action-control/email-chips-field.tsx +47 -37
- package/src/controls/email-form-action-control/fields.tsx +3 -1
- package/src/controls/email-form-action-control/index.tsx +2 -4
- package/src/utils/tracking.ts +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -653,21 +653,7 @@ type SortableItemSettings<T> = BaseItemSettings<T> & {
|
|
|
653
653
|
index: number;
|
|
654
654
|
}) => string;
|
|
655
655
|
};
|
|
656
|
-
type
|
|
657
|
-
label: string;
|
|
658
|
-
values?: T[];
|
|
659
|
-
openOnAdd?: boolean;
|
|
660
|
-
setValues: (newValue: T[], _: CreateOptions, meta?: SetRepeaterValuesMeta<T>) => void;
|
|
661
|
-
disabled?: boolean;
|
|
662
|
-
disableAddItemButton?: boolean;
|
|
663
|
-
addButtonInfotipContent?: React$1.ReactNode;
|
|
664
|
-
showDuplicate?: boolean;
|
|
665
|
-
showToggle?: boolean;
|
|
666
|
-
showRemove?: boolean;
|
|
667
|
-
openItem?: number;
|
|
668
|
-
isSortable: false;
|
|
669
|
-
itemSettings: BaseItemSettings<T>;
|
|
670
|
-
} | {
|
|
656
|
+
type BaseProps<T> = {
|
|
671
657
|
label: string;
|
|
672
658
|
values?: T[];
|
|
673
659
|
openOnAdd?: boolean;
|
|
@@ -679,10 +665,18 @@ type RepeaterProps<T> = {
|
|
|
679
665
|
showToggle?: boolean;
|
|
680
666
|
showRemove?: boolean;
|
|
681
667
|
openItem?: number;
|
|
668
|
+
adornment?: React$1.FC;
|
|
669
|
+
};
|
|
670
|
+
type SortableProps<T> = BaseProps<T> & {
|
|
682
671
|
isSortable?: true;
|
|
683
672
|
itemSettings: SortableItemSettings<T>;
|
|
684
673
|
};
|
|
685
|
-
|
|
674
|
+
type NonSortableProps<T> = BaseProps<T> & {
|
|
675
|
+
isSortable?: false;
|
|
676
|
+
itemSettings: BaseItemSettings<T>;
|
|
677
|
+
};
|
|
678
|
+
type RepeaterProps<T> = SortableProps<T> | NonSortableProps<T>;
|
|
679
|
+
declare const Repeater: <T>({ label, itemSettings, disabled, openOnAdd, values: items, setValues: setItems, showDuplicate, showToggle, showRemove, disableAddItemButton, addButtonInfotipContent, openItem: initialOpenItem, isSortable, adornment, }: RepeaterProps<RepeaterItem<T>>) => React$1.JSX.Element;
|
|
686
680
|
|
|
687
681
|
declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
|
|
688
682
|
gap?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -653,21 +653,7 @@ type SortableItemSettings<T> = BaseItemSettings<T> & {
|
|
|
653
653
|
index: number;
|
|
654
654
|
}) => string;
|
|
655
655
|
};
|
|
656
|
-
type
|
|
657
|
-
label: string;
|
|
658
|
-
values?: T[];
|
|
659
|
-
openOnAdd?: boolean;
|
|
660
|
-
setValues: (newValue: T[], _: CreateOptions, meta?: SetRepeaterValuesMeta<T>) => void;
|
|
661
|
-
disabled?: boolean;
|
|
662
|
-
disableAddItemButton?: boolean;
|
|
663
|
-
addButtonInfotipContent?: React$1.ReactNode;
|
|
664
|
-
showDuplicate?: boolean;
|
|
665
|
-
showToggle?: boolean;
|
|
666
|
-
showRemove?: boolean;
|
|
667
|
-
openItem?: number;
|
|
668
|
-
isSortable: false;
|
|
669
|
-
itemSettings: BaseItemSettings<T>;
|
|
670
|
-
} | {
|
|
656
|
+
type BaseProps<T> = {
|
|
671
657
|
label: string;
|
|
672
658
|
values?: T[];
|
|
673
659
|
openOnAdd?: boolean;
|
|
@@ -679,10 +665,18 @@ type RepeaterProps<T> = {
|
|
|
679
665
|
showToggle?: boolean;
|
|
680
666
|
showRemove?: boolean;
|
|
681
667
|
openItem?: number;
|
|
668
|
+
adornment?: React$1.FC;
|
|
669
|
+
};
|
|
670
|
+
type SortableProps<T> = BaseProps<T> & {
|
|
682
671
|
isSortable?: true;
|
|
683
672
|
itemSettings: SortableItemSettings<T>;
|
|
684
673
|
};
|
|
685
|
-
|
|
674
|
+
type NonSortableProps<T> = BaseProps<T> & {
|
|
675
|
+
isSortable?: false;
|
|
676
|
+
itemSettings: BaseItemSettings<T>;
|
|
677
|
+
};
|
|
678
|
+
type RepeaterProps<T> = SortableProps<T> | NonSortableProps<T>;
|
|
679
|
+
declare const Repeater: <T>({ label, itemSettings, disabled, openOnAdd, values: items, setValues: setItems, showDuplicate, showToggle, showRemove, disableAddItemButton, addButtonInfotipContent, openItem: initialOpenItem, isSortable, adornment, }: RepeaterProps<RepeaterItem<T>>) => React$1.JSX.Element;
|
|
686
680
|
|
|
687
681
|
declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
|
|
688
682
|
gap?: number;
|
package/dist/index.js
CHANGED
|
@@ -7309,7 +7309,6 @@ var import_i18n53 = require("@wordpress/i18n");
|
|
|
7309
7309
|
var import_editor_elements6 = require("@elementor/editor-elements");
|
|
7310
7310
|
var import_events2 = require("@elementor/events");
|
|
7311
7311
|
var getBaseEventProperties = (data, config) => ({
|
|
7312
|
-
app_type: config?.appTypes?.editor ?? "editor",
|
|
7313
7312
|
window_name: config?.appTypes?.editor ?? "editor",
|
|
7314
7313
|
interaction_type: config?.triggers?.click ?? "Click",
|
|
7315
7314
|
target_name: data.target_name,
|
|
@@ -8312,7 +8311,7 @@ var shouldShowMentionsInfo = () => {
|
|
|
8312
8311
|
};
|
|
8313
8312
|
|
|
8314
8313
|
// src/controls/email-form-action-control/email-chips-field.tsx
|
|
8315
|
-
var
|
|
8314
|
+
var EmailChipsControl = createControl(({ placeholder }) => {
|
|
8316
8315
|
const { value, setValue, disabled } = useBoundProp(import_editor_props65.stringArrayPropTypeUtil);
|
|
8317
8316
|
const [inputValue, setInputValue] = (0, import_react69.useState)("");
|
|
8318
8317
|
const items2 = value || [];
|
|
@@ -8348,7 +8347,7 @@ var EmailChipsField = ({ fieldLabel, placeholder }) => {
|
|
|
8348
8347
|
tryAddChip(inputValue);
|
|
8349
8348
|
}
|
|
8350
8349
|
};
|
|
8351
|
-
return /* @__PURE__ */ React116.createElement(
|
|
8350
|
+
return /* @__PURE__ */ React116.createElement(ControlActions, null, /* @__PURE__ */ React116.createElement(
|
|
8352
8351
|
import_ui100.Autocomplete,
|
|
8353
8352
|
{
|
|
8354
8353
|
fullWidth: true,
|
|
@@ -8371,8 +8370,9 @@ var EmailChipsField = ({ fieldLabel, placeholder }) => {
|
|
|
8371
8370
|
renderInput: (params) => /* @__PURE__ */ React116.createElement(import_ui100.TextField, { ...params, placeholder, onKeyDown: handleKeyDown }),
|
|
8372
8371
|
renderTags: (tagValues, getTagProps) => /* @__PURE__ */ React116.createElement(ChipsList, { getLabel: (option) => option, getTagProps, values: tagValues })
|
|
8373
8372
|
}
|
|
8374
|
-
))
|
|
8375
|
-
};
|
|
8373
|
+
));
|
|
8374
|
+
});
|
|
8375
|
+
var EmailChipsField = ({ fieldLabel, placeholder }) => /* @__PURE__ */ React116.createElement(import_ui100.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React116.createElement(import_ui100.Grid, { item: true }, /* @__PURE__ */ React116.createElement(ControlFormLabel, null, fieldLabel)), /* @__PURE__ */ React116.createElement(import_ui100.Grid, { item: true }, /* @__PURE__ */ React116.createElement(EmailChipsControl, { placeholder })));
|
|
8376
8376
|
|
|
8377
8377
|
// src/controls/email-form-action-control/email-field.tsx
|
|
8378
8378
|
var React117 = __toESM(require("react"));
|
|
@@ -8380,7 +8380,7 @@ var import_ui101 = require("@elementor/ui");
|
|
|
8380
8380
|
var EmailField = ({ bind, label, placeholder }) => /* @__PURE__ */ React117.createElement(PropKeyProvider, { bind }, /* @__PURE__ */ React117.createElement(import_ui101.Grid, { container: true, direction: "column", gap: 0.5 }, /* @__PURE__ */ React117.createElement(import_ui101.Grid, { item: true }, /* @__PURE__ */ React117.createElement(ControlFormLabel, null, label)), /* @__PURE__ */ React117.createElement(import_ui101.Grid, { item: true }, /* @__PURE__ */ React117.createElement(TextControl, { placeholder }))));
|
|
8381
8381
|
|
|
8382
8382
|
// src/controls/email-form-action-control/fields.tsx
|
|
8383
|
-
var SendToField = ({ placeholder }) => /* @__PURE__ */ React118.createElement(EmailChipsField, { fieldLabel: (0, import_i18n57.__)("Send to", "elementor"), placeholder });
|
|
8383
|
+
var SendToField = ({ placeholder }) => /* @__PURE__ */ React118.createElement(PropKeyProvider, { bind: "to" }, /* @__PURE__ */ React118.createElement(EmailChipsField, { fieldLabel: (0, import_i18n57.__)("Send to", "elementor"), placeholder }));
|
|
8384
8384
|
var SubjectField = () => /* @__PURE__ */ React118.createElement(
|
|
8385
8385
|
EmailField,
|
|
8386
8386
|
{
|
|
@@ -8452,7 +8452,7 @@ var SendAsField = () => /* @__PURE__ */ React118.createElement(PropKeyProvider,
|
|
|
8452
8452
|
var EmailFormActionControl = createControl(
|
|
8453
8453
|
({ toPlaceholder, label }) => {
|
|
8454
8454
|
const { value, setValue, ...propContext } = useBoundProp(import_editor_props66.emailsPropTypeUtil);
|
|
8455
|
-
return /* @__PURE__ */ React119.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React119.createElement(import_ui103.Stack, { gap: 2 }, /* @__PURE__ */ React119.createElement(ControlLabel, null, label ? label + " " + (0, import_i18n58.__)("settings", "elementor") : (0, import_i18n58.__)("Email settings", "elementor")), /* @__PURE__ */ React119.createElement(
|
|
8455
|
+
return /* @__PURE__ */ React119.createElement(PropProvider, { ...propContext, value, setValue }, /* @__PURE__ */ React119.createElement(import_ui103.Stack, { gap: 2 }, /* @__PURE__ */ React119.createElement(ControlLabel, null, label ? label + " " + (0, import_i18n58.__)("settings", "elementor") : (0, import_i18n58.__)("Email settings", "elementor")), /* @__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)));
|
|
8456
8456
|
}
|
|
8457
8457
|
);
|
|
8458
8458
|
var AdvancedSettings = () => /* @__PURE__ */ React119.createElement(import_editor_ui16.CollapsibleContent, { defaultOpen: false }, /* @__PURE__ */ React119.createElement(import_ui103.Box, { sx: { pt: 2 } }, /* @__PURE__ */ React119.createElement(import_ui103.Stack, { 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(import_ui103.Divider, null), /* @__PURE__ */ React119.createElement(MetaDataField, null), /* @__PURE__ */ React119.createElement(SendAsField, null))));
|
|
@@ -8665,7 +8665,8 @@ var Repeater3 = ({
|
|
|
8665
8665
|
disableAddItemButton = false,
|
|
8666
8666
|
addButtonInfotipContent,
|
|
8667
8667
|
openItem: initialOpenItem = EMPTY_OPEN_ITEM2,
|
|
8668
|
-
isSortable = true
|
|
8668
|
+
isSortable = true,
|
|
8669
|
+
adornment = ControlAdornments
|
|
8669
8670
|
}) => {
|
|
8670
8671
|
const [openItem, setOpenItem] = (0, import_react73.useState)(initialOpenItem);
|
|
8671
8672
|
const uniqueKeys = items2.map(
|
|
@@ -8743,7 +8744,7 @@ var Repeater3 = ({
|
|
|
8743
8744
|
},
|
|
8744
8745
|
/* @__PURE__ */ React126.createElement(import_icons40.PlusIcon, { fontSize: SIZE12 })
|
|
8745
8746
|
);
|
|
8746
|
-
return /* @__PURE__ */ React126.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React126.createElement(RepeaterHeader, { label, adornment
|
|
8747
|
+
return /* @__PURE__ */ React126.createElement(SectionContent, { gap: 2 }, /* @__PURE__ */ React126.createElement(RepeaterHeader, { label, adornment }, shouldShowInfotip ? /* @__PURE__ */ React126.createElement(
|
|
8747
8748
|
import_ui110.Infotip,
|
|
8748
8749
|
{
|
|
8749
8750
|
placement: "right",
|