easy-email-extensions 4.15.0 → 4.16.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/AttributePanel/components/blocks/AdvancedTable/Operation/index.d.ts +2 -0
- package/lib/AttributePanel/components/blocks/AdvancedTable/Operation/tableCellBgSelector.d.ts +6 -0
- package/lib/AttributePanel/components/blocks/AdvancedTable/Operation/tableMenuConfig.d.ts +44 -0
- package/lib/AttributePanel/components/blocks/AdvancedTable/Operation/tableOperationMenu.d.ts +65 -0
- package/lib/AttributePanel/components/blocks/AdvancedTable/Operation/tableTool.d.ts +45 -0
- package/lib/AttributePanel/components/blocks/AdvancedTable/Operation/type.d.ts +21 -0
- package/lib/AttributePanel/components/blocks/AdvancedTable/Operation/util.d.ts +23 -0
- package/lib/AttributePanel/components/blocks/AdvancedTable/index.d.ts +2 -0
- package/lib/AttributePanel/components/blocks/index.d.ts +2 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index2.js +1040 -152
- package/lib/index2.js.map +1 -1
- package/lib/utils/getIconNameByBlockType.d.ts +1 -0
- package/package.json +3 -2
- package/readme.md +0 -233
@@ -0,0 +1,6 @@
|
|
1
|
+
interface CellBackgroundSelectorProps {
|
2
|
+
bgColorHandler: (color: string) => void;
|
3
|
+
rootDom: Element;
|
4
|
+
}
|
5
|
+
declare const getCellBackgroundSelectorRoot: (bgColorHandler: CellBackgroundSelectorProps['bgColorHandler'], rootDom: any) => HTMLDivElement;
|
6
|
+
export default getCellBackgroundSelectorRoot;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import TableOperationMenu from './tableOperationMenu';
|
2
|
+
declare const MENU_CONFIG: {
|
3
|
+
insertColumnRight: {
|
4
|
+
text: string;
|
5
|
+
icon: string;
|
6
|
+
handler(): void;
|
7
|
+
};
|
8
|
+
insertColumnLeft: {
|
9
|
+
text: string;
|
10
|
+
icon: string;
|
11
|
+
handler(): void;
|
12
|
+
};
|
13
|
+
insertRowUp: {
|
14
|
+
text: string;
|
15
|
+
icon: string;
|
16
|
+
handler(): void;
|
17
|
+
};
|
18
|
+
insertRowDown: {
|
19
|
+
text: string;
|
20
|
+
icon: string;
|
21
|
+
handler(): void;
|
22
|
+
};
|
23
|
+
mergeCells: {
|
24
|
+
text: string;
|
25
|
+
icon: string;
|
26
|
+
handler(): void;
|
27
|
+
};
|
28
|
+
deleteColumn: {
|
29
|
+
text: string;
|
30
|
+
icon: string;
|
31
|
+
handler(): void;
|
32
|
+
};
|
33
|
+
deleteRow: {
|
34
|
+
text: string;
|
35
|
+
icon: string;
|
36
|
+
handler(): void;
|
37
|
+
};
|
38
|
+
setCellBg: {
|
39
|
+
text: string;
|
40
|
+
render(tableOperationMenu: TableOperationMenu): HTMLDivElement;
|
41
|
+
handler(color: string): void;
|
42
|
+
};
|
43
|
+
};
|
44
|
+
export default MENU_CONFIG;
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import { IBoundingPosition, IOperationData } from './type';
|
2
|
+
export default class TableOperationMenu {
|
3
|
+
menuItems: {
|
4
|
+
insertColumnRight: {
|
5
|
+
text: string;
|
6
|
+
icon: string;
|
7
|
+
handler(): void;
|
8
|
+
};
|
9
|
+
insertColumnLeft: {
|
10
|
+
text: string;
|
11
|
+
icon: string;
|
12
|
+
handler(): void;
|
13
|
+
};
|
14
|
+
insertRowUp: {
|
15
|
+
text: string;
|
16
|
+
icon: string;
|
17
|
+
handler(): void;
|
18
|
+
};
|
19
|
+
insertRowDown: {
|
20
|
+
text: string;
|
21
|
+
icon: string;
|
22
|
+
handler(): void;
|
23
|
+
};
|
24
|
+
mergeCells: {
|
25
|
+
text: string;
|
26
|
+
icon: string;
|
27
|
+
handler(): void;
|
28
|
+
};
|
29
|
+
deleteColumn: {
|
30
|
+
text: string;
|
31
|
+
icon: string;
|
32
|
+
handler(): void;
|
33
|
+
};
|
34
|
+
deleteRow: {
|
35
|
+
text: string;
|
36
|
+
icon: string;
|
37
|
+
handler(): void;
|
38
|
+
};
|
39
|
+
setCellBg: {
|
40
|
+
text: string;
|
41
|
+
render(tableOperationMenu: TableOperationMenu): HTMLDivElement;
|
42
|
+
handler(color: string): void;
|
43
|
+
};
|
44
|
+
};
|
45
|
+
domNode: Element | undefined;
|
46
|
+
styleDom?: HTMLStyleElement;
|
47
|
+
visible: boolean;
|
48
|
+
changeTableData?: (e: IOperationData[][]) => void;
|
49
|
+
tableData: IOperationData[][];
|
50
|
+
tableIndexBoundary: IBoundingPosition;
|
51
|
+
maxTdCount: number;
|
52
|
+
constructor();
|
53
|
+
mount(): void;
|
54
|
+
destroy(): void;
|
55
|
+
hide(): void;
|
56
|
+
addRow(insertIndex: number, colCount: number): void;
|
57
|
+
setTableData(tableData: IOperationData[][]): void;
|
58
|
+
setTableIndexBoundary(tableIndexBoundary: IBoundingPosition): void;
|
59
|
+
showMenu({ x, y }: {
|
60
|
+
x: number;
|
61
|
+
y: number;
|
62
|
+
}): void;
|
63
|
+
menuInitial(): void;
|
64
|
+
menuItemCreator({ text, icon, handler }: any): HTMLDivElement;
|
65
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import TableOperationMenu from './tableOperationMenu';
|
2
|
+
import { AdvancedTableBlock } from 'easy-email-core';
|
3
|
+
interface IBorderTool {
|
4
|
+
top: Element;
|
5
|
+
bottom: Element;
|
6
|
+
left: Element;
|
7
|
+
right: Element;
|
8
|
+
}
|
9
|
+
declare class TableColumnTool {
|
10
|
+
borderTool: IBorderTool;
|
11
|
+
dragging: boolean;
|
12
|
+
showBorderTool: boolean;
|
13
|
+
startRect: {
|
14
|
+
width: number;
|
15
|
+
height: number;
|
16
|
+
};
|
17
|
+
startTdTop: number;
|
18
|
+
startTdLeft: number;
|
19
|
+
endTdTop: number;
|
20
|
+
endTdLeft: number;
|
21
|
+
width: number;
|
22
|
+
height: number;
|
23
|
+
selectedLeftTopCell: Element | undefined;
|
24
|
+
selectedBottomRightCell: Element | undefined;
|
25
|
+
startDom: Element | undefined;
|
26
|
+
endDom: Element | undefined;
|
27
|
+
hoveringTable: ParentNode | null;
|
28
|
+
root: Element | undefined;
|
29
|
+
tableMenu?: TableOperationMenu;
|
30
|
+
changeTableData?: (e: AdvancedTableBlock['data']['value']['tableSource']) => void;
|
31
|
+
tableData: AdvancedTableBlock['data']['value']['tableSource'];
|
32
|
+
constructor(borderTool: IBorderTool, root: Element);
|
33
|
+
initTool(): void;
|
34
|
+
destroy(): void;
|
35
|
+
hideBorder: (e: any) => void;
|
36
|
+
hideBorderByKeyDown: () => void;
|
37
|
+
hideTableMenu: (e?: any) => void;
|
38
|
+
visibleBorder: (show?: boolean) => void;
|
39
|
+
renderBorder: () => void;
|
40
|
+
handleContextmenu: (event: any) => void;
|
41
|
+
handleMousedown(event: any): void;
|
42
|
+
handleDrag: (e: any) => void;
|
43
|
+
handleMouseup: (e: any) => void;
|
44
|
+
}
|
45
|
+
export default TableColumnTool;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { IAdvancedTableData } from 'easy-email-core';
|
2
|
+
export interface IOperationData extends IAdvancedTableData {
|
3
|
+
top: number;
|
4
|
+
bottom: number;
|
5
|
+
left: number;
|
6
|
+
right: number;
|
7
|
+
}
|
8
|
+
export interface IBoundaryRect {
|
9
|
+
left: number;
|
10
|
+
top: number;
|
11
|
+
right: number;
|
12
|
+
bottom: number;
|
13
|
+
width: number;
|
14
|
+
height: number;
|
15
|
+
}
|
16
|
+
export interface IBoundingPosition {
|
17
|
+
left: number;
|
18
|
+
top: number;
|
19
|
+
right: number;
|
20
|
+
bottom: number;
|
21
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { IBoundaryRect, IBoundingPosition, IOperationData } from './type';
|
2
|
+
import { AdvancedTableBlock } from 'easy-email-core';
|
3
|
+
export declare const getBoundaryRectAndElement: (el1: Element, el2: Element) => {
|
4
|
+
leftTopCell: Element;
|
5
|
+
bottomRightCell: Element;
|
6
|
+
boundary: IBoundaryRect;
|
7
|
+
} | null;
|
8
|
+
export declare function setStyle(domNode: any, rules: any): void;
|
9
|
+
export declare const getCurrentTable: (target: Element) => ParentNode | null;
|
10
|
+
export declare const getElementsBoundary: (el1: Element, el2: Element) => IBoundingPosition;
|
11
|
+
export declare const checkEventInBoundingRect: (rect: IBoundingPosition, { x, y }: {
|
12
|
+
x: number;
|
13
|
+
y: number;
|
14
|
+
}) => boolean;
|
15
|
+
export declare const getCellAttr: (el: Element, attrName: string) => number;
|
16
|
+
export declare const getTdBoundaryIndex: (leftTopCell: Element, bottomRightCell: Element) => {
|
17
|
+
left: number;
|
18
|
+
top: number;
|
19
|
+
right: number;
|
20
|
+
bottom: number;
|
21
|
+
};
|
22
|
+
export declare const getCorrectTableIndexBoundary: (tableIndexBoundary: IBoundingPosition, tableData: IOperationData[][]) => IBoundingPosition;
|
23
|
+
export declare const getMaxTdCount: (tableData: AdvancedTableBlock['data']['value']['tableSource']) => number;
|
@@ -18,6 +18,7 @@ import { Hero } from './Hero';
|
|
18
18
|
import { Navbar } from './Navbar';
|
19
19
|
import { Social } from './Social';
|
20
20
|
import { Table } from './Table';
|
21
|
+
import { AdvancedTable } from './AdvancedTable';
|
21
22
|
export declare const blocks: {
|
22
23
|
page: typeof Page;
|
23
24
|
section: typeof Section;
|
@@ -48,6 +49,7 @@ export declare const blocks: {
|
|
48
49
|
advanced_carousel: typeof Carousel;
|
49
50
|
advanced_navbar: typeof Navbar;
|
50
51
|
advanced_social: typeof Social;
|
52
|
+
advanced_table: typeof AdvancedTable;
|
51
53
|
advanced_hero: typeof Hero;
|
52
54
|
advanced_wrapper: typeof Wrapper;
|
53
55
|
advanced_section: typeof Section;
|
package/lib/index.d.ts
CHANGED
@@ -12,6 +12,6 @@ export * from './constants';
|
|
12
12
|
export * from './components/Form';
|
13
13
|
export * from './components/ShadowDom';
|
14
14
|
export { getContextMergeTags } from './utils/getContextMergeTags';
|
15
|
-
export { getIconNameByBlockType } from './utils/getIconNameByBlockType';
|
15
|
+
export { getIconNameByBlockType, setIconsMap } from './utils/getIconNameByBlockType';
|
16
16
|
export { getBlockTitle } from './utils/getBlockTitle';
|
17
17
|
export { MjmlToJson } from './utils/MjmlToJson';
|
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, ac as AutoCompleteField, l as Background, o as BackgroundColor, d as BlockAttributeConfigurationManager, B as BlockLayer, O as BlockMarketManager, Q as BlockMaskWrapper, r as Border, u as BorderColor, x as BorderStyle, z as BorderWidth, af as CheckboxField, I as ClassName, h as CollapseWrapper, C as Color, aj as ColorPickerField, i as Condition, j as ContainerBackgroundColor, D as Decoration, P as DefaultPageConfigPanel, p as Direction, ah as EditGridTabField, ag as EditTabField, _ as ExtensionContext, $ as ExtensionProvider, F as FontFamily, v as FontSize, y as FontStyle, E as FontWeight, H as Height, a9 as ImageUploaderField, ai as InlineTextField, a3 as InputWithUnitField, U as InteractivePrompt, L as LetterSpacing, m as LineHeight, q as Link, t as Margin, Z as MergeTagBadgePrompt, w as MergeTags, M as MjmlToJson, N as NavbarLinkPadding, a6 as NumberField, G as Padding, J as PresetColorsProvider, a1 as RICH_TEXT_TOOL_BAR, ad as RadioGroupField, al as RichTextField, a4 as SearchField, aa as SelectField, S as SelectionRangeProvider, am as ShadowDom, K as ShortcutToolbar, X as SimpleLayout, a7 as SliderField, R as SourceCodePanel, Y as StandardLayout, ae as SwitchField, T as TextAlign, a5 as TextAreaField, k as TextDecoration, a2 as TextField, n as TextTransform, ab as TreeSelectField, a8 as UploadField, V as VerticalAlign, W as Width, ak as enhancer, b as getBlockTitle, g as getContextMergeTags, a as getIconNameByBlockType, s as setIconsMap, a0 as useExtensionProps } from "./index2.js";
|
2
2
|
import "react";
|
3
3
|
import "easy-email-editor";
|
4
4
|
import "easy-email-core";
|