@steedos-widgets/amis-lib 1.0.25 → 1.0.28

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.
@@ -0,0 +1,15 @@
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
+ };
@@ -25,7 +25,11 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
25
25
  inline: boolean;
26
26
  wrapperComponent: string;
27
27
  className: string;
28
- label?: undefined;
28
+ label?: undefined; /**
29
+ * 记录详细界面中相关表顶部头amisSchema
30
+ * @param {*} relatedObjectSchema 相关对象UISchema
31
+ * @returns amisSchema
32
+ */
29
33
  rightIcon?: undefined;
30
34
  size?: undefined;
31
35
  hideCaret?: undefined;
@@ -341,7 +345,11 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
341
345
  inline: boolean;
342
346
  wrapperComponent: string;
343
347
  className: string;
344
- label?: undefined;
348
+ label?: undefined; /**
349
+ * 记录详细界面中相关表顶部头amisSchema
350
+ * @param {*} relatedObjectSchema 相关对象UISchema
351
+ * @returns amisSchema
352
+ */
345
353
  rightIcon?: undefined;
346
354
  size?: undefined;
347
355
  hideCaret?: undefined;
@@ -408,6 +416,7 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
408
416
  };
409
417
  body: {
410
418
  type: string;
419
+ id: string;
411
420
  data: {
412
421
  "&": string;
413
422
  objectName: any;
@@ -68,34 +68,56 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
68
68
  };
69
69
  body: {
70
70
  type: string;
71
- mode: any;
72
- labelAlign: any;
73
- persistData: boolean;
74
- promptPageLeave: boolean;
75
- name: string;
76
- debug: boolean;
77
- title: string;
78
- data: {
79
- formData: string;
80
- };
81
- wrapWithPanel: boolean;
71
+ hiddenOn: string;
82
72
  body: {
83
73
  type: string;
84
- title: any;
85
- collapsable: boolean;
74
+ mode: any;
75
+ labelAlign: any;
76
+ persistData: boolean;
77
+ promptPageLeave: boolean;
78
+ name: string;
79
+ debug: boolean;
80
+ title: string;
81
+ data: {
82
+ formData: string;
83
+ };
84
+ wrapWithPanel: boolean;
86
85
  body: {
87
- type: any;
88
- tpl: string;
89
- multiple: boolean;
90
- extractValue: boolean;
91
- className: any;
92
- quickEdit: boolean;
93
- visibleOn: string;
86
+ type: string;
87
+ title: any;
88
+ collapsable: boolean;
89
+ body: {
90
+ type: any;
91
+ tpl: string;
92
+ multiple: boolean;
93
+ extractValue: boolean;
94
+ className: any;
95
+ quickEdit: boolean;
96
+ visibleOn: string;
97
+ }[];
94
98
  }[];
95
- }[];
99
+ className: string;
100
+ actions: any[];
101
+ onEvent: {
102
+ [x: string]: {
103
+ actions: ({
104
+ actionType: string;
105
+ componentId: string;
106
+ expression: string;
107
+ args?: undefined;
108
+ } | {
109
+ args: {
110
+ url: string;
111
+ blank: boolean;
112
+ };
113
+ actionType: string;
114
+ expression: string;
115
+ componentId?: undefined;
116
+ })[];
117
+ };
118
+ };
119
+ };
96
120
  className: string;
97
- actions: any[];
98
- hiddenOn: string;
99
121
  }[];
100
122
  onEvent: {
101
123
  fetchInited: {
@@ -1,5 +1,6 @@
1
- export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showDisplayAs }?: {
1
+ export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showDisplayAs, hiddenCount }?: {
2
2
  showDisplayAs?: boolean;
3
+ hiddenCount?: boolean;
3
4
  }): (string | {
4
5
  type: string;
5
6
  icon: string;
@@ -21,6 +22,14 @@ export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showD
21
22
  label?: undefined;
22
23
  icon?: undefined;
23
24
  onEvent?: undefined;
25
+ } | {
26
+ type?: undefined;
27
+ className?: undefined;
28
+ tpl?: undefined;
29
+ align?: undefined;
30
+ label?: undefined;
31
+ icon?: undefined;
32
+ onEvent?: undefined;
24
33
  } | {
25
34
  type: string;
26
35
  tpl: string;
@@ -52,14 +61,6 @@ export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showD
52
61
  };
53
62
  };
54
63
  tpl?: undefined;
55
- } | {
56
- type?: undefined;
57
- className?: undefined;
58
- tpl?: undefined;
59
- align?: undefined;
60
- label?: undefined;
61
- icon?: undefined;
62
- onEvent?: undefined;
63
64
  })[];
64
65
  export function getObjectFooterToolbar(mainObject: any, formFactor: any): string[];
65
66
  export function getObjectFilter(objectSchema: any, fields: any, options: any): Promise<{
@@ -64,34 +64,56 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
64
64
  };
65
65
  body: {
66
66
  type: string;
67
- mode: any;
68
- labelAlign: any;
69
- persistData: boolean;
70
- promptPageLeave: boolean;
71
- name: string;
72
- debug: boolean;
73
- title: string;
74
- data: {
75
- formData: string;
76
- };
77
- wrapWithPanel: boolean;
67
+ hiddenOn: string;
78
68
  body: {
79
69
  type: string;
80
- title: any;
81
- collapsable: boolean;
70
+ mode: any;
71
+ labelAlign: any;
72
+ persistData: boolean;
73
+ promptPageLeave: boolean;
74
+ name: string;
75
+ debug: boolean;
76
+ title: string;
77
+ data: {
78
+ formData: string;
79
+ };
80
+ wrapWithPanel: boolean;
82
81
  body: {
83
- type: any;
84
- tpl: string;
85
- multiple: boolean;
86
- extractValue: boolean;
87
- className: any;
88
- quickEdit: boolean;
89
- visibleOn: string;
82
+ type: string;
83
+ title: any;
84
+ collapsable: boolean;
85
+ body: {
86
+ type: any;
87
+ tpl: string;
88
+ multiple: boolean;
89
+ extractValue: boolean;
90
+ className: any;
91
+ quickEdit: boolean;
92
+ visibleOn: string;
93
+ }[];
90
94
  }[];
91
- }[];
95
+ className: string;
96
+ actions: any[];
97
+ onEvent: {
98
+ [x: string]: {
99
+ actions: ({
100
+ actionType: string;
101
+ componentId: string;
102
+ expression: string;
103
+ args?: undefined;
104
+ } | {
105
+ args: {
106
+ url: string;
107
+ blank: boolean;
108
+ };
109
+ actionType: string;
110
+ expression: string;
111
+ componentId?: undefined;
112
+ })[];
113
+ };
114
+ };
115
+ };
92
116
  className: string;
93
- actions: any[];
94
- hiddenOn: string;
95
117
  }[];
96
118
  onEvent: {
97
119
  fetchInited: {
@@ -319,6 +341,7 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any, opti
319
341
  };
320
342
  body: {
321
343
  type: string;
344
+ id: string;
322
345
  data: {
323
346
  "&": string;
324
347
  objectName: any;
@@ -405,14 +428,23 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
405
428
  id: string;
406
429
  onEvent: {
407
430
  recordLoaded: {
408
- actions: {
431
+ actions: ({
409
432
  actionType: string;
410
433
  data: {
411
434
  name: string;
412
435
  record: string;
413
436
  recordLoaded: boolean;
414
437
  };
415
- }[];
438
+ componentId?: undefined;
439
+ } | {
440
+ actionType: string;
441
+ componentId: string;
442
+ data: {
443
+ name: string;
444
+ record: string;
445
+ recordLoaded: boolean;
446
+ };
447
+ })[];
416
448
  };
417
449
  };
418
450
  })[];
@@ -27,27 +27,21 @@ export function getSchema(uiSchema: any): {
27
27
  success: string;
28
28
  failed: string;
29
29
  };
30
- url?: undefined;
31
- blank?: undefined;
30
+ eventName?: undefined;
32
31
  };
33
32
  actionType: string;
34
- componentId?: undefined;
35
- expression?: undefined;
33
+ data?: undefined;
36
34
  } | {
37
- componentId: string;
35
+ actionType: string;
38
36
  args: {
39
- url: string;
40
- blank: boolean;
37
+ eventName: string;
41
38
  api?: undefined;
42
39
  messages?: undefined;
43
40
  };
44
- actionType: string;
45
- expression: string;
46
- } | {
47
- componentId: string;
48
- actionType: string;
49
- expression: string;
50
- args?: undefined;
41
+ data: {
42
+ objectName: string;
43
+ __deletedRecord: boolean;
44
+ };
51
45
  })[];
52
46
  };
53
47
  };
@@ -7,6 +7,7 @@ export function getSchema(uiSchema: any, ctx: any): Promise<{
7
7
  level: string;
8
8
  onEvent: {
9
9
  click: {
10
+ weight: number;
10
11
  actions: {
11
12
  actionType: string;
12
13
  dialog: {
@@ -20,26 +21,32 @@ export function getSchema(uiSchema: any, ctx: any): Promise<{
20
21
  global: string;
21
22
  listViewId: string;
22
23
  uiSchema: string;
24
+ isLookup: string;
25
+ listName: string;
23
26
  };
24
27
  title: string;
25
- bodyClassName: string;
26
28
  body: {
27
29
  type: string;
28
- label: string;
29
- objectApiName: string;
30
- recordId: string;
31
30
  id: string;
32
- mode: string;
33
- layout: string;
31
+ messages: {};
32
+ schemaApi: {
33
+ data: {
34
+ isLookup: string;
35
+ };
36
+ url: string;
37
+ method: string;
38
+ messages: {};
39
+ requestAdaptor: string;
40
+ adaptor: string;
41
+ };
34
42
  }[];
43
+ showCloseButton: boolean;
35
44
  id: string;
36
45
  closeOnEsc: boolean;
37
46
  closeOnOutside: boolean;
38
- showCloseButton: boolean;
39
47
  size: string;
40
48
  };
41
49
  }[];
42
- weight: number;
43
50
  };
44
51
  };
45
52
  }[];
@@ -10,6 +10,7 @@ export namespace StandardButtons {
10
10
  level: string;
11
11
  onEvent: {
12
12
  click: {
13
+ weight: number;
13
14
  actions: {
14
15
  actionType: string;
15
16
  dialog: {
@@ -23,26 +24,32 @@ export namespace StandardButtons {
23
24
  global: string;
24
25
  listViewId: string;
25
26
  uiSchema: string;
27
+ isLookup: string;
28
+ listName: string;
26
29
  };
27
30
  title: string;
28
- bodyClassName: string;
29
31
  body: {
30
32
  type: string;
31
- label: string;
32
- objectApiName: string;
33
- recordId: string;
34
33
  id: string;
35
- mode: string;
36
- layout: string;
34
+ messages: {};
35
+ schemaApi: {
36
+ data: {
37
+ isLookup: string;
38
+ };
39
+ url: string;
40
+ method: string;
41
+ messages: {};
42
+ requestAdaptor: string;
43
+ adaptor: string;
44
+ };
37
45
  }[];
46
+ showCloseButton: boolean;
38
47
  id: string;
39
48
  closeOnEsc: boolean;
40
49
  closeOnOutside: boolean;
41
- showCloseButton: boolean;
42
50
  size: string;
43
51
  };
44
52
  }[];
45
- weight: number;
46
53
  };
47
54
  };
48
55
  }[];
@@ -122,27 +129,21 @@ export namespace StandardButtons {
122
129
  success: string;
123
130
  failed: string;
124
131
  };
125
- url?: undefined;
126
- blank?: undefined;
132
+ eventName?: undefined;
127
133
  };
128
134
  actionType: string;
129
- componentId?: undefined;
130
- expression?: undefined;
135
+ data?: undefined;
131
136
  } | {
132
- componentId: string;
137
+ actionType: string;
133
138
  args: {
134
- url: string;
135
- blank: boolean;
139
+ eventName: string;
136
140
  api?: undefined;
137
141
  messages?: undefined;
138
142
  };
139
- actionType: string;
140
- expression: string;
141
- } | {
142
- componentId: string;
143
- actionType: string;
144
- expression: string;
145
- args?: undefined;
143
+ data: {
144
+ objectName: string;
145
+ __deletedRecord: boolean;
146
+ };
146
147
  })[];
147
148
  };
148
149
  };
@@ -0,0 +1,14 @@
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;
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.25",
4
+ "version": "1.0.28",
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": "20e116d9c98768d247c19c99396636bbdde3b5a4"
61
+ "gitHead": "6d36f71035c0352b742b460254d38cceee1ddfdb"
62
62
  }