amis-editor 3.3.12-beta.1 → 4.0.1-beta.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/150a58f3318ca7541ed9.png +0 -0
- package/dist/471adb97c322b226e589.png +0 -0
- package/dist/4de5f42360bc5946c3c2.png +0 -0
- package/dist/4e9968bba3855f088fed.png +0 -0
- package/dist/7f09c38ebc687fea847a.png +0 -0
- package/dist/c94073576487510314ea.png +0 -0
- package/dist/cebfe0bc5a1dbde02da1.svg +10 -0
- package/dist/component/Breadcrumb.d.ts +1 -1
- package/dist/component/Control/APIControl.d.ts +540 -0
- package/dist/component/Control/OptionControl.d.ts +163 -0
- package/dist/component/Control/PopoverEdit.d.ts +57 -0
- package/dist/component/Control/ValidationControl.d.ts +30 -0
- package/dist/component/Panel/AMisCodeEditor.d.ts +37 -0
- package/dist/component/Panel/AvailableRenderersPanel.d.ts +20 -0
- package/dist/component/Panel/CodeEditorPanel.d.ts +6 -0
- package/dist/component/Panel/ContextMenuPanel.d.ts +8 -0
- package/dist/component/Panel/DrawerPanel.d.ts +15 -0
- package/dist/component/Panel/InsertSubRendererPanel.d.ts +11 -0
- package/dist/component/Panel/LeftPanels.d.ts +20 -0
- package/dist/component/Panel/Outline.d.ts +18 -0
- package/dist/component/Panel/RightPanels.d.ts +21 -0
- package/dist/component/Panel/TargetNamePanel.d.ts +7 -0
- package/dist/component/Preview.d.ts +2 -0
- package/dist/component/RegionHLBox.d.ts +1 -8
- package/dist/component/ScaffoldModal.d.ts +1 -1
- package/dist/component/base/BackTop.d.ts +26 -0
- package/dist/component/base/ErrorRenderer.d.ts +4 -0
- package/dist/component/base/InputComponentName.d.ts +8 -0
- package/dist/component/base/SearchRendererPanel.d.ts +51 -0
- package/dist/component/base/WidthDraggableBtn.d.ts +16 -0
- package/dist/component/base/WidthDraggableContainer.d.ts +2 -0
- package/dist/component/remarkTpl.d.ts +150 -0
- package/dist/dnd/default.d.ts +1 -1
- package/dist/dnd/index.d.ts +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.min.js +1 -1
- package/dist/manager.d.ts +16 -9
- package/dist/plugin/BasicToolbar.d.ts +1 -1
- package/dist/plugin/Card.d.ts +0 -1
- package/dist/plugin/Date.d.ts +1 -0
- package/dist/plugin/Datetime.d.ts +3 -0
- package/dist/plugin/Flex.d.ts +0 -1
- package/dist/plugin/Form/CodeEditor.d.ts +39 -0
- package/dist/plugin/Form/FieldSet.d.ts +1 -0
- package/dist/plugin/Form/Group.d.ts +1 -0
- package/dist/plugin/Form/InputGroup.d.ts +0 -2
- package/dist/plugin/Form/InputTable.d.ts +0 -1
- package/dist/plugin/Form/Item.d.ts +1 -1
- package/dist/plugin/Form/Static.d.ts +0 -1
- package/dist/plugin/Grid.d.ts +17 -20
- package/dist/plugin/HBox.d.ts +1 -1
- package/dist/plugin/ListItem.d.ts +0 -1
- package/dist/plugin/Log.d.ts +1 -0
- package/dist/plugin/Panel/AvailableRenderers.d.ts +8 -0
- package/dist/plugin/Panel/Code.d.ts +9 -0
- package/dist/plugin/Panel/Name.d.ts +8 -0
- package/dist/plugin/Panel.d.ts +15 -3
- package/dist/plugin/Plain.d.ts +1 -0
- package/dist/plugin/Reset.d.ts +1 -0
- package/dist/plugin/Steps.d.ts +1 -7
- package/dist/plugin/Submit.d.ts +1 -0
- package/dist/plugin/TableCell.d.ts +0 -1
- package/dist/plugin/Time.d.ts +3 -0
- package/dist/plugin/Wrapper.d.ts +1 -0
- package/dist/plugin.d.ts +22 -3
- package/dist/store/editor.d.ts +17 -3
- package/dist/style.css +1 -1
- package/dist/util.d.ts +2 -2
- package/package.json +24 -15
- package/static/Code-hover.png +0 -0
- package/static/Code.png +0 -0
- package/static/Outline-hover.png +0 -0
- package/static/Outline.png +0 -0
- package/static/Renderers-hover.png +0 -0
- package/static/Renderers.png +0 -0
- package/static/side_hide_left.svg +10 -0
- package/.editorconfig +0 -12
- package/.fecsrc +0 -8
- package/.prettierrc +0 -20
- package/dist/plugin/Form/Color.d.ts +0 -39
- package/rollup.config.js +0 -24
@@ -0,0 +1,163 @@
|
|
1
|
+
/**
|
2
|
+
* @file 组件选项组件的可视化编辑控件
|
3
|
+
*/
|
4
|
+
import React from 'react';
|
5
|
+
import Sortable from 'sortablejs';
|
6
|
+
import type { Option } from 'amis';
|
7
|
+
import type { FormControlProps } from 'amis/lib/renderers/Form/Item';
|
8
|
+
import type { OptionValue } from 'amis/lib/components/Select';
|
9
|
+
export declare type valueType = 'text' | 'boolean' | 'number';
|
10
|
+
export interface PopoverForm {
|
11
|
+
optionLabel: string;
|
12
|
+
optionValue: any;
|
13
|
+
optionValueType: valueType;
|
14
|
+
}
|
15
|
+
export declare type OptionControlItem = Option & {
|
16
|
+
checked: boolean;
|
17
|
+
};
|
18
|
+
export interface OptionControlProps extends FormControlProps {
|
19
|
+
className?: string;
|
20
|
+
}
|
21
|
+
export interface OptionControlState {
|
22
|
+
options: Array<OptionControlItem>;
|
23
|
+
popOverData: any;
|
24
|
+
popOverCtx?: {
|
25
|
+
mode: 'add' | 'edit';
|
26
|
+
index?: number;
|
27
|
+
};
|
28
|
+
source: 'custom' | 'api' | 'form';
|
29
|
+
sourceOptions: Array<Option>;
|
30
|
+
}
|
31
|
+
export declare class OptionControl extends React.Component<OptionControlProps, OptionControlState> {
|
32
|
+
sortable?: Sortable;
|
33
|
+
drag?: HTMLElement | null;
|
34
|
+
target: HTMLElement | null;
|
35
|
+
internalProps: string[];
|
36
|
+
constructor(props: OptionControlProps);
|
37
|
+
componentDidUpdate(prevProps: OptionControlProps): void;
|
38
|
+
/**
|
39
|
+
* 获取当前选项值的类型
|
40
|
+
*/
|
41
|
+
getOptionValueType(value: any): valueType;
|
42
|
+
/**
|
43
|
+
* 将当前选项值转换为选择的类型
|
44
|
+
*/
|
45
|
+
normalizeOptionValue(value: any, valueType: valueType): string | number | boolean;
|
46
|
+
/**
|
47
|
+
* 处理填入输入框的值
|
48
|
+
*/
|
49
|
+
transformOptionValue(value: any): string;
|
50
|
+
transformOptions(props: OptionControlProps): {
|
51
|
+
checked: boolean;
|
52
|
+
label?: string | undefined;
|
53
|
+
scopeLabel?: string | undefined;
|
54
|
+
value?: any;
|
55
|
+
disabled?: boolean | undefined;
|
56
|
+
children?: import("amis").Options | undefined;
|
57
|
+
visible?: boolean | undefined;
|
58
|
+
hidden?: boolean | undefined;
|
59
|
+
description?: string | undefined;
|
60
|
+
defer?: boolean | undefined;
|
61
|
+
deferApi?: import("amis").SchemaApi | undefined;
|
62
|
+
loading?: boolean | undefined;
|
63
|
+
loaded?: boolean | undefined;
|
64
|
+
}[];
|
65
|
+
/**
|
66
|
+
* 处理当前组件的默认值
|
67
|
+
*/
|
68
|
+
normalizeValue(): OptionValue | OptionValue[];
|
69
|
+
/**
|
70
|
+
* 更新options字段的统一出口
|
71
|
+
*/
|
72
|
+
onChangeOptions(): void;
|
73
|
+
targetRef(ref: any): void;
|
74
|
+
dragRef(ref: any): void;
|
75
|
+
initDragging(): void;
|
76
|
+
destroyDragging(): void;
|
77
|
+
scroll2Bottom(): void;
|
78
|
+
/**
|
79
|
+
* 切换选项类型
|
80
|
+
*/
|
81
|
+
handleSourceChange(option: {
|
82
|
+
label: string;
|
83
|
+
value: 'custom' | 'api' | 'form';
|
84
|
+
}): void;
|
85
|
+
/**
|
86
|
+
* 删除选项
|
87
|
+
*/
|
88
|
+
handleDelete(index: number, e: React.UIEvent<any>): void;
|
89
|
+
/**
|
90
|
+
* 设置默认选项
|
91
|
+
*/
|
92
|
+
handleToggleDefaultValue(index: number, checked: any, shift?: boolean): void;
|
93
|
+
/**
|
94
|
+
* 编辑选项
|
95
|
+
*/
|
96
|
+
handleEdit(index: number, e: React.UIEvent<any>): void;
|
97
|
+
handleEditLabel(index: number, e: React.FocusEvent<HTMLInputElement>): void;
|
98
|
+
handleAdd(): void;
|
99
|
+
handlePopoverSubmit(values: PopoverForm, action: any): void;
|
100
|
+
closePopoverEdit(): boolean;
|
101
|
+
handleBatchAdd(values: {
|
102
|
+
batchOption: string;
|
103
|
+
}, action: any): void;
|
104
|
+
renderHeader(): JSX.Element;
|
105
|
+
renderOption(props: any): JSX.Element;
|
106
|
+
renderPopover(): JSX.Element;
|
107
|
+
buildBatchAddSchema(): {
|
108
|
+
type: string;
|
109
|
+
actionType: string;
|
110
|
+
level: string;
|
111
|
+
size: string;
|
112
|
+
label: string;
|
113
|
+
dialog: {
|
114
|
+
title: string;
|
115
|
+
headerClassName: string;
|
116
|
+
closeOnEsc: boolean;
|
117
|
+
closeOnOutside: boolean;
|
118
|
+
showCloseButton: boolean;
|
119
|
+
body: ({
|
120
|
+
type: string;
|
121
|
+
level: string;
|
122
|
+
body: string;
|
123
|
+
showIcon: boolean;
|
124
|
+
className: string;
|
125
|
+
wrapWithPanel?: undefined;
|
126
|
+
mode?: undefined;
|
127
|
+
wrapperComponent?: undefined;
|
128
|
+
resetAfterSubmit?: undefined;
|
129
|
+
autoFocus?: undefined;
|
130
|
+
preventEnterSubmit?: undefined;
|
131
|
+
horizontal?: undefined;
|
132
|
+
} | {
|
133
|
+
type: string;
|
134
|
+
wrapWithPanel: boolean;
|
135
|
+
mode: string;
|
136
|
+
wrapperComponent: string;
|
137
|
+
resetAfterSubmit: boolean;
|
138
|
+
autoFocus: boolean;
|
139
|
+
preventEnterSubmit: boolean;
|
140
|
+
horizontal: {
|
141
|
+
left: number;
|
142
|
+
right: number;
|
143
|
+
};
|
144
|
+
body: {
|
145
|
+
name: string;
|
146
|
+
type: string;
|
147
|
+
label: string;
|
148
|
+
placeholder: string;
|
149
|
+
trimContents: boolean;
|
150
|
+
minRows: number;
|
151
|
+
maxRows: number;
|
152
|
+
required: boolean;
|
153
|
+
}[];
|
154
|
+
level?: undefined;
|
155
|
+
showIcon?: undefined;
|
156
|
+
className?: undefined;
|
157
|
+
})[];
|
158
|
+
};
|
159
|
+
};
|
160
|
+
render(): JSX.Element;
|
161
|
+
}
|
162
|
+
export declare class OptionControlRenderer extends OptionControl {
|
163
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
/**
|
2
|
+
* @file 浮窗编辑
|
3
|
+
*/
|
4
|
+
import React from 'react';
|
5
|
+
import type { Action } from 'amis/lib/types';
|
6
|
+
import type { IScopedContext } from 'amis/lib/Scoped';
|
7
|
+
import type { FormSchema } from 'amis/lib/renderers/Form';
|
8
|
+
import type { FormControlProps } from 'amis/lib/renderers/Form/Item';
|
9
|
+
import type { Offset } from 'amis/lib/components/PopOver';
|
10
|
+
export interface PopoverEditProps extends FormControlProps {
|
11
|
+
className?: string;
|
12
|
+
popOverclassName?: string;
|
13
|
+
btnLabel?: string;
|
14
|
+
btnIcon?: string;
|
15
|
+
iconPosition?: 'right' | 'left';
|
16
|
+
mode: 'popover' | 'dialog';
|
17
|
+
form: Omit<FormSchema, 'type'>;
|
18
|
+
rootClose?: boolean;
|
19
|
+
placement?: string;
|
20
|
+
offset?: ((clip: object, offset: object) => Offset) | Offset;
|
21
|
+
style?: object;
|
22
|
+
overlay?: boolean;
|
23
|
+
container?: React.ReactNode | Function;
|
24
|
+
target?: React.ReactNode | Function;
|
25
|
+
trueValue?: any;
|
26
|
+
falseValue?: any;
|
27
|
+
enableEdit?: boolean;
|
28
|
+
removable?: boolean;
|
29
|
+
onClose: (e: React.UIEvent<any> | void) => void;
|
30
|
+
}
|
31
|
+
interface PopoverEditState {
|
32
|
+
/**
|
33
|
+
* 是否展示编辑窗口
|
34
|
+
*/
|
35
|
+
show: boolean;
|
36
|
+
/**
|
37
|
+
* 是否开启编辑
|
38
|
+
*/
|
39
|
+
checked: boolean;
|
40
|
+
}
|
41
|
+
export declare class PopoverEdit extends React.Component<PopoverEditProps, PopoverEditState> {
|
42
|
+
static defaultProps: Pick<PopoverEditProps, 'btnIcon' | 'iconPosition' | 'container' | 'placement' | 'overlay' | 'rootClose' | 'mode' | 'trueValue' | 'falseValue' | 'enableEdit'>;
|
43
|
+
overlay: HTMLElement | null;
|
44
|
+
constructor(props: PopoverEditProps);
|
45
|
+
overlayRef(ref: any): void;
|
46
|
+
openPopover(): void;
|
47
|
+
closePopover(): void;
|
48
|
+
handleDelete(e: React.UIEvent<any> | void): void;
|
49
|
+
handleSwitchChange(checked: boolean): void;
|
50
|
+
handleSubmit(values: any, action: any): void;
|
51
|
+
handleAction(e: React.UIEvent<any> | void, action: Action, data: object, throwErrors?: boolean, delegate?: IScopedContext): void;
|
52
|
+
renderPopover(): JSX.Element;
|
53
|
+
render(): JSX.Element;
|
54
|
+
}
|
55
|
+
export declare class PopoverEditRenderer extends PopoverEdit {
|
56
|
+
}
|
57
|
+
export {};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/**
|
2
|
+
* @file 表单项校验配置
|
3
|
+
*/
|
4
|
+
/// <reference types="lodash" />
|
5
|
+
import React from 'react';
|
6
|
+
import type { FormControlProps } from 'amis/lib/renderers/Form/Item';
|
7
|
+
export interface ValidationControlProps extends FormControlProps {
|
8
|
+
}
|
9
|
+
interface Rule {
|
10
|
+
label: string;
|
11
|
+
key: string;
|
12
|
+
value: boolean | string | number;
|
13
|
+
checked: boolean;
|
14
|
+
message?: string;
|
15
|
+
}
|
16
|
+
interface ValidationControlState {
|
17
|
+
rules: Array<Rule>;
|
18
|
+
}
|
19
|
+
export declare class ValidationControl extends React.Component<ValidationControlProps, ValidationControlState> {
|
20
|
+
validationRules: Record<string, string>;
|
21
|
+
constructor(props: ValidationControlProps);
|
22
|
+
transformRules(): Rule[];
|
23
|
+
normalizeRules(): import("lodash").Dictionary<boolean | Record<string, any>>;
|
24
|
+
handleAddRule(): void;
|
25
|
+
handleSubmit(values: any, action: any): void;
|
26
|
+
render(): JSX.Element;
|
27
|
+
}
|
28
|
+
export declare class ValidationControlRenderer extends ValidationControl {
|
29
|
+
}
|
30
|
+
export {};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
/// <reference types="lodash" />
|
2
|
+
import React from 'react';
|
3
|
+
export interface AMisCodeEditorProps {
|
4
|
+
value: any;
|
5
|
+
onChange: (value: any, diff: any) => void;
|
6
|
+
onPaste?: () => void;
|
7
|
+
disabled?: boolean;
|
8
|
+
$schemaUrl?: string;
|
9
|
+
$schema?: string;
|
10
|
+
className?: string;
|
11
|
+
theme?: string;
|
12
|
+
}
|
13
|
+
export default class AMisCodeEditor extends React.Component<AMisCodeEditorProps> {
|
14
|
+
state: {
|
15
|
+
wrongSchema: string;
|
16
|
+
value: any;
|
17
|
+
contents: any;
|
18
|
+
};
|
19
|
+
lastResult: any;
|
20
|
+
toDispose: Array<() => void>;
|
21
|
+
editor: any;
|
22
|
+
monaco: any;
|
23
|
+
model: any;
|
24
|
+
decorations: any;
|
25
|
+
uri: string;
|
26
|
+
componentDidUpdate(prevProps: AMisCodeEditorProps): void;
|
27
|
+
obj2str(value: any, props: AMisCodeEditorProps): any;
|
28
|
+
str2obj(str: string): any;
|
29
|
+
emitChange: import("lodash").DebouncedFunc<() => void>;
|
30
|
+
changeJsonOptions(props?: AMisCodeEditorProps): void;
|
31
|
+
editorFactory: (containerElement: HTMLElement, monaco: any, options: any) => any;
|
32
|
+
editorDidMount: (editor: any, monaco: any) => void;
|
33
|
+
editorWillUnmount: (editor: any, monaco: any) => void;
|
34
|
+
handleChange: (value: string) => void;
|
35
|
+
handleBlur: () => Promise<void>;
|
36
|
+
render(): JSX.Element;
|
37
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { PanelProps } from '../../plugin';
|
3
|
+
declare type PanelStates = {
|
4
|
+
toggleCollapseFolderStatus: boolean;
|
5
|
+
};
|
6
|
+
export declare class AvailableRenderersPanel extends React.Component<PanelProps, PanelStates> {
|
7
|
+
state: {
|
8
|
+
toggleCollapseFolderStatus: boolean;
|
9
|
+
};
|
10
|
+
curCollapseFolded: {
|
11
|
+
[propName: string]: boolean;
|
12
|
+
};
|
13
|
+
handleRegionFilterClick(e: React.MouseEvent): void;
|
14
|
+
handleDragStart(e: React.DragEvent): void;
|
15
|
+
handleClick(e: React.MouseEvent): void;
|
16
|
+
changeCollapseFoldStatus(tagKey: string, event: any): void;
|
17
|
+
renderThumb(schema: any): JSX.Element;
|
18
|
+
render(): JSX.Element;
|
19
|
+
}
|
20
|
+
export {};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { EditorStoreType } from '../../store/editor';
|
3
|
+
export interface ContextMenuPanelProps {
|
4
|
+
store: EditorStoreType;
|
5
|
+
}
|
6
|
+
export declare class ContextMenuPanel extends React.Component<ContextMenuPanelProps> {
|
7
|
+
render(): JSX.Element | null;
|
8
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { EditorManager } from '../../manager';
|
3
|
+
import { EditorStoreType } from '../../store/editor';
|
4
|
+
import { EditorNodeType } from '../../store/node';
|
5
|
+
export interface PanelsProps {
|
6
|
+
store: EditorStoreType;
|
7
|
+
manager: EditorManager;
|
8
|
+
node: EditorNodeType | undefined;
|
9
|
+
panelItem: any;
|
10
|
+
theme?: string;
|
11
|
+
}
|
12
|
+
export declare class DrawerPanel extends React.Component<PanelsProps> {
|
13
|
+
getPopOverContainer(): HTMLElement;
|
14
|
+
render(): JSX.Element;
|
15
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { PanelProps } from '../../plugin';
|
3
|
+
export declare class InsertSubRendererPanel extends React.Component<PanelProps> {
|
4
|
+
handleLeftClick(e: React.MouseEvent): void;
|
5
|
+
handleClick(e: React.MouseEvent): void;
|
6
|
+
hadnlDBClick(e: React.MouseEvent): void;
|
7
|
+
handleInsert(): void;
|
8
|
+
handleReplace(): void;
|
9
|
+
handleCancel(): void;
|
10
|
+
render(): JSX.Element;
|
11
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { EditorManager } from '../../manager';
|
3
|
+
import { EditorStoreType } from '../../store/editor';
|
4
|
+
interface LeftPanelsProps {
|
5
|
+
store: EditorStoreType;
|
6
|
+
manager: EditorManager;
|
7
|
+
theme?: string;
|
8
|
+
}
|
9
|
+
interface LeftPanelsStates {
|
10
|
+
isFixedStatus: boolean;
|
11
|
+
}
|
12
|
+
export declare class LeftPanels extends React.Component<LeftPanelsProps, LeftPanelsStates> {
|
13
|
+
constructor(props: any);
|
14
|
+
handleHidden(): void;
|
15
|
+
handleFixed(): void;
|
16
|
+
handleSelect(key: string): void;
|
17
|
+
getPopOverContainer(): HTMLElement;
|
18
|
+
render(): JSX.Element;
|
19
|
+
}
|
20
|
+
export {};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { PanelProps } from '../../plugin';
|
3
|
+
import { EditorNodeType } from '../../store/node';
|
4
|
+
export declare class OutlinePanel extends React.Component<PanelProps> {
|
5
|
+
state: {
|
6
|
+
curSearchElemKey: string;
|
7
|
+
};
|
8
|
+
handleClick(e: React.MouseEvent<HTMLAnchorElement>): void;
|
9
|
+
handleEnter(e: React.MouseEvent): void;
|
10
|
+
handleDragStart(e: React.DragEvent): void;
|
11
|
+
handleDragOver(e: React.DragEvent): void;
|
12
|
+
handleDrop(e: React.DragEvent): void;
|
13
|
+
handleSearchElemKeyChange(searchVal: string): void;
|
14
|
+
clearSearchElemKey(): void;
|
15
|
+
renderTitleByKeyword(rendererTitle: string, curSearchTitle: string): string | JSX.Element;
|
16
|
+
renderItem(option: EditorNodeType, index: number): JSX.Element | null;
|
17
|
+
render(): JSX.Element;
|
18
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { EditorManager } from '../../manager';
|
3
|
+
import { EditorStoreType } from '../../store/editor';
|
4
|
+
interface RightPanelsProps {
|
5
|
+
store: EditorStoreType;
|
6
|
+
manager: EditorManager;
|
7
|
+
theme?: string;
|
8
|
+
}
|
9
|
+
interface RightPanelsStates {
|
10
|
+
isOpenStatus: boolean;
|
11
|
+
isFixedStatus: boolean;
|
12
|
+
}
|
13
|
+
export declare class RightPanels extends React.Component<RightPanelsProps, RightPanelsStates> {
|
14
|
+
constructor(props: any);
|
15
|
+
handleFixed(): void;
|
16
|
+
handleSelect(key: string): void;
|
17
|
+
handleHidden(): void;
|
18
|
+
getPopOverContainer(): HTMLElement;
|
19
|
+
render(): JSX.Element | null;
|
20
|
+
}
|
21
|
+
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { PanelProps } from '../../plugin';
|
3
|
+
export declare class TargetNamePanel extends React.Component<PanelProps> {
|
4
|
+
handleClick(e: React.MouseEvent<HTMLElement>): void;
|
5
|
+
handleEnter(e: React.MouseEvent<HTMLElement>): void;
|
6
|
+
render(): JSX.Element;
|
7
|
+
}
|
@@ -20,6 +20,7 @@ export interface PreviewState {
|
|
20
20
|
ready?: boolean;
|
21
21
|
}
|
22
22
|
export default class Preview extends Component<PreviewProps> {
|
23
|
+
currentDom: HTMLElement;
|
23
24
|
env: RenderOptions;
|
24
25
|
doingSelection: boolean;
|
25
26
|
componentDidMount(): void;
|
@@ -47,6 +48,7 @@ export default class Preview extends Component<PreviewProps> {
|
|
47
48
|
handleDragLeave(e: React.DragEvent): void;
|
48
49
|
handleDragOver(e: React.DragEvent): void;
|
49
50
|
handleDrop(e: React.DragEvent): void;
|
51
|
+
getCurrentTarget(): HTMLDivElement;
|
50
52
|
rendererResolver(path: string, schema: Schema, props: any): RendererConfig;
|
51
53
|
render(): JSX.Element;
|
52
54
|
}
|
@@ -12,16 +12,9 @@ export interface HighlightBoxProps {
|
|
12
12
|
title: string;
|
13
13
|
preferTag?: string;
|
14
14
|
manager: EditorManager;
|
15
|
+
isOnlyChildRegion: boolean;
|
15
16
|
}
|
16
17
|
export default class RegionHighlightBox extends React.Component<HighlightBoxProps> {
|
17
|
-
addBtn: HTMLElement;
|
18
|
-
constructor(props: HighlightBoxProps);
|
19
|
-
componentDidMount(): void;
|
20
|
-
componentDidUpdate(): void;
|
21
|
-
componentWillUnmount(): void;
|
22
|
-
attachAddBtn(): void;
|
23
18
|
handleClick(): void;
|
24
|
-
handleMouseEnter(): void;
|
25
|
-
handleMouseLeave(): void;
|
26
19
|
render(): JSX.Element;
|
27
20
|
}
|
@@ -14,7 +14,7 @@ export declare class ScaffoldModal extends React.Component<SubEditorProps> {
|
|
14
14
|
wrapWithPanel: boolean;
|
15
15
|
initApi: any;
|
16
16
|
api: any;
|
17
|
-
mode: "normal" | "
|
17
|
+
mode: "normal" | "horizontal" | "inline";
|
18
18
|
wrapperComponent: string;
|
19
19
|
};
|
20
20
|
amisScope: any;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export interface BackTopProps {
|
3
|
+
visibilityHeight?: number;
|
4
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
5
|
+
target: () => HTMLElement | Window | Document;
|
6
|
+
children?: React.ReactNode;
|
7
|
+
className?: string;
|
8
|
+
visible?: boolean;
|
9
|
+
}
|
10
|
+
export interface BackTopStates {
|
11
|
+
visible: boolean;
|
12
|
+
}
|
13
|
+
export default class BackTop extends React.Component<BackTopProps, BackTopStates> {
|
14
|
+
ref: React.RefObject<HTMLDivElement>;
|
15
|
+
scrollElem: any;
|
16
|
+
constructor(props: any);
|
17
|
+
componentDidMount(): void;
|
18
|
+
componentWillUnmount(): void;
|
19
|
+
getDefaultTarget(): (Window & typeof globalThis) | Document;
|
20
|
+
handleScroll(e: React.UIEvent<HTMLElement> | {
|
21
|
+
target: any;
|
22
|
+
}): void;
|
23
|
+
bindScrollEvent(): void;
|
24
|
+
scrollToTop(e: React.MouseEvent<HTMLDivElement>): void;
|
25
|
+
render(): JSX.Element;
|
26
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { RendererProps } from 'amis/lib/factory';
|
3
|
+
interface InputComponentNameProps extends RendererProps {
|
4
|
+
value: any;
|
5
|
+
onChange: (value: any) => void;
|
6
|
+
}
|
7
|
+
export declare function InputComponentName(props: InputComponentNameProps): JSX.Element;
|
8
|
+
export {};
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { EditorStoreType } from '../../store/editor';
|
3
|
+
import { SubRendererInfo } from '../../plugin';
|
4
|
+
interface SearchRendererProps {
|
5
|
+
store: EditorStoreType;
|
6
|
+
}
|
7
|
+
interface SearchRendererStates {
|
8
|
+
subRenderersByOrder: Array<SubRendererInfo>;
|
9
|
+
groupedSubRenderers: {
|
10
|
+
[propName: string]: Array<SubRendererInfo>;
|
11
|
+
};
|
12
|
+
searchSubRenderers: {
|
13
|
+
[propName: string]: Array<SubRendererInfo>;
|
14
|
+
};
|
15
|
+
visible: boolean;
|
16
|
+
curKeyword: string;
|
17
|
+
curKeywordSearchHistory: string[];
|
18
|
+
toggleTagFolderStatus: boolean;
|
19
|
+
}
|
20
|
+
export default class SearchRendererPanel extends React.Component<SearchRendererProps, SearchRendererStates> {
|
21
|
+
ref: React.RefObject<HTMLDivElement>;
|
22
|
+
curInputBox: any;
|
23
|
+
localStorageKey: string;
|
24
|
+
curTagFolded: {
|
25
|
+
[propName: string]: boolean;
|
26
|
+
};
|
27
|
+
lastSubRenderersTag: string;
|
28
|
+
constructor(props: any);
|
29
|
+
componentDidMount(): void;
|
30
|
+
componentWillReceiveProps(nextProps: any): void;
|
31
|
+
componentWillUnmount(): void;
|
32
|
+
bindFocusEvent(): void;
|
33
|
+
bindBlurEvent(): void;
|
34
|
+
searchSubRenderersByKeyword(keywords: string): void;
|
35
|
+
changeTagFoldStatus(tagKey: string, event: any): void;
|
36
|
+
bindEnterEvent(event: any): void;
|
37
|
+
bindClearActionEvent(): void;
|
38
|
+
bindTagClickEvent(tag: string): void;
|
39
|
+
getSearchHistory(): any[];
|
40
|
+
addSearchHistory(newKeywords: string): void;
|
41
|
+
clickKeywordEvent(keywords: string): void;
|
42
|
+
deleteSearchHistory(event: any, newKeywords: string): void;
|
43
|
+
clearSearchHistory(event: any): void;
|
44
|
+
updateSearchHistory(): void;
|
45
|
+
renderNameByKeyword(rendererName: string, curKeyword: string): string | JSX.Element;
|
46
|
+
resultIsHasScroll(searchSubRenderers: {
|
47
|
+
[propName: string]: Array<SubRendererInfo>;
|
48
|
+
}, maxShowLine: number): boolean;
|
49
|
+
render(): JSX.Element;
|
50
|
+
}
|
51
|
+
export {};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
interface WidthDraggableProps {
|
3
|
+
isLeftDragIcon?: boolean;
|
4
|
+
className?: any;
|
5
|
+
}
|
6
|
+
export declare class WidthDraggableBtn extends React.Component<WidthDraggableProps> {
|
7
|
+
startX: number;
|
8
|
+
startWidth: number;
|
9
|
+
dragWrap: HTMLElement;
|
10
|
+
constructor(props: any);
|
11
|
+
handleResizeMouseDown(e: React.MouseEvent): void;
|
12
|
+
handleResizeMouseMove(e: MouseEvent): void;
|
13
|
+
handleResizeMouseUp(): void;
|
14
|
+
render(): JSX.Element;
|
15
|
+
}
|
16
|
+
export {};
|