amis-editor-core 5.4.1 → 5.6.0-beta.0

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/lib/tpl.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { SchemaObject } from 'amis';
3
- export declare function getSchemaTpl(name: string, patch?: object, rendererSchema?: any): any;
3
+ export declare function getSchemaTpl(name: string, patch?: object, options?: object): any;
4
4
  export declare function setSchemaTpl(name: string, value: any): void;
5
5
  export declare function valuePipeOut(value: any): any;
6
6
  export declare function undefinedPipeOut(value: any): any;
package/lib/util.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Diff } from 'deep-diff';
2
1
  import type { Schema } from 'amis';
2
+ import { Diff } from 'deep-diff';
3
3
  declare const guid: any, omitControls: any, isObjectShallowModified: any, cloneObject: any, anyChanged: any, noop: any, makeHorizontalDeeper: any, isEmpty: any, eachTree: any, createObject: any;
4
4
  export { guid, isObjectShallowModified, anyChanged, noop, makeHorizontalDeeper, omitControls, isEmpty, cloneObject, eachTree, createObject };
5
5
  export declare let themeConfig: any;
@@ -54,7 +54,7 @@ export declare function filterSchemaForConfig(schema: any, valueWithConfig?: any
54
54
  */
55
55
  export declare function filterSchemaForEditor(schema: any): any;
56
56
  export declare function blackList(list: Array<string>): (str: string) => boolean;
57
- export declare function sortByList(list: Array<string>, attr: string | Function): (a: any, b: any) => 0 | 1 | -1;
57
+ export declare function sortByList(list: Array<string>, attr: string | Function): (a: any, b: any) => 1 | -1 | 0;
58
58
  export declare function persistGet(key: string, defaultValue?: any): any;
59
59
  export declare function persistSet(key: string, value: any): void;
60
60
  export declare function normalizeId(id: string): string;
@@ -121,3 +121,21 @@ export declare function needFillPlaceholder(curProps: any): boolean;
121
121
  export declare function setThemeConfig(config: any): void;
122
122
  export declare function setThemeDefaultData(data: any): any;
123
123
  export declare function deleteThemeConfigData(data: any): any;
124
+ /**
125
+ * 从amis数据域中取变量数据
126
+ * @param node
127
+ * @param manager
128
+ * @returns
129
+ */
130
+ export declare function resolveVariablesFromScope(node: any, manager: any): Promise<any[]>;
131
+ /**
132
+ * 整合 props & amis数据域 中的 variables
133
+ * @param that 为组件的实例 this
134
+ **/
135
+ export declare function getVariables(that: any): Promise<any>;
136
+ /**
137
+ * 更新组件上下文中label为带层级说明
138
+ * @param variables 变量列表
139
+ * @returns
140
+ */
141
+ export declare const updateComponentContext: (variables: any[]) => any[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amis-editor-core",
3
- "version": "5.4.1",
3
+ "version": "5.6.0-beta.0",
4
4
  "description": "amis 可视化编辑器",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
@@ -28,6 +28,7 @@
28
28
  "scripts": {
29
29
  "test": "echo \"Warnings: no test specified\"",
30
30
  "build": "npm run clean-dist && NODE_ENV=production rollup -c",
31
+ "build-esm": "npm run clean-dist && NODE_ENV=production rollup -c rollup.esm.config.js",
31
32
  "clean-dist": "rimraf lib/* esm/*",
32
33
  "i18n:update": "npx i18n update --config=./i18nConfig.js",
33
34
  "i18n:translate": "npx i18n translate --config=./i18nConfig.js --l=en-US",
@@ -53,6 +54,7 @@
53
54
  "mobx": "^4.5.0",
54
55
  "mobx-react": "^6.3.1",
55
56
  "mobx-state-tree": "^3.17.3",
57
+ "react-frame-component": "^5.2.6",
56
58
  "react-json-view": "^1.21.3",
57
59
  "sortablejs": "^1.14.0"
58
60
  },
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { EditorManager } from '../manager';
3
- import { EditorStoreType } from '../store/editor';
4
- export interface IFrameBridgeProps {
5
- className?: string;
6
- url: string;
7
- editable?: boolean;
8
- isMobile?: boolean;
9
- store: EditorStoreType;
10
- manager: EditorManager;
11
- theme?: string;
12
- data?: any;
13
- env?: any;
14
- autoFocus?: boolean;
15
- }
16
- export interface BridgeApi {
17
- update: (props: any) => void;
18
- }
19
- export default class IFrameBridge extends React.PureComponent<IFrameBridgeProps> {
20
- bridgeFnName: string;
21
- bridge?: BridgeApi;
22
- schema: any;
23
- constructor(props: IFrameBridgeProps);
24
- componentDidUpdate(): void;
25
- componentWillUnmount(): void;
26
- iframeRef(iframe: any): void;
27
- update(props?: Readonly<IFrameBridgeProps>): void;
28
- render(): React.JSX.Element;
29
- }
30
- export declare function mountInIframe(dom: HTMLElement, reactDom: any, envCreator?: any): void;
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import { EditorManager } from '../manager';
3
- import { EditorStoreType } from '../store/editor';
4
- export interface IFrameBridgeProps {
5
- className?: string;
6
- url: string;
7
- editable?: boolean;
8
- isMobile?: boolean;
9
- store: EditorStoreType;
10
- manager: EditorManager;
11
- theme?: string;
12
- data?: any;
13
- env?: any;
14
- autoFocus?: boolean;
15
- }
16
- export interface BridgeApi {
17
- update: (props: any) => void;
18
- }
19
- export default class IFrameBridge extends React.PureComponent<IFrameBridgeProps> {
20
- bridgeFnName: string;
21
- bridge?: BridgeApi;
22
- schema: any;
23
- constructor(props: IFrameBridgeProps);
24
- componentDidUpdate(): void;
25
- componentWillUnmount(): void;
26
- iframeRef(iframe: any): void;
27
- update(props?: Readonly<IFrameBridgeProps>): void;
28
- render(): React.JSX.Element;
29
- }
30
- export declare function mountInIframe(dom: HTMLElement, reactDom: any, envCreator?: any): void;