@steedos-widgets/amis-lib 1.0.10 → 1.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.
@@ -27,9 +27,7 @@ export function getCalendarRecordSaveApi(object: any, calendarOptions: any): {
27
27
  url: string;
28
28
  data: {
29
29
  objectName: string;
30
- $: {
31
- _id: string;
32
- };
30
+ $: {};
33
31
  $self: string;
34
32
  };
35
33
  requestAdaptor: string;
@@ -43,13 +41,19 @@ export function getCalendarRecordSaveApi(object: any, calendarOptions: any): {
43
41
  * @param {*} objectSchema 对象UISchema
44
42
  * @returns amisSchema
45
43
  */
46
- export function getObjectCalendar(objectSchema: any, listView: any, options: any): Promise<{
44
+ export function getObjectCalendar(objectSchema: any, calendarOptions: any, options: any): Promise<{
47
45
  type: string;
48
46
  label: string;
49
47
  name: string;
50
48
  editable: any;
51
49
  selectable: any;
52
50
  selectMirror: any;
51
+ initialView: any;
52
+ businessHours: {
53
+ daysOfWeek: number[];
54
+ startTime: string;
55
+ endTime: string;
56
+ };
53
57
  onEvent: {
54
58
  getEvents: {
55
59
  weight: number;
@@ -127,9 +131,7 @@ export function getObjectCalendar(objectSchema: any, listView: any, options: any
127
131
  url: string;
128
132
  data: {
129
133
  objectName: string;
130
- $: {
131
- _id: string;
132
- };
134
+ $: {};
133
135
  $self: string;
134
136
  };
135
137
  requestAdaptor: string;
@@ -168,3 +170,9 @@ export function getObjectCalendar(objectSchema: any, listView: any, options: any
168
170
  };
169
171
  };
170
172
  }>;
173
+ export namespace DEFAULT_CALENDAR_OPTIONS {
174
+ const startDateExpr: string;
175
+ const endDateExpr: string;
176
+ const allDayExpr: string;
177
+ const textExpr: string;
178
+ }
@@ -8,11 +8,8 @@ export function getObjectFieldsFilterButtonSchema(objectSchema: any): Promise<{
8
8
  actions: {
9
9
  actionType: string;
10
10
  args: {
11
- value: {
12
- showFieldsFilter: string;
13
- };
11
+ eventName: string;
14
12
  };
15
- componentId: string;
16
13
  }[];
17
14
  };
18
15
  };
@@ -264,8 +261,20 @@ export function getObjectFieldsFilterBarSchema(objectSchema: any, fields: any, c
264
261
  };
265
262
  size: string;
266
263
  className: string;
264
+ visibleOn: string;
267
265
  };
268
- visibleOn: string;
269
266
  className: string;
267
+ onEvent: {
268
+ broadcast_toggle_fields_filter: {
269
+ actions: {
270
+ actionType: string;
271
+ args: {
272
+ value: {
273
+ showFieldsFilter: string;
274
+ };
275
+ };
276
+ }[];
277
+ };
278
+ };
270
279
  }>;
271
280
  export function resetLocalListViewPropsWithSearchableFields(listViewId: any, searchableFields: any): void;
@@ -103,11 +103,8 @@ export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: a
103
103
  actions: {
104
104
  actionType: string;
105
105
  args: {
106
- value: {
107
- showFieldsFilter: string;
108
- };
106
+ eventName: string;
109
107
  };
110
- componentId: string;
111
108
  }[];
112
109
  };
113
110
  };
@@ -339,9 +336,21 @@ export function getObjectListHeaderFieldsFilterBar(objectSchema: any, listViewNa
339
336
  };
340
337
  size: string;
341
338
  className: string;
339
+ visibleOn: string;
342
340
  };
343
- visibleOn: string;
344
341
  className: string;
342
+ onEvent: {
343
+ broadcast_toggle_fields_filter: {
344
+ actions: {
345
+ actionType: string;
346
+ args: {
347
+ value: {
348
+ showFieldsFilter: string;
349
+ };
350
+ };
351
+ }[];
352
+ };
353
+ };
345
354
  }>;
346
355
  /**
347
356
  * 列表视图顶部amisSchema
@@ -444,11 +453,8 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
444
453
  actions: {
445
454
  actionType: string;
446
455
  args: {
447
- value: {
448
- showFieldsFilter: string;
449
- };
456
+ eventName: string;
450
457
  };
451
- componentId: string;
452
458
  }[];
453
459
  };
454
460
  };
@@ -102,20 +102,32 @@ export function getObjectDetail(objectSchema: any, recordId: any, ctx: any): Pro
102
102
  }[];
103
103
  className: string;
104
104
  actions: any[];
105
+ hiddenOn: string;
105
106
  }[];
106
107
  onEvent: {
107
108
  fetchInited: {
108
109
  weight: number;
109
- actions: {
110
+ actions: ({
110
111
  actionType: string;
111
112
  eventName: string;
112
113
  args: {
113
114
  eventName: string;
115
+ value?: undefined;
114
116
  };
115
117
  data: {
116
118
  record: string;
117
119
  };
118
- }[];
120
+ } | {
121
+ actionType: string;
122
+ args: {
123
+ value: {
124
+ recordLoaded: boolean;
125
+ };
126
+ eventName?: undefined;
127
+ };
128
+ eventName?: undefined;
129
+ data?: undefined;
130
+ })[];
119
131
  };
120
132
  };
121
133
  }>;
@@ -96,20 +96,32 @@ export function getViewSchema(objectName: any, recordId: any, ctx: any): Promise
96
96
  }[];
97
97
  className: string;
98
98
  actions: any[];
99
+ hiddenOn: string;
99
100
  }[];
100
101
  onEvent: {
101
102
  fetchInited: {
102
103
  weight: number;
103
- actions: {
104
+ actions: ({
104
105
  actionType: string;
105
106
  eventName: string;
106
107
  args: {
107
108
  eventName: string;
109
+ value?: undefined;
108
110
  };
109
111
  data: {
110
112
  record: string;
111
113
  };
112
- }[];
114
+ } | {
115
+ actionType: string;
116
+ args: {
117
+ value: {
118
+ recordLoaded: boolean;
119
+ };
120
+ eventName?: undefined;
121
+ };
122
+ eventName?: undefined;
123
+ data?: undefined;
124
+ })[];
113
125
  };
114
126
  };
115
127
  };
@@ -127,6 +139,42 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
127
139
  } | {
128
140
  uiSchema: any;
129
141
  isCalendar: boolean;
142
+ amisSchema: any;
143
+ isCustomAmisSchema?: undefined;
144
+ } | {
145
+ uiSchema: any;
146
+ amisSchema: {
147
+ type: string;
148
+ objectApiName: any;
149
+ columns: any;
150
+ extraColumns: any;
151
+ filters: any;
152
+ sort: string;
153
+ ctx: {};
154
+ };
155
+ isCustomAmisSchema?: undefined;
156
+ isCalendar?: undefined;
157
+ }>;
158
+ export function getTableSchema(appName: any, objectName: any, columns: any, ctx?: {}): Promise<{
159
+ uiSchema: any;
160
+ amisSchema: {
161
+ type: string;
162
+ className: string;
163
+ id: string;
164
+ name: string;
165
+ data: {
166
+ $master: string;
167
+ objectName: any;
168
+ _id: any;
169
+ recordPermissions: any;
170
+ uiSchema: any;
171
+ loaded: boolean;
172
+ };
173
+ body: {};
174
+ };
175
+ }>;
176
+ export function getCalendarSchema(appName: any, objectName: any, calendarOptions: any, ctx?: {}): Promise<{
177
+ uiSchema: any;
130
178
  amisSchema: {
131
179
  type: string;
132
180
  label: string;
@@ -134,6 +182,12 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
134
182
  editable: any;
135
183
  selectable: any;
136
184
  selectMirror: any;
185
+ initialView: any;
186
+ businessHours: {
187
+ daysOfWeek: number[];
188
+ startTime: string;
189
+ endTime: string;
190
+ };
137
191
  onEvent: {
138
192
  getEvents: {
139
193
  weight: number;
@@ -208,21 +262,10 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
208
262
  args: {
209
263
  api: {
210
264
  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
- */
265
+ url: string;
221
266
  data: {
222
267
  objectName: string;
223
- $: {
224
- _id: string;
225
- };
268
+ $: {};
226
269
  $self: string;
227
270
  };
228
271
  requestAdaptor: string;
@@ -261,38 +304,6 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
261
304
  };
262
305
  };
263
306
  };
264
- isCustomAmisSchema?: undefined;
265
- } | {
266
- uiSchema: any;
267
- amisSchema: {
268
- type: string;
269
- objectApiName: any;
270
- columns: any;
271
- extraColumns: any;
272
- filters: any;
273
- sort: string;
274
- ctx: {};
275
- };
276
- isCustomAmisSchema?: undefined;
277
- isCalendar?: undefined;
278
- }>;
279
- export function getTableSchema(appName: any, objectName: any, columns: any, ctx?: {}): Promise<{
280
- uiSchema: any;
281
- amisSchema: {
282
- type: string;
283
- className: string;
284
- id: string;
285
- name: string;
286
- data: {
287
- $master: string;
288
- objectName: any;
289
- _id: any;
290
- recordPermissions: any;
291
- uiSchema: any;
292
- loaded: boolean;
293
- };
294
- body: {};
295
- };
296
307
  }>;
297
308
  export function getRecordDetailHeaderSchema(objectName: any, recordId: any): Promise<{
298
309
  uiSchema: any;
@@ -467,140 +478,7 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
467
478
  } | {
468
479
  uiSchema: any;
469
480
  isCalendar: boolean;
470
- amisSchema: {
471
- type: string;
472
- label: string;
473
- name: string;
474
- editable: any;
475
- selectable: any;
476
- selectMirror: any;
477
- onEvent: {
478
- getEvents: {
479
- weight: number;
480
- actions: {
481
- componentId: string;
482
- args: {};
483
- actionType: string;
484
- script: string;
485
- }[];
486
- };
487
- select: {
488
- weight: number;
489
- actions: {
490
- componentId: string;
491
- args: {};
492
- actionType: string;
493
- script: string;
494
- }[];
495
- };
496
- eventClick: {
497
- weight: number;
498
- actions: {
499
- componentId: string;
500
- args: {};
501
- actionType: string;
502
- script: string;
503
- }[];
504
- };
505
- eventAdd: {
506
- weight: number;
507
- actions: {
508
- componentId: string;
509
- args: {};
510
- actionType: string;
511
- script: string;
512
- }[];
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
- };
584
- eventRemove: {
585
- weight: number;
586
- actions: {
587
- componentId: string;
588
- args: {};
589
- actionType: string;
590
- script: string;
591
- }[];
592
- };
593
- eventsSet: {
594
- weight: number;
595
- actions: {
596
- componentId: string;
597
- args: {};
598
- actionType: string;
599
- script: string;
600
- }[];
601
- };
602
- };
603
- };
481
+ amisSchema: any;
604
482
  isCustomAmisSchema?: undefined;
605
483
  } | {
606
484
  uiSchema: any;
@@ -641,140 +519,7 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
641
519
  } | {
642
520
  uiSchema: any;
643
521
  isCalendar: boolean;
644
- amisSchema: {
645
- type: string;
646
- label: string;
647
- name: string;
648
- editable: any;
649
- selectable: any;
650
- selectMirror: any;
651
- onEvent: {
652
- getEvents: {
653
- weight: number;
654
- actions: {
655
- componentId: string;
656
- args: {};
657
- actionType: string;
658
- script: string;
659
- }[];
660
- };
661
- select: {
662
- weight: number;
663
- actions: {
664
- componentId: string;
665
- args: {};
666
- actionType: string;
667
- script: string;
668
- }[];
669
- };
670
- eventClick: {
671
- weight: number;
672
- actions: {
673
- componentId: string;
674
- args: {};
675
- actionType: string;
676
- script: string;
677
- }[];
678
- };
679
- eventAdd: {
680
- weight: number;
681
- actions: {
682
- componentId: string;
683
- args: {};
684
- actionType: string;
685
- script: string;
686
- }[];
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
- };
758
- eventRemove: {
759
- weight: number;
760
- actions: {
761
- componentId: string;
762
- args: {};
763
- actionType: string;
764
- script: string;
765
- }[];
766
- };
767
- eventsSet: {
768
- weight: number;
769
- actions: {
770
- componentId: string;
771
- args: {};
772
- actionType: string;
773
- script: string;
774
- }[];
775
- };
776
- };
777
- };
522
+ amisSchema: any;
778
523
  isCustomAmisSchema?: undefined;
779
524
  } | {
780
525
  uiSchema: any;