@steedos/schemas 2.7.27-beta.6 → 3.0.0-beta.100

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.
@@ -1,104 +1,89 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "name": "steedos-schema_object_button",
4
- "type": "object",
5
- "additionalProperties": false,
6
- "oneOf": [
7
- {
8
- "properties": {
9
- "type": {
10
- "enum": [
11
- "library"
12
- ]
13
- }
14
- },
15
- "required": [
16
- "type",
17
- "name"
18
- ]
19
- },
20
- {
21
- "properties": {
22
- "type": {
23
- "not": {
24
- "enum": [
25
- "library"
26
- ]
27
- }
28
- }
29
- }
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "name": "steedos-schema_object_button",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "oneOf": [
7
+ {
8
+ "properties": {
9
+ "type": {
10
+ "enum": ["library"]
30
11
  }
31
- ],
32
- "properties": {
33
- "name": {
34
- "type": "string",
35
- "description": "API 名称"
36
- },
37
- "label": {
38
- "type": "string",
39
- "description": "按钮显示名称"
40
- },
41
- "is_enable": {
42
- "type": "boolean",
43
- "description": "是否启用"
44
- },
45
- "visible": {
46
- "type": [
47
- "string",
48
- "boolean"
49
- ],
50
- "description": "是否有效"
51
- },
52
- "on": {
53
- "type": "string",
54
- "description": "显示位置, list: 只显示在列表右上角; record: 显示在记录查看页右上角,以及列表视图中每项的下拉菜单中; record_more: 显示在记录查看页右上角的“更多”下拉菜单中,以及列表视图中每项的下拉菜单中; list_item: 只显示在列表视图中每项的下拉菜单中; record_only: 只显示在记录查看页右上角;record_only_more: 只显示在记录查看页右上角的“更多”下拉菜单中",
55
- "enum": [
56
- "list",
57
- "record",
58
- "record_more",
59
- "list_item",
60
- "record_only",
61
- "record_only_more"
62
- ]
63
- },
64
- "todo": {
65
- "type": "string",
66
- "description": "执行的脚本"
67
- },
68
- "sort": {
69
- "type": "number",
70
- "description": "显示顺序"
71
- },
12
+ },
13
+ "required": ["type", "name"]
14
+ },
15
+ {
16
+ "properties": {
72
17
  "type": {
73
- "type": "string",
74
- "description": "按钮类型",
75
- "anyOf": [
76
- {
77
- "enum": [
78
- "script",
79
- "amis_button"
80
- ]
81
- }
82
- ]
83
- },
84
- "amis_schema": {
85
- "type": [
86
- "string",
87
- "object"
88
- ],
89
- "description": ""
90
- },
91
- "license": {
92
- "type": "array",
93
- "description": "许可证",
94
- "items": {
95
- "type": "string",
96
- "description": "许可证",
97
- "enum": [
98
- "platform-enterprise",
99
- "platform-professional"
100
- ]
101
- }
18
+ "not": {
19
+ "enum": ["library"]
20
+ }
21
+ }
22
+ }
23
+ }
24
+ ],
25
+ "properties": {
26
+ "name": {
27
+ "type": "string",
28
+ "description": "API 名称"
29
+ },
30
+ "label": {
31
+ "type": "string",
32
+ "description": "按钮显示名称"
33
+ },
34
+ "locked": {
35
+ "type": "boolean",
36
+ "description": "是否锁定"
37
+ },
38
+ "is_enable": {
39
+ "type": "boolean",
40
+ "description": "是否启用"
41
+ },
42
+ "visible": {
43
+ "type": ["string", "boolean"],
44
+ "description": "是否有效"
45
+ },
46
+ "on": {
47
+ "type": "string",
48
+ "description": "显示位置, list: 只显示在列表右上角; record: 显示在记录查看页右上角,以及列表视图中每项的下拉菜单中; record_more: 显示在记录查看页右上角的“更多”下拉菜单中,以及列表视图中每项的下拉菜单中; list_item: 只显示在列表视图中每项的下拉菜单中; record_only: 只显示在记录查看页右上角;record_only_more: 只显示在记录查看页右上角的“更多”下拉菜单中",
49
+ "enum": [
50
+ "list",
51
+ "record",
52
+ "record_more",
53
+ "list_item",
54
+ "record_only",
55
+ "record_only_more"
56
+ ]
57
+ },
58
+ "todo": {
59
+ "type": "string",
60
+ "description": "执行的脚本"
61
+ },
62
+ "sort": {
63
+ "type": "number",
64
+ "description": "显示顺序"
65
+ },
66
+ "type": {
67
+ "type": "string",
68
+ "description": "按钮类型",
69
+ "anyOf": [
70
+ {
71
+ "enum": ["script", "amis_button"]
102
72
  }
73
+ ]
74
+ },
75
+ "amis_schema": {
76
+ "type": ["string", "object"],
77
+ "description": ""
78
+ },
79
+ "license": {
80
+ "type": "array",
81
+ "description": "许可证",
82
+ "items": {
83
+ "type": "string",
84
+ "description": "许可证",
85
+ "enum": ["platform-enterprise", "platform-professional"]
86
+ }
103
87
  }
104
- }
88
+ }
89
+ }
@@ -1,153 +1,132 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-04/schema#",
3
- "name": "steedos-schema_object_listview",
4
- "type": "object",
5
- "additionalProperties": false,
6
- "oneOf": [
7
- {
8
- "properties": {
9
- "type": {
10
- "enum": [
11
- "library"
12
- ]
13
- }
14
- },
15
- "required": [
16
- "name",
17
- "columns"
18
- ]
19
- },
20
- {
21
- "properties": {
22
- "type": {
23
- "not": {
24
- "enum": [
25
- "library"
26
- ]
27
- }
28
- }
29
- }
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "name": "steedos-schema_object_listview",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "oneOf": [
7
+ {
8
+ "properties": {
9
+ "type": {
10
+ "enum": ["library"]
30
11
  }
31
- ],
32
- "properties": {
33
- "name": {
34
- "type": "string",
35
- "description": "API 名称"
36
- },
37
- "label": {
38
- "type": "string",
39
- "description": "视图显示名称"
40
- },
12
+ },
13
+ "required": ["name", "columns"]
14
+ },
15
+ {
16
+ "properties": {
41
17
  "type": {
42
- "type": "string",
43
- "description": "列表显示类型,默认为grid",
44
- "enum": [
45
- "grid",
46
- "calendar"
47
- ]
48
- },
49
- "filter_scope": {
50
- "type": "string",
51
- "description": "范围",
52
- "enum": [
53
- "space",
54
- "mine",
55
- "all"
56
- ]
57
- },
58
- "columns": {
59
- "type": "array",
60
- "description": "列表显示的字段"
61
- },
62
- "mobile_columns": {
63
- "type": "array",
64
- "description": "手机模式下列表显示的字段"
65
- },
66
- "extra_columns": {
67
- "type": "array",
68
- "description": "额外查询的字段"
69
- },
70
- "sort": {
71
- "type": "array",
72
- "description": "排序"
73
- },
74
- "filters": {
75
- "type": [
76
- "array",
77
- "string"
78
- ],
79
- "description": "过滤条件"
80
- },
81
- "filter_fields": {
82
- "type": "array",
83
- "description": "过滤的字段"
84
- },
85
- "sort_no": {
86
- "type": "number",
87
- "description": "显示顺序,从小到大"
88
- },
89
- "options": {
90
- "type": "object",
91
- "description": "额外选项"
92
- },
93
- "show_count": {
94
- "type": "boolean",
95
- "description": "显示条目数"
96
- },
97
- "is_enable":{
98
- "type": "boolean",
99
- "description": "启用"
100
- },
101
- "searchable_fields":{
102
- "type": "array",
103
- "description": "可搜索字段"
104
- },
105
- "enable_amis_schema":{
106
- "type": "boolean",
107
- "description": "是否使用 amis自定义列表"
108
- },
109
- "crud_mode":{
110
- "type": "string",
111
- "description": "crud组件mode属性,默认为table,可选table、cards 或者 list",
112
- "enum": [
113
- "table",
114
- "cards",
115
- "list"
116
- ]
117
- },
118
- "shared":{
119
- "type": "boolean",
120
- "description": "是否共享到工作区"
121
- },
122
- "shared_to":{
123
- "type": "string",
124
- "description": "谁可以查看此列表视图?",
125
- "enum": [
126
- "mine",
127
- "space",
128
- "organizations"
129
- ]
130
- },
131
- "shared_to_organizations":{
132
- "type": "array",
133
- "description": "共享列表视图给哪些组织?"
134
- },
135
- "scrolling_mode":{
136
- "type":"string",
137
- "description": "滚动条样式",
138
- "enum": [
139
- "standard",
140
- "virtual",
141
- "infinite"
142
- ]
143
- },
144
- "requestAdaptor": {
145
- "type": "string",
146
- "description": "发送适配器"
147
- },
148
- "adaptor": {
149
- "type": "string",
150
- "description": "接收适配器"
18
+ "not": {
19
+ "enum": ["library"]
20
+ }
151
21
  }
22
+ }
23
+ }
24
+ ],
25
+ "properties": {
26
+ "name": {
27
+ "type": "string",
28
+ "description": "API 名称"
29
+ },
30
+ "label": {
31
+ "type": "string",
32
+ "description": "视图显示名称"
33
+ },
34
+ "type": {
35
+ "type": "string",
36
+ "description": "列表显示类型,默认为grid",
37
+ "enum": ["grid", "calendar"]
38
+ },
39
+ "filter_scope": {
40
+ "type": "string",
41
+ "description": "范围",
42
+ "enum": ["space", "mine", "all"]
43
+ },
44
+ "columns": {
45
+ "type": "array",
46
+ "description": "列表显示的字段"
47
+ },
48
+ "mobile_columns": {
49
+ "type": "array",
50
+ "description": "手机模式下列表显示的字段"
51
+ },
52
+ "extra_columns": {
53
+ "type": "array",
54
+ "description": "额外查询的字段"
55
+ },
56
+ "sort": {
57
+ "type": "array",
58
+ "description": "排序"
59
+ },
60
+ "filters": {
61
+ "type": ["array", "string"],
62
+ "description": "过滤条件"
63
+ },
64
+ "filter_fields": {
65
+ "type": "array",
66
+ "description": "过滤的字段"
67
+ },
68
+ "sort_no": {
69
+ "type": "number",
70
+ "description": "显示顺序,从小到大"
71
+ },
72
+ "options": {
73
+ "type": "object",
74
+ "description": "额外选项"
75
+ },
76
+ "show_count": {
77
+ "type": "boolean",
78
+ "description": "显示条目数"
79
+ },
80
+ "is_enable": {
81
+ "type": "boolean",
82
+ "description": "启用"
83
+ },
84
+ "searchable_fields": {
85
+ "type": "array",
86
+ "description": "可搜索字段"
87
+ },
88
+ "enable_amis_schema": {
89
+ "type": "boolean",
90
+ "description": "是否使用 amis自定义列表"
91
+ },
92
+ "crud_mode": {
93
+ "type": "string",
94
+ "description": "crud组件mode属性,默认为table,可选table、cards 或者 list",
95
+ "enum": ["table", "cards", "list"]
96
+ },
97
+ "shared": {
98
+ "type": "boolean",
99
+ "description": "是否共享到工作区"
100
+ },
101
+ "shared_to": {
102
+ "type": "string",
103
+ "description": "谁可以查看此列表视图?",
104
+ "enum": ["mine", "space", "organizations"]
105
+ },
106
+ "shared_to_organizations": {
107
+ "type": "array",
108
+ "description": "共享列表视图给哪些组织?"
109
+ },
110
+ "scrolling_mode": {
111
+ "type": "string",
112
+ "description": "滚动条样式",
113
+ "enum": ["standard", "virtual", "infinite"]
114
+ },
115
+ "requestAdaptor": {
116
+ "type": "string",
117
+ "description": "发送适配器"
118
+ },
119
+ "adaptor": {
120
+ "type": "string",
121
+ "description": "接收适配器"
122
+ },
123
+ "crudDataFilter": {
124
+ "type": "string",
125
+ "description": "如果需要对列表视图组件原始返回的crud进行加工,可以自己写一段函数脚本来实现。\n\n函数签名:(crud, env, data) => crud\n\n参数说明:\n\ncrud 组件原始返回的crud schema\n\nenv amis env,可以调用env.fetcher函数实现异步请求\n\ndata 数据域中的data\n\n返回值:\n\n最后需要返回加工后的crud schema\n\n示例:\n\n\nconsole.log('data===>', data);\nconst api = ...;\nreturn env.fetcher(api, {}).then((result) => {\n console.log(result);\n crud.columns.push({'label': 'xxx', name: 'xxx'});\n return crud;\n});\n\n\n"
126
+ },
127
+ "crud": {
128
+ "type": "object",
129
+ "description": "重写列表crud配置,请使用json格式配置。"
152
130
  }
153
- }
131
+ }
132
+ }