amis-editor 4.0.1-beta.10 → 4.0.1-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cebfe0bc5a1dbde02da1.svg +10 -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 +21 -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/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/WidthDraggableBtn.d.ts +16 -0
- package/dist/component/base/WidthDraggableContainer.d.ts +2 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.min.js +1 -1
- package/dist/plugin/Form/CodeEditor.d.ts +39 -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.d.ts +3 -3
- package/dist/store/editor.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/util.d.ts +1 -1
- package/package.json +3 -2
- 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,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="6px" height="8px" viewBox="0 0 6 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<g id="折叠icon" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
4
|
+
<g id="折叠icon svg" transform="translate(-305.000000, -566.000000)" fill="#A1A6B3" fill-rule="nonzero">
|
5
|
+
<g id="折叠icon svg g" transform="translate(60.000000, 60.000000)">
|
6
|
+
<path d="M245.77735,506.518233 L250.375962,509.583975 C250.605727,509.737151 250.667814,510.047586 250.514637,510.27735 C250.47802,510.332276 250.430888,510.379408 250.375962,510.416025 L245.77735,513.481767 C245.547586,513.634943 245.237151,513.572856 245.083975,513.343092 C245.029219,513.260958 245,513.164454 245,513.065741 L245,506.934259 C245,506.658116 245.223858,506.434259 245.5,506.434259 C245.598712,506.434259 245.695216,506.463478 245.77735,506.518233 Z" id="矩形" transform="translate(248.000000, 510.000000) scale(-1, 1) translate(-248.000000, -510.000000) "></path>
|
7
|
+
</g>
|
8
|
+
</g>
|
9
|
+
</g>
|
10
|
+
</svg>
|
@@ -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,21 @@
|
|
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
|
+
isOpenStatus: boolean;
|
11
|
+
isFixedStatus: boolean;
|
12
|
+
}
|
13
|
+
export declare class LeftPanels extends React.Component<LeftPanelsProps, LeftPanelsStates> {
|
14
|
+
constructor(props: any);
|
15
|
+
handleHidden(): void;
|
16
|
+
handleFixed(): void;
|
17
|
+
handleSelect(key: string): void;
|
18
|
+
getPopOverContainer(): HTMLElement;
|
19
|
+
render(): JSX.Element;
|
20
|
+
}
|
21
|
+
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
|
+
}
|
@@ -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,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 {};
|
package/dist/index.d.ts
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
*/
|
4
4
|
import Editor from './component/Editor';
|
5
5
|
import './component/ClassNameControl';
|
6
|
-
import './plugin/AvailableRenderers';
|
7
|
-
import './plugin/Code';
|
8
|
-
import './plugin/Name';
|
6
|
+
import './plugin/Panel/AvailableRenderers';
|
7
|
+
import './plugin/Panel/Code';
|
8
|
+
import './plugin/Panel/Name';
|
9
9
|
import './plugin/ErrorRenderer';
|
10
10
|
import './plugin/BasicToolbar';
|
11
11
|
import './plugin/Unknown';
|
@@ -25,7 +25,7 @@ import './plugin/Form/InputDateRange';
|
|
25
25
|
import './plugin/Form/InputDateTime';
|
26
26
|
import './plugin/Form/InputDateTimeRange';
|
27
27
|
import './plugin/Form/DiffEditor';
|
28
|
-
import './plugin/Form/
|
28
|
+
import './plugin/Form/CodeEditor';
|
29
29
|
import './plugin/Form/InputEmail';
|
30
30
|
import './plugin/Form/FieldSet';
|
31
31
|
import './plugin/Form/InputFile';
|
@@ -140,10 +140,10 @@ import { registerEditorPlugin, unRegisterEditorPlugin } from './manager';
|
|
140
140
|
import { BasePlugin } from './plugin';
|
141
141
|
import { BasicEditor, RendererEditor } from './compat';
|
142
142
|
import MiniEditor from './component/MiniEditor';
|
143
|
-
import CodeEditor from './component/
|
143
|
+
import CodeEditor from './component/Panel/AMisCodeEditor';
|
144
144
|
import IFramePreview from './component/IFramePreview';
|
145
145
|
import { mountInIframe } from './component/IFrameBridge';
|
146
|
-
import { AvailableRenderersPlugin } from './plugin/AvailableRenderers';
|
146
|
+
import { AvailableRenderersPlugin } from './plugin/Panel/AvailableRenderers';
|
147
147
|
import { BasicToolbarPlugin } from './plugin/BasicToolbar';
|
148
148
|
import { VRenderer } from './component/VRenderer';
|
149
149
|
import { RegionWrapper } from './component/RegionWrapper';
|