@steedos-widgets/amis-lib 0.0.3 → 0.0.4
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 +248 -54
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.esm.js +248 -54
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +508 -0
- package/dist/index.umd.min.js +508 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/lib/assets.d.ts +1 -0
- package/dist/types/lib/buttons.d.ts +6 -4
- package/dist/types/lib/converter/amis/api.d.ts +1 -1
- package/dist/types/lib/converter/amis/fields/file.d.ts +57 -0
- package/dist/types/lib/converter/amis/fields/index.d.ts +6 -4
- package/dist/types/lib/converter/amis/fields/list.d.ts +22 -6
- package/dist/types/lib/converter/amis/fields/lookup.d.ts +11 -95
- package/dist/types/lib/converter/amis/fields/sections.d.ts +2 -1
- package/dist/types/lib/converter/amis/fields/table.d.ts +2 -2
- package/dist/types/lib/converter/amis/fields/type.d.ts +1 -0
- package/dist/types/lib/converter/amis/fields/user.d.ts +1 -0
- package/dist/types/lib/converter/amis/filters.d.ts +5 -0
- package/dist/types/lib/converter/amis/form.d.ts +2 -1
- package/dist/types/lib/converter/amis/graphql.d.ts +1 -0
- package/dist/types/lib/converter/amis/index.d.ts +94 -219
- package/dist/types/lib/converter/amis/tpl.d.ts +6 -3
- package/dist/types/lib/defaultsDeep.d.ts +1 -0
- package/dist/types/lib/objects.d.ts +193 -524
- package/dist/types/lib/page.d.ts +7 -1
- package/dist/types/lib/router.d.ts +4 -2
- package/dist/types/lib/space_users.d.ts +137 -0
- package/dist/types/lib/workflow/flow.d.ts +31 -0
- package/dist/types/schema/standard_delete.amis.d.ts +56 -0
- package/dist/types/schema/standard_edit.amis.d.ts +37 -0
- package/dist/types/schema/standard_import_data.amis.d.ts +251 -0
- package/dist/types/schema/standard_new.amis.d.ts +39 -0
- package/dist/types/standard/button.d.ts +400 -0
- package/dist/types/utils/keyToPath.d.ts +6 -0
- package/dist/types/utils/object.d.ts +14 -0
- package/dist/utils/keyToPath.d.ts +6 -0
- package/dist/utils/object.d.ts +14 -0
- package/package.json +3 -4
- package/dist/amis-lib.umd.js +0 -314
- package/dist/amis-lib.umd.min.js +0 -314
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
export namespace StandardButtons {
|
|
2
|
+
function getStandardNew(uiSchema: any): {
|
|
3
|
+
type: string;
|
|
4
|
+
amis_schema: {
|
|
5
|
+
type: string;
|
|
6
|
+
body: {
|
|
7
|
+
type: string;
|
|
8
|
+
label: string;
|
|
9
|
+
id: string;
|
|
10
|
+
level: string;
|
|
11
|
+
onEvent: {
|
|
12
|
+
click: {
|
|
13
|
+
actions: {
|
|
14
|
+
actionType: string;
|
|
15
|
+
dialog: {
|
|
16
|
+
type: string;
|
|
17
|
+
title: string;
|
|
18
|
+
bodyClassName: string;
|
|
19
|
+
body: {
|
|
20
|
+
type: string;
|
|
21
|
+
label: string;
|
|
22
|
+
objectApiName: string;
|
|
23
|
+
recordId: string;
|
|
24
|
+
id: string;
|
|
25
|
+
mode: string;
|
|
26
|
+
layout: string;
|
|
27
|
+
}[];
|
|
28
|
+
id: string;
|
|
29
|
+
closeOnEsc: boolean;
|
|
30
|
+
closeOnOutside: boolean;
|
|
31
|
+
showCloseButton: boolean;
|
|
32
|
+
size: string;
|
|
33
|
+
};
|
|
34
|
+
}[];
|
|
35
|
+
weight: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}[];
|
|
39
|
+
regions: string[];
|
|
40
|
+
bodyClassName: string;
|
|
41
|
+
id: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
function getStandardEdit(uiSchema: any): {
|
|
45
|
+
type: string;
|
|
46
|
+
amis_schema: {
|
|
47
|
+
type: string;
|
|
48
|
+
body: {
|
|
49
|
+
type: string;
|
|
50
|
+
label: string;
|
|
51
|
+
id: string;
|
|
52
|
+
onEvent: {
|
|
53
|
+
click: {
|
|
54
|
+
actions: {
|
|
55
|
+
actionType: string;
|
|
56
|
+
dialog: {
|
|
57
|
+
type: string;
|
|
58
|
+
title: string;
|
|
59
|
+
bodyClassName: string;
|
|
60
|
+
body: {
|
|
61
|
+
type: string;
|
|
62
|
+
label: string;
|
|
63
|
+
objectApiName: string;
|
|
64
|
+
recordId: string;
|
|
65
|
+
id: string;
|
|
66
|
+
mode: string;
|
|
67
|
+
}[];
|
|
68
|
+
id: string;
|
|
69
|
+
closeOnEsc: boolean;
|
|
70
|
+
closeOnOutside: boolean;
|
|
71
|
+
showCloseButton: boolean;
|
|
72
|
+
size: string;
|
|
73
|
+
};
|
|
74
|
+
}[];
|
|
75
|
+
weight: number;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}[];
|
|
79
|
+
regions: string[];
|
|
80
|
+
bodyClassName: string;
|
|
81
|
+
id: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
function getStandardDelete(uiSchema: any): {
|
|
85
|
+
type: string;
|
|
86
|
+
amis_schema: {
|
|
87
|
+
type: string;
|
|
88
|
+
bodyClassName: string;
|
|
89
|
+
body: {
|
|
90
|
+
type: string;
|
|
91
|
+
label: string;
|
|
92
|
+
confirmText: string;
|
|
93
|
+
className: string;
|
|
94
|
+
onEvent: {
|
|
95
|
+
click: {
|
|
96
|
+
actions: ({
|
|
97
|
+
args: {
|
|
98
|
+
api: {
|
|
99
|
+
method: string;
|
|
100
|
+
url: string;
|
|
101
|
+
data: {
|
|
102
|
+
"&": string;
|
|
103
|
+
recordId: string;
|
|
104
|
+
objectName: string;
|
|
105
|
+
};
|
|
106
|
+
requestAdaptor: string;
|
|
107
|
+
headers: {
|
|
108
|
+
Authorization: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
messages: {
|
|
112
|
+
success: string;
|
|
113
|
+
failed: string;
|
|
114
|
+
};
|
|
115
|
+
url?: undefined;
|
|
116
|
+
blank?: undefined;
|
|
117
|
+
};
|
|
118
|
+
actionType: string;
|
|
119
|
+
componentId?: undefined;
|
|
120
|
+
expression?: undefined;
|
|
121
|
+
} | {
|
|
122
|
+
componentId: string;
|
|
123
|
+
args: {
|
|
124
|
+
url: string;
|
|
125
|
+
blank: boolean;
|
|
126
|
+
api?: undefined;
|
|
127
|
+
messages?: undefined;
|
|
128
|
+
};
|
|
129
|
+
actionType: string;
|
|
130
|
+
expression: string;
|
|
131
|
+
} | {
|
|
132
|
+
componentId: string;
|
|
133
|
+
actionType: string;
|
|
134
|
+
expression: string;
|
|
135
|
+
args?: undefined;
|
|
136
|
+
})[];
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}[];
|
|
140
|
+
regions: string[];
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
function getStandardDeleteMany(uiSchema: any): {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
function getStandardImportData(uiSchema: any): {
|
|
147
|
+
type: string;
|
|
148
|
+
amis_schema: {
|
|
149
|
+
type: string;
|
|
150
|
+
body: {
|
|
151
|
+
type: string;
|
|
152
|
+
label: string;
|
|
153
|
+
id: string;
|
|
154
|
+
onEvent: {
|
|
155
|
+
click: {
|
|
156
|
+
actions: {
|
|
157
|
+
actionType: string;
|
|
158
|
+
dialog: {
|
|
159
|
+
type: string;
|
|
160
|
+
title: string;
|
|
161
|
+
body: {
|
|
162
|
+
type: string;
|
|
163
|
+
mode: string;
|
|
164
|
+
persistData: boolean;
|
|
165
|
+
promptPageLeave: boolean;
|
|
166
|
+
name: string;
|
|
167
|
+
debug: boolean;
|
|
168
|
+
title: string;
|
|
169
|
+
submitText: string;
|
|
170
|
+
api: {
|
|
171
|
+
method: string;
|
|
172
|
+
url: string;
|
|
173
|
+
data: {
|
|
174
|
+
objectName: string;
|
|
175
|
+
$: string;
|
|
176
|
+
};
|
|
177
|
+
requestAdaptor: string;
|
|
178
|
+
responseData: {
|
|
179
|
+
recordId: string;
|
|
180
|
+
};
|
|
181
|
+
adaptor: string;
|
|
182
|
+
headers: {
|
|
183
|
+
Authorization: string;
|
|
184
|
+
};
|
|
185
|
+
dataType: string;
|
|
186
|
+
};
|
|
187
|
+
initFetch: boolean;
|
|
188
|
+
body: {
|
|
189
|
+
type: string;
|
|
190
|
+
title: string;
|
|
191
|
+
collapsable: boolean;
|
|
192
|
+
body: ({
|
|
193
|
+
name: string;
|
|
194
|
+
label: string;
|
|
195
|
+
required: boolean;
|
|
196
|
+
type: string;
|
|
197
|
+
joinValues: boolean;
|
|
198
|
+
extractValue: boolean;
|
|
199
|
+
autoComplete: {
|
|
200
|
+
method: string;
|
|
201
|
+
url: string;
|
|
202
|
+
data: {
|
|
203
|
+
orderBy: string;
|
|
204
|
+
orderDir: string;
|
|
205
|
+
pageNo: string;
|
|
206
|
+
pageSize: string;
|
|
207
|
+
query: string;
|
|
208
|
+
$term: string;
|
|
209
|
+
$value: string;
|
|
210
|
+
$: string;
|
|
211
|
+
rfield: string;
|
|
212
|
+
};
|
|
213
|
+
headers: {
|
|
214
|
+
Authorization: string;
|
|
215
|
+
};
|
|
216
|
+
requestAdaptor: string;
|
|
217
|
+
};
|
|
218
|
+
className: string;
|
|
219
|
+
labelClassName: string;
|
|
220
|
+
clearValueOnHidden: boolean;
|
|
221
|
+
id: string;
|
|
222
|
+
multiple: boolean;
|
|
223
|
+
hidden: boolean;
|
|
224
|
+
labelField?: undefined;
|
|
225
|
+
valueField?: undefined;
|
|
226
|
+
modalMode?: undefined;
|
|
227
|
+
source?: undefined;
|
|
228
|
+
size?: undefined;
|
|
229
|
+
pickerSchema?: undefined;
|
|
230
|
+
useChunk?: undefined;
|
|
231
|
+
receiver?: undefined;
|
|
232
|
+
} | {
|
|
233
|
+
name: string;
|
|
234
|
+
label: string;
|
|
235
|
+
required: boolean;
|
|
236
|
+
type: string;
|
|
237
|
+
labelField: string;
|
|
238
|
+
valueField: string;
|
|
239
|
+
modalMode: string;
|
|
240
|
+
source: {
|
|
241
|
+
method: string;
|
|
242
|
+
url: string;
|
|
243
|
+
data: {
|
|
244
|
+
orderBy: string;
|
|
245
|
+
orderDir: string;
|
|
246
|
+
pageNo: string;
|
|
247
|
+
pageSize: string;
|
|
248
|
+
query: string;
|
|
249
|
+
$term: string;
|
|
250
|
+
$self: string;
|
|
251
|
+
};
|
|
252
|
+
headers: {
|
|
253
|
+
Authorization: string;
|
|
254
|
+
};
|
|
255
|
+
requestAdaptor: string;
|
|
256
|
+
adaptor: string;
|
|
257
|
+
};
|
|
258
|
+
size: string;
|
|
259
|
+
pickerSchema: {
|
|
260
|
+
mode: string;
|
|
261
|
+
name: string;
|
|
262
|
+
draggable: boolean;
|
|
263
|
+
headerToolbar: string[];
|
|
264
|
+
defaultParams: {
|
|
265
|
+
perPage: number;
|
|
266
|
+
};
|
|
267
|
+
columns: ({
|
|
268
|
+
name: string;
|
|
269
|
+
type: string;
|
|
270
|
+
width: number;
|
|
271
|
+
placeholder: string;
|
|
272
|
+
label?: undefined;
|
|
273
|
+
tpl?: undefined;
|
|
274
|
+
className?: undefined;
|
|
275
|
+
html?: undefined;
|
|
276
|
+
} | {
|
|
277
|
+
name: string;
|
|
278
|
+
label: string;
|
|
279
|
+
type: string;
|
|
280
|
+
tpl: string;
|
|
281
|
+
className: string;
|
|
282
|
+
html: any;
|
|
283
|
+
width?: undefined;
|
|
284
|
+
placeholder?: undefined;
|
|
285
|
+
} | {
|
|
286
|
+
name: string;
|
|
287
|
+
label: string;
|
|
288
|
+
type: string;
|
|
289
|
+
className: string;
|
|
290
|
+
html: boolean;
|
|
291
|
+
width?: undefined;
|
|
292
|
+
placeholder?: undefined;
|
|
293
|
+
tpl?: undefined;
|
|
294
|
+
})[];
|
|
295
|
+
syncLocation: boolean;
|
|
296
|
+
keepItemSelectionOnPageChange: boolean;
|
|
297
|
+
checkOnItemClick: boolean;
|
|
298
|
+
autoFillHeight: boolean;
|
|
299
|
+
};
|
|
300
|
+
joinValues: boolean;
|
|
301
|
+
extractValue: boolean;
|
|
302
|
+
className: string;
|
|
303
|
+
labelClassName: string;
|
|
304
|
+
clearValueOnHidden: boolean;
|
|
305
|
+
id: string;
|
|
306
|
+
autoComplete?: undefined;
|
|
307
|
+
multiple?: undefined;
|
|
308
|
+
hidden?: undefined;
|
|
309
|
+
useChunk?: undefined;
|
|
310
|
+
receiver?: undefined;
|
|
311
|
+
} | {
|
|
312
|
+
name: string;
|
|
313
|
+
label: string;
|
|
314
|
+
required: boolean;
|
|
315
|
+
type: string;
|
|
316
|
+
className: string;
|
|
317
|
+
labelClassName: string;
|
|
318
|
+
clearValueOnHidden: boolean;
|
|
319
|
+
useChunk: boolean;
|
|
320
|
+
receiver: {
|
|
321
|
+
method: string;
|
|
322
|
+
url: string;
|
|
323
|
+
data: {
|
|
324
|
+
$: string;
|
|
325
|
+
context: string;
|
|
326
|
+
};
|
|
327
|
+
adaptor: string;
|
|
328
|
+
headers: {
|
|
329
|
+
Authorization: string;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
id: string;
|
|
333
|
+
joinValues?: undefined;
|
|
334
|
+
extractValue?: undefined;
|
|
335
|
+
autoComplete?: undefined;
|
|
336
|
+
multiple?: undefined;
|
|
337
|
+
hidden?: undefined;
|
|
338
|
+
labelField?: undefined;
|
|
339
|
+
valueField?: undefined;
|
|
340
|
+
modalMode?: undefined;
|
|
341
|
+
source?: undefined;
|
|
342
|
+
size?: undefined;
|
|
343
|
+
pickerSchema?: undefined;
|
|
344
|
+
})[];
|
|
345
|
+
id: string;
|
|
346
|
+
}[];
|
|
347
|
+
panelClassName: string;
|
|
348
|
+
bodyClassName: string;
|
|
349
|
+
className: string;
|
|
350
|
+
label: string;
|
|
351
|
+
objectApiName: string;
|
|
352
|
+
id: string;
|
|
353
|
+
onEvent: {
|
|
354
|
+
submitSucc: {
|
|
355
|
+
weight: number;
|
|
356
|
+
actions: {
|
|
357
|
+
args: {
|
|
358
|
+
api: {
|
|
359
|
+
url: string;
|
|
360
|
+
method: string;
|
|
361
|
+
data: {
|
|
362
|
+
eventData: string;
|
|
363
|
+
};
|
|
364
|
+
dataType: string;
|
|
365
|
+
requestAdaptor: string;
|
|
366
|
+
adaptor: string;
|
|
367
|
+
headers: {
|
|
368
|
+
Authorization: string;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
messages: {
|
|
372
|
+
success: string;
|
|
373
|
+
failed: string;
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
actionType: string;
|
|
377
|
+
expression: string;
|
|
378
|
+
}[];
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
closeDialogOnSubmit: boolean;
|
|
382
|
+
}[];
|
|
383
|
+
id: string;
|
|
384
|
+
closeOnEsc: boolean;
|
|
385
|
+
closeOnOutside: boolean;
|
|
386
|
+
showCloseButton: boolean;
|
|
387
|
+
size: string;
|
|
388
|
+
};
|
|
389
|
+
}[];
|
|
390
|
+
weight: number;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
level: string;
|
|
394
|
+
}[];
|
|
395
|
+
regions: string[];
|
|
396
|
+
bodyClassName: string;
|
|
397
|
+
id: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function createObject(superProps?: {
|
|
2
|
+
[propName: string]: any;
|
|
3
|
+
}, props?: {
|
|
4
|
+
[propName: string]: any;
|
|
5
|
+
}, properties?: any): object;
|
|
6
|
+
export declare function cloneObject(target: any, persistOwnProps?: boolean): any;
|
|
7
|
+
export declare function extendObject(target: any, src?: any, persistOwnProps?: boolean): any;
|
|
8
|
+
export declare function isObject(obj: any): boolean;
|
|
9
|
+
export declare function setVariable(data: {
|
|
10
|
+
[propName: string]: any;
|
|
11
|
+
}, key: string, value: any, convertKeyToPath?: boolean): void;
|
|
12
|
+
export declare function deleteVariable(data: {
|
|
13
|
+
[propName: string]: any;
|
|
14
|
+
}, key: string): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function createObject(superProps?: {
|
|
2
|
+
[propName: string]: any;
|
|
3
|
+
}, props?: {
|
|
4
|
+
[propName: string]: any;
|
|
5
|
+
}, properties?: any): object;
|
|
6
|
+
export declare function cloneObject(target: any, persistOwnProps?: boolean): any;
|
|
7
|
+
export declare function extendObject(target: any, src?: any, persistOwnProps?: boolean): any;
|
|
8
|
+
export declare function isObject(obj: any): boolean;
|
|
9
|
+
export declare function setVariable(data: {
|
|
10
|
+
[propName: string]: any;
|
|
11
|
+
}, key: string, value: any, convertKeyToPath?: boolean): void;
|
|
12
|
+
export declare function deleteVariable(data: {
|
|
13
|
+
[propName: string]: any;
|
|
14
|
+
}, key: string): void;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/amis-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.4",
|
|
5
5
|
"unpkg": "./dist/index.umd.js",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.esm.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
@@ -15,7 +15,7 @@
|
|
|
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",
|
|
18
|
-
"build-uglifyjs": "yarn uglifyjs dist/
|
|
18
|
+
"build-uglifyjs": "yarn uglifyjs dist/index.umd.js -o dist/index.umd.min.js"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"publishConfig": {
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
50
50
|
"rollup-plugin-uglify": "^6.0.4",
|
|
51
51
|
"ts-jest": "26.4.4",
|
|
52
|
-
"ts-node": "^9.1.1",
|
|
53
52
|
"tslint": "^5.8.0",
|
|
54
53
|
"tslint-config-prettier": "^1.1.0",
|
|
55
54
|
"tslint-config-standard": "^7.0.0",
|