@steedos-widgets/amis-lib 1.0.28 → 1.0.30

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" | "textarea" | "picker" | "table" | "email" | "html" | "markdown" | "checkbox";
9
+ export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "picker" | "table" | "email" | "html" | "markdown" | "textarea" | "checkbox";
10
10
  export function getObjectFieldSubFields(mainField: any, fields: any): any;
11
11
  export function getGridFieldSubFields(mainField: any, fields: any): any;
12
12
  /**
@@ -16,23 +16,7 @@ export function getGridFieldSubFields(mainField: any, fields: any): any;
16
16
  */
17
17
  export function getPermissionFields(object: any, userSession: any): any[];
18
18
  export function getSelectFieldOptions(field: any): any[];
19
- export function convertSFieldToAmisField(field: any, readonly: any, ctx: any): Promise<{
20
- type: any;
21
- tpl: string;
22
- multiple: boolean;
23
- extractValue: boolean;
24
- className: any;
25
- quickEdit: boolean;
26
- visibleOn: string;
27
- }>;
28
- export function getFieldSearchable(perField: any, permissionFields: any, ctx: any): Promise<{
29
- type: any;
30
- tpl: string;
31
- multiple: boolean;
32
- extractValue: boolean;
33
- className: any;
34
- quickEdit: boolean;
35
- visibleOn: string;
36
- }>;
19
+ export function convertSFieldToAmisField(field: any, readonly: any, ctx: any): Promise<any>;
20
+ export function getFieldSearchable(perField: any, permissionFields: any, ctx: any): Promise<any>;
37
21
  export const OMIT_FIELDS: string[];
38
22
  export { getAmisStaticFieldType } from "./type";
@@ -1,14 +1,6 @@
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;
5
- body: {
6
- type: any;
7
- tpl: string;
8
- multiple: boolean;
9
- extractValue: boolean;
10
- className: any;
11
- quickEdit: boolean;
12
- visibleOn: string;
13
- }[];
5
+ body: any[];
14
6
  }[]>;
@@ -14,15 +14,7 @@ export function getObjectFieldsFilterButtonSchema(objectSchema: any): Promise<{
14
14
  };
15
15
  };
16
16
  }>;
17
- export function getObjectFieldsFilterFormSchema(objectSchema: any, fields: any, ctx: any): Promise<{
18
- type: any;
19
- tpl: string;
20
- multiple: boolean;
21
- extractValue: boolean;
22
- className: any;
23
- quickEdit: boolean;
24
- visibleOn: string;
25
- }[] | {
17
+ export function getObjectFieldsFilterFormSchema(objectSchema: any, fields: any, ctx: any): Promise<any[] | {
26
18
  title: string;
27
19
  type: string;
28
20
  name: string;
@@ -47,15 +39,7 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
47
39
  type: string;
48
40
  body: ({
49
41
  type: string;
50
- body: ({
51
- type: any;
52
- tpl: string;
53
- multiple: boolean;
54
- extractValue: boolean;
55
- className: any;
56
- quickEdit: boolean;
57
- visibleOn: string;
58
- }[] | {
42
+ body: (any[] | {
59
43
  title: string;
60
44
  type: string;
61
45
  name: string;
@@ -1,14 +1,6 @@
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;
5
- body: {
6
- type: any;
7
- tpl: string;
8
- multiple: boolean;
9
- extractValue: boolean;
10
- className: any;
11
- quickEdit: boolean;
12
- visibleOn: string;
13
- }[];
5
+ body: any[];
14
6
  }[]>;
@@ -149,15 +149,7 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
149
149
  type: string;
150
150
  body: ({
151
151
  type: string;
152
- body: ({
153
- type: any;
154
- tpl: string;
155
- multiple: boolean;
156
- extractValue: boolean;
157
- className: any;
158
- quickEdit: boolean;
159
- visibleOn: string;
160
- }[] | {
152
+ body: (any[] | {
161
153
  title: string;
162
154
  type: string;
163
155
  name: string;
@@ -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;
@@ -69,6 +68,7 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
69
68
  body: {
70
69
  type: string;
71
70
  hiddenOn: string;
71
+ className: string;
72
72
  body: {
73
73
  type: string;
74
74
  mode: any;
@@ -86,15 +86,7 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
86
86
  type: string;
87
87
  title: any;
88
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
- }[];
89
+ body: any[];
98
90
  }[];
99
91
  className: string;
100
92
  actions: any[];
@@ -117,7 +109,6 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
117
109
  };
118
110
  };
119
111
  };
120
- className: string;
121
112
  }[];
122
113
  onEvent: {
123
114
  fetchInited: {
@@ -20,32 +20,64 @@ export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showD
20
20
  tpl?: undefined;
21
21
  align?: undefined;
22
22
  label?: undefined;
23
- icon?: undefined;
23
+ tooltipPlacement?: undefined;
24
+ tooltip?: undefined;
24
25
  onEvent?: undefined;
26
+ icon?: undefined;
25
27
  } | {
26
28
  type?: undefined;
27
29
  className?: undefined;
28
30
  tpl?: undefined;
29
31
  align?: undefined;
30
32
  label?: undefined;
31
- icon?: undefined;
33
+ tooltipPlacement?: undefined;
34
+ tooltip?: undefined;
32
35
  onEvent?: undefined;
36
+ icon?: undefined;
33
37
  } | {
34
38
  type: string;
35
39
  tpl: string;
36
40
  className?: undefined;
37
41
  align?: undefined;
38
42
  label?: undefined;
39
- icon?: undefined;
43
+ tooltipPlacement?: undefined;
44
+ tooltip?: undefined;
40
45
  onEvent?: undefined;
46
+ icon?: undefined;
41
47
  } | {
42
48
  type: string;
43
49
  align: string;
44
50
  className: string;
45
51
  tpl?: undefined;
46
52
  label?: undefined;
47
- icon?: undefined;
53
+ tooltipPlacement?: undefined;
54
+ tooltip?: undefined;
48
55
  onEvent?: undefined;
56
+ icon?: undefined;
57
+ } | {
58
+ type: string;
59
+ label: string;
60
+ align: string;
61
+ className: string;
62
+ tooltipPlacement: string;
63
+ tooltip: string;
64
+ onEvent: {
65
+ click: {
66
+ actions: {
67
+ args: {
68
+ api: {
69
+ url: string;
70
+ method: string;
71
+ responseType: string;
72
+ requestAdaptor: string;
73
+ };
74
+ };
75
+ actionType: string;
76
+ };
77
+ };
78
+ };
79
+ tpl?: undefined;
80
+ icon?: undefined;
49
81
  } | {
50
82
  label: string;
51
83
  icon: string;
@@ -61,6 +93,8 @@ export function getObjectHeaderToolbar(mainObject: any, formFactor: any, { showD
61
93
  };
62
94
  };
63
95
  tpl?: undefined;
96
+ tooltipPlacement?: undefined;
97
+ tooltip?: undefined;
64
98
  })[];
65
99
  export function getObjectFooterToolbar(mainObject: any, formFactor: any): string[];
66
100
  export function getObjectFilter(objectSchema: any, fields: any, options: any): Promise<{
@@ -83,15 +117,7 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
83
117
  type: string;
84
118
  body: ({
85
119
  type: string;
86
- body: ({
87
- type: any;
88
- tpl: string;
89
- multiple: boolean;
90
- extractValue: boolean;
91
- className: any;
92
- quickEdit: boolean;
93
- visibleOn: string;
94
- }[] | {
120
+ body: (any[] | {
95
121
  title: string;
96
122
  type: string;
97
123
  name: string;
@@ -65,6 +65,7 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
65
65
  body: {
66
66
  type: string;
67
67
  hiddenOn: string;
68
+ className: string;
68
69
  body: {
69
70
  type: string;
70
71
  mode: any;
@@ -82,15 +83,7 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
82
83
  type: string;
83
84
  title: any;
84
85
  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
- }[];
86
+ body: any[];
94
87
  }[];
95
88
  className: string;
96
89
  actions: any[];
@@ -113,7 +106,6 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
113
106
  };
114
107
  };
115
108
  };
116
- className: string;
117
109
  }[];
118
110
  onEvent: {
119
111
  fetchInited: {
@@ -183,7 +175,6 @@ export function getTableSchema(appName: any, objectName: any, columns: any, ctx?
183
175
  id: string;
184
176
  name: string;
185
177
  data: {
186
- $master: string;
187
178
  objectName: any;
188
179
  _id: any;
189
180
  recordPermissions: any;
@@ -399,7 +390,7 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any, opti
399
390
  className: string;
400
391
  };
401
392
  }>;
402
- export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
393
+ export function getRecordDetailSchema(objectName: any, appId: any, props?: {}): Promise<{
403
394
  uiSchema: any;
404
395
  amisSchema: {
405
396
  type: string;
@@ -448,6 +439,11 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
448
439
  };
449
440
  };
450
441
  })[];
442
+ data: {
443
+ "_master.objectName": string;
444
+ "_master.recordId": string;
445
+ };
446
+ onEvent: any;
451
447
  };
452
448
  }>;
453
449
  export function getObjectRelated({ appName, masterObjectName, objectName, relatedFieldName, recordId, formFactor }: {
@@ -496,15 +492,7 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
496
492
  record: any;
497
493
  masterObjectUISchema: any;
498
494
  }>;
499
- export function getSearchableFieldsFilterSchema(objectSchema: any, fields: any, ctx: any): Promise<{
500
- type: any;
501
- tpl: string;
502
- multiple: boolean;
503
- extractValue: boolean;
504
- className: any;
505
- quickEdit: boolean;
506
- visibleOn: string;
507
- }[] | {
495
+ export function getSearchableFieldsFilterSchema(objectSchema: any, fields: any, ctx: any): Promise<any[] | {
508
496
  title: string;
509
497
  type: string;
510
498
  name: string;
@@ -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: {
@@ -1,8 +1,8 @@
1
1
  export function getPage({ type, pageId, appId, objectName, recordId, formFactor }: {
2
2
  type: any;
3
- pageId: any;
3
+ pageId?: string;
4
4
  appId: any;
5
5
  objectName?: string;
6
- recordId: any;
6
+ recordId?: string;
7
7
  formFactor?: string;
8
8
  }): Promise<any>;
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.28",
4
+ "version": "1.0.30",
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": "6d36f71035c0352b742b460254d38cceee1ddfdb"
61
+ "gitHead": "a518ccb1e24bc980663bb9971861d383046097aa"
62
62
  }