amis-editor 4.0.1-beta.10 → 4.0.1-beta.28
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cebfe0bc5a1dbde02da1.svg +10 -0
- package/dist/component/Control/APIControl.d.ts +504 -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/Editor.d.ts +1 -0
- package/dist/component/Panel/AMisCodeEditor.d.ts +37 -0
- package/dist/component/Panel/AvailableRenderersPanel.d.ts +10 -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/RenderersPanel.d.ts +32 -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 +1 -0
- 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 +59 -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/exports.d.ts +8 -0
- package/dist/exports.min.js +1 -0
- package/dist/index.d.ts +18 -14
- package/dist/index.min.js +1 -1
- package/dist/manager.d.ts +3 -0
- package/dist/plugin/Alert.d.ts +2 -1
- package/dist/plugin/AnchorNav.d.ts +1 -0
- package/dist/plugin/Audio.d.ts +1 -0
- package/dist/plugin/Avatar.d.ts +1 -0
- package/dist/plugin/Breadcrumb.d.ts +1 -0
- package/dist/plugin/Button.d.ts +1 -0
- package/dist/plugin/ButtonGroup.d.ts +1 -0
- package/dist/plugin/ButtonToolbar.d.ts +1 -0
- package/dist/plugin/CRUD.d.ts +1 -0
- package/dist/plugin/Card.d.ts +1 -1
- package/dist/plugin/Cards.d.ts +1 -0
- package/dist/plugin/Carousel.d.ts +1 -0
- package/dist/plugin/Chart.d.ts +1 -0
- package/dist/plugin/CodeView.d.ts +1 -0
- package/dist/plugin/Collapse.d.ts +1 -0
- package/dist/plugin/Container.d.ts +1 -0
- package/dist/plugin/Custom.d.ts +1 -0
- package/dist/plugin/Date.d.ts +1 -0
- package/dist/plugin/Datetime.d.ts +1 -0
- package/dist/plugin/Dialog.d.ts +1 -0
- package/dist/plugin/Divider.d.ts +1 -0
- package/dist/plugin/Drawer.d.ts +1 -0
- package/dist/plugin/DropDownButton.d.ts +1 -0
- package/dist/plugin/Each.d.ts +1 -0
- package/dist/plugin/ErrorRenderer.d.ts +1 -0
- package/dist/plugin/Flex.d.ts +1 -1
- package/dist/plugin/Form/ButtonGroupSelect.d.ts +1 -0
- package/dist/plugin/Form/ButtonToolbar.d.ts +1 -0
- package/dist/plugin/Form/ChainedSelect.d.ts +1 -0
- package/dist/plugin/Form/Checkbox.d.ts +1 -0
- package/dist/plugin/Form/Checkboxes.d.ts +1 -0
- package/dist/plugin/Form/CodeEditor.d.ts +40 -0
- package/dist/plugin/Form/Combo.d.ts +1 -0
- package/dist/plugin/Form/ConditionBuilder.d.ts +1 -0
- package/dist/plugin/Form/Control.d.ts +1 -0
- package/dist/plugin/Form/DiffEditor.d.ts +1 -0
- package/dist/plugin/Form/FieldSet.d.ts +1 -0
- package/dist/plugin/Form/Form.d.ts +1 -0
- package/dist/plugin/Form/Formula.d.ts +1 -0
- package/dist/plugin/Form/Group.d.ts +1 -0
- package/dist/plugin/Form/Hidden.d.ts +1 -0
- package/dist/plugin/Form/InputArray.d.ts +1 -0
- package/dist/plugin/Form/InputCity.d.ts +1 -0
- package/dist/plugin/Form/InputColor.d.ts +1 -0
- package/dist/plugin/Form/InputDate.d.ts +1 -0
- package/dist/plugin/Form/InputDateRange.d.ts +1 -0
- package/dist/plugin/Form/InputDateTime.d.ts +1 -0
- package/dist/plugin/Form/InputDateTimeRange.d.ts +1 -0
- package/dist/plugin/Form/InputEmail.d.ts +1 -0
- package/dist/plugin/Form/InputExcel.d.ts +1 -0
- package/dist/plugin/Form/InputFile.d.ts +1 -0
- package/dist/plugin/Form/InputGroup.d.ts +1 -0
- package/dist/plugin/Form/InputImage.d.ts +1 -0
- package/dist/plugin/Form/InputKV.d.ts +1 -0
- package/dist/plugin/Form/InputMonth.d.ts +1 -0
- package/dist/plugin/Form/InputMonthRange.d.ts +1 -0
- package/dist/plugin/Form/InputNumber.d.ts +1 -0
- package/dist/plugin/Form/InputPassword.d.ts +1 -0
- package/dist/plugin/Form/InputQuarter.d.ts +1 -0
- package/dist/plugin/Form/InputQuarterRange.d.ts +1 -0
- package/dist/plugin/Form/InputRange.d.ts +1 -0
- package/dist/plugin/Form/InputRating.d.ts +2 -1
- package/dist/plugin/Form/InputRepeat.d.ts +1 -0
- package/dist/plugin/Form/InputRichText.d.ts +1 -0
- package/dist/plugin/Form/InputSubForm.d.ts +1 -0
- package/dist/plugin/Form/InputTable.d.ts +1 -1
- package/dist/plugin/Form/InputTag.d.ts +1 -0
- package/dist/plugin/Form/InputText.d.ts +1 -0
- package/dist/plugin/Form/InputTime.d.ts +1 -0
- package/dist/plugin/Form/InputTree.d.ts +1 -0
- package/dist/plugin/Form/InputURL.d.ts +1 -0
- package/dist/plugin/Form/InputYear.d.ts +1 -0
- package/dist/plugin/Form/ListSelect.d.ts +1 -0
- package/dist/plugin/Form/LocationPicker.d.ts +1 -0
- package/dist/plugin/Form/MatrixCheckboxes.d.ts +1 -0
- package/dist/plugin/Form/NestedSelect.d.ts +1 -0
- package/dist/plugin/Form/Picker.d.ts +1 -0
- package/dist/plugin/Form/Radios.d.ts +1 -0
- package/dist/plugin/Form/Select.d.ts +1 -0
- package/dist/plugin/Form/Static.d.ts +1 -1
- package/dist/plugin/Form/Switch.d.ts +1 -0
- package/dist/plugin/Form/TabsTransfer.d.ts +1 -0
- package/dist/plugin/Form/Textarea.d.ts +1 -0
- package/dist/plugin/Form/Transfer.d.ts +1 -0
- package/dist/plugin/Form/TreeSelect.d.ts +1 -0
- package/dist/plugin/Form/UUID.d.ts +1 -0
- package/dist/plugin/Grid.d.ts +1 -0
- package/dist/plugin/HBox.d.ts +1 -1
- package/dist/plugin/IFrame.d.ts +1 -0
- package/dist/plugin/Image.d.ts +1 -0
- package/dist/plugin/Images.d.ts +1 -0
- package/dist/plugin/Json.d.ts +1 -0
- package/dist/plugin/Link.d.ts +1 -0
- package/dist/plugin/List.d.ts +1 -0
- package/dist/plugin/ListItem.d.ts +1 -1
- package/dist/plugin/Log.d.ts +1 -0
- package/dist/plugin/Mapping.d.ts +1 -0
- package/dist/plugin/Markdown.d.ts +1 -0
- package/dist/plugin/Nav.d.ts +1 -0
- package/dist/plugin/Operation.d.ts +1 -0
- package/dist/plugin/Others/Action.d.ts +6 -0
- package/dist/plugin/Others/BasicToolbar.d.ts +11 -0
- package/dist/plugin/Others/DataDebug.d.ts +19 -0
- package/dist/plugin/Others/TableCell.d.ts +8 -0
- package/dist/plugin/Others/Unknown.d.ts +5 -0
- package/dist/plugin/Page.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 +16 -3
- package/dist/plugin/Plain.d.ts +1 -0
- package/dist/plugin/Progress.d.ts +1 -0
- package/dist/plugin/Property.d.ts +1 -0
- package/dist/plugin/QRCode.d.ts +1 -0
- package/dist/plugin/Reset.d.ts +1 -0
- package/dist/plugin/Service.d.ts +1 -0
- package/dist/plugin/Sparkline.d.ts +1 -0
- package/dist/plugin/Status.d.ts +1 -0
- package/dist/plugin/Steps.d.ts +1 -0
- package/dist/plugin/Submit.d.ts +1 -0
- package/dist/plugin/Table.d.ts +1 -0
- package/dist/plugin/TableCell.d.ts +0 -1
- package/dist/plugin/TableView.d.ts +1 -0
- package/dist/plugin/Tabs.d.ts +1 -0
- package/dist/plugin/Tasks.d.ts +1 -0
- package/dist/plugin/Time.d.ts +1 -0
- package/dist/plugin/Tpl.d.ts +1 -0
- package/dist/plugin/Video.d.ts +1 -0
- package/dist/plugin/WebComponent.d.ts +3 -26
- package/dist/plugin/Wizard.d.ts +1 -0
- package/dist/plugin/Wrapper.d.ts +1 -0
- package/dist/plugin.d.ts +9 -3
- package/dist/store/editor.d.ts +50 -4
- package/dist/style.css +1 -1
- package/dist/util.d.ts +3 -3
- package/package.json +17 -14
- 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
@@ -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,10 @@
|
|
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
|
+
handleSelect(key: string): void;
|
8
|
+
render(): JSX.Element;
|
9
|
+
}
|
10
|
+
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,32 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { EditorStoreType } from '../../store/editor';
|
3
|
+
import { EditorManager } from '../../manager';
|
4
|
+
import { SubRendererInfo } from '../../plugin';
|
5
|
+
declare type PanelProps = {
|
6
|
+
store: EditorStoreType;
|
7
|
+
manager: EditorManager;
|
8
|
+
groupedRenderers: {
|
9
|
+
[propName: string]: Array<SubRendererInfo>;
|
10
|
+
};
|
11
|
+
renderersPanelUUID: string;
|
12
|
+
isShowSearchRenderer?: boolean;
|
13
|
+
className?: string;
|
14
|
+
};
|
15
|
+
declare type PanelStates = {
|
16
|
+
toggleCollapseFolderStatus: boolean;
|
17
|
+
};
|
18
|
+
export default class RenderersPanel extends React.Component<PanelProps, PanelStates> {
|
19
|
+
state: {
|
20
|
+
toggleCollapseFolderStatus: boolean;
|
21
|
+
};
|
22
|
+
curCollapseFolded: {
|
23
|
+
[propName: string]: boolean;
|
24
|
+
};
|
25
|
+
handleRegionFilterClick(e: React.MouseEvent): void;
|
26
|
+
handleDragStart(e: React.DragEvent): void;
|
27
|
+
handleClick(e: React.MouseEvent): void;
|
28
|
+
changeCollapseFoldStatus(tagKey: string, event: any): void;
|
29
|
+
renderThumb(schema: any): JSX.Element;
|
30
|
+
render(): JSX.Element;
|
31
|
+
}
|
32
|
+
export {};
|
@@ -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
|
+
}
|
@@ -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(): Document | (Window & typeof globalThis);
|
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,59 @@
|
|
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
|
+
updateCurKeyword(keywords: string): void;
|
35
|
+
searchSubRenderersByKeyword(): void;
|
36
|
+
changeTagFoldStatus(tagKey: string, event: any): void;
|
37
|
+
bindEnterEvent(event: any): void;
|
38
|
+
/** 删除搜索关键字 */
|
39
|
+
bindClearActionEvent(): void;
|
40
|
+
/** 组件分类tag点击事件 */
|
41
|
+
bindTagClickEvent(tag: string): void;
|
42
|
+
getSearchHistory(): any[];
|
43
|
+
/** 添加搜索历史 */
|
44
|
+
addSearchHistory(newKeywords: string): void;
|
45
|
+
/** 搜索历史/点击 */
|
46
|
+
clickKeywordEvent(keywords: string): void;
|
47
|
+
deleteSearchHistory(event: any, newKeywords: string): void;
|
48
|
+
clearSearchHistory(event: any): void;
|
49
|
+
/** 将搜索记录保存到localStorage */
|
50
|
+
updateSearchHistory(): void;
|
51
|
+
/** 显示搜索关键字 */
|
52
|
+
renderNameByKeyword(rendererName: string, curKeyword: string): string | JSX.Element;
|
53
|
+
/** 判断搜索展示内容是否有滚动(交互优化) */
|
54
|
+
resultIsHasScroll(searchSubRenderers: {
|
55
|
+
[propName: string]: Array<SubRendererInfo>;
|
56
|
+
}, maxShowLine: number): boolean;
|
57
|
+
render(): JSX.Element;
|
58
|
+
}
|
59
|
+
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 {};
|
@@ -0,0 +1,150 @@
|
|
1
|
+
/**
|
2
|
+
* @description 信息提示组件模版
|
3
|
+
* @file src/component/remarkTpl.tsx
|
4
|
+
* @author hanxiao11@baidu.com
|
5
|
+
*/
|
6
|
+
export default function remarkTpl(config: {
|
7
|
+
name: 'remark' | 'labelRemark';
|
8
|
+
label: string;
|
9
|
+
}): {
|
10
|
+
type: string;
|
11
|
+
label: string;
|
12
|
+
mode: string;
|
13
|
+
className: string;
|
14
|
+
labelRemark: {
|
15
|
+
icon: string;
|
16
|
+
trigger: string[];
|
17
|
+
setting: boolean;
|
18
|
+
title: string;
|
19
|
+
content: string;
|
20
|
+
placement: string;
|
21
|
+
};
|
22
|
+
body: {
|
23
|
+
type: string;
|
24
|
+
className: string;
|
25
|
+
body: ({
|
26
|
+
type: string;
|
27
|
+
name: "remark" | "labelRemark";
|
28
|
+
label: string;
|
29
|
+
btnLabel: string;
|
30
|
+
visibleOn: string;
|
31
|
+
className: string;
|
32
|
+
itemClassName: string;
|
33
|
+
icon: string;
|
34
|
+
form: {
|
35
|
+
title: string;
|
36
|
+
mode: string;
|
37
|
+
size: string;
|
38
|
+
body: {
|
39
|
+
type: string;
|
40
|
+
columns: ({
|
41
|
+
md: string;
|
42
|
+
body: ({
|
43
|
+
name: string;
|
44
|
+
type: string;
|
45
|
+
label: string;
|
46
|
+
placeholder: string;
|
47
|
+
} | {
|
48
|
+
name: string;
|
49
|
+
type: string;
|
50
|
+
label: string;
|
51
|
+
placeholder?: undefined;
|
52
|
+
})[];
|
53
|
+
} | {
|
54
|
+
md: string;
|
55
|
+
body: ({
|
56
|
+
name: string;
|
57
|
+
type: string;
|
58
|
+
size: string;
|
59
|
+
label: string;
|
60
|
+
options: {
|
61
|
+
label: string;
|
62
|
+
value: string;
|
63
|
+
}[];
|
64
|
+
labelRemark?: undefined;
|
65
|
+
multiple?: undefined;
|
66
|
+
pipeIn?: undefined;
|
67
|
+
pipeOut?: undefined;
|
68
|
+
visibleOn?: undefined;
|
69
|
+
} | {
|
70
|
+
name: string;
|
71
|
+
label: string;
|
72
|
+
type: string;
|
73
|
+
size?: undefined;
|
74
|
+
options?: undefined;
|
75
|
+
labelRemark?: undefined;
|
76
|
+
multiple?: undefined;
|
77
|
+
pipeIn?: undefined;
|
78
|
+
pipeOut?: undefined;
|
79
|
+
visibleOn?: undefined;
|
80
|
+
} | {
|
81
|
+
name: string;
|
82
|
+
label: string;
|
83
|
+
type: string;
|
84
|
+
labelRemark: {
|
85
|
+
trigger: string;
|
86
|
+
className: string;
|
87
|
+
rootClose: boolean;
|
88
|
+
content: string;
|
89
|
+
placement: string;
|
90
|
+
};
|
91
|
+
size?: undefined;
|
92
|
+
options?: undefined;
|
93
|
+
multiple?: undefined;
|
94
|
+
pipeIn?: undefined;
|
95
|
+
pipeOut?: undefined;
|
96
|
+
visibleOn?: undefined;
|
97
|
+
} | {
|
98
|
+
name: string;
|
99
|
+
type: string;
|
100
|
+
label: string;
|
101
|
+
multiple: boolean;
|
102
|
+
pipeIn: (value: any) => string | never[];
|
103
|
+
pipeOut: (value: any) => any;
|
104
|
+
options: {
|
105
|
+
label: string;
|
106
|
+
value: string;
|
107
|
+
}[];
|
108
|
+
size?: undefined;
|
109
|
+
labelRemark?: undefined;
|
110
|
+
visibleOn?: undefined;
|
111
|
+
} | {
|
112
|
+
name: string;
|
113
|
+
visibleOn: string;
|
114
|
+
label: string;
|
115
|
+
type: string;
|
116
|
+
size?: undefined;
|
117
|
+
options?: undefined;
|
118
|
+
labelRemark?: undefined;
|
119
|
+
multiple?: undefined;
|
120
|
+
pipeIn?: undefined;
|
121
|
+
pipeOut?: undefined;
|
122
|
+
})[];
|
123
|
+
})[];
|
124
|
+
};
|
125
|
+
};
|
126
|
+
mode?: undefined;
|
127
|
+
pipeIn?: undefined;
|
128
|
+
pipeOut?: undefined;
|
129
|
+
} | {
|
130
|
+
type: string;
|
131
|
+
name: "remark" | "labelRemark";
|
132
|
+
mode: string;
|
133
|
+
pipeIn: (value: any) => boolean;
|
134
|
+
pipeOut: (value: any) => {
|
135
|
+
icon: string;
|
136
|
+
trigger: string[];
|
137
|
+
className: string;
|
138
|
+
setting: boolean;
|
139
|
+
placement: string;
|
140
|
+
} | null;
|
141
|
+
label?: undefined;
|
142
|
+
btnLabel?: undefined;
|
143
|
+
visibleOn?: undefined;
|
144
|
+
className?: undefined;
|
145
|
+
itemClassName?: undefined;
|
146
|
+
icon?: undefined;
|
147
|
+
form?: undefined;
|
148
|
+
})[];
|
149
|
+
}[];
|
150
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* 用于导出纯工具类方法
|
3
|
+
* 比如:BasePlugin、registerEditorPlugin
|
4
|
+
*/
|
5
|
+
import { BasePlugin } from './plugin';
|
6
|
+
import { registerEditorPlugin, unRegisterEditorPlugin, getEditorPlugins } from './manager';
|
7
|
+
import { getSchemaTpl, defaultValue, setSchemaTpl } from './component/schemaTpl';
|
8
|
+
export { BasePlugin, getSchemaTpl, setSchemaTpl, defaultValue, registerEditorPlugin, unRegisterEditorPlugin, getEditorPlugins };
|