@steedos-widgets/amis-lib 1.0.29 → 1.0.32

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.
@@ -6,7 +6,7 @@ export function getBaseFields(readonly: any): {
6
6
  className: string;
7
7
  tpl: string;
8
8
  }[];
9
- export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "picker" | "table" | "email" | "html" | "markdown" | "textarea" | "checkbox";
9
+ export function getAmisFieldType(sField: any): "url" | "password" | "select" | "date" | "datetime" | "number" | "image" | "text" | "picker" | "table" | "markdown" | "html" | "email" | "textarea" | "checkbox";
10
10
  export function getObjectFieldSubFields(mainField: any, fields: any): any;
11
11
  export function getGridFieldSubFields(mainField: any, fields: any): any;
12
12
  /**
@@ -1,4 +1,4 @@
1
- export function getSections(permissionFields: any, mergedSchema: any, ctx: any): Promise<{
1
+ export function getSections(permissionFields: any, formFields: any, ctx: any): Promise<{
2
2
  type: string;
3
3
  title: any;
4
4
  collapsable: boolean;
@@ -39,7 +39,7 @@ export function getTableSchema(fields: any, options: any): Promise<{
39
39
  *
40
40
  * @param {*} mainObject
41
41
  * @param {*} fields
42
- * @param {*} options = {globalFilter: 相关字表过滤条件, filter: listview 过滤条件, ...}
42
+ * @param {*} options = {filter: listview 过滤条件, ...}
43
43
  * @returns
44
44
  */
45
45
  export function getTableApi(mainObject: any, fields: any, options: any): Promise<{
@@ -1,4 +1,4 @@
1
- export function getFormBody(permissionFields: any, objectConfig: any, ctx: any): Promise<{
1
+ export function getFormBody(permissionFields: any, formFields: any, ctx: any): Promise<{
2
2
  type: string;
3
3
  title: any;
4
4
  collapsable: boolean;
@@ -203,6 +203,11 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
203
203
  id: string;
204
204
  source: {
205
205
  method: string;
206
+ /**
207
+ * 记录详细界面中相关表顶部头amisSchema
208
+ * @param {*} relatedObjectSchema 相关对象UISchema
209
+ * @returns amisSchema
210
+ */
206
211
  url: string;
207
212
  dataType: string;
208
213
  headers: {
@@ -4,7 +4,6 @@ export function getObjectCRUD(objectSchema: any, fields: any, options: any): Pro
4
4
  id: string;
5
5
  name: string;
6
6
  data: {
7
- $master: string;
8
7
  objectName: any;
9
8
  _id: any;
10
9
  recordPermissions: any;
@@ -19,33 +19,75 @@ export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showD
19
19
  className: string;
20
20
  tpl?: undefined;
21
21
  align?: undefined;
22
+ tooltipPlacement?: undefined;
22
23
  label?: undefined;
23
24
  icon?: undefined;
25
+ visibleOn?: undefined;
26
+ tooltip?: undefined;
24
27
  onEvent?: undefined;
25
28
  } | {
26
29
  type?: undefined;
27
30
  className?: undefined;
28
31
  tpl?: undefined;
29
32
  align?: undefined;
33
+ tooltipPlacement?: undefined;
30
34
  label?: undefined;
31
35
  icon?: undefined;
36
+ visibleOn?: undefined;
37
+ tooltip?: undefined;
32
38
  onEvent?: undefined;
33
39
  } | {
34
40
  type: string;
35
41
  tpl: string;
36
42
  className?: undefined;
37
43
  align?: undefined;
44
+ tooltipPlacement?: undefined;
38
45
  label?: undefined;
39
46
  icon?: undefined;
47
+ visibleOn?: undefined;
48
+ tooltip?: undefined;
40
49
  onEvent?: undefined;
41
50
  } | {
42
51
  type: string;
43
52
  align: string;
53
+ tooltipPlacement: string;
44
54
  className: string;
45
55
  tpl?: undefined;
46
56
  label?: undefined;
47
57
  icon?: undefined;
58
+ visibleOn?: undefined;
59
+ tooltip?: undefined;
48
60
  onEvent?: undefined;
61
+ } | {
62
+ type: string;
63
+ label: string;
64
+ icon: string;
65
+ align: string;
66
+ className: string;
67
+ tooltipPlacement: string;
68
+ visibleOn: string;
69
+ tooltip: string;
70
+ onEvent: {
71
+ click: {
72
+ weight: number;
73
+ actions: {
74
+ args: {
75
+ api: {
76
+ url: string;
77
+ method: string;
78
+ messages: {};
79
+ requestAdaptor: string;
80
+ data: {
81
+ uiSchema: string;
82
+ listName: string;
83
+ };
84
+ };
85
+ };
86
+ actionType: string;
87
+ }[];
88
+ };
89
+ };
90
+ tpl?: undefined;
49
91
  } | {
50
92
  label: string;
51
93
  icon: string;
@@ -58,9 +100,13 @@ export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showD
58
100
  actionType: string;
59
101
  script: string;
60
102
  }[];
103
+ weight?: undefined;
61
104
  };
62
105
  };
63
106
  tpl?: undefined;
107
+ tooltipPlacement?: undefined;
108
+ visibleOn?: undefined;
109
+ tooltip?: undefined;
64
110
  })[];
65
111
  export function getObjectFooterToolbar(mainObject: any, formFactor: any): string[];
66
112
  export function getObjectFilter(objectSchema: any, fields: any, options: any): Promise<{
@@ -175,7 +175,6 @@ export function getTableSchema(appName: any, objectName: any, columns: any, ctx?
175
175
  id: string;
176
176
  name: string;
177
177
  data: {
178
- $master: string;
179
178
  objectName: any;
180
179
  _id: any;
181
180
  recordPermissions: any;
@@ -440,6 +439,10 @@ export function getRecordDetailSchema(objectName: any, appId: any, props?: {}):
440
439
  };
441
440
  };
442
441
  })[];
442
+ data: {
443
+ "_master.objectName": string;
444
+ "_master.recordId": string;
445
+ };
443
446
  onEvent: any;
444
447
  };
445
448
  }>;
@@ -489,15 +492,4 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
489
492
  record: any;
490
493
  masterObjectUISchema: any;
491
494
  }>;
492
- export function getSearchableFieldsFilterSchema(objectSchema: any, fields: any, ctx: any): Promise<any[] | {
493
- title: string;
494
- type: string;
495
- name: string;
496
- id: string;
497
- mode: string;
498
- wrapWithPanel: boolean;
499
- className: string;
500
- data: any;
501
- body: any[];
502
- }>;
503
495
  export function setUISchemaFunction(fun: any): void;
@@ -45,6 +45,7 @@ export function getRecordDetailRelatedListSchema(objectName: any, recordId: any,
45
45
  relatedKey: any;
46
46
  objectName: any;
47
47
  listViewId: string;
48
+ _isRelated: boolean;
48
49
  };
49
50
  body: {
50
51
  data: {
@@ -36,6 +36,9 @@ export function getSchema(uiSchema: any, ctx: any): Promise<{
36
36
  url: string;
37
37
  method: string;
38
38
  messages: {};
39
+ headers: {
40
+ Authorization: string;
41
+ };
39
42
  requestAdaptor: string;
40
43
  adaptor: string;
41
44
  };
@@ -39,6 +39,9 @@ export namespace StandardButtons {
39
39
  url: string;
40
40
  method: string;
41
41
  messages: {};
42
+ headers: {
43
+ Authorization: string;
44
+ };
42
45
  requestAdaptor: string;
43
46
  adaptor: string;
44
47
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@steedos-widgets/amis-lib",
3
3
  "private": false,
4
- "version": "1.0.29",
4
+ "version": "1.0.32",
5
5
  "unpkg": "./dist/index.umd.js",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",
@@ -58,5 +58,5 @@
58
58
  "dependencies": {
59
59
  "lodash": "^4.17.21"
60
60
  },
61
- "gitHead": "dc0d23189fc89b7a957b98bb44946a51974929b9"
61
+ "gitHead": "d921dd757818d8b4e8871a7f748ed0d471d001a3"
62
62
  }
package/dist/index.d.ts DELETED
@@ -1,24 +0,0 @@
1
- export * from './lib/amis';
2
- export * from './lib/objects';
3
- export * from './lib/objectsRelated';
4
- export * from './lib/page_init';
5
- export * from './lib/apps';
6
- export * from './lib/buttons';
7
- export * from './lib/defaultsDeep';
8
- export * from './lib/expression';
9
- export * from './lib/notification';
10
- export * from './lib/page';
11
- export * from './lib/public.env';
12
- export * from './lib/record';
13
- export * from './lib/space_users';
14
- export * from './lib/steedos.client.js';
15
- export * as Field from './lib/converter/amis/fields/index';
16
- export * from './lib/converter/amis/fields/lookup';
17
- export * from './lib/converter/amis/fields/user';
18
- export * from './lib/converter/amis/filters';
19
- export * from './lib/converter/amis/header';
20
- export * from './lib/converter/amis/fields_filter';
21
- export * from './lib/workflow/flow';
22
- export * from './lib/assets';
23
- export * from './utils/object';
24
- export * from './render';
package/dist/render.d.ts DELETED
@@ -1,15 +0,0 @@
1
- export declare const getDefaultRenderData: () => {
2
- context: {
3
- rootUrl: any;
4
- userId: any;
5
- tenantId: any;
6
- authToken: any;
7
- user: {};
8
- };
9
- global: {
10
- userId: any;
11
- spaceId: any;
12
- user: {};
13
- now: Date;
14
- };
15
- };
@@ -1,14 +0,0 @@
1
- export declare function createObject(superProps?: {
2
- [propName: string]: any;
3
- }, props?: {
4
- [propName: string]: any;
5
- }, properties?: any): object;
6
- export declare function cloneObject(target: any, persistOwnProps?: boolean): any;
7
- export declare function extendObject(target: any, src?: any, persistOwnProps?: boolean): any;
8
- export declare function isObject(obj: any): boolean;
9
- export declare function setVariable(data: {
10
- [propName: string]: any;
11
- }, key: string, value: any, convertKeyToPath?: boolean): void;
12
- export declare function deleteVariable(data: {
13
- [propName: string]: any;
14
- }, key: string): void;