amis-editor 3.3.6-beta.15 → 3.3.6-beta.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Animation.d.ts +22 -0
- package/dist/BasicContainerEditor.d.ts +46 -0
- package/dist/BasicEditor.d.ts +214 -0
- package/dist/Breadcrumb.d.ts +19 -0
- package/dist/ClassNameControl.d.ts +31 -0
- package/dist/CodeEditor.d.ts +34 -0
- package/dist/Editor.d.ts +251 -0
- package/dist/HighlightBox.d.ts +17 -0
- package/dist/MiniEditor.d.ts +9 -0
- package/dist/Outline.d.ts +38 -0
- package/dist/PositionRegion.d.ts +7 -0
- package/dist/Preview.d.ts +76 -0
- package/dist/Region.d.ts +61 -0
- package/dist/RendererThumb.d.ts +23 -0
- package/dist/Renderers.d.ts +39 -0
- package/dist/RenderersPicker.d.ts +28 -0
- package/dist/SettingForm.d.ts +20 -0
- package/dist/Settings.d.ts +58 -0
- package/dist/dom-helper.d.ts +2 -0
- package/dist/editors/Action.d.ts +14 -0
- package/dist/editors/Alert.d.ts +11 -0
- package/dist/editors/Audio.d.ts +9 -0
- package/dist/editors/ButtonGroup.d.ts +15 -0
- package/dist/editors/ButtonToolbar.d.ts +7 -0
- package/dist/editors/CRUD.d.ts +27 -0
- package/dist/editors/Card.d.ts +47 -0
- package/dist/editors/Cards.d.ts +20 -0
- package/dist/editors/Carousel.d.ts +9 -0
- package/dist/editors/Chart.d.ts +13 -0
- package/dist/editors/Collapse.d.ts +13 -0
- package/dist/editors/Container.d.ts +13 -0
- package/dist/editors/Date.d.ts +18 -0
- package/dist/editors/Dialog.d.ts +27 -0
- package/dist/editors/DiffEditor.d.ts +8 -0
- package/dist/editors/Divdier.d.ts +8 -0
- package/dist/editors/Drawer.d.ts +26 -0
- package/dist/editors/DropDownButton.d.ts +16 -0
- package/dist/editors/Each.d.ts +16 -0
- package/dist/editors/Form/Array.d.ts +12 -0
- package/dist/editors/Form/Button.d.ts +13 -0
- package/dist/editors/Form/ButtonGroup.d.ts +17 -0
- package/dist/editors/Form/ButtonToolbar.d.ts +15 -0
- package/dist/editors/Form/ChainedSelect.d.ts +8 -0
- package/dist/editors/Form/Checkbox.d.ts +8 -0
- package/dist/editors/Form/Checkboxes.d.ts +8 -0
- package/dist/editors/Form/City.d.ts +8 -0
- package/dist/editors/Form/Color.d.ts +8 -0
- package/dist/editors/Form/Combo.d.ts +19 -0
- package/dist/editors/Form/Container.d.ts +22 -0
- package/dist/editors/Form/Control.d.ts +15 -0
- package/dist/editors/Form/Date.d.ts +9 -0
- package/dist/editors/Form/DateRange.d.ts +9 -0
- package/dist/editors/Form/Datetime.d.ts +9 -0
- package/dist/editors/Form/DiffEditor.d.ts +8 -0
- package/dist/editors/Form/Editor.d.ts +12 -0
- package/dist/editors/Form/Email.d.ts +8 -0
- package/dist/editors/Form/FieldSet.d.ts +22 -0
- package/dist/editors/Form/File.d.ts +8 -0
- package/dist/editors/Form/Form.d.ts +26 -0
- package/dist/editors/Form/Formula.d.ts +11 -0
- package/dist/editors/Form/Grid.d.ts +21 -0
- package/dist/editors/Form/Group.d.ts +21 -0
- package/dist/editors/Form/HBox.d.ts +20 -0
- package/dist/editors/Form/Hidden.d.ts +21 -0
- package/dist/editors/Form/Image.d.ts +8 -0
- package/dist/editors/Form/InputGroup.d.ts +12 -0
- package/dist/editors/Form/Item.d.ts +8 -0
- package/dist/editors/Form/List.d.ts +16 -0
- package/dist/editors/Form/Matrix.d.ts +8 -0
- package/dist/editors/Form/NestedSelect.d.ts +50 -0
- package/dist/editors/Form/Number.d.ts +8 -0
- package/dist/editors/Form/Panel.d.ts +22 -0
- package/dist/editors/Form/Password.d.ts +10 -0
- package/dist/editors/Form/Picker.d.ts +17 -0
- package/dist/editors/Form/QRCode.d.ts +8 -0
- package/dist/editors/Form/Radios.d.ts +8 -0
- package/dist/editors/Form/Range.d.ts +8 -0
- package/dist/editors/Form/Rating.d.ts +8 -0
- package/dist/editors/Form/Repeat.d.ts +8 -0
- package/dist/editors/Form/Reset.d.ts +8 -0
- package/dist/editors/Form/RichText.d.ts +8 -0
- package/dist/editors/Form/Select.d.ts +8 -0
- package/dist/editors/Form/Service.d.ts +25 -0
- package/dist/editors/Form/Static.d.ts +18 -0
- package/dist/editors/Form/SubForm.d.ts +12 -0
- package/dist/editors/Form/Submit.d.ts +9 -0
- package/dist/editors/Form/Switch.d.ts +8 -0
- package/dist/editors/Form/Tab.d.ts +12 -0
- package/dist/editors/Form/Table.d.ts +25 -0
- package/dist/editors/Form/Tabs.d.ts +6 -0
- package/dist/editors/Form/Tag.d.ts +10 -0
- package/dist/editors/Form/Text.d.ts +10 -0
- package/dist/editors/Form/Textarea.d.ts +8 -0
- package/dist/editors/Form/Time.d.ts +9 -0
- package/dist/editors/Form/Tree.d.ts +50 -0
- package/dist/editors/Form/TreeSelect.d.ts +50 -0
- package/dist/editors/Form/Url.d.ts +8 -0
- package/dist/editors/Grid.d.ts +16 -0
- package/dist/editors/HBox.d.ts +13 -0
- package/dist/editors/IFrame.d.ts +11 -0
- package/dist/editors/Image.d.ts +9 -0
- package/dist/editors/Json.d.ts +9 -0
- package/dist/editors/Link.d.ts +8 -0
- package/dist/editors/List.d.ts +70 -0
- package/dist/editors/Mapping.d.ts +9 -0
- package/dist/editors/Nav.d.ts +142 -0
- package/dist/editors/Operation.d.ts +17 -0
- package/dist/editors/Page.d.ts +15 -0
- package/dist/editors/Panel.d.ts +13 -0
- package/dist/editors/Plain.d.ts +9 -0
- package/dist/editors/Progress.d.ts +9 -0
- package/dist/editors/QRCode.d.ts +8 -0
- package/dist/editors/Service.d.ts +5 -0
- package/dist/editors/Status.d.ts +9 -0
- package/dist/editors/Switch.d.ts +9 -0
- package/dist/editors/Tab.d.ts +13 -0
- package/dist/editors/Table.d.ts +27 -0
- package/dist/editors/TableCell.d.ts +29 -0
- package/dist/editors/TableColumnsRegion.d.ts +6 -0
- package/dist/editors/Tabs.d.ts +15 -0
- package/dist/editors/Tasks.d.ts +8 -0
- package/dist/editors/Tpl.d.ts +8 -0
- package/dist/editors/Video.d.ts +8 -0
- package/dist/editors/Wizard.d.ts +15 -0
- package/dist/editors/WizardStep.d.ts +19 -0
- package/dist/editors/Wrapper.d.ts +11 -0
- package/dist/editors/index.d.ts +101 -0
- package/dist/editors/templates.d.ts +3 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.min.js +1 -1
- package/dist/json-ast/index.d.ts +53 -0
- package/dist/plugin/DataDebug.d.ts +1 -0
- package/dist/plugin/DiffEditor.d.ts +19 -0
- package/dist/plugin/Form/AnchorNav.d.ts +17 -0
- package/dist/plugin/Form/Array.d.ts +27 -0
- package/dist/plugin/Form/Button.d.ts +11 -0
- package/dist/plugin/Form/ButtonGroup.d.ts +22 -0
- package/dist/plugin/Form/City.d.ts +19 -0
- package/dist/plugin/Form/Container.d.ts +37 -0
- package/dist/plugin/Form/Date.d.ts +20 -0
- package/dist/plugin/Form/DateRange.d.ts +20 -0
- package/dist/plugin/Form/DateTime.d.ts +19 -0
- package/dist/plugin/Form/Email.d.ts +25 -0
- package/dist/plugin/Form/File.d.ts +19 -0
- package/dist/plugin/Form/Grid.d.ts +32 -0
- package/dist/plugin/Form/HBox.d.ts +73 -0
- package/dist/plugin/Form/Image.d.ts +20 -0
- package/dist/plugin/Form/InputSubForm.d.ts +1 -0
- package/dist/plugin/Form/List.d.ts +24 -0
- package/dist/plugin/Form/Location.d.ts +48 -0
- package/dist/plugin/Form/Matrix.d.ts +26 -0
- package/dist/plugin/Form/Month.d.ts +16 -0
- package/dist/plugin/Form/MonthRange.d.ts +20 -0
- package/dist/plugin/Form/Number.d.ts +20 -0
- package/dist/plugin/Form/Panel.d.ts +24 -0
- package/dist/plugin/Form/Password.d.ts +25 -0
- package/dist/plugin/Form/QRCode.d.ts +20 -0
- package/dist/plugin/Form/Range.d.ts +19 -0
- package/dist/plugin/Form/Rating.d.ts +19 -0
- package/dist/plugin/Form/Repeat.d.ts +19 -0
- package/dist/plugin/Form/RichText.d.ts +19 -0
- package/dist/plugin/Form/Service.d.ts +24 -0
- package/dist/plugin/Form/SubForm.d.ts +64 -0
- package/dist/plugin/Form/Table.d.ts +34 -0
- package/dist/plugin/Form/Tabs.d.ts +17 -0
- package/dist/plugin/Form/Tag.d.ts +21 -0
- package/dist/plugin/Form/Text.d.ts +20 -0
- package/dist/plugin/Form/Time.d.ts +19 -0
- package/dist/plugin/Form/Tree.d.ts +73 -0
- package/dist/plugin/Form/Url.d.ts +25 -0
- package/dist/plugin/Form/Year.d.ts +16 -0
- package/dist/plugin/Switch.d.ts +21 -0
- package/dist/store/editor.d.ts +1 -0
- package/dist/types.d.ts +40 -0
- package/dist/util.d.ts +1 -1
- package/package.json +14 -38
@@ -0,0 +1,76 @@
|
|
1
|
+
/// <reference types="lodash" />
|
2
|
+
import React from 'react';
|
3
|
+
import { Schema, RendererComponent, RendererConfig, RendererProps, RenderOptions } from './types';
|
4
|
+
import H from 'history';
|
5
|
+
export interface scaffoldForm {
|
6
|
+
title: string;
|
7
|
+
controls: Array<any>;
|
8
|
+
onConfirm?: (value: any) => any;
|
9
|
+
}
|
10
|
+
export interface EditoConfig {
|
11
|
+
name?: string;
|
12
|
+
description?: string;
|
13
|
+
docLink?: string;
|
14
|
+
previewSchema?: Schema;
|
15
|
+
type: string;
|
16
|
+
scaffold?: any;
|
17
|
+
scaffoldForm?: scaffoldForm;
|
18
|
+
affixPath?: string;
|
19
|
+
image?: string;
|
20
|
+
tags?: Array<string> | string;
|
21
|
+
icon?: string;
|
22
|
+
rendererName: string;
|
23
|
+
$schema?: string;
|
24
|
+
renderer: RendererComponent;
|
25
|
+
component: RendererComponent;
|
26
|
+
}
|
27
|
+
export declare const editors: Array<EditoConfig>;
|
28
|
+
export declare function getEditors(): EditoConfig[];
|
29
|
+
export declare const getEditorByName: ((name: string) => EditoConfig | undefined) & import("lodash").MemoizedFunction;
|
30
|
+
export declare function Editor(rendererName: string, config?: Omit<EditoConfig, 'rendererName' | 'renderer' | 'component'>, proto?: any): (component: React.ComponentClass<RendererProps>) => any;
|
31
|
+
export declare function resolveEditor(renderer: RendererComponent): any;
|
32
|
+
export interface PreviewProps {
|
33
|
+
editable?: boolean;
|
34
|
+
getSchema: () => any;
|
35
|
+
schema: Schema;
|
36
|
+
schemaFilter?: (schema: Schema) => Schema;
|
37
|
+
widgetsLayerRef?: (dom: any) => void;
|
38
|
+
pathPrefix?: string;
|
39
|
+
className?: string;
|
40
|
+
history?: H.History;
|
41
|
+
env?: any;
|
42
|
+
theme?: string;
|
43
|
+
onResize: () => void;
|
44
|
+
onMouseMove?: (e: React.MouseEvent<any>) => void;
|
45
|
+
onMouseLeave?: (e: React.MouseEvent<any>) => void;
|
46
|
+
onClick?: (e: MouseEvent) => void;
|
47
|
+
onDragEnter?: (e: React.DragEvent) => void;
|
48
|
+
onDragOver?: (e: React.DragEvent) => void;
|
49
|
+
onDragLeave?: (e: React.DragEvent) => void;
|
50
|
+
onDrop?: (e: React.DragEvent) => void;
|
51
|
+
isEditorEnabled?: (path: string, editor: any, renderer: any, schema: any) => boolean;
|
52
|
+
[propName: string]: any;
|
53
|
+
}
|
54
|
+
export default class AMisPreview extends React.Component<PreviewProps, any> {
|
55
|
+
env: RenderOptions;
|
56
|
+
unSensor?: () => void;
|
57
|
+
static defaultProps: {
|
58
|
+
onResize: () => void;
|
59
|
+
};
|
60
|
+
id: string;
|
61
|
+
widgetsLayer: HTMLDivElement;
|
62
|
+
constructor(props: PreviewProps);
|
63
|
+
componentDidMount(): void;
|
64
|
+
componentWillReceiveProps(nextProps: PreviewProps): void;
|
65
|
+
componentWillUnmount(): void;
|
66
|
+
widgetsLayerRef(ref: any): void;
|
67
|
+
handleClick(e: MouseEvent): void;
|
68
|
+
handeMouseOver(e: MouseEvent): void;
|
69
|
+
rendererResolver(path: string, schema: Schema, props: any): RendererConfig | null;
|
70
|
+
dragEnterCount: number;
|
71
|
+
handleDragEnter(e: React.DragEvent): void;
|
72
|
+
handleDragLeave(e: React.DragEvent): void;
|
73
|
+
handleDrop(e: React.DragEvent): void;
|
74
|
+
reset(): void;
|
75
|
+
render(): JSX.Element;
|
76
|
+
}
|
package/dist/Region.d.ts
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
import React = require('react');
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
interface RegionProps {
|
4
|
+
name: string;
|
5
|
+
hostId: string;
|
6
|
+
label?: string;
|
7
|
+
className?: string;
|
8
|
+
wrapperResolve?: ((dom: HTMLElement) => HTMLElement) | string;
|
9
|
+
}
|
10
|
+
export default class Region extends React.Component<RegionProps> {
|
11
|
+
isRegion: boolean;
|
12
|
+
nodes: Array<any>;
|
13
|
+
entered: boolean;
|
14
|
+
static contextTypes: {
|
15
|
+
editor: PropTypes.Requireable<object>;
|
16
|
+
editorNode: PropTypes.Requireable<object>;
|
17
|
+
};
|
18
|
+
static childContextTypes: {
|
19
|
+
editorNode: PropTypes.Requireable<object>;
|
20
|
+
};
|
21
|
+
hlDom: HTMLElement | null;
|
22
|
+
addBtn: HTMLElement;
|
23
|
+
constructor(props: RegionProps);
|
24
|
+
getChildContext(this: any): {
|
25
|
+
editorNode: {
|
26
|
+
isRegion: boolean;
|
27
|
+
id: string;
|
28
|
+
add: any;
|
29
|
+
remove: any;
|
30
|
+
getNodes: any;
|
31
|
+
component: any;
|
32
|
+
parent: any;
|
33
|
+
};
|
34
|
+
};
|
35
|
+
componentWillMount(): void;
|
36
|
+
componentDidMount(): void;
|
37
|
+
componentDidUpdate(): void;
|
38
|
+
componentWillUnmount(): void;
|
39
|
+
hlDomRef(ref: HTMLElement | null): void;
|
40
|
+
getWrapper(): HTMLElement;
|
41
|
+
updateHlbox(): void;
|
42
|
+
addNode(node: any): void;
|
43
|
+
removeTo(node: any): void;
|
44
|
+
getNodes(): any[];
|
45
|
+
getContextMenus(): any[];
|
46
|
+
dropPosition: number;
|
47
|
+
schema: any;
|
48
|
+
wrapper: HTMLElement;
|
49
|
+
handleDragEnter(e: React.DragEvent, ghost: HTMLElement, dragData: any): void;
|
50
|
+
handleDragLeave(e: React.DragEvent, ghost: HTMLElement, dragData: any): void;
|
51
|
+
handleAdd(): void;
|
52
|
+
lastX: number;
|
53
|
+
lastY: number;
|
54
|
+
handleDragOver(e: React.DragEvent, ghost: HTMLElement, dragData: any, rendererId: any, vertical: boolean): void;
|
55
|
+
getTarget(e: React.DragEvent, regionDom: HTMLElement): HTMLElement | null;
|
56
|
+
getChild(dom: HTMLElement, descend: HTMLElement): HTMLElement;
|
57
|
+
getDropIndex(): number;
|
58
|
+
update(): void;
|
59
|
+
render(): {} | null | undefined;
|
60
|
+
}
|
61
|
+
export {};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { RendererProps } from 'amis/lib/factory';
|
3
|
+
import { Schema } from 'amis/lib/types';
|
4
|
+
interface ThumbProps extends RendererProps {
|
5
|
+
schema: Schema;
|
6
|
+
}
|
7
|
+
export declare class RendererThumb extends React.Component<ThumbProps> {
|
8
|
+
ref: HTMLDivElement;
|
9
|
+
unSensor: Function;
|
10
|
+
state: {
|
11
|
+
scale: boolean;
|
12
|
+
};
|
13
|
+
env: {
|
14
|
+
session: string;
|
15
|
+
};
|
16
|
+
componentWillMount(): void;
|
17
|
+
componentWillUnmount(): void;
|
18
|
+
rootRef(ref: HTMLDivElement): void;
|
19
|
+
syncHeight(): void;
|
20
|
+
handleClick(e: React.MouseEvent): void;
|
21
|
+
render(): JSX.Element;
|
22
|
+
}
|
23
|
+
export {};
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import BasicContainerEditor from './BasicContainerEditor';
|
4
|
+
export interface RenderersProps {
|
5
|
+
id: string;
|
6
|
+
editor: BasicContainerEditor;
|
7
|
+
}
|
8
|
+
export declare type RendererItem = {
|
9
|
+
label: string;
|
10
|
+
value: any;
|
11
|
+
image: string;
|
12
|
+
docLink: string;
|
13
|
+
previewSchema: any;
|
14
|
+
description: string;
|
15
|
+
id: string;
|
16
|
+
tags?: Array<string>;
|
17
|
+
icon?: string;
|
18
|
+
};
|
19
|
+
export interface RenderersState {
|
20
|
+
items: Array<RendererItem>;
|
21
|
+
filteredItems: Array<RendererItem>;
|
22
|
+
keywords: string;
|
23
|
+
}
|
24
|
+
export default class Renderers extends React.PureComponent<RenderersProps, RenderersState> {
|
25
|
+
static contextTypes: {
|
26
|
+
editor: PropTypes.Requireable<object>;
|
27
|
+
};
|
28
|
+
id: string;
|
29
|
+
constructor(props: RenderersProps);
|
30
|
+
build(props?: Readonly<RenderersProps> & Readonly<{
|
31
|
+
children?: React.ReactNode;
|
32
|
+
}>): any;
|
33
|
+
componentDidUpdate(prevProps: RenderersProps): void;
|
34
|
+
handleDragStart(e: React.DragEvent): void;
|
35
|
+
handleFilterChange(keywords: string): void;
|
36
|
+
handleFilterReset(): void;
|
37
|
+
renderThumb(schema: any): JSX.Element;
|
38
|
+
render(): JSX.Element;
|
39
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { RendererItem } from './Renderers';
|
3
|
+
import { RendererProps } from 'amis/lib/factory';
|
4
|
+
export interface RenderersPickerProps extends RendererProps {
|
5
|
+
onChange: (value: any, submitOnChange?: boolean) => void;
|
6
|
+
value: any;
|
7
|
+
data: {
|
8
|
+
renderers: Array<RendererItem>;
|
9
|
+
};
|
10
|
+
}
|
11
|
+
export interface RenderersPickerState {
|
12
|
+
filteredItems: Array<RendererItem>;
|
13
|
+
keywords: string;
|
14
|
+
activeIndex: number;
|
15
|
+
}
|
16
|
+
export default class RendereresPicker extends React.Component<RenderersPickerProps, RenderersPickerState> {
|
17
|
+
state: RenderersPickerState;
|
18
|
+
componentDidMount(): void;
|
19
|
+
componentDidUpdate(prevProps: RenderersPickerProps): void;
|
20
|
+
syncRenderers(keywords?: string): void;
|
21
|
+
handleSearch(text: string): void;
|
22
|
+
handleSeachCancel(): void;
|
23
|
+
handleLeftClick(e: React.MouseEvent): void;
|
24
|
+
handleClick(e: React.MouseEvent): void;
|
25
|
+
hadnlDBClick(e: React.MouseEvent): void;
|
26
|
+
renderRenderers(): JSX.Element;
|
27
|
+
render(): JSX.Element;
|
28
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Schema } from './types';
|
3
|
+
import { RenderOptions } from 'amis/lib/factory';
|
4
|
+
export declare function extendsEnv(options?: RenderOptions): void;
|
5
|
+
export declare function getEnv(): RenderOptions;
|
6
|
+
export interface SettingProps {
|
7
|
+
onChange: (value: any) => void;
|
8
|
+
value: any;
|
9
|
+
schema: Schema;
|
10
|
+
theme?: string;
|
11
|
+
popOverContainer?: any;
|
12
|
+
}
|
13
|
+
export default class AMisSetting extends React.PureComponent<SettingProps, any> {
|
14
|
+
handleSubmit: (value: any) => boolean;
|
15
|
+
scope: any;
|
16
|
+
scopeRef: (scope: any) => void;
|
17
|
+
flush: () => void;
|
18
|
+
getValue: () => any;
|
19
|
+
render(): JSX.Element;
|
20
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Schema } from './types';
|
3
|
+
export interface SettingsProps {
|
4
|
+
settings: {
|
5
|
+
id: string;
|
6
|
+
editor: any;
|
7
|
+
$schema?: string;
|
8
|
+
schema: Schema;
|
9
|
+
value?: any;
|
10
|
+
getValue?: () => any;
|
11
|
+
getRaw: () => any;
|
12
|
+
onChange: (value: any, mode: string, callback?: (value: any) => void) => void;
|
13
|
+
} | null;
|
14
|
+
size?: 'large' | 'normal';
|
15
|
+
theme?: string;
|
16
|
+
onSizeToggle: () => void;
|
17
|
+
activeId: any;
|
18
|
+
outline: Array<any>;
|
19
|
+
onHover: (id?: string | null) => void;
|
20
|
+
onSelect: (value: any, forceOpen?: boolean) => void;
|
21
|
+
showDropableNodesOnly?: boolean;
|
22
|
+
$schemaUrl?: string;
|
23
|
+
}
|
24
|
+
interface AMisSettingsState {
|
25
|
+
schema: any;
|
26
|
+
data: any;
|
27
|
+
raw: any;
|
28
|
+
activeKey?: 'nav' | 'form' | 'code' | 'renderers' | 'none';
|
29
|
+
}
|
30
|
+
export default class AMisSettings extends React.PureComponent<SettingsProps, AMisSettingsState> {
|
31
|
+
id: any;
|
32
|
+
lastKey?: 'nav' | 'form' | 'code' | 'renderers' | 'none';
|
33
|
+
data: any;
|
34
|
+
raw: any;
|
35
|
+
innerRef: React.RefObject<HTMLDivElement>;
|
36
|
+
toDispose: Array<Function>;
|
37
|
+
state: AMisSettingsState;
|
38
|
+
pipeIn(props: SettingsProps): any;
|
39
|
+
pipeOut(value: any): any;
|
40
|
+
handleSelect: (key: 'nav' | 'form' | 'code' | 'renderers' | 'none', force?: boolean) => void;
|
41
|
+
componentDidUpdate(prevProps: SettingsProps): void;
|
42
|
+
openTab(key: 'nav' | 'form' | 'code' | 'renderers' | 'none'): void;
|
43
|
+
formChangedAt: number;
|
44
|
+
handleFormChange: (value: any) => void;
|
45
|
+
handleCodeChange: (value: any, diff: any) => void;
|
46
|
+
getPopOverContainer(): HTMLDivElement | null;
|
47
|
+
form: any;
|
48
|
+
formRef(form: any): void;
|
49
|
+
updateSettings(id?: string, mode?: string): void;
|
50
|
+
startX: number;
|
51
|
+
startWidth: number;
|
52
|
+
codeWrap: HTMLElement;
|
53
|
+
handleResizeMouseDown(e: React.MouseEvent): void;
|
54
|
+
handleResizeMouseMove(e: MouseEvent): void;
|
55
|
+
handleResizeMouseUp(): void;
|
56
|
+
render(): JSX.Element;
|
57
|
+
}
|
58
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ButtonEditor } from './Form/Button';
|
2
|
+
export declare class ActionEditor extends ButtonEditor {
|
3
|
+
tipName: string;
|
4
|
+
settingsSchema: {
|
5
|
+
title: string;
|
6
|
+
controls: any[];
|
7
|
+
};
|
8
|
+
}
|
9
|
+
export declare class SubmitEditor extends ActionEditor {
|
10
|
+
tipName: string;
|
11
|
+
}
|
12
|
+
export declare class ResetEditor extends ActionEditor {
|
13
|
+
tipName: string;
|
14
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import BasicContainerEditor from '../BasicContainerEditor';
|
2
|
+
export declare class AlertEditor extends BasicContainerEditor {
|
3
|
+
tipName: string;
|
4
|
+
settingsSchema: {
|
5
|
+
title: string;
|
6
|
+
controls: any;
|
7
|
+
};
|
8
|
+
containers: string[];
|
9
|
+
dropable: boolean;
|
10
|
+
containerLabels: string[];
|
11
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicEditor from '../BasicEditor';
|
3
|
+
export declare class ButtonGroupEditor extends BasicEditor {
|
4
|
+
settingsSchema: {
|
5
|
+
title: string;
|
6
|
+
controls: any;
|
7
|
+
};
|
8
|
+
tipName: string;
|
9
|
+
containers: string[];
|
10
|
+
containerLabels: string[];
|
11
|
+
handleAdd(): void;
|
12
|
+
acceptChild(type: string, region: string, rendererId?: string): boolean | null;
|
13
|
+
renderRenderer(props: any): JSX.Element;
|
14
|
+
getContextMenus(): any[];
|
15
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicEditor from '../BasicEditor';
|
3
|
+
import { RendererProps, Schema } from '../types';
|
4
|
+
export declare class CRUDEditor extends BasicEditor {
|
5
|
+
tipName: string;
|
6
|
+
oldFilter: any;
|
7
|
+
settingsSchema: {
|
8
|
+
title: string;
|
9
|
+
controls: any[];
|
10
|
+
};
|
11
|
+
schemaCaches: any;
|
12
|
+
componentDidMount(): void;
|
13
|
+
modifyProps(props: RendererProps, context?: any): {
|
14
|
+
defaultParams: any;
|
15
|
+
itemActions: any;
|
16
|
+
bulkActions: any;
|
17
|
+
};
|
18
|
+
normalizeContainerHeaderToolbar(toolbar: any): any;
|
19
|
+
normalizeContainerFooterToolbar(toolbar: any): any;
|
20
|
+
normalizeToolbar(toolbar: any): any;
|
21
|
+
onChildSettingsGet(type: string, originValue: any): any;
|
22
|
+
onChildSettingsSet(type: string, value: any, origin: any): "__SKIP__" | undefined;
|
23
|
+
handleBulkActionEdit(index: number): void;
|
24
|
+
handleItemActionEdit(index: number): void;
|
25
|
+
renderChild(region: string, node: Schema, props: any): JSX.Element;
|
26
|
+
setSettingsValue(value: any): void;
|
27
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicEditor from '../BasicEditor';
|
3
|
+
import { RendererProps } from '../types';
|
4
|
+
import BasicContainerEditor from '../BasicContainerEditor';
|
5
|
+
export declare class CardEditor extends BasicContainerEditor {
|
6
|
+
tipName: string;
|
7
|
+
containers: string[];
|
8
|
+
regions2path: {
|
9
|
+
body: string;
|
10
|
+
};
|
11
|
+
childrenSortList: {
|
12
|
+
body: string[];
|
13
|
+
};
|
14
|
+
settingsSchema: {
|
15
|
+
title: string;
|
16
|
+
controls: any[];
|
17
|
+
};
|
18
|
+
acceptChild(type: string, region?: string, rendererId?: string): boolean | null;
|
19
|
+
getContextMenus(): any[];
|
20
|
+
onAddNode(key: string, child: any): any;
|
21
|
+
}
|
22
|
+
export declare class CardItemEditor extends BasicEditor {
|
23
|
+
tipName: string;
|
24
|
+
replaceable: boolean;
|
25
|
+
settingsSchema: {
|
26
|
+
title: string;
|
27
|
+
controls: any[];
|
28
|
+
};
|
29
|
+
childrenOrder: string[];
|
30
|
+
state: any;
|
31
|
+
constructor(props: RendererProps, context: any);
|
32
|
+
componentWillReceiveProps(nextProps: RendererProps): void;
|
33
|
+
editorWillUpdate(activeId: string | null, prevId: string | null, mode: string): any;
|
34
|
+
modifyProps(props: RendererProps, context?: any): {
|
35
|
+
quickEdit: any;
|
36
|
+
popOver: any;
|
37
|
+
};
|
38
|
+
deleteSelf(): void;
|
39
|
+
onChildSettingsGet(type: string, value: any): any;
|
40
|
+
onChildSettingsSet(type: string, value: any, origin: any, replaceMode?: boolean): any;
|
41
|
+
getSettingsValue(): any;
|
42
|
+
setSettingsValue(value: any): void;
|
43
|
+
handleQuickEditSetting(): void;
|
44
|
+
handlePopOverSetting(): void;
|
45
|
+
acceptChild(type: string, region?: string, rendererId?: string): boolean | null;
|
46
|
+
renderRenderer(props: any): JSX.Element;
|
47
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { RendererProps } from '../types';
|
2
|
+
import BasicContainerEditor from '../BasicContainerEditor';
|
3
|
+
export declare class CardsEditor extends BasicContainerEditor {
|
4
|
+
tipName: string;
|
5
|
+
isCRUDBody: boolean;
|
6
|
+
dropable: boolean;
|
7
|
+
containers: string[];
|
8
|
+
containerLabels: string[];
|
9
|
+
settingsSchema: {
|
10
|
+
title: string;
|
11
|
+
controls: any;
|
12
|
+
};
|
13
|
+
constructor(props: RendererProps, context: any);
|
14
|
+
componentWillReceiveProps(nextProps: RendererProps): void;
|
15
|
+
editorWillUpdate(activeId: string | null, prevId: string | null, mode: string): any;
|
16
|
+
modifyProps(props: RendererProps, context?: any): any;
|
17
|
+
getContextMenus(): any[];
|
18
|
+
handleToolbarAction(id: string): void;
|
19
|
+
handleEditCard(): void;
|
20
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import BasicEditor from '../BasicEditor';
|
2
|
+
export declare class ChartEditor extends BasicEditor {
|
3
|
+
tipName: string;
|
4
|
+
settingsSchema: {
|
5
|
+
title: string;
|
6
|
+
controls: any;
|
7
|
+
};
|
8
|
+
state: {
|
9
|
+
onAction: any;
|
10
|
+
};
|
11
|
+
handleChildAction(e: any, action: any, ctx: any): void;
|
12
|
+
handleEditDrillDown(e: any, ctx?: {}): void;
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicContainerEditor from '../BasicContainerEditor';
|
3
|
+
export declare class CollapseEditor extends BasicContainerEditor {
|
4
|
+
tipName: string;
|
5
|
+
containers: string[];
|
6
|
+
containerLabels: string[];
|
7
|
+
dropable: boolean;
|
8
|
+
settingsSchema: {
|
9
|
+
title: string;
|
10
|
+
controls: any;
|
11
|
+
};
|
12
|
+
renderRenderer(props?: any): JSX.Element;
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicContainerEditor from '../BasicContainerEditor';
|
3
|
+
export declare class WrapperEditor extends BasicContainerEditor {
|
4
|
+
tipName: string;
|
5
|
+
containers: string[];
|
6
|
+
containerLabels: string[];
|
7
|
+
dropable: boolean;
|
8
|
+
settingsSchema: {
|
9
|
+
title: string;
|
10
|
+
controls: any[];
|
11
|
+
};
|
12
|
+
renderRenderer(props: any): JSX.Element;
|
13
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicEditor from '../BasicEditor';
|
3
|
+
import { RendererProps } from '../types';
|
4
|
+
export declare class DateFieldEditor extends BasicEditor {
|
5
|
+
tipName: string;
|
6
|
+
isUnderField: boolean;
|
7
|
+
settingsSchema: {
|
8
|
+
title: string;
|
9
|
+
controls: any;
|
10
|
+
};
|
11
|
+
renderRenderer(props: RendererProps): JSX.Element;
|
12
|
+
}
|
13
|
+
export declare class DateTimeFieldEditor extends DateFieldEditor {
|
14
|
+
tipName: string;
|
15
|
+
}
|
16
|
+
export declare class TimeFieldEditor extends DateFieldEditor {
|
17
|
+
tipName: string;
|
18
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Schema } from '../types';
|
3
|
+
import BasicContainerEditor from '../BasicContainerEditor';
|
4
|
+
export declare class DialogEditor extends BasicContainerEditor {
|
5
|
+
regionDefaultNodes: {
|
6
|
+
actions: {
|
7
|
+
label: string;
|
8
|
+
type: string;
|
9
|
+
}[];
|
10
|
+
};
|
11
|
+
tipName: string;
|
12
|
+
removable: boolean;
|
13
|
+
replaceable: boolean;
|
14
|
+
dropable: boolean;
|
15
|
+
containers: string[];
|
16
|
+
containerLabels: string[];
|
17
|
+
settingsSchema: {
|
18
|
+
title: string;
|
19
|
+
controls: any;
|
20
|
+
};
|
21
|
+
pickChild(region: string): void;
|
22
|
+
renderRenderer(props: any): JSX.Element;
|
23
|
+
onChildSettingsGet(type: string, originValue: any): any;
|
24
|
+
acceptChild(type: string, region?: string, regionId?: string): boolean | null;
|
25
|
+
render(): JSX.Element;
|
26
|
+
renderChild(region: string, node: Schema, props: any): JSX.Element;
|
27
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import BasicContainerEditor from '../BasicContainerEditor';
|
3
|
+
import { Schema } from 'amis/lib/types';
|
4
|
+
export declare class DrawerEditor extends BasicContainerEditor {
|
5
|
+
tipName: string;
|
6
|
+
removable: boolean;
|
7
|
+
replaceable: boolean;
|
8
|
+
dropable: boolean;
|
9
|
+
containers: string[];
|
10
|
+
containerLabels: string[];
|
11
|
+
regionDefaultNodes: {
|
12
|
+
actions: {
|
13
|
+
label: string;
|
14
|
+
type: string;
|
15
|
+
}[];
|
16
|
+
};
|
17
|
+
settingsSchema: {
|
18
|
+
title: string;
|
19
|
+
controls: any;
|
20
|
+
};
|
21
|
+
pickChild(region: string): void;
|
22
|
+
renderRenderer(props: any): JSX.Element;
|
23
|
+
acceptChild(type: string, region?: string, rendererId?: string): boolean | null;
|
24
|
+
renderChild(region: string, node: Schema, props: any): JSX.Element;
|
25
|
+
render(): JSX.Element;
|
26
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { RendererProps } from '../types';
|
3
|
+
import BasicContainerEditor from '../BasicContainerEditor';
|
4
|
+
export declare class DropDownButtonEditor extends BasicContainerEditor {
|
5
|
+
containers: string[];
|
6
|
+
settingsSchema: {
|
7
|
+
title: string;
|
8
|
+
controls: any[];
|
9
|
+
};
|
10
|
+
tipName: string;
|
11
|
+
constructor(props: RendererProps, context: any);
|
12
|
+
handleToolbarAction(id: string): void;
|
13
|
+
handleAdd(): void;
|
14
|
+
handleEditDropDown(): void;
|
15
|
+
renderRenderer(props: any): JSX.Element;
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import BasicEditor from '../BasicEditor';
|
2
|
+
import { RendererProps } from '../types';
|
3
|
+
export declare class EachEditor extends BasicEditor {
|
4
|
+
tipName: string;
|
5
|
+
settingsSchema: {
|
6
|
+
title: string;
|
7
|
+
controls: any;
|
8
|
+
};
|
9
|
+
constructor(props: RendererProps, context: any);
|
10
|
+
componentWillReceiveProps(nextProps: RendererProps): void;
|
11
|
+
editorWillUpdate(activeId: string | null, prevId: string | null, mode: string): any;
|
12
|
+
handleToolbarAction(id: string): void;
|
13
|
+
modifyProps(props: RendererProps, context?: any): any;
|
14
|
+
handleAdd(): void;
|
15
|
+
handleEditItem(): void;
|
16
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { FormItemEditor } from './Item';
|
2
|
+
import { RendererProps } from '../../types';
|
3
|
+
export declare class ArrayControlEditor extends FormItemEditor {
|
4
|
+
tipName: string;
|
5
|
+
settingsSchema: {
|
6
|
+
title: string;
|
7
|
+
controls: any[];
|
8
|
+
};
|
9
|
+
constructor(props: RendererProps);
|
10
|
+
handleToolbarAction(id: string): void;
|
11
|
+
handleEditFormItem(): void;
|
12
|
+
}
|