@steedos-widgets/amis-lib 0.0.15 → 1.0.0-beta.29

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.
@@ -22,16 +22,6 @@ export function getFormSchema(objectName: any, ctx: any): Promise<{
22
22
  };
23
23
  };
24
24
  initApi: any;
25
- /**
26
- * localListViewProps规范来自crud请求api中api.data.$self参数值的。
27
- * 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
28
- * __searchable__...:顶部放大镜搜索条件
29
- * filter:右侧过滤器
30
- * perPage:每页条数
31
- * page:当前页码
32
- * orderBy:排序字段
33
- * orderDir:排序方向
34
- */
35
25
  initFetch: any;
36
26
  body: {}[];
37
27
  };
@@ -126,11 +116,11 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
126
116
  }>;
127
117
  export function getListSchema(appName: any, objectName: any, listViewName: any, ctx?: {}): Promise<{
128
118
  uiSchema: any;
129
- isCustom?: undefined;
119
+ isCustomAmisSchema?: undefined;
130
120
  amisSchema?: undefined;
131
121
  } | {
132
122
  uiSchema: any;
133
- isCustom: boolean;
123
+ isCustomAmisSchema: boolean;
134
124
  amisSchema: any;
135
125
  } | {
136
126
  uiSchema: any;
@@ -143,7 +133,7 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
143
133
  sort: string;
144
134
  ctx: {};
145
135
  };
146
- isCustom?: undefined;
136
+ isCustomAmisSchema?: undefined;
147
137
  }>;
148
138
  export function getTableSchema(appName: any, objectName: any, columns: any, ctx?: {}): Promise<{
149
139
  uiSchema: any;
@@ -154,11 +144,6 @@ export function getTableSchema(appName: any, objectName: any, columns: any, ctx?
154
144
  name: string;
155
145
  data: {
156
146
  $master: string;
157
- context: {
158
- rootUrl: any;
159
- tenantId: any;
160
- authToken: any;
161
- };
162
147
  objectName: any;
163
148
  _id: any;
164
149
  recordPermissions: any;
@@ -261,6 +246,49 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any): Pro
261
246
  }[];
262
247
  };
263
248
  }>;
249
+ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
250
+ uiSchema: any;
251
+ amisSchema: {
252
+ type: string;
253
+ body: ({
254
+ type: string;
255
+ label: string;
256
+ objectApiName: string;
257
+ recordId: string;
258
+ id: string;
259
+ onEvent: {
260
+ recordLoaded: {
261
+ actions: {
262
+ actionType: string;
263
+ data: {
264
+ name: string;
265
+ };
266
+ }[];
267
+ };
268
+ };
269
+ tabs?: undefined;
270
+ } | {
271
+ type: string;
272
+ tabs: {
273
+ title: string;
274
+ body: {
275
+ type: string;
276
+ label: string;
277
+ objectApiName: string;
278
+ recordId: string;
279
+ id: string;
280
+ appId: any;
281
+ }[];
282
+ id: string;
283
+ }[];
284
+ id: string;
285
+ label?: undefined;
286
+ objectApiName?: undefined;
287
+ recordId?: undefined;
288
+ onEvent?: undefined;
289
+ })[];
290
+ };
291
+ }>;
264
292
  export function getObjectRelatedList(appName: any, objectName: any, recordId: any, formFactor: any): Promise<({
265
293
  masterObjectName: any;
266
294
  object_name: any;
@@ -274,11 +302,6 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
274
302
  name: string;
275
303
  data: {
276
304
  $master: string;
277
- context: {
278
- rootUrl: any;
279
- tenantId: any;
280
- authToken: any;
281
- };
282
305
  objectName: any;
283
306
  _id: any;
284
307
  recordPermissions: any;
@@ -294,11 +317,11 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
294
317
  foreign_key: any;
295
318
  schema: {
296
319
  uiSchema: any;
297
- isCustom?: undefined;
320
+ isCustomAmisSchema?: undefined;
298
321
  amisSchema?: undefined;
299
322
  } | {
300
323
  uiSchema: any;
301
- isCustom: boolean;
324
+ isCustomAmisSchema: boolean;
302
325
  amisSchema: any;
303
326
  } | {
304
327
  uiSchema: any;
@@ -311,7 +334,7 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
311
334
  sort: string;
312
335
  ctx: {};
313
336
  };
314
- isCustom?: undefined;
337
+ isCustomAmisSchema?: undefined;
315
338
  };
316
339
  })[]>;
317
340
  export function getObjectRelated({ appName, masterObjectName, objectName, relatedFieldName, recordId, formFactor }: {
@@ -327,11 +350,11 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
327
350
  foreign_key: any;
328
351
  schema: {
329
352
  uiSchema: any;
330
- isCustom?: undefined;
353
+ isCustomAmisSchema?: undefined;
331
354
  amisSchema?: undefined;
332
355
  } | {
333
356
  uiSchema: any;
334
- isCustom: boolean;
357
+ isCustomAmisSchema: boolean;
335
358
  amisSchema: any;
336
359
  } | {
337
360
  uiSchema: any;
@@ -344,7 +367,7 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
344
367
  sort: string;
345
368
  ctx: {};
346
369
  };
347
- isCustom?: undefined;
370
+ isCustomAmisSchema?: undefined;
348
371
  };
349
372
  record: any;
350
373
  masterObjectUISchema: any;
@@ -11,11 +11,6 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
11
11
  name: string;
12
12
  data: {
13
13
  $master: string;
14
- context: {
15
- rootUrl: any;
16
- tenantId: any;
17
- authToken: any;
18
- };
19
14
  objectName: any;
20
15
  _id: any;
21
16
  recordPermissions: any;
@@ -31,11 +26,11 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
31
26
  foreign_key: any;
32
27
  schema: {
33
28
  uiSchema: any;
34
- isCustom?: undefined;
29
+ isCustomAmisSchema?: undefined;
35
30
  amisSchema?: undefined;
36
31
  } | {
37
32
  uiSchema: any;
38
- isCustom: boolean;
33
+ isCustomAmisSchema: boolean;
39
34
  amisSchema: any;
40
35
  } | {
41
36
  uiSchema: any;
@@ -48,10 +43,10 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
48
43
  sort: string;
49
44
  ctx: {};
50
45
  };
51
- isCustom?: undefined;
46
+ isCustomAmisSchema?: undefined;
52
47
  };
53
48
  })[]>;
54
- export function getRecordDetailRelatedListSchema(objectName: any, recordId: any, relatedObjectName: any, relatedKey: any, top: any, hiddenEmptyTable: any): Promise<{
49
+ export function getRecordDetailRelatedListSchema(objectName: any, recordId: any, relatedObjectName: any, relatedKey: any, top: any, hiddenEmptyTable: any, appId: any): Promise<{
55
50
  uiSchema: any;
56
51
  amisSchema: {
57
52
  type: string;
@@ -64,6 +64,7 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
64
64
  };
65
65
  label?: undefined;
66
66
  rightIcon?: undefined;
67
+ size?: undefined;
67
68
  hideCaret?: undefined;
68
69
  btnClassName?: undefined;
69
70
  buttons?: undefined;
@@ -72,6 +73,7 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
72
73
  className: string;
73
74
  label: string;
74
75
  rightIcon: string;
76
+ size: string;
75
77
  hideCaret: boolean;
76
78
  btnClassName: string;
77
79
  buttons: any[];
@@ -101,7 +103,23 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
101
103
  } | {
102
104
  type: string;
103
105
  align: string;
104
- columns: {
106
+ columns: ({
107
+ body: {
108
+ type: string;
109
+ tpl: string;
110
+ visibleOn: string;
111
+ inline: boolean;
112
+ wrapperComponent: string;
113
+ className: string;
114
+ style: {
115
+ fontFamily: string;
116
+ fontSize: number;
117
+ };
118
+ id: string;
119
+ }[];
120
+ md: string;
121
+ valign: string;
122
+ } | {
105
123
  body: ({
106
124
  type: string;
107
125
  label: string;
@@ -127,31 +145,12 @@ export function getListPageInitSchema(objectApiName: any, formFactor: any, userS
127
145
  actionType: string;
128
146
  target: string;
129
147
  className: string;
130
- id?: undefined;
131
- onEvent?: undefined;
132
- } | {
133
- type: string;
134
- label: string;
135
- icon: string;
136
- actionType: string;
137
- className: string;
138
- id: string;
139
- onEvent: {
140
- click: {
141
- actions: {
142
- actionType: string;
143
- script: string;
144
- }[];
145
- weight: number;
146
- };
147
- };
148
- target?: undefined;
149
148
  })[];
150
149
  md: string;
151
- }[];
150
+ valign?: undefined;
151
+ })[];
152
152
  className: string;
153
153
  })[];
154
- size: string;
155
154
  className: string;
156
155
  }[];
157
156
  }[];
@@ -178,12 +177,4 @@ export function getRecordPageInitSchema(objectApiName: any): Promise<{
178
177
  };
179
178
  }[];
180
179
  }>;
181
- export function getListviewInitSchema(objectApiName: any, listViewName: any, ctx: any): Promise<{
182
- type: string;
183
- bodyClassName: string;
184
- regions: string[];
185
- body: {}[];
186
- data: {
187
- listName: any;
188
- };
189
- }>;
180
+ export function getListviewInitSchema(objectApiName: any, listViewName: any, ctx: 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.15",
4
+ "version": "1.0.0-beta.29",
5
5
  "unpkg": "./dist/index.umd.js",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "scripts": {
13
13
  "prebuild": "rimraf dist",
14
- "http": "npx http-server ../ --port 8080 --cors -c -1",
14
+ "watch": "rollup -c rollup.config.ts -w",
15
15
  "build": "yarn build-types && yarn build-rollup",
16
16
  "build-types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
17
17
  "build-rollup": "rollup -c rollup.config.ts && yarn build-uglifyjs",
@@ -22,15 +22,18 @@
22
22
  "access": "public"
23
23
  },
24
24
  "devDependencies": {
25
- "uglify-js": "^3.17.0",
26
25
  "@babel/core": "^7.18.13",
27
26
  "@rollup/plugin-babel": "^5.3.1",
28
27
  "@rollup/plugin-commonjs": "^22.0.0",
29
28
  "@rollup/plugin-node-resolve": "^13.1.3",
29
+ "@rollup/plugin-typescript": "^8.4.0",
30
+ "@types/lodash": "^4.14.184",
30
31
  "amis": "^2.1.1-beta.2",
32
+ "fast-glob": "^3.2.12",
31
33
  "rimraf": "3.0.2",
32
34
  "rollup": "^2.70.1",
33
35
  "rollup-plugin-alias": "^2.2.0",
36
+ "rollup-plugin-commonjs": "^10.1.0",
34
37
  "rollup-plugin-external-globals": "^0.6.1",
35
38
  "rollup-plugin-json": "^4.0.0",
36
39
  "rollup-plugin-node-builtins": "^2.1.2",
@@ -44,18 +47,17 @@
44
47
  "rollup-plugin-sourcemaps": "^0.6.3",
45
48
  "rollup-plugin-svg": "^2.0.0",
46
49
  "rollup-plugin-tslib-resolve-id": "^0.0.0",
47
- "@rollup/plugin-typescript": "^8.4.0",
48
- "rollup-plugin-visualizer": "^5.8.0",
49
- "rollup-plugin-commonjs": "^10.1.0",
50
50
  "rollup-plugin-uglify": "^6.0.4",
51
+ "rollup-plugin-visualizer": "^5.8.0",
51
52
  "ts-jest": "26.4.4",
52
53
  "tslint": "^5.8.0",
53
54
  "tslint-config-prettier": "^1.1.0",
54
55
  "tslint-config-standard": "^7.0.0",
55
56
  "typescript": "^4.6.2",
56
- "@types/lodash": "^4.14.184"
57
+ "uglify-js": "^3.17.0"
57
58
  },
58
59
  "dependencies": {
59
60
  "lodash": "^4.17.21"
60
- }
61
+ },
62
+ "gitHead": "62a446518c9f80a67a4c3f04ddb65165f30f3bae"
61
63
  }