@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.
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +148 -31
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +145 -28
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +162 -45
- package/dist/index.umd.js.map +1 -1
- package/dist/render.d.ts +15 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/converter/amis/calendar.d.ts +87 -6
- package/dist/types/lib/converter/amis/fields/index.d.ts +1 -1
- package/dist/types/lib/converter/amis/fields/table.d.ts +10 -0
- package/dist/types/lib/converter/amis/graphql.d.ts +3 -0
- package/dist/types/lib/converter/amis/header.d.ts +27 -41
- package/dist/types/lib/objects.d.ts +233 -39
- package/dist/types/lib/objectsRelated.d.ts +60 -5
- package/dist/types/render.d.ts +15 -0
- package/package.json +4 -4
- package/dist/index.umd.min.js +0 -802
|
@@ -131,6 +131,9 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
|
|
|
131
131
|
type: string;
|
|
132
132
|
label: string;
|
|
133
133
|
name: string;
|
|
134
|
+
editable: any;
|
|
135
|
+
selectable: any;
|
|
136
|
+
selectMirror: any;
|
|
134
137
|
onEvent: {
|
|
135
138
|
getEvents: {
|
|
136
139
|
weight: number;
|
|
@@ -170,12 +173,73 @@ export function getListSchema(appName: any, objectName: any, listViewName: any,
|
|
|
170
173
|
};
|
|
171
174
|
eventChange: {
|
|
172
175
|
weight: number;
|
|
173
|
-
actions: {
|
|
174
|
-
componentId: string;
|
|
175
|
-
args: {};
|
|
176
|
+
actions: ({
|
|
176
177
|
actionType: string;
|
|
177
|
-
|
|
178
|
-
|
|
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
|
+
})[];
|
|
179
243
|
};
|
|
180
244
|
eventRemove: {
|
|
181
245
|
weight: number;
|
|
@@ -249,6 +313,11 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any): Pro
|
|
|
249
313
|
};
|
|
250
314
|
body: {
|
|
251
315
|
type: string;
|
|
316
|
+
data: {
|
|
317
|
+
"&": string;
|
|
318
|
+
record: string;
|
|
319
|
+
recordLoaded: string;
|
|
320
|
+
};
|
|
252
321
|
body: {
|
|
253
322
|
type: string;
|
|
254
323
|
className: string;
|
|
@@ -267,35 +336,18 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any): Pro
|
|
|
267
336
|
className: string;
|
|
268
337
|
columnClassName: string;
|
|
269
338
|
} | {
|
|
270
|
-
body:
|
|
271
|
-
type: string;
|
|
272
|
-
tpl: string;
|
|
273
|
-
inline: boolean;
|
|
274
|
-
wrapperComponent: string;
|
|
275
|
-
style: {
|
|
276
|
-
fontFamily: string;
|
|
277
|
-
fontSize: number;
|
|
278
|
-
fontWeight?: undefined;
|
|
279
|
-
textAlign?: undefined;
|
|
280
|
-
};
|
|
281
|
-
className: string;
|
|
282
|
-
} | {
|
|
339
|
+
body: {
|
|
283
340
|
type: string;
|
|
284
341
|
tpl: string;
|
|
285
342
|
inline: boolean;
|
|
286
343
|
wrapperComponent: string;
|
|
287
|
-
style: {
|
|
288
|
-
fontFamily: string;
|
|
289
|
-
fontSize: number;
|
|
290
|
-
fontWeight: string;
|
|
291
|
-
textAlign: string;
|
|
292
|
-
};
|
|
293
344
|
className: string;
|
|
294
|
-
}
|
|
345
|
+
}[];
|
|
346
|
+
columnClassName: string;
|
|
295
347
|
md?: undefined;
|
|
296
348
|
className?: undefined;
|
|
297
|
-
columnClassName?: undefined;
|
|
298
349
|
})[];
|
|
350
|
+
className: string;
|
|
299
351
|
}[];
|
|
300
352
|
md: string;
|
|
301
353
|
} | {
|
|
@@ -311,11 +363,12 @@ export function getRecordDetailHeaderSchema(objectName: any, recordId: any): Pro
|
|
|
311
363
|
};
|
|
312
364
|
md: string;
|
|
313
365
|
})[];
|
|
314
|
-
|
|
366
|
+
className: string;
|
|
315
367
|
}[];
|
|
316
368
|
size: string;
|
|
317
369
|
}[];
|
|
318
370
|
messages: {};
|
|
371
|
+
hiddenOn: string;
|
|
319
372
|
}[];
|
|
320
373
|
};
|
|
321
374
|
}>;
|
|
@@ -331,19 +384,32 @@ export function getRecordDetailSchema(objectName: any, appId: any): Promise<{
|
|
|
331
384
|
id: string;
|
|
332
385
|
onEvent: {
|
|
333
386
|
recordLoaded: {
|
|
334
|
-
actions: {
|
|
387
|
+
actions: ({
|
|
335
388
|
actionType: string;
|
|
336
389
|
data: {
|
|
337
390
|
name: string;
|
|
338
391
|
};
|
|
339
|
-
|
|
392
|
+
args?: undefined;
|
|
393
|
+
} | {
|
|
394
|
+
actionType: string;
|
|
395
|
+
args: {
|
|
396
|
+
value: {
|
|
397
|
+
record: string;
|
|
398
|
+
recordLoaded: boolean;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
data?: undefined;
|
|
402
|
+
})[];
|
|
340
403
|
};
|
|
341
404
|
};
|
|
405
|
+
className?: undefined;
|
|
342
406
|
tabs?: undefined;
|
|
343
407
|
} | {
|
|
344
408
|
type: string;
|
|
409
|
+
className: string;
|
|
345
410
|
tabs: {
|
|
346
411
|
title: string;
|
|
412
|
+
className: string;
|
|
347
413
|
body: {
|
|
348
414
|
type: string;
|
|
349
415
|
label: string;
|
|
@@ -405,6 +471,9 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
|
|
|
405
471
|
type: string;
|
|
406
472
|
label: string;
|
|
407
473
|
name: string;
|
|
474
|
+
editable: any;
|
|
475
|
+
selectable: any;
|
|
476
|
+
selectMirror: any;
|
|
408
477
|
onEvent: {
|
|
409
478
|
getEvents: {
|
|
410
479
|
weight: number;
|
|
@@ -444,12 +513,73 @@ export function getObjectRelatedList(appName: any, objectName: any, recordId: an
|
|
|
444
513
|
};
|
|
445
514
|
eventChange: {
|
|
446
515
|
weight: number;
|
|
447
|
-
actions: {
|
|
448
|
-
componentId: string;
|
|
449
|
-
args: {};
|
|
516
|
+
actions: ({
|
|
450
517
|
actionType: string;
|
|
451
|
-
|
|
452
|
-
|
|
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
|
+
})[];
|
|
453
583
|
};
|
|
454
584
|
eventRemove: {
|
|
455
585
|
weight: number;
|
|
@@ -515,6 +645,9 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
|
|
|
515
645
|
type: string;
|
|
516
646
|
label: string;
|
|
517
647
|
name: string;
|
|
648
|
+
editable: any;
|
|
649
|
+
selectable: any;
|
|
650
|
+
selectMirror: any;
|
|
518
651
|
onEvent: {
|
|
519
652
|
getEvents: {
|
|
520
653
|
weight: number;
|
|
@@ -554,12 +687,73 @@ export function getObjectRelated({ appName, masterObjectName, objectName, relate
|
|
|
554
687
|
};
|
|
555
688
|
eventChange: {
|
|
556
689
|
weight: number;
|
|
557
|
-
actions: {
|
|
558
|
-
componentId: string;
|
|
559
|
-
args: {};
|
|
690
|
+
actions: ({
|
|
560
691
|
actionType: string;
|
|
561
|
-
|
|
562
|
-
|
|
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
|
+
})[];
|
|
563
757
|
};
|
|
564
758
|
eventRemove: {
|
|
565
759
|
weight: number;
|
|
@@ -41,6 +41,9 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
|
|
|
41
41
|
type: string;
|
|
42
42
|
label: string;
|
|
43
43
|
name: string;
|
|
44
|
+
editable: any;
|
|
45
|
+
selectable: any;
|
|
46
|
+
selectMirror: any;
|
|
44
47
|
onEvent: {
|
|
45
48
|
getEvents: {
|
|
46
49
|
weight: number;
|
|
@@ -80,12 +83,64 @@ export function getAmisObjectRelatedList(appName: any, objectName: any, recordId
|
|
|
80
83
|
};
|
|
81
84
|
eventChange: {
|
|
82
85
|
weight: number;
|
|
83
|
-
actions: {
|
|
84
|
-
componentId: string;
|
|
85
|
-
args: {};
|
|
86
|
+
actions: ({
|
|
86
87
|
actionType: string;
|
|
87
|
-
|
|
88
|
-
|
|
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
|
+
})[];
|
|
89
144
|
};
|
|
90
145
|
eventRemove: {
|
|
91
146
|
weight: number;
|
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.
|
|
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
|
|
18
|
-
"
|
|
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": "
|
|
61
|
+
"gitHead": "baa8e1a29e04ad3bf8ed0e4698ef2555d427d3ae"
|
|
62
62
|
}
|