@steedos-widgets/amis-lib 0.0.3 → 0.0.5
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 +194 -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
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
export * from './lib/amis';
|
|
1
2
|
export * from './lib/objects';
|
|
2
3
|
export * from './lib/apps';
|
|
3
4
|
export * from './lib/buttons';
|
|
5
|
+
export * from './lib/defaultsDeep';
|
|
4
6
|
export * from './lib/expression';
|
|
5
7
|
export * from './lib/notification';
|
|
6
8
|
export * from './lib/page';
|
|
7
9
|
export * from './lib/public.env';
|
|
8
10
|
export * from './lib/record';
|
|
11
|
+
export * from './lib/space_users';
|
|
9
12
|
export * from './lib/steedos.client.js';
|
|
13
|
+
export * from './lib/converter/amis/fields/lookup';
|
|
14
|
+
export * from './lib/converter/amis/fields/user';
|
|
15
|
+
export * from './lib/converter/amis/filters';
|
|
16
|
+
export * from './lib/workflow/flow';
|
|
17
|
+
export * from './lib/assets';
|
|
18
|
+
export * from './utils/object';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function registerRemoteAssets(assetUrls: any): Promise<any[]>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
export function getButtonVisibleOn(button: any): any;
|
|
2
|
+
export function getButtonVisible(button: any, ctx: any): any;
|
|
1
3
|
export namespace standardButtonsTodo {
|
|
2
|
-
function
|
|
3
|
-
function standard_edit(event: any, props: any): void;
|
|
4
|
-
function standard_delete(event: any, props: any): void;
|
|
5
|
-
function standard_delete_many(event: any, props: any): void;
|
|
4
|
+
function standard_delete_many(): void;
|
|
6
5
|
}
|
|
7
6
|
export function getButtons(uiSchema: any, ctx: any): any[];
|
|
8
7
|
export function getListViewButtons(uiSchema: any, ctx: any): any[];
|
|
9
8
|
export function getObjectDetailButtons(uiSchema: any, ctx: any): any[];
|
|
10
9
|
export function getObjectDetailMoreButtons(uiSchema: any, ctx: any): any[];
|
|
10
|
+
export function getListViewItemButtons(uiSchema: any, ctx: any): Promise<any[]>;
|
|
11
|
+
export function getButton(objectName: any, buttonName: any, ctx: any): Promise<any>;
|
|
11
12
|
export function execute(button: any, props: any): any;
|
|
13
|
+
export function executeButton(button: any, props: any): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export function getAmisFileReadonlySchema(steedosField: any): {
|
|
2
|
+
type: any;
|
|
3
|
+
defaultImage: string;
|
|
4
|
+
enlargeAble: boolean;
|
|
5
|
+
showToolbar: boolean;
|
|
6
|
+
tpl?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
type: any;
|
|
9
|
+
tpl: string;
|
|
10
|
+
defaultImage?: undefined;
|
|
11
|
+
enlargeAble?: undefined;
|
|
12
|
+
showToolbar?: undefined;
|
|
13
|
+
};
|
|
14
|
+
export function getAmisFileEditSchema(steedosField: any): {
|
|
15
|
+
type: any;
|
|
16
|
+
useChunk: boolean;
|
|
17
|
+
receiver: {
|
|
18
|
+
method: string;
|
|
19
|
+
url: string;
|
|
20
|
+
data: {
|
|
21
|
+
$: string;
|
|
22
|
+
context: string;
|
|
23
|
+
};
|
|
24
|
+
adaptor: string;
|
|
25
|
+
headers: {
|
|
26
|
+
Authorization: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export function getAmisFileSchema(steedosField: any, readonly: any): {
|
|
31
|
+
type: any;
|
|
32
|
+
defaultImage: string;
|
|
33
|
+
enlargeAble: boolean;
|
|
34
|
+
showToolbar: boolean;
|
|
35
|
+
tpl?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
type: any;
|
|
38
|
+
tpl: string;
|
|
39
|
+
defaultImage?: undefined;
|
|
40
|
+
enlargeAble?: undefined;
|
|
41
|
+
showToolbar?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
type: any;
|
|
44
|
+
useChunk: boolean;
|
|
45
|
+
receiver: {
|
|
46
|
+
method: string;
|
|
47
|
+
url: string;
|
|
48
|
+
data: {
|
|
49
|
+
$: string;
|
|
50
|
+
context: string;
|
|
51
|
+
};
|
|
52
|
+
adaptor: string;
|
|
53
|
+
headers: {
|
|
54
|
+
Authorization: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -6,8 +6,7 @@ export function getBaseFields(readonly: any): {
|
|
|
6
6
|
className: string;
|
|
7
7
|
tpl: string;
|
|
8
8
|
}[];
|
|
9
|
-
export function
|
|
10
|
-
export function getAmisFieldType(sField: any): "date" | "datetime" | "select" | "image" | "password" | "text" | "table" | "picker" | "number" | "url" | "email" | "textarea" | "html" | "checkbox";
|
|
9
|
+
export function getAmisFieldType(sField: any): "url" | "date" | "datetime" | "number" | "select" | "image" | "password" | "text" | "email" | "html" | "textarea" | "table" | "picker" | "checkbox";
|
|
11
10
|
export function getObjectFieldSubFields(mainField: any, fields: any): any;
|
|
12
11
|
export function getGridFieldSubFields(mainField: any, fields: any): any;
|
|
13
12
|
/**
|
|
@@ -28,11 +27,12 @@ export function convertSFieldToAmisField(field: any, readonly: any, ctx: any): P
|
|
|
28
27
|
value: string | number | boolean;
|
|
29
28
|
multiple: boolean;
|
|
30
29
|
extractValue: boolean;
|
|
31
|
-
joinValues: boolean;
|
|
32
30
|
className: any;
|
|
33
31
|
labelClassName: string;
|
|
34
32
|
quickEdit: boolean;
|
|
35
33
|
visibleOn: string;
|
|
34
|
+
} & {
|
|
35
|
+
clearValueOnHidden: boolean;
|
|
36
36
|
}>;
|
|
37
37
|
export function getFieldSearchable(perField: any, permissionFields: any, ctx: any): Promise<{
|
|
38
38
|
name: any;
|
|
@@ -45,10 +45,12 @@ export function getFieldSearchable(perField: any, permissionFields: any, ctx: an
|
|
|
45
45
|
value: string | number | boolean;
|
|
46
46
|
multiple: boolean;
|
|
47
47
|
extractValue: boolean;
|
|
48
|
-
joinValues: boolean;
|
|
49
48
|
className: any;
|
|
50
49
|
labelClassName: string;
|
|
51
50
|
quickEdit: boolean;
|
|
52
51
|
visibleOn: string;
|
|
52
|
+
} & {
|
|
53
|
+
clearValueOnHidden: boolean;
|
|
53
54
|
}>;
|
|
54
55
|
export const OMIT_FIELDS: string[];
|
|
56
|
+
export { getAmisStaticFieldType } from "./type";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getListSchema(fields: any, options: any): {
|
|
1
|
+
export function getListSchema(fields: any, options: any): Promise<{
|
|
2
2
|
mode: string;
|
|
3
3
|
name: string;
|
|
4
4
|
draggable: boolean;
|
|
@@ -11,7 +11,15 @@ export function getListSchema(fields: any, options: any): {
|
|
|
11
11
|
checkOnItemClick: boolean;
|
|
12
12
|
labelTpl: string;
|
|
13
13
|
listItem: {
|
|
14
|
-
body:
|
|
14
|
+
body: {
|
|
15
|
+
name: any;
|
|
16
|
+
label: any;
|
|
17
|
+
sortable: any;
|
|
18
|
+
width: any;
|
|
19
|
+
type: string;
|
|
20
|
+
tpl: string;
|
|
21
|
+
toggled: any;
|
|
22
|
+
}[];
|
|
15
23
|
actions: {
|
|
16
24
|
icon: string;
|
|
17
25
|
label: string;
|
|
@@ -20,8 +28,8 @@ export function getListSchema(fields: any, options: any): {
|
|
|
20
28
|
link: string;
|
|
21
29
|
}[];
|
|
22
30
|
};
|
|
23
|
-
}
|
|
24
|
-
export function getCardSchema(fields: any, options: any): {
|
|
31
|
+
}>;
|
|
32
|
+
export function getCardSchema(fields: any, options: any): Promise<{
|
|
25
33
|
mode: string;
|
|
26
34
|
name: string;
|
|
27
35
|
draggable: boolean;
|
|
@@ -38,6 +46,14 @@ export function getCardSchema(fields: any, options: any): {
|
|
|
38
46
|
header: {
|
|
39
47
|
title: string;
|
|
40
48
|
};
|
|
41
|
-
body:
|
|
49
|
+
body: {
|
|
50
|
+
name: any;
|
|
51
|
+
label: any;
|
|
52
|
+
sortable: any;
|
|
53
|
+
width: any;
|
|
54
|
+
type: string;
|
|
55
|
+
tpl: string;
|
|
56
|
+
toggled: any;
|
|
57
|
+
}[];
|
|
42
58
|
};
|
|
43
|
-
}
|
|
59
|
+
}>;
|
|
@@ -50,100 +50,15 @@ export function lookupToAmisPicker(field: any, readonly: any, ctx: any): Promise
|
|
|
50
50
|
checkOnItemClick: boolean;
|
|
51
51
|
labelTpl: string;
|
|
52
52
|
listItem: {
|
|
53
|
-
body:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
body: {
|
|
54
|
+
name: any;
|
|
55
|
+
label: any;
|
|
56
|
+
sortable: any;
|
|
57
|
+
width: any;
|
|
57
58
|
type: string;
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
tpl: string;
|
|
60
|
+
toggled: any;
|
|
60
61
|
}[];
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
joinValues: boolean;
|
|
64
|
-
extractValue: boolean;
|
|
65
|
-
}>;
|
|
66
|
-
export function lookupToAmisSelect(field: any, readonly: any, ctx: any): Promise<{
|
|
67
|
-
type: any;
|
|
68
|
-
joinValues: boolean;
|
|
69
|
-
extractValue: boolean;
|
|
70
|
-
labelField: any;
|
|
71
|
-
valueField: any;
|
|
72
|
-
autoComplete: {
|
|
73
|
-
method: string;
|
|
74
|
-
url: string;
|
|
75
|
-
data: {
|
|
76
|
-
orderBy: string;
|
|
77
|
-
orderDir: string;
|
|
78
|
-
pageNo: string;
|
|
79
|
-
pageSize: string;
|
|
80
|
-
query: string;
|
|
81
|
-
};
|
|
82
|
-
headers: {
|
|
83
|
-
Authorization: string;
|
|
84
|
-
};
|
|
85
|
-
} | {
|
|
86
|
-
method: string;
|
|
87
|
-
url: string;
|
|
88
|
-
data: {
|
|
89
|
-
query: string;
|
|
90
|
-
$: string;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
}>;
|
|
94
|
-
export function lookupToAmis(field: any, readonly: any, ctx: any): Promise<{
|
|
95
|
-
type: any;
|
|
96
|
-
labelField: any;
|
|
97
|
-
valueField: any;
|
|
98
|
-
modalMode: string;
|
|
99
|
-
source: {
|
|
100
|
-
method: string;
|
|
101
|
-
url: string;
|
|
102
|
-
data: {
|
|
103
|
-
orderBy: string;
|
|
104
|
-
orderDir: string;
|
|
105
|
-
pageNo: string;
|
|
106
|
-
pageSize: string;
|
|
107
|
-
query: string;
|
|
108
|
-
};
|
|
109
|
-
headers: {
|
|
110
|
-
Authorization: string;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
size: string;
|
|
114
|
-
pickerSchema: {
|
|
115
|
-
mode: string;
|
|
116
|
-
name: string;
|
|
117
|
-
draggable: boolean;
|
|
118
|
-
headerToolbar: string[];
|
|
119
|
-
defaultParams: {
|
|
120
|
-
perPage: any;
|
|
121
|
-
};
|
|
122
|
-
columns: {
|
|
123
|
-
name: string;
|
|
124
|
-
type: string;
|
|
125
|
-
width: number;
|
|
126
|
-
placeholder: string;
|
|
127
|
-
}[];
|
|
128
|
-
syncLocation: boolean;
|
|
129
|
-
keepItemSelectionOnPageChange: boolean;
|
|
130
|
-
checkOnItemClick: boolean;
|
|
131
|
-
labelTpl: string;
|
|
132
|
-
autoFillHeight: boolean;
|
|
133
|
-
} | {
|
|
134
|
-
mode: string;
|
|
135
|
-
name: string;
|
|
136
|
-
draggable: boolean;
|
|
137
|
-
headerToolbar: string[];
|
|
138
|
-
defaultParams: {
|
|
139
|
-
perPage: any;
|
|
140
|
-
};
|
|
141
|
-
syncLocation: boolean;
|
|
142
|
-
keepItemSelectionOnPageChange: boolean;
|
|
143
|
-
checkOnItemClick: boolean;
|
|
144
|
-
labelTpl: string;
|
|
145
|
-
listItem: {
|
|
146
|
-
body: any[];
|
|
147
62
|
actions: {
|
|
148
63
|
icon: string;
|
|
149
64
|
label: string;
|
|
@@ -155,12 +70,11 @@ export function lookupToAmis(field: any, readonly: any, ctx: any): Promise<{
|
|
|
155
70
|
};
|
|
156
71
|
joinValues: boolean;
|
|
157
72
|
extractValue: boolean;
|
|
158
|
-
}
|
|
73
|
+
}>;
|
|
74
|
+
export function lookupToAmisSelect(field: any, readonly: any, ctx: any): Promise<{
|
|
159
75
|
type: any;
|
|
160
76
|
joinValues: boolean;
|
|
161
77
|
extractValue: boolean;
|
|
162
|
-
labelField: any;
|
|
163
|
-
valueField: any;
|
|
164
78
|
autoComplete: {
|
|
165
79
|
method: string;
|
|
166
80
|
url: string;
|
|
@@ -183,3 +97,5 @@ export function lookupToAmis(field: any, readonly: any, ctx: any): Promise<{
|
|
|
183
97
|
};
|
|
184
98
|
};
|
|
185
99
|
}>;
|
|
100
|
+
export function lookupToAmis(field: any, readonly: any, ctx: any): Promise<{}>;
|
|
101
|
+
export function lookupToAmisSelectUser(field: any, readonly: any, ctx: any): Promise<{}>;
|
|
@@ -13,10 +13,11 @@ export function getSections(permissionFields: any, mergedSchema: any, ctx: any):
|
|
|
13
13
|
value: string | number | boolean;
|
|
14
14
|
multiple: boolean;
|
|
15
15
|
extractValue: boolean;
|
|
16
|
-
joinValues: boolean;
|
|
17
16
|
className: any;
|
|
18
17
|
labelClassName: string;
|
|
19
18
|
quickEdit: boolean;
|
|
20
19
|
visibleOn: string;
|
|
20
|
+
} & {
|
|
21
|
+
clearValueOnHidden: boolean;
|
|
21
22
|
})[];
|
|
22
23
|
}[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getTableSchema(fields: any, options: any): {
|
|
1
|
+
export function getTableSchema(fields: any, options: any): Promise<{
|
|
2
2
|
mode: string;
|
|
3
3
|
name: string;
|
|
4
4
|
draggable: boolean;
|
|
@@ -17,7 +17,7 @@ export function getTableSchema(fields: any, options: any): {
|
|
|
17
17
|
checkOnItemClick: boolean;
|
|
18
18
|
labelTpl: string;
|
|
19
19
|
autoFillHeight: boolean;
|
|
20
|
-
}
|
|
20
|
+
}>;
|
|
21
21
|
export function getTableApi(mainObject: any, fields: any, options: any): Promise<{
|
|
22
22
|
method: string;
|
|
23
23
|
url: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getAmisStaticFieldType(type: any, readonly: any, options: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function getSelectUserSchema(field: any, readonly: any, ctx: any): Promise<{}>;
|
|
@@ -13,10 +13,11 @@ export function getFormBody(permissionFields: any, objectConfig: any, ctx: any):
|
|
|
13
13
|
value: string | number | boolean;
|
|
14
14
|
multiple: boolean;
|
|
15
15
|
extractValue: boolean;
|
|
16
|
-
joinValues: boolean;
|
|
17
16
|
className: any;
|
|
18
17
|
labelClassName: string;
|
|
19
18
|
quickEdit: boolean;
|
|
20
19
|
visibleOn: string;
|
|
20
|
+
} & {
|
|
21
|
+
clearValueOnHidden: boolean;
|
|
21
22
|
})[];
|
|
22
23
|
}[]>;
|
|
@@ -8,6 +8,7 @@ export function getSaveQuery(object: any, recordId: any, fields: any, options: a
|
|
|
8
8
|
recordId: string;
|
|
9
9
|
modalName: string;
|
|
10
10
|
};
|
|
11
|
+
export function getScriptForReadonlyFields(fields: any): string;
|
|
11
12
|
export function getScriptForRemoveUrlPrefixForImgFields(fields: any): string;
|
|
12
13
|
export function getScriptForSimplifiedValueForFileFields(fields: any): string;
|
|
13
14
|
export function getSaveDataTpl(fields: any): string;
|