@steedos-widgets/amis-lib 1.0.8 → 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.
@@ -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
+ };
@@ -20,3 +20,4 @@ export * from './lib/converter/amis/fields_filter';
20
20
  export * from './lib/workflow/flow';
21
21
  export * from './lib/assets';
22
22
  export * from './utils/object';
23
+ export * from './render';
@@ -12,15 +12,44 @@ export function getCalendarApi(mainObject: any, fields: any, options: any): Prom
12
12
  Authorization: string;
13
13
  };
14
14
  }>;
15
+ export function getCalendarRecordPermissionsApi(mainObject: any, recordId: any): {
16
+ method: string;
17
+ url: string;
18
+ data: {
19
+ query: string;
20
+ };
21
+ headers: {
22
+ Authorization: string;
23
+ };
24
+ };
25
+ export function getCalendarRecordSaveApi(object: any, calendarOptions: any): {
26
+ method: string;
27
+ url: string;
28
+ data: {
29
+ objectName: string;
30
+ $: {
31
+ _id: string;
32
+ };
33
+ $self: string;
34
+ };
35
+ requestAdaptor: string;
36
+ adaptor: string;
37
+ headers: {
38
+ Authorization: string;
39
+ };
40
+ };
15
41
  /**
16
42
  * 列表视图Calendar amisSchema
17
43
  * @param {*} objectSchema 对象UISchema
18
44
  * @returns amisSchema
19
45
  */
20
- export function getObjectCalendar(objectSchema: any, listView: any, ctx: any): Promise<{
46
+ export function getObjectCalendar(objectSchema: any, listView: any, options: any): Promise<{
21
47
  type: string;
22
48
  label: string;
23
49
  name: string;
50
+ editable: any;
51
+ selectable: any;
52
+ selectMirror: any;
24
53
  onEvent: {
25
54
  getEvents: {
26
55
  weight: number;
@@ -60,12 +89,64 @@ export function getObjectCalendar(objectSchema: any, listView: any, ctx: any): P
60
89
  };
61
90
  eventChange: {
62
91
  weight: number;
63
- actions: {
64
- componentId: string;
65
- args: {};
92
+ actions: ({
66
93
  actionType: string;
67
- script: string;
68
- }[];
94
+ args: {
95
+ api: {
96
+ method: string;
97
+ url: string;
98
+ data: {
99
+ query: string;
100
+ };
101
+ headers: {
102
+ Authorization: string;
103
+ };
104
+ };
105
+ msgType?: undefined;
106
+ msg?: undefined;
107
+ position?: undefined;
108
+ messages?: undefined;
109
+ };
110
+ expression?: undefined;
111
+ } | {
112
+ actionType: string;
113
+ expression: string;
114
+ args: {
115
+ msgType: string;
116
+ msg: string;
117
+ position: string;
118
+ api?: undefined;
119
+ messages?: undefined;
120
+ };
121
+ } | {
122
+ actionType: string;
123
+ expression: string;
124
+ args: {
125
+ api: {
126
+ method: string;
127
+ url: string;
128
+ data: {
129
+ objectName: string;
130
+ $: {
131
+ _id: string;
132
+ };
133
+ $self: string;
134
+ };
135
+ requestAdaptor: string;
136
+ adaptor: string;
137
+ headers: {
138
+ Authorization: string;
139
+ };
140
+ };
141
+ messages: {
142
+ success: string;
143
+ failed: string;
144
+ };
145
+ msgType?: undefined;
146
+ msg?: undefined;
147
+ position?: undefined;
148
+ };
149
+ })[];
69
150
  };
70
151
  eventRemove: {
71
152
  weight: number;
@@ -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" | "table" | "email" | "html" | "textarea" | "picker" | "checkbox";
9
+ export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "textarea" | "table" | "email" | "html" | "picker" | "checkbox";
10
10
  export function getObjectFieldSubFields(mainField: any, fields: any): any;
11
11
  export function getGridFieldSubFields(mainField: any, fields: any): any;
12
12
  /**
@@ -46,3 +46,13 @@ export function getApi(object: any, recordId: any, fields: any, options: any): P
46
46
  Authorization: string;
47
47
  };
48
48
  }>;
49
+ export function getRecordPermissionsApi(object: any, recordId: any, options: any): {
50
+ method: string;
51
+ url: string;
52
+ data: {
53
+ query: string;
54
+ };
55
+ headers: {
56
+ Authorization: string;
57
+ };
58
+ };
@@ -21,4 +21,7 @@ export function getFindQuery(object: any, recordId: any, fields: any, options: a
21
21
  pageSize: string;
22
22
  query: string;
23
23
  }>;
24
+ export function getRecordPermissionsQuery(object: any, recordId: any, options: any): {
25
+ query: string;
26
+ };
24
27
  export function getApi(isMobile: any): string;
@@ -17,7 +17,7 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
17
17
  md: string;
18
18
  className: string;
19
19
  columnClassName: string;
20
- valign?: undefined;
20
+ valign: string;
21
21
  } | {
22
22
  body: ({
23
23
  type: string;
@@ -45,10 +45,11 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
45
45
  wrapperComponent?: undefined;
46
46
  })[];
47
47
  md: string;
48
- valign: string;
49
48
  columnClassName: string;
50
49
  className?: undefined;
50
+ valign?: undefined;
51
51
  })[];
52
+ className: string;
52
53
  }[];
53
54
  md: string;
54
55
  valign?: undefined;
@@ -66,7 +67,7 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
66
67
  md: string;
67
68
  valign: string;
68
69
  })[];
69
- align: string;
70
+ className: string;
70
71
  };
71
72
  /**
72
73
  * 列表视图顶部第二行amisSchema
@@ -75,7 +76,6 @@ export function getObjectListHeaderFirstLine(objectSchema: any, listViewName: an
75
76
  */
76
77
  export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: any, ctx: any): Promise<{
77
78
  type: string;
78
- align: string;
79
79
  columns: ({
80
80
  body: {
81
81
  type: string;
@@ -91,7 +91,7 @@ export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: a
91
91
  id: string;
92
92
  }[];
93
93
  md: string;
94
- valign: string;
94
+ columnClassName: string;
95
95
  } | {
96
96
  body: ({
97
97
  type: string;
@@ -120,7 +120,7 @@ export function getObjectListHeaderSecordLine(objectSchema: any, listViewName: a
120
120
  className: string;
121
121
  })[];
122
122
  md: string;
123
- valign?: undefined;
123
+ columnClassName?: undefined;
124
124
  })[];
125
125
  className: string;
126
126
  }>;
@@ -364,7 +364,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
364
364
  md: string;
365
365
  className: string;
366
366
  columnClassName: string;
367
- valign?: undefined;
367
+ valign: string;
368
368
  } | {
369
369
  body: ({
370
370
  type: string;
@@ -392,10 +392,11 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
392
392
  wrapperComponent?: undefined;
393
393
  })[];
394
394
  md: string;
395
- valign: string;
396
395
  columnClassName: string;
397
396
  className?: undefined;
397
+ valign?: undefined;
398
398
  })[];
399
+ className: string;
399
400
  }[];
400
401
  md: string;
401
402
  valign?: undefined;
@@ -413,10 +414,9 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
413
414
  md: string;
414
415
  valign: string;
415
416
  })[];
416
- align: string;
417
+ className: string;
417
418
  } | {
418
419
  type: string;
419
- align: string;
420
420
  columns: ({
421
421
  body: {
422
422
  type: string;
@@ -432,7 +432,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
432
432
  id: string;
433
433
  }[];
434
434
  md: string;
435
- valign: string;
435
+ columnClassName: string;
436
436
  } | {
437
437
  body: ({
438
438
  type: string;
@@ -461,7 +461,7 @@ export function getObjectListHeader(objectSchema: any, listViewName: any, ctx: a
461
461
  className: string;
462
462
  })[];
463
463
  md: string;
464
- valign?: undefined;
464
+ columnClassName?: undefined;
465
465
  })[];
466
466
  className: string;
467
467
  })[];
@@ -490,6 +490,11 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any): P
490
490
  };
491
491
  body: {
492
492
  type: string;
493
+ data: {
494
+ "&": string;
495
+ record: string;
496
+ recordLoaded: string;
497
+ };
493
498
  body: {
494
499
  type: string;
495
500
  className: string;
@@ -508,35 +513,18 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any): P
508
513
  className: string;
509
514
  columnClassName: string;
510
515
  } | {
511
- body: ({
512
- type: string;
513
- tpl: string;
514
- inline: boolean;
515
- wrapperComponent: string;
516
- style: {
517
- fontFamily: string;
518
- fontSize: number;
519
- fontWeight?: undefined;
520
- textAlign?: undefined;
521
- };
522
- className: string;
523
- } | {
516
+ body: {
524
517
  type: string;
525
518
  tpl: string;
526
519
  inline: boolean;
527
520
  wrapperComponent: string;
528
- style: {
529
- fontFamily: string;
530
- fontSize: number;
531
- fontWeight: string;
532
- textAlign: string;
533
- };
534
521
  className: string;
535
- })[];
522
+ }[];
523
+ columnClassName: string;
536
524
  md?: undefined;
537
525
  className?: undefined;
538
- columnClassName?: undefined;
539
526
  })[];
527
+ className: string;
540
528
  }[];
541
529
  md: string;
542
530
  } | {
@@ -552,11 +540,12 @@ export function getObjectRecordDetailHeader(objectSchema: any, recordId: any): P
552
540
  };
553
541
  md: string;
554
542
  })[];
555
- align: string;
543
+ className: string;
556
544
  }[];
557
545
  size: string;
558
546
  }[];
559
547
  messages: {};
548
+ hiddenOn: string;
560
549
  }[];
561
550
  }>;
562
551
  /**
@@ -568,9 +557,12 @@ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any)
568
557
  type: string;
569
558
  body: {
570
559
  type: string;
560
+ valign: string;
571
561
  columns: ({
572
562
  body: {
573
563
  type: string;
564
+ valign: string;
565
+ className: string;
574
566
  columns: ({
575
567
  body: {
576
568
  type: string;
@@ -588,11 +580,6 @@ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any)
588
580
  inline: boolean;
589
581
  wrapperComponent: string;
590
582
  className: string;
591
- style: {
592
- fontFamily: string;
593
- fontSize: number;
594
- fontWeight: string;
595
- };
596
583
  }[];
597
584
  md: string;
598
585
  valign: string;
@@ -614,9 +601,8 @@ export function getObjectRecordDetailRelatedListHeader(relatedObjectSchema: any)
614
601
  };
615
602
  md: string;
616
603
  })[];
617
- align: string;
604
+ className: string;
618
605
  }[];
619
- size: string;
620
606
  className: string;
621
607
  }>;
622
608
  /**