@steedos-widgets/amis-lib 0.0.10 → 0.0.11

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.
@@ -15,6 +15,8 @@ export * from './lib/steedos.client.js';
15
15
  export * from './lib/converter/amis/fields/lookup';
16
16
  export * from './lib/converter/amis/fields/user';
17
17
  export * from './lib/converter/amis/filters';
18
+ export * from './lib/converter/amis/header';
19
+ export * from './lib/converter/amis/fields_filter';
18
20
  export * from './lib/workflow/flow';
19
21
  export * from './lib/assets';
20
22
  export * from './utils/object';
@@ -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" | "email" | "html" | "textarea" | "table" | "picker" | "checkbox";
9
+ export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "table" | "email" | "html" | "textarea" | "picker" | "checkbox";
10
10
  export function getObjectFieldSubFields(mainField: any, fields: any): any;
11
11
  export function getGridFieldSubFields(mainField: any, fields: any): any;
12
12
  /**
@@ -33,6 +33,7 @@ export function convertSFieldToAmisField(field: any, readonly: any, ctx: any): P
33
33
  visibleOn: string;
34
34
  } & {
35
35
  clearValueOnHidden: boolean;
36
+ fieldName: any;
36
37
  }>;
37
38
  export function getFieldSearchable(perField: any, permissionFields: any, ctx: any): Promise<{
38
39
  name: any;
@@ -51,6 +52,7 @@ export function getFieldSearchable(perField: any, permissionFields: any, ctx: an
51
52
  visibleOn: string;
52
53
  } & {
53
54
  clearValueOnHidden: boolean;
55
+ fieldName: any;
54
56
  }>;
55
57
  export const OMIT_FIELDS: string[];
56
58
  export { getAmisStaticFieldType } from "./type";
@@ -19,25 +19,6 @@ export function lookupToAmisPicker(field: any, readonly: any, ctx: any): Promise
19
19
  };
20
20
  size: string;
21
21
  pickerSchema: {
22
- mode: string;
23
- name: string;
24
- draggable: boolean;
25
- headerToolbar: string[];
26
- defaultParams: {
27
- perPage: any;
28
- };
29
- columns: {
30
- name: string;
31
- type: string;
32
- width: number;
33
- placeholder: string;
34
- }[];
35
- syncLocation: boolean;
36
- keepItemSelectionOnPageChange: boolean;
37
- checkOnItemClick: boolean;
38
- labelTpl: string;
39
- autoFillHeight: boolean;
40
- } | {
41
22
  mode: string;
42
23
  name: string;
43
24
  draggable: boolean;
@@ -67,6 +48,25 @@ export function lookupToAmisPicker(field: any, readonly: any, ctx: any): Promise
67
48
  link: string;
68
49
  }[];
69
50
  };
51
+ } | {
52
+ mode: string;
53
+ name: string;
54
+ draggable: boolean;
55
+ headerToolbar: string[];
56
+ defaultParams: {
57
+ perPage: any;
58
+ };
59
+ columns: {
60
+ name: string;
61
+ type: string;
62
+ width: number;
63
+ placeholder: string;
64
+ }[];
65
+ syncLocation: boolean;
66
+ keepItemSelectionOnPageChange: boolean;
67
+ checkOnItemClick: boolean;
68
+ labelTpl: string;
69
+ autoFillHeight: boolean;
70
70
  };
71
71
  joinValues: boolean;
72
72
  extractValue: boolean;
@@ -19,5 +19,6 @@ export function getSections(permissionFields: any, mergedSchema: any, ctx: any):
19
19
  visibleOn: string;
20
20
  } & {
21
21
  clearValueOnHidden: boolean;
22
+ fieldName: any;
22
23
  })[];
23
24
  }[]>;
@@ -0,0 +1,138 @@
1
+ export function getObjectFieldsFilterButtonSchema(objectSchema: any): Promise<{
2
+ type: string;
3
+ label: string;
4
+ icon: string;
5
+ className: string;
6
+ onEvent: {
7
+ click: {
8
+ actions: {
9
+ actionType: string;
10
+ args: {
11
+ value: {
12
+ showFieldsFilter: string;
13
+ };
14
+ };
15
+ componentId: string;
16
+ }[];
17
+ };
18
+ };
19
+ }>;
20
+ export function getObjectFieldsFilterFormSchema(objectSchema: any, fields: any, ctx: any): Promise<{
21
+ title: string;
22
+ type: string;
23
+ name: string;
24
+ id: string;
25
+ mode: string;
26
+ wrapWithPanel: boolean;
27
+ className: string;
28
+ body: ({
29
+ name: any;
30
+ label: any;
31
+ labelRemark: any;
32
+ required: any;
33
+ } & {
34
+ type: any;
35
+ tpl: string;
36
+ value: string | number | boolean;
37
+ multiple: boolean;
38
+ extractValue: boolean;
39
+ className: any;
40
+ labelClassName: string;
41
+ quickEdit: boolean;
42
+ visibleOn: string;
43
+ } & {
44
+ clearValueOnHidden: boolean;
45
+ fieldName: any;
46
+ })[];
47
+ }>;
48
+ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, ctx: any): Promise<{
49
+ type: string;
50
+ id: string;
51
+ body: {
52
+ type: string;
53
+ body: {
54
+ type: string;
55
+ body: ({
56
+ type: string;
57
+ body: {
58
+ title: string;
59
+ type: string;
60
+ name: string;
61
+ id: string;
62
+ mode: string;
63
+ wrapWithPanel: boolean;
64
+ className: string;
65
+ body: ({
66
+ name: any;
67
+ label: any;
68
+ labelRemark: any;
69
+ required: any;
70
+ } & {
71
+ type: any;
72
+ tpl: string;
73
+ value: string | number | boolean;
74
+ multiple: boolean;
75
+ extractValue: boolean;
76
+ className: any;
77
+ labelClassName: string;
78
+ quickEdit: boolean;
79
+ visibleOn: string;
80
+ } & {
81
+ clearValueOnHidden: boolean;
82
+ fieldName: any;
83
+ })[];
84
+ }[];
85
+ size: string;
86
+ visibleOn: string;
87
+ className: string;
88
+ } | {
89
+ type: string;
90
+ body: {
91
+ type: string;
92
+ body: ({
93
+ type: string;
94
+ label: string;
95
+ icon: string;
96
+ visibleOn: string;
97
+ onEvent: {
98
+ click: {
99
+ actions: {
100
+ actionType: string;
101
+ script: string;
102
+ }[];
103
+ };
104
+ };
105
+ className?: undefined;
106
+ level?: undefined;
107
+ } | {
108
+ type: string;
109
+ label: string;
110
+ className: string;
111
+ level: string;
112
+ onEvent: {
113
+ click: {
114
+ actions: {
115
+ actionType: string;
116
+ script: string;
117
+ }[];
118
+ };
119
+ };
120
+ icon?: undefined;
121
+ visibleOn?: undefined;
122
+ })[];
123
+ size: string;
124
+ className: string;
125
+ };
126
+ size: string;
127
+ className: string;
128
+ visibleOn?: undefined;
129
+ })[];
130
+ size: string;
131
+ className: string;
132
+ };
133
+ size: string;
134
+ className: string;
135
+ };
136
+ visibleOn: string;
137
+ className: string;
138
+ }>;
@@ -19,5 +19,6 @@ export function getFormBody(permissionFields: any, objectConfig: any, ctx: any):
19
19
  visibleOn: string;
20
20
  } & {
21
21
  clearValueOnHidden: boolean;
22
+ fieldName: any;
22
23
  })[];
23
24
  }[]>;
@@ -3,7 +3,7 @@
3
3
  * @param {*} objectSchema 对象UISchema
4
4
  * @returns amisSchema
5
5
  */
6
- export function getObjectListHeader(objectSchema: any, listViewName: any): Promise<{
6
+ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: any): Promise<{
7
7
  type: string;
8
8
  body: ({
9
9
  type: string;
@@ -73,6 +73,24 @@ export function getObjectListHeader(objectSchema: any, listViewName: any): Promi
73
73
  align: string;
74
74
  columns: {
75
75
  body: ({
76
+ type: string;
77
+ label: string;
78
+ icon: string;
79
+ className: string;
80
+ onEvent: {
81
+ click: {
82
+ actions: {
83
+ actionType: string;
84
+ args: {
85
+ value: {
86
+ showFieldsFilter: string;
87
+ };
88
+ };
89
+ componentId: string;
90
+ }[];
91
+ };
92
+ };
93
+ } | {
76
94
  type: string;
77
95
  label: string;
78
96
  icon: string;
@@ -101,10 +119,11 @@ export function getObjectListHeader(objectSchema: any, listViewName: any): Promi
101
119
  })[];
102
120
  md: string;
103
121
  }[];
122
+ className: string;
104
123
  })[];
105
124
  size: string;
106
125
  className: string;
107
- }>;
126
+ }[]>;
108
127
  /**
109
128
  * 记录详细界面顶部头amisSchema,也是标题面板组件的amisSchema
110
129
  * @param {*} objectSchema 对象UISchema
@@ -100,6 +100,7 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
100
100
  visibleOn: string;
101
101
  } & {
102
102
  clearValueOnHidden: boolean;
103
+ fieldName: any;
103
104
  })[];
104
105
  }[];
105
106
  className: string;
@@ -91,6 +91,7 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
91
91
  visibleOn: string;
92
92
  } & {
93
93
  clearValueOnHidden: boolean;
94
+ fieldName: any;
94
95
  })[];
95
96
  }[];
96
97
  className: string;
@@ -351,10 +352,11 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
351
352
  record: any;
352
353
  masterObjectUISchema: any;
353
354
  }>;
354
- export function getSearchableFieldsFilterSchema(fields: any, cols: any): Promise<{
355
+ export function getSearchableFieldsFilterSchema(objectSchema: any, fields: any, cols: any): Promise<{
355
356
  title: string;
356
357
  type: string;
357
358
  name: string;
359
+ id: string;
358
360
  mode: string;
359
361
  wrapWithPanel: boolean;
360
362
  className: string;
@@ -375,6 +377,7 @@ export function getSearchableFieldsFilterSchema(fields: any, cols: any): Promise
375
377
  visibleOn: string;
376
378
  } & {
377
379
  clearValueOnHidden: boolean;
380
+ fieldName: any;
378
381
  })[];
379
382
  }>;
380
383
  export function setUISchemaFunction(fun: any): void;
@@ -103,6 +103,24 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
103
103
  align: string;
104
104
  columns: {
105
105
  body: ({
106
+ type: string;
107
+ label: string;
108
+ icon: string;
109
+ className: string;
110
+ onEvent: {
111
+ click: {
112
+ actions: {
113
+ actionType: string;
114
+ args: {
115
+ value: {
116
+ showFieldsFilter: string;
117
+ };
118
+ };
119
+ componentId: string;
120
+ }[];
121
+ };
122
+ };
123
+ } | {
106
124
  type: string;
107
125
  label: string;
108
126
  icon: string;
@@ -131,10 +149,11 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
131
149
  })[];
132
150
  md: string;
133
151
  }[];
152
+ className: string;
134
153
  })[];
135
154
  size: string;
136
155
  className: string;
137
- };
156
+ }[];
138
157
  }[];
139
158
  }>;
140
159
  export function getRecordPageInitSchema(objectApiName: any): Promise<{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@steedos-widgets/amis-lib",
3
3
  "private": false,
4
- "version": "0.0.10",
4
+ "version": "0.0.11",
5
5
  "unpkg": "./dist/index.umd.js",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",