@steedos-widgets/amis-lib 1.0.14 → 1.0.15

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,33 @@
1
+ export function getMarkdownFieldSchema(field: any, readonly: any, ctx: any): {
2
+ type: string;
3
+ name: any;
4
+ options: {
5
+ linkify: boolean;
6
+ html: boolean;
7
+ breaks: boolean;
8
+ };
9
+ body?: undefined;
10
+ } | {
11
+ type: string;
12
+ body: ({
13
+ type: string;
14
+ name: any;
15
+ language: string;
16
+ options?: undefined;
17
+ } | {
18
+ type: string;
19
+ name: any;
20
+ options: {
21
+ linkify: boolean;
22
+ html: boolean;
23
+ breaks: boolean;
24
+ };
25
+ language?: undefined;
26
+ })[];
27
+ name?: undefined;
28
+ options?: undefined;
29
+ };
30
+ export function getHtmlFieldSchema(field: any, readonly: any, ctx: any): {
31
+ type: string;
32
+ name: any;
33
+ };
@@ -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" | "checkbox";
9
+ export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "textarea" | "picker" | "table" | "markdown" | "email" | "html" | "checkbox";
10
10
  export function getObjectFieldSubFields(mainField: any, fields: any): any;
11
11
  export function getGridFieldSubFields(mainField: any, fields: any): any;
12
12
  /**
@@ -17,42 +17,24 @@ export function getGridFieldSubFields(mainField: any, fields: any): any;
17
17
  export function getPermissionFields(object: any, userSession: any): any[];
18
18
  export function getSelectFieldOptions(field: any): any[];
19
19
  export function convertSFieldToAmisField(field: any, readonly: any, ctx: any): Promise<{
20
- name: any;
21
- label: any;
22
- labelRemark: any;
23
- required: any;
24
- } & {
25
20
  type: any;
26
21
  tpl: string;
27
22
  value: string | number | boolean;
28
23
  multiple: boolean;
29
24
  extractValue: boolean;
30
25
  className: any;
31
- labelClassName: string;
32
26
  quickEdit: boolean;
33
27
  visibleOn: string;
34
- } & {
35
- clearValueOnHidden: boolean;
36
- fieldName: any;
37
28
  }>;
38
29
  export function getFieldSearchable(perField: any, permissionFields: any, ctx: any): Promise<{
39
- name: any;
40
- label: any;
41
- labelRemark: any;
42
- required: any;
43
- } & {
44
30
  type: any;
45
31
  tpl: string;
46
32
  value: string | number | boolean;
47
33
  multiple: boolean;
48
34
  extractValue: boolean;
49
35
  className: any;
50
- labelClassName: string;
51
36
  quickEdit: boolean;
52
37
  visibleOn: string;
53
- } & {
54
- clearValueOnHidden: boolean;
55
- fieldName: any;
56
38
  }>;
57
39
  export const OMIT_FIELDS: string[];
58
40
  export { getAmisStaticFieldType } from "./type";
@@ -76,6 +76,27 @@ export function lookupToAmisSelect(field: any, readonly: any, ctx: any): Promise
76
76
  type: any;
77
77
  joinValues: boolean;
78
78
  extractValue: boolean;
79
+ source: {
80
+ method: string;
81
+ url: string;
82
+ data: {
83
+ orderBy: string;
84
+ orderDir: string;
85
+ pageNo: string;
86
+ pageSize: string;
87
+ query: string;
88
+ };
89
+ headers: {
90
+ Authorization: string;
91
+ };
92
+ } | {
93
+ method: string;
94
+ url: string;
95
+ data: {
96
+ query: string;
97
+ $: string;
98
+ };
99
+ };
79
100
  autoComplete: {
80
101
  method: string;
81
102
  url: string;
@@ -97,6 +118,7 @@ export function lookupToAmisSelect(field: any, readonly: any, ctx: any): Promise
97
118
  $: string;
98
119
  };
99
120
  };
121
+ searchable: boolean;
100
122
  }>;
101
123
  export function lookupToAmis(field: any, readonly: any, ctx: any): Promise<{}>;
102
124
  export function lookupToAmisSelectUser(field: any, readonly: any, ctx: any): Promise<{}>;
@@ -2,23 +2,14 @@ export function getSections(permissionFields: any, mergedSchema: any, ctx: any):
2
2
  type: string;
3
3
  title: any;
4
4
  collapsable: boolean;
5
- body: ({
6
- name: any;
7
- label: any;
8
- labelRemark: any;
9
- required: any;
10
- } & {
5
+ body: {
11
6
  type: any;
12
7
  tpl: string;
13
8
  value: string | number | boolean;
14
9
  multiple: boolean;
15
10
  extractValue: boolean;
16
11
  className: any;
17
- labelClassName: string;
18
12
  quickEdit: boolean;
19
13
  visibleOn: string;
20
- } & {
21
- clearValueOnHidden: boolean;
22
- fieldName: any;
23
- })[];
14
+ }[];
24
15
  }[]>;
@@ -19,6 +19,13 @@ export function getTableSchema(fields: any, options: any): Promise<{
19
19
  labelTpl: string;
20
20
  autoFillHeight: boolean;
21
21
  }>;
22
+ /**
23
+ *
24
+ * @param {*} mainObject
25
+ * @param {*} fields
26
+ * @param {*} options = {globalFilter: 相关字表过滤条件, filter: listview 过滤条件, ...}
27
+ * @returns
28
+ */
22
29
  export function getTableApi(mainObject: any, fields: any, options: any): Promise<{
23
30
  method: string;
24
31
  url: string;
@@ -23,25 +23,16 @@ export function getObjectFieldsFilterFormSchema(objectSchema: any, fields: any,
23
23
  wrapWithPanel: boolean;
24
24
  className: string;
25
25
  data: any;
26
- body: ({
27
- name: any;
28
- label: any;
29
- labelRemark: any;
30
- required: any;
31
- } & {
26
+ body: {
32
27
  type: any;
33
28
  tpl: string;
34
29
  value: string | number | boolean;
35
30
  multiple: boolean;
36
31
  extractValue: boolean;
37
32
  className: any;
38
- labelClassName: string;
39
33
  quickEdit: boolean;
40
34
  visibleOn: string;
41
- } & {
42
- clearValueOnHidden: boolean;
43
- fieldName: any;
44
- })[];
35
+ }[];
45
36
  onEvent: {
46
37
  broadcastSearchableFieldsChange: {
47
38
  actions: {
@@ -73,25 +64,16 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
73
64
  wrapWithPanel: boolean;
74
65
  className: string;
75
66
  data: any;
76
- body: ({
77
- name: any;
78
- label: any;
79
- labelRemark: any;
80
- required: any;
81
- } & {
67
+ body: {
82
68
  type: any;
83
69
  tpl: string;
84
70
  value: string | number | boolean;
85
71
  multiple: boolean;
86
72
  extractValue: boolean;
87
73
  className: any;
88
- labelClassName: string;
89
74
  quickEdit: boolean;
90
75
  visibleOn: string;
91
- } & {
92
- clearValueOnHidden: boolean;
93
- fieldName: any;
94
- })[];
76
+ }[];
95
77
  onEvent: {
96
78
  broadcastSearchableFieldsChange: {
97
79
  actions: {
@@ -2,23 +2,14 @@ export function getFormBody(permissionFields: any, objectConfig: any, ctx: any):
2
2
  type: string;
3
3
  title: any;
4
4
  collapsable: boolean;
5
- body: ({
6
- name: any;
7
- label: any;
8
- labelRemark: any;
9
- required: any;
10
- } & {
5
+ body: {
11
6
  type: any;
12
7
  tpl: string;
13
8
  value: string | number | boolean;
14
9
  multiple: boolean;
15
10
  extractValue: boolean;
16
11
  className: any;
17
- labelClassName: string;
18
12
  quickEdit: boolean;
19
13
  visibleOn: string;
20
- } & {
21
- clearValueOnHidden: boolean;
22
- fieldName: any;
23
- })[];
14
+ }[];
24
15
  }[]>;
@@ -158,25 +158,16 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
158
158
  wrapWithPanel: boolean;
159
159
  className: string;
160
160
  data: any;
161
- body: ({
162
- name: any;
163
- label: any;
164
- labelRemark: any;
165
- required: any;
166
- } & {
161
+ body: {
167
162
  type: any;
168
163
  tpl: string;
169
164
  value: string | number | boolean;
170
165
  multiple: boolean;
171
166
  extractValue: boolean;
172
167
  className: any;
173
- labelClassName: string;
174
168
  quickEdit: boolean;
175
169
  visibleOn: string;
176
- } & {
177
- clearValueOnHidden: boolean;
178
- fieldName: any;
179
- })[];
170
+ }[];
180
171
  onEvent: {
181
172
  broadcastSearchableFieldsChange: {
182
173
  actions: {
@@ -504,7 +495,7 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any, op
504
495
  * @param {*} relatedObjectSchema 相关对象UISchema
505
496
  * @returns amisSchema
506
497
  */
507
- export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any): Promise<{
498
+ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any, relatedLabel: any): Promise<{
508
499
  type: string;
509
500
  body: {
510
501
  type: string;
@@ -80,25 +80,16 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
80
80
  type: string;
81
81
  title: any;
82
82
  collapsable: boolean;
83
- body: ({
84
- name: any;
85
- label: any;
86
- labelRemark: any;
87
- required: any;
88
- } & {
83
+ body: {
89
84
  type: any;
90
85
  tpl: string;
91
86
  value: string | number | boolean;
92
87
  multiple: boolean;
93
88
  extractValue: boolean;
94
89
  className: any;
95
- labelClassName: string;
96
90
  quickEdit: boolean;
97
91
  visibleOn: string;
98
- } & {
99
- clearValueOnHidden: boolean;
100
- fieldName: any;
101
- })[];
92
+ }[];
102
93
  }[];
103
94
  className: string;
104
95
  actions: any[];
@@ -1,8 +1,16 @@
1
1
  export function getObjectHeaderToolbar(mainObject: any, formFactor: any): (string | {
2
2
  type: string;
3
- tpl: string;
3
+ className: string;
4
+ tpl?: undefined;
4
5
  align?: undefined;
6
+ label?: undefined;
7
+ icon?: undefined;
8
+ onEvent?: undefined;
9
+ } | {
10
+ type: string;
11
+ tpl: string;
5
12
  className?: undefined;
13
+ align?: undefined;
6
14
  label?: undefined;
7
15
  icon?: undefined;
8
16
  onEvent?: undefined;
@@ -59,25 +67,16 @@ export function getObjectFilter(objectSchema: any, fields: any, options: any): P
59
67
  wrapWithPanel: boolean;
60
68
  className: string;
61
69
  data: any;
62
- body: ({
63
- name: any;
64
- label: any;
65
- labelRemark: any;
66
- required: any;
67
- } & {
70
+ body: {
68
71
  type: any;
69
72
  tpl: string;
70
73
  value: string | number | boolean;
71
74
  multiple: boolean;
72
75
  extractValue: boolean;
73
76
  className: any;
74
- labelClassName: string;
75
77
  quickEdit: boolean;
76
78
  visibleOn: string;
77
- } & {
78
- clearValueOnHidden: boolean;
79
- fieldName: any;
80
- })[];
79
+ }[];
81
80
  onEvent: {
82
81
  broadcastSearchableFieldsChange: {
83
82
  actions: {
@@ -1,5 +1,6 @@
1
1
  export function getListViewColumns(listView: any, formFactor: any): any;
2
2
  export function getListViewSort(listView: any): string;
3
+ export function getListViewFilter(listView: any): any;
3
4
  export function getUISchema(objectName: any, force: any): Promise<any>;
4
5
  export function getField(objectName: any, fieldName: any): Promise<any>;
5
6
  export function getFormSchema(objectName: any, ctx: any): Promise<{
@@ -74,25 +75,16 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
74
75
  type: string;
75
76
  title: any;
76
77
  collapsable: boolean;
77
- body: ({
78
- name: any;
79
- label: any;
80
- labelRemark: any;
81
- required: any;
82
- } & {
78
+ body: {
83
79
  type: any;
84
80
  tpl: string;
85
81
  value: string | number | boolean;
86
82
  multiple: boolean;
87
83
  extractValue: boolean;
88
84
  className: any;
89
- labelClassName: string;
90
85
  quickEdit: boolean;
91
86
  visibleOn: string;
92
- } & {
93
- clearValueOnHidden: boolean;
94
- fieldName: any;
95
- })[];
87
+ }[];
96
88
  }[];
97
89
  className: string;
98
90
  actions: any[];
@@ -426,6 +418,7 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
426
418
  masterObjectName: any;
427
419
  object_name: any;
428
420
  foreign_key: any;
421
+ label: any;
429
422
  schema: {
430
423
  uiSchema: any;
431
424
  amisSchema: {
@@ -477,6 +470,7 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
477
470
  isCustomAmisSchema?: undefined;
478
471
  isCalendar?: undefined;
479
472
  };
473
+ label?: undefined;
480
474
  })[]>;
481
475
  export function getObjectRelated({ appName, masterObjectName, objectName, relatedFieldName, recordId, formFactor }: {
482
476
  appName: any;
@@ -530,25 +524,16 @@ export function getSearchableFieldsFilterSchema(objectSchema: any, fields: any,
530
524
  wrapWithPanel: boolean;
531
525
  className: string;
532
526
  data: any;
533
- body: ({
534
- name: any;
535
- label: any;
536
- labelRemark: any;
537
- required: any;
538
- } & {
527
+ body: {
539
528
  type: any;
540
529
  tpl: string;
541
530
  value: string | number | boolean;
542
531
  multiple: boolean;
543
532
  extractValue: boolean;
544
533
  className: any;
545
- labelClassName: string;
546
534
  quickEdit: boolean;
547
535
  visibleOn: string;
548
- } & {
549
- clearValueOnHidden: boolean;
550
- fieldName: any;
551
- })[];
536
+ }[];
552
537
  onEvent: {
553
538
  broadcastSearchableFieldsChange: {
554
539
  actions: {
@@ -54,7 +54,7 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
54
54
  isCalendar?: undefined;
55
55
  };
56
56
  })[]>;
57
- export function getRecordDetailRelatedListSchema(objectName: any, recordId: any, relatedObjectName: any, relatedKey: any, top: any, perPage: any, hiddenEmptyTable: any, appId: any): Promise<{
57
+ export function getRecordDetailRelatedListSchema(objectName: any, recordId: any, relatedObjectName: any, relatedKey: any, top: any, perPage: any, hiddenEmptyTable: any, appId: any, relatedLabel: any): Promise<{
58
58
  uiSchema: any;
59
59
  amisSchema: {
60
60
  type: string;
@@ -6,6 +6,7 @@ export function getImageSrc(fileId: any): string;
6
6
  export function getTenantId(): any;
7
7
  export function getAuthToken(): any;
8
8
  export function getAuthorization(): string;
9
+ export function getUserId(): any;
9
10
  export function absoluteUrl(url: any): string;
10
11
  export function getRootUrl(defaultRootUrl: any): any;
11
12
  export function setRootUrl(rootUrl: any): void;
@@ -9,6 +9,10 @@ export function getSchema(uiSchema: any): {
9
9
  actions: {
10
10
  actionType: string;
11
11
  dialog: {
12
+ data: {
13
+ "&": string;
14
+ object_name: string;
15
+ };
12
16
  type: string;
13
17
  title: string;
14
18
  body: {
@@ -17,6 +17,7 @@ export function getSchema(uiSchema: any, ctx: any): Promise<{
17
17
  appId: string;
18
18
  objectName: string;
19
19
  context: string;
20
+ global: string;
20
21
  listViewId: string;
21
22
  };
22
23
  title: string;
@@ -20,6 +20,7 @@ export namespace StandardButtons {
20
20
  appId: string;
21
21
  objectName: string;
22
22
  context: string;
23
+ global: string;
23
24
  listViewId: string;
24
25
  };
25
26
  title: string;
@@ -165,6 +166,10 @@ export namespace StandardButtons {
165
166
  actions: {
166
167
  actionType: string;
167
168
  dialog: {
169
+ data: {
170
+ "&": string;
171
+ object_name: string;
172
+ };
168
173
  type: string;
169
174
  title: string;
170
175
  body: {
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.14",
4
+ "version": "1.0.15",
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": "ad673af04db47a605a672cfd5601fd96d74c6142"
61
+ "gitHead": "e566caba128dd6221eaf34d89e15fb052c0dcfa3"
62
62
  }