amis-editor 4.1.0-beta.2 → 4.1.0-beta.4

Sign up to get free protection for your applications and to get access to all the features.
package/dist/manager.d.ts CHANGED
@@ -255,10 +255,11 @@ export declare class EditorManager {
255
255
  */
256
256
  trigger<T extends EventContext>(type: string, context: T): PluginEvent<T>;
257
257
  /**
258
- * 组件面板中的组件点选添加
259
- * @param rendererId
258
+ * 在当前选中元素插入或追加新的元素
259
+ * @param rendererIdOrSchema
260
+ * 备注:可以根据渲染器ID添加新元素,也可以根据现有schema片段添加新元素
260
261
  */
261
- addElem(rendererId: string): Promise<void>;
262
+ addElem(rendererIdOrSchema: string | Object): Promise<void>;
262
263
  /**
263
264
  * 给插入面板使用的,将当前选中的节点插入到当前选中的节点容器内。
264
265
  * @param position
package/dist/util.d.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  */
4
4
  import { utils } from 'amis';
5
5
  import { Diff } from 'deep-diff';
6
- declare const guid: typeof utils.guid, omitControls: typeof utils.omitControls, isObjectShallowModified: typeof utils.isObjectShallowModified, isObject: typeof utils.isObject, anyChanged: typeof utils.anyChanged, noop: typeof utils.noop, makeHorizontalDeeper: typeof utils.makeHorizontalDeeper, isEmpty: typeof utils.isEmpty;
7
- export { guid, isObjectShallowModified, isObject, anyChanged, noop, makeHorizontalDeeper, omitControls, isEmpty };
6
+ declare const guid: typeof utils.guid, omitControls: typeof utils.omitControls, isObjectShallowModified: typeof utils.isObjectShallowModified, anyChanged: typeof utils.anyChanged, noop: typeof utils.noop, makeHorizontalDeeper: typeof utils.makeHorizontalDeeper, isEmpty: typeof utils.isEmpty;
7
+ export { guid, isObjectShallowModified, anyChanged, noop, makeHorizontalDeeper, omitControls, isEmpty };
8
8
  export declare function __uri(id: string): string;
9
9
  export declare function cleanUndefined(obj: any): any;
10
10
  /**
@@ -65,3 +65,8 @@ export declare function patchDiff(left: any, changes: Array<DiffChange> | undefi
65
65
  * @param mapper
66
66
  */
67
67
  export declare function JSONTraverse(json: any, mapper: (value: any, key: string | number, host: Object) => any): void;
68
+ export declare function isString(obj: any): boolean;
69
+ /**
70
+ * 判断是否是对象类型
71
+ * */
72
+ export declare function isObject(curObj: any): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amis-editor",
3
- "version": "4.1.0-beta.2",
3
+ "version": "4.1.0-beta.4",
4
4
  "description": "amis 可视化编辑器",
5
5
  "main": "dist/index.min.js",
6
6
  "types": "dist/index.d.ts",
@@ -56,7 +56,7 @@
56
56
  "@types/react-router": "^4.0.16",
57
57
  "@types/sortablejs": "^1.10.7",
58
58
  "ajv": "^8.8.2",
59
- "amis": "^1.8.0-beta.0",
59
+ "amis": "^1.8.0-beta.9",
60
60
  "axios": "0.21.1",
61
61
  "concurrently": "^6.2.0",
62
62
  "css-loader": "^6.2.0",