@steedos-widgets/amis-lib 1.0.7 → 1.0.9

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.
@@ -131,13 +131,11 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
131
131
  type: string;
132
132
  label: string;
133
133
  name: string;
134
- initialEvents: {
135
- id: string;
136
- title: string;
137
- start: string;
138
- }[];
134
+ editable: any;
135
+ selectable: any;
136
+ selectMirror: any;
139
137
  onEvent: {
140
- select: {
138
+ getEvents: {
141
139
  weight: number;
142
140
  actions: {
143
141
  componentId: string;
@@ -146,7 +144,7 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
146
144
  script: string;
147
145
  }[];
148
146
  };
149
- eventClick: {
147
+ select: {
150
148
  weight: number;
151
149
  actions: {
152
150
  componentId: string;
@@ -155,7 +153,7 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
155
153
  script: string;
156
154
  }[];
157
155
  };
158
- eventAdd: {
156
+ eventClick: {
159
157
  weight: number;
160
158
  actions: {
161
159
  componentId: string;
@@ -164,7 +162,7 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
164
162
  script: string;
165
163
  }[];
166
164
  };
167
- eventChange: {
165
+ eventAdd: {
168
166
  weight: number;
169
167
  actions: {
170
168
  componentId: string;
@@ -173,6 +171,76 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
173
171
  script: string;
174
172
  }[];
175
173
  };
174
+ eventChange: {
175
+ weight: number;
176
+ actions: ({
177
+ actionType: string;
178
+ args: {
179
+ api: {
180
+ method: string;
181
+ url: string;
182
+ data: {
183
+ query: string;
184
+ };
185
+ headers: {
186
+ Authorization: string;
187
+ };
188
+ };
189
+ msgType?: undefined;
190
+ msg?: undefined;
191
+ position?: undefined;
192
+ messages?: undefined;
193
+ };
194
+ expression?: undefined;
195
+ } | {
196
+ actionType: string;
197
+ expression: string;
198
+ args: {
199
+ msgType: string;
200
+ msg: string;
201
+ position: string;
202
+ api?: undefined;
203
+ messages?: undefined;
204
+ };
205
+ } | {
206
+ actionType: string;
207
+ expression: string;
208
+ args: {
209
+ api: {
210
+ method: string;
211
+ url: string; /**
212
+ * localListViewProps规范来自crud请求api中api.data.$self参数值的。
213
+ * 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
214
+ * __searchable__...:顶部放大镜搜索条件
215
+ * filter:右侧过滤器
216
+ * perPage:每页条数
217
+ * page:当前页码
218
+ * orderBy:排序字段
219
+ * orderDir:排序方向
220
+ */
221
+ data: {
222
+ objectName: string;
223
+ $: {
224
+ _id: string;
225
+ };
226
+ $self: string;
227
+ };
228
+ requestAdaptor: string;
229
+ adaptor: string;
230
+ headers: {
231
+ Authorization: string;
232
+ };
233
+ };
234
+ messages: {
235
+ success: string;
236
+ failed: string;
237
+ };
238
+ msgType?: undefined;
239
+ msg?: undefined;
240
+ position?: undefined;
241
+ };
242
+ })[];
243
+ };
176
244
  eventRemove: {
177
245
  weight: number;
178
246
  actions: {
@@ -245,80 +313,62 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any): Pro
245
313
  };
246
314
  body: {
247
315
  type: string;
316
+ data: {
317
+ "&": string;
318
+ record: string;
319
+ recordLoaded: string;
320
+ };
248
321
  body: {
249
322
  type: string;
250
- title: string;
251
- body: any[];
252
- header: {
323
+ className: string;
324
+ body: {
253
325
  type: string;
254
- body: {
255
- type: string;
256
- columns: ({
257
- body: {
258
- type: string;
259
- columns: ({
260
- body: {
261
- type: string;
262
- className: string;
263
- tpl: string;
264
- };
265
- md: string;
326
+ columns: ({
327
+ body: {
328
+ type: string;
329
+ columns: ({
330
+ body: {
331
+ type: string;
266
332
  className: string;
267
- columnClassName: string;
268
- } | {
269
- body: ({
270
- type: string;
271
- tpl: string;
272
- inline: boolean;
273
- wrapperComponent: string;
274
- style: {
275
- fontFamily: string;
276
- fontSize: number;
277
- fontWeight?: undefined;
278
- textAlign?: undefined;
279
- };
280
- className: string;
281
- } | {
282
- type: string;
283
- tpl: string;
284
- inline: boolean;
285
- wrapperComponent: string;
286
- style: {
287
- fontFamily: string;
288
- fontSize: number;
289
- fontWeight: string;
290
- textAlign: string;
291
- };
292
- className: string;
293
- })[];
294
- md?: undefined;
295
- className?: undefined;
296
- columnClassName?: undefined;
297
- })[];
298
- }[];
299
- md: string;
300
- } | {
301
- body: {
302
- type: string;
303
- items: {
333
+ tpl: string;
334
+ };
335
+ md: string;
336
+ className: string;
337
+ columnClassName: string;
338
+ } | {
339
+ body: {
304
340
  type: string;
305
- name: any;
306
- objectName: any;
307
- visibleOn: any;
341
+ tpl: string;
342
+ inline: boolean;
343
+ wrapperComponent: string;
308
344
  className: string;
309
345
  }[];
310
- };
311
- md: string;
312
- })[];
313
- align: string;
314
- }[];
315
- size: string;
316
- };
317
- affixFooter: boolean;
318
- headerClassName: string;
319
- bodyClassName: string;
346
+ columnClassName: string;
347
+ md?: undefined;
348
+ className?: undefined;
349
+ })[];
350
+ className: string;
351
+ }[];
352
+ md: string;
353
+ } | {
354
+ body: {
355
+ type: string;
356
+ items: {
357
+ type: string;
358
+ name: any;
359
+ objectName: any;
360
+ visibleOn: any;
361
+ className: string;
362
+ }[];
363
+ };
364
+ md: string;
365
+ })[];
366
+ className: string;
367
+ }[];
368
+ size: string;
320
369
  }[];
321
370
  messages: {};
371
+ hiddenOn: string;
322
372
  }[];
323
373
  };
324
374
  }>;
@@ -334,19 +384,32 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
334
384
  id: string;
335
385
  onEvent: {
336
386
  recordLoaded: {
337
- actions: {
387
+ actions: ({
338
388
  actionType: string;
339
389
  data: {
340
390
  name: string;
341
391
  };
342
- }[];
392
+ args?: undefined;
393
+ } | {
394
+ actionType: string;
395
+ args: {
396
+ value: {
397
+ record: string;
398
+ recordLoaded: boolean;
399
+ };
400
+ };
401
+ data?: undefined;
402
+ })[];
343
403
  };
344
404
  };
405
+ className?: undefined;
345
406
  tabs?: undefined;
346
407
  } | {
347
408
  type: string;
409
+ className: string;
348
410
  tabs: {
349
411
  title: string;
412
+ className: string;
350
413
  body: {
351
414
  type: string;
352
415
  label: string;
@@ -408,13 +471,11 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
408
471
  type: string;
409
472
  label: string;
410
473
  name: string;
411
- initialEvents: {
412
- id: string;
413
- title: string;
414
- start: string;
415
- }[];
474
+ editable: any;
475
+ selectable: any;
476
+ selectMirror: any;
416
477
  onEvent: {
417
- select: {
478
+ getEvents: {
418
479
  weight: number;
419
480
  actions: {
420
481
  componentId: string;
@@ -423,7 +484,7 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
423
484
  script: string;
424
485
  }[];
425
486
  };
426
- eventClick: {
487
+ select: {
427
488
  weight: number;
428
489
  actions: {
429
490
  componentId: string;
@@ -432,7 +493,7 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
432
493
  script: string;
433
494
  }[];
434
495
  };
435
- eventAdd: {
496
+ eventClick: {
436
497
  weight: number;
437
498
  actions: {
438
499
  componentId: string;
@@ -441,7 +502,7 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
441
502
  script: string;
442
503
  }[];
443
504
  };
444
- eventChange: {
505
+ eventAdd: {
445
506
  weight: number;
446
507
  actions: {
447
508
  componentId: string;
@@ -450,6 +511,76 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
450
511
  script: string;
451
512
  }[];
452
513
  };
514
+ eventChange: {
515
+ weight: number;
516
+ actions: ({
517
+ actionType: string;
518
+ args: {
519
+ api: {
520
+ method: string;
521
+ url: string;
522
+ data: {
523
+ query: string;
524
+ };
525
+ headers: {
526
+ Authorization: string;
527
+ };
528
+ };
529
+ msgType?: undefined;
530
+ msg?: undefined;
531
+ position?: undefined;
532
+ messages?: undefined;
533
+ };
534
+ expression?: undefined;
535
+ } | {
536
+ actionType: string;
537
+ expression: string;
538
+ args: {
539
+ msgType: string;
540
+ msg: string;
541
+ position: string;
542
+ api?: undefined;
543
+ messages?: undefined;
544
+ };
545
+ } | {
546
+ actionType: string;
547
+ expression: string;
548
+ args: {
549
+ api: {
550
+ method: string;
551
+ url: string; /**
552
+ * localListViewProps规范来自crud请求api中api.data.$self参数值的。
553
+ * 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
554
+ * __searchable__...:顶部放大镜搜索条件
555
+ * filter:右侧过滤器
556
+ * perPage:每页条数
557
+ * page:当前页码
558
+ * orderBy:排序字段
559
+ * orderDir:排序方向
560
+ */
561
+ data: {
562
+ objectName: string;
563
+ $: {
564
+ _id: string;
565
+ };
566
+ $self: string;
567
+ };
568
+ requestAdaptor: string;
569
+ adaptor: string;
570
+ headers: {
571
+ Authorization: string;
572
+ };
573
+ };
574
+ messages: {
575
+ success: string;
576
+ failed: string;
577
+ };
578
+ msgType?: undefined;
579
+ msg?: undefined;
580
+ position?: undefined;
581
+ };
582
+ })[];
583
+ };
453
584
  eventRemove: {
454
585
  weight: number;
455
586
  actions: {
@@ -514,13 +645,11 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
514
645
  type: string;
515
646
  label: string;
516
647
  name: string;
517
- initialEvents: {
518
- id: string;
519
- title: string;
520
- start: string;
521
- }[];
648
+ editable: any;
649
+ selectable: any;
650
+ selectMirror: any;
522
651
  onEvent: {
523
- select: {
652
+ getEvents: {
524
653
  weight: number;
525
654
  actions: {
526
655
  componentId: string;
@@ -529,7 +658,7 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
529
658
  script: string;
530
659
  }[];
531
660
  };
532
- eventClick: {
661
+ select: {
533
662
  weight: number;
534
663
  actions: {
535
664
  componentId: string;
@@ -538,7 +667,7 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
538
667
  script: string;
539
668
  }[];
540
669
  };
541
- eventAdd: {
670
+ eventClick: {
542
671
  weight: number;
543
672
  actions: {
544
673
  componentId: string;
@@ -547,7 +676,7 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
547
676
  script: string;
548
677
  }[];
549
678
  };
550
- eventChange: {
679
+ eventAdd: {
551
680
  weight: number;
552
681
  actions: {
553
682
  componentId: string;
@@ -556,6 +685,76 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
556
685
  script: string;
557
686
  }[];
558
687
  };
688
+ eventChange: {
689
+ weight: number;
690
+ actions: ({
691
+ actionType: string;
692
+ args: {
693
+ api: {
694
+ method: string;
695
+ url: string;
696
+ data: {
697
+ query: string;
698
+ };
699
+ headers: {
700
+ Authorization: string;
701
+ };
702
+ };
703
+ msgType?: undefined;
704
+ msg?: undefined;
705
+ position?: undefined;
706
+ messages?: undefined;
707
+ };
708
+ expression?: undefined;
709
+ } | {
710
+ actionType: string;
711
+ expression: string;
712
+ args: {
713
+ msgType: string;
714
+ msg: string;
715
+ position: string;
716
+ api?: undefined;
717
+ messages?: undefined;
718
+ };
719
+ } | {
720
+ actionType: string;
721
+ expression: string;
722
+ args: {
723
+ api: {
724
+ method: string;
725
+ url: string; /**
726
+ * localListViewProps规范来自crud请求api中api.data.$self参数值的。
727
+ * 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
728
+ * __searchable__...:顶部放大镜搜索条件
729
+ * filter:右侧过滤器
730
+ * perPage:每页条数
731
+ * page:当前页码
732
+ * orderBy:排序字段
733
+ * orderDir:排序方向
734
+ */
735
+ data: {
736
+ objectName: string;
737
+ $: {
738
+ _id: string;
739
+ };
740
+ $self: string;
741
+ };
742
+ requestAdaptor: string;
743
+ adaptor: string;
744
+ headers: {
745
+ Authorization: string;
746
+ };
747
+ };
748
+ messages: {
749
+ success: string;
750
+ failed: string;
751
+ };
752
+ msgType?: undefined;
753
+ msg?: undefined;
754
+ position?: undefined;
755
+ };
756
+ })[];
757
+ };
559
758
  eventRemove: {
560
759
  weight: number;
561
760
  actions: {
@@ -41,13 +41,11 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
41
41
  type: string;
42
42
  label: string;
43
43
  name: string;
44
- initialEvents: {
45
- id: string;
46
- title: string;
47
- start: string;
48
- }[];
44
+ editable: any;
45
+ selectable: any;
46
+ selectMirror: any;
49
47
  onEvent: {
50
- select: {
48
+ getEvents: {
51
49
  weight: number;
52
50
  actions: {
53
51
  componentId: string;
@@ -56,7 +54,7 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
56
54
  script: string;
57
55
  }[];
58
56
  };
59
- eventClick: {
57
+ select: {
60
58
  weight: number;
61
59
  actions: {
62
60
  componentId: string;
@@ -65,7 +63,7 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
65
63
  script: string;
66
64
  }[];
67
65
  };
68
- eventAdd: {
66
+ eventClick: {
69
67
  weight: number;
70
68
  actions: {
71
69
  componentId: string;
@@ -74,7 +72,7 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
74
72
  script: string;
75
73
  }[];
76
74
  };
77
- eventChange: {
75
+ eventAdd: {
78
76
  weight: number;
79
77
  actions: {
80
78
  componentId: string;
@@ -83,6 +81,67 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
83
81
  script: string;
84
82
  }[];
85
83
  };
84
+ eventChange: {
85
+ weight: number;
86
+ actions: ({
87
+ actionType: string;
88
+ args: {
89
+ api: {
90
+ method: string;
91
+ url: string;
92
+ data: {
93
+ query: string;
94
+ };
95
+ headers: {
96
+ Authorization: string;
97
+ };
98
+ };
99
+ msgType?: undefined;
100
+ msg?: undefined;
101
+ position?: undefined;
102
+ messages?: undefined;
103
+ };
104
+ expression?: undefined;
105
+ } | {
106
+ actionType: string;
107
+ expression: string;
108
+ args: {
109
+ msgType: string;
110
+ msg: string;
111
+ position: string;
112
+ api?: undefined;
113
+ messages?: undefined;
114
+ };
115
+ } | {
116
+ actionType: string;
117
+ expression: string;
118
+ args: {
119
+ api: {
120
+ method: string;
121
+ url: string;
122
+ data: {
123
+ objectName: string;
124
+ $: {
125
+ _id: string;
126
+ };
127
+ $self: string;
128
+ };
129
+ requestAdaptor: string;
130
+ adaptor: string;
131
+ headers: {
132
+ Authorization: string;
133
+ };
134
+ };
135
+ messages: {
136
+ success: string;
137
+ failed: string;
138
+ };
139
+ msgType?: undefined;
140
+ msg?: undefined;
141
+ position?: undefined;
142
+ };
143
+ })[];
144
+ };
86
145
  eventRemove: {
87
146
  weight: number;
88
147
  actions: {
@@ -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
+ };
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.7",
4
+ "version": "1.0.9",
5
5
  "unpkg": "./dist/index.umd.js",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.esm.js",
@@ -14,8 +14,8 @@
14
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
- "build-rollup": "rollup -c rollup.config.ts && yarn build-uglifyjs",
18
- "build-uglifyjs": "yarn uglifyjs dist/index.umd.js -o dist/index.umd.min.js"
17
+ "build-rollup": "rollup -c rollup.config.ts",
18
+ "uglifyjs": "yarn uglifyjs dist/index.umd.js -o dist/index.umd.min.js"
19
19
  },
20
20
  "license": "MIT",
21
21
  "publishConfig": {
@@ -58,5 +58,5 @@
58
58
  "dependencies": {
59
59
  "lodash": "^4.17.21"
60
60
  },
61
- "gitHead": "cfb2322ea4243ffff3a03a45d93deb2c5c40ddf6"
61
+ "gitHead": "baa8e1a29e04ad3bf8ed0e4698ef2555d427d3ae"
62
62
  }