easy-email-extensions 4.0.0-alpha.0 → 4.0.0-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/AttributePanel/components/attributes/index.d.ts +1 -0
- package/lib/MergeTagBadgePrompt/index.d.ts +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index2.js +8 -7
- package/lib/index2.js.map +1 -1
- package/package.json +2 -2
- package/lib/MergeTagBadge/index.d.ts +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
export declare function MergeTagBadgePrompt(): JSX.Element;
|
package/lib/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ export * from './ShortcutToolbar';
|
|
5
5
|
export * from './SourceCodePanel';
|
6
6
|
export * from './InteractivePrompt';
|
7
7
|
export * from './SimpleLayout';
|
8
|
-
export * from './
|
8
|
+
export * from './MergeTagBadgePrompt';
|
9
9
|
export * from './components/Form';
|
10
10
|
export { getContextMergeTags } from './utils/getContextMergeTags';
|
11
11
|
export { getIconNameByBlockType } from './utils/getIconNameByBlockType';
|
package/lib/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { e as Align, A as AttributePanel, f as AttributesPanelWrapper,
|
1
|
+
export { e as Align, A as AttributePanel, f as AttributesPanelWrapper, a1 as AutoCompleteField, j as Background, m as BackgroundColor, d as BlockAttributeConfigurationManager, B as BlockLayer, y as BlockMarketManager, z as BlockMaskWrapper, p as Border, q as BorderColor, t as BorderStyle, v as BorderWidth, a5 as CheckboxField, x as ClassName, C as Color, Y as ColorPickerField, h as ContainerBackgroundColor, a4 as DatePickerField, D as Decoration, n as Direction, a7 as EditGridTabField, a6 as EditTabField, F as FontFamily, r as FontSize, u as FontStyle, w as FontWeight, H as Height, _ as ImageUploaderField, a8 as InlineTextField, O as InputWithUnitField, I as InteractivePrompt, L as LetterSpacing, k as LineHeight, o as Link, M as Margin, J as MergeTagBadgePrompt, s as MergeTags, N as NavbarLinkPadding, U as NumberField, P as Padding, a2 as RadioGroupField, aa as RichTextField, Q as SearchField, $ as SelectField, S as ShortcutToolbar, G as SimpleLayout, X as SliderField, E as SourceCodePanel, a3 as SwitchField, T as TextAlign, R as TextAreaField, i as TextDecoration, K as TextField, l as TextTransform, a0 as TreeSelectField, Z as UploadField, V as VerticalAlign, W as Width, a9 as enhancer, b as getBlockTitle, g as getContextMergeTags, a as getIconNameByBlockType } from "./index2.js";
|
2
2
|
import "react";
|
3
3
|
import "easy-email-editor";
|
4
4
|
import "easy-email-core";
|
package/lib/index2.js
CHANGED
@@ -55,7 +55,7 @@ var __async = (__this, __arguments, generator) => {
|
|
55
55
|
};
|
56
56
|
import * as React from "react";
|
57
57
|
import React__default, { Children, isValidElement, cloneElement, createContext, useContext, Component, useMemo, memo, forwardRef, useEffect, useRef, useLayoutEffect, useState, createRef, useImperativeHandle, PureComponent, useCallback, useReducer, Fragment, createElement, Suspense } from "react";
|
58
|
-
import { IconFont, useEditorProps, Stack as Stack$6, getShadowRoot, TextStyle, useEditorContext, useBlock, useFocusIdx, useFocusBlockLayout, getEditNode, MergeTagBadge
|
58
|
+
import { IconFont, useEditorProps, Stack as Stack$6, getShadowRoot, TextStyle, useEditorContext, useBlock, useFocusIdx, useFocusBlockLayout, getEditNode, MergeTagBadge, FIXED_CONTAINER_ID, getPluginElement, isTextBlock, scrollBlockEleIntoView, useHoverIdx, useDataTransfer, useRefState, getBlockNodeByChildEle, getDirectionPosition, DATA_ATTRIBUTE_DROP_CONTAINER, BlockAvatarWrapper, getBlockNodeByIdx, useLazyState, getEditorRoot, useActiveTab, ActiveTabKeys } from "easy-email-editor";
|
59
59
|
import { BasicType, ImageManager, EMAIL_BLOCK_CLASS_NAME, BlockManager, createBlockDataByType, AdvancedType, Operator, OperatorSymbol, isAdvancedBlock, getParentByIdx, getParentIdx, getIndexByIdx, getSiblingIdx, getNodeIdxFromClassName, getNodeIdxClassName, getPageIdx, getChildIdx, MjmlToJson, JsonToMjml, getNodeTypeFromClassName } from "easy-email-core";
|
60
60
|
import ReactDOM, { findDOMNode, render as render$1, unmountComponentAtNode, createPortal } from "react-dom";
|
61
61
|
import { useField, Field, useForm as useForm$1, Form as Form$3, version as version$2, useFormState } from "react-final-form";
|
@@ -40184,7 +40184,8 @@ function EditGridTab(props) {
|
|
40184
40184
|
const { value, additionItem } = props;
|
40185
40185
|
const onAdd = (index2) => {
|
40186
40186
|
let newItem = additionItem || lodash.exports.cloneDeep(value[index2]);
|
40187
|
-
|
40187
|
+
value.splice(index2 + 1, 0, newItem);
|
40188
|
+
props.onChange([...value]);
|
40188
40189
|
};
|
40189
40190
|
const onDelete = (index2) => {
|
40190
40191
|
props.onChange(value.filter((_, vIndex) => Number(index2) !== vIndex));
|
@@ -43666,7 +43667,7 @@ function Tools(props) {
|
|
43666
43667
|
} else if (cmd === "insertHTML") {
|
43667
43668
|
let newContent = val;
|
43668
43669
|
if (enabledMergeTagsBadge) {
|
43669
|
-
newContent = MergeTagBadge
|
43670
|
+
newContent = MergeTagBadge.transform(val, uuid2);
|
43670
43671
|
}
|
43671
43672
|
document.execCommand(cmd, false, newContent);
|
43672
43673
|
const insertMergeTagEle = getShadowRoot().getElementById(uuid2);
|
@@ -43861,7 +43862,7 @@ function FieldWrapper(props) {
|
|
43861
43862
|
const { mergeTagGenerate, enabledMergeTagsBadge } = useEditorProps();
|
43862
43863
|
const debounceCallbackChange = useCallback(lodash.exports.debounce((val) => {
|
43863
43864
|
if (enabledMergeTagsBadge) {
|
43864
|
-
input.onChange(MergeTagBadge
|
43865
|
+
input.onChange(MergeTagBadge.revert(val, mergeTagGenerate));
|
43865
43866
|
} else {
|
43866
43867
|
input.onChange(val);
|
43867
43868
|
}
|
@@ -47429,7 +47430,7 @@ const removeAllActiveBadge = () => {
|
|
47429
47430
|
});
|
47430
47431
|
getShadowRoot().querySelectorAll(".easy-email-merge-tag-popover");
|
47431
47432
|
};
|
47432
|
-
function
|
47433
|
+
function MergeTagBadgePrompt() {
|
47433
47434
|
const { initialized } = useEditorContext();
|
47434
47435
|
const popoverRef = useRef(null);
|
47435
47436
|
const { onChangeMergeTag, mergeTags: mergeTags2 } = useEditorProps();
|
@@ -47629,7 +47630,7 @@ const SimpleLayout = (props) => {
|
|
47629
47630
|
title: /* @__PURE__ */ React__default.createElement("div", {
|
47630
47631
|
style: { height: 31, lineHeight: "31px" }
|
47631
47632
|
}, "Source code")
|
47632
|
-
}, /* @__PURE__ */ React__default.createElement(SourceCodePanel, null))))), /* @__PURE__ */ React__default.createElement(InteractivePrompt, null), /* @__PURE__ */ React__default.createElement(
|
47633
|
+
}, /* @__PURE__ */ React__default.createElement(SourceCodePanel, null))))), /* @__PURE__ */ React__default.createElement(InteractivePrompt, null), /* @__PURE__ */ React__default.createElement(MergeTagBadgePrompt, null)));
|
47633
47634
|
};
|
47634
|
-
export {
|
47635
|
+
export { SelectField as $, AttributePanel as A, BlockLayer as B, Color as C, Decoration as D, SourceCodePanel as E, FontFamily as F, SimpleLayout as G, Height as H, InteractivePrompt as I, MergeTagBadgePrompt as J, TextField as K, LetterSpacing as L, Margin as M, NavbarLinkPadding as N, InputWithUnitField as O, Padding as P, SearchField as Q, TextAreaField as R, ShortcutToolbar as S, TextAlign as T, NumberField as U, VerticalAlign as V, Width as W, SliderField as X, ColorPickerField as Y, UploadField as Z, ImageUploaderField as _, getIconNameByBlockType as a, TreeSelectField as a0, AutoCompleteField as a1, RadioGroupField as a2, SwitchField as a3, DatePickerField as a4, CheckboxField as a5, EditTabField as a6, EditGridTabField as a7, InlineTextField as a8, enhancer as a9, RichTextField as aa, getBlockTitle as b, commonjsGlobal as c, BlockAttributeConfigurationManager as d, Align as e, AttributesPanelWrapper as f, getContextMergeTags as g, ContainerBackgroundColor as h, TextDecoration as i, Background as j, LineHeight as k, TextTransform as l, BackgroundColor as m, Direction as n, Link as o, Border as p, BorderColor as q, FontSize$1 as r, MergeTags$1 as s, BorderStyle as t, FontStyle as u, BorderWidth as v, FontWeight as w, ClassName as x, BlockMarketManager as y, BlockMaskWrapper as z };
|
47635
47636
|
//# sourceMappingURL=index2.js.map
|