@steedos/standard-ui 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.
- package/main/default/applications/admin.app.yml +63 -58
- package/main/default/client/liveblocks.client.js +21 -0
- package/main/default/objectTranslations/apps.en/apps.en.objectTranslation.yml +12 -0
- package/main/default/objectTranslations/apps.zh-CN/apps.zh-CN.objectTranslation.yml +14 -2
- package/main/default/objectTranslations/tabs.en/tabs.en.objectTranslation.yml +6 -0
- package/main/default/objectTranslations/tabs.zh-CN/tabs.zh-CN.objectTranslation.yml +6 -0
- package/main/default/objects/apps.action.js +21 -63
- package/main/default/objects/tabs/buttons/generate_object_tabs.button.yml +1 -1
- package/main/default/objects/tabs.object.yml +12 -1
- package/main/default/routers/amis_app_nav_schema_design.router.js +5 -5
- package/main/default/routers/main_head.router.js +3 -3
- package/main/default/triggers/tabs_api_name.trigger.js +2 -3
- package/package.json +2 -2
- package/package.service.js +3 -3
- package/main/default/client/apps.client.js +0 -37
- package/main/default/client/favicon.client.js +0 -11
- package/main/default/client/history_paths.client.js +0 -251
- package/main/default/client/setLocalstorageSteedostoken.client.js +0 -8
- package/main/default/client/tabs.client.js +0 -55
- package/main/default/objects/apps/buttons/amis_edit.button.yml +0 -39
- package/main/default/objects/apps/buttons/amis_nav_schema_design.button.js +0 -31
- package/main/default/objects/apps/buttons/amis_nav_schema_design.button.yml +0 -4
- package/main/default/objects/apps/buttons/amis_new.button.yml +0 -43
- package/main/default/objects/apps/buttons/disable.button.js +0 -56
- package/main/default/objects/apps/buttons/disable.button.yml +0 -4
- package/main/default/objects/apps/buttons/enable.button.js +0 -60
- package/main/default/objects/apps/buttons/enable.button.yml +0 -4
- package/main/default/objects/apps.object.js +0 -94
- package/main/default/objects/apps.object.yml +0 -396
- package/main/default/tabs/.gitkeep +0 -0
- package/main/default/tabs/admin_action_field_updates.tab.yml +0 -21
- package/main/default/tabs/admin_api_keys.tab.yml +0 -21
- package/main/default/tabs/admin_apps.tab.yml +0 -21
- package/main/default/tabs/admin_audit_records.tab.yml +0 -21
- package/main/default/tabs/admin_autonumber.tab.yml +0 -21
- package/main/default/tabs/admin_business_hours.tab.yml +0 -21
- package/main/default/tabs/admin_categories.tab.yml +0 -21
- package/main/default/tabs/admin_charts.tab.yml +0 -21
- package/main/default/tabs/admin_company.tab.yml +0 -21
- package/main/default/tabs/admin_dashboard.tab.yml +0 -21
- package/main/default/tabs/admin_datasources.tab.yml +0 -23
- package/main/default/tabs/admin_developer_graphql.tab.yml +0 -21
- package/main/default/tabs/admin_developer_triggers.tab.yml +0 -21
- package/main/default/tabs/admin_flow_positions.tab.yml +0 -21
- package/main/default/tabs/admin_flow_roles.tab.yml +0 -21
- package/main/default/tabs/admin_flows.tab.yml +0 -21
- package/main/default/tabs/admin_holidays.tab.yml +0 -21
- package/main/default/tabs/admin_instance_number_rules.tab.yml +0 -23
- package/main/default/tabs/admin_instances_statistic.tab.yml +0 -24
- package/main/default/tabs/admin_metadata.tab.yml +0 -22
- package/main/default/tabs/admin_object_validation_rules.tab.yml +0 -21
- package/main/default/tabs/admin_object_webhooks.tab.yml +0 -21
- package/main/default/tabs/admin_object_workflows.tab.yml +0 -21
- package/main/default/tabs/admin_objects.tab.yml +0 -21
- package/main/default/tabs/admin_organizations.tab.yml +0 -21
- package/main/default/tabs/admin_pages.tab.yml +0 -21
- package/main/default/tabs/admin_permission_set.tab.yml +0 -21
- package/main/default/tabs/admin_personal_information.tab.yml +0 -21
- package/main/default/tabs/admin_process_definition.tab.yml +0 -21
- package/main/default/tabs/admin_process_delegation_rules.tab.yml +0 -24
- package/main/default/tabs/admin_queue_import.tab.yml +0 -21
- package/main/default/tabs/admin_roles.tab.yml +0 -21
- package/main/default/tabs/admin_sessions.tab.yml +0 -21
- package/main/default/tabs/admin_space_info.tab.yml +0 -21
- package/main/default/tabs/admin_space_user_info.tab.yml +0 -22
- package/main/default/tabs/admin_space_user_signs.tab.yml +0 -25
- package/main/default/tabs/admin_space_users.tab.yml +0 -21
- package/main/default/tabs/admin_steedos_packages.tab.yml +0 -21
- package/main/default/tabs/admin_tabs.tab.yml +0 -21
- package/main/default/tabs/admin_web_forms.tab.yml +0 -21
- package/main/default/tabs/admin_webhooks.tab.yml +0 -21
- package/main/default/tabs/admin_workflow_notifications.tab.yml +0 -21
- package/main/default/tabs/admin_workflow_outbound_messages.tab.yml +0 -21
- package/main/default/tabs/admin_workflow_rule.tab.yml +0 -21
- package/main/default/triggers/apps.trigger.js +0 -90
|
@@ -4,6 +4,7 @@ description: 管理员设置公司、人员、权限等。
|
|
|
4
4
|
icon: ion-ios-people-outline
|
|
5
5
|
icon_slds: settings
|
|
6
6
|
is_creator: true
|
|
7
|
+
showSidebar: true
|
|
7
8
|
mobile: true
|
|
8
9
|
tab_groups:
|
|
9
10
|
- group_name: personal_settings
|
|
@@ -12,12 +13,13 @@ tab_groups:
|
|
|
12
13
|
- group_name: object_settings
|
|
13
14
|
- group_name: user_interface
|
|
14
15
|
- group_name: statistical_analysis
|
|
15
|
-
- group_name: development
|
|
16
16
|
default_open: false
|
|
17
17
|
- group_name: process_automation
|
|
18
18
|
default_open: false
|
|
19
19
|
- group_name: approval_workflow
|
|
20
20
|
default_open: false
|
|
21
|
+
- group_name: development
|
|
22
|
+
default_open: false
|
|
21
23
|
- group_name: advanced_settings
|
|
22
24
|
default_open: false
|
|
23
25
|
tab_items:
|
|
@@ -27,9 +29,6 @@ tab_items:
|
|
|
27
29
|
admin_personal_information:
|
|
28
30
|
group: personal_settings
|
|
29
31
|
index: 1
|
|
30
|
-
admin_process_delegation_rules:
|
|
31
|
-
group: personal_settings
|
|
32
|
-
index: 2
|
|
33
32
|
admin_space_info:
|
|
34
33
|
group: company_settings
|
|
35
34
|
index: 3
|
|
@@ -48,37 +47,37 @@ tab_items:
|
|
|
48
47
|
admin_license:
|
|
49
48
|
group: company_settings
|
|
50
49
|
index: 9
|
|
51
|
-
admin_apps:
|
|
52
|
-
group: apps
|
|
53
|
-
index: 10
|
|
54
50
|
admin_objects:
|
|
55
51
|
group: apps
|
|
56
|
-
index:
|
|
52
|
+
index: 10
|
|
57
53
|
admin_pages:
|
|
58
54
|
group: apps
|
|
59
|
-
index:
|
|
55
|
+
index: 11
|
|
60
56
|
admin_tabs:
|
|
61
57
|
group: apps
|
|
62
|
-
index:
|
|
63
|
-
|
|
64
|
-
group: apps
|
|
65
|
-
index: 18
|
|
66
|
-
admin_datasources:
|
|
58
|
+
index: 12
|
|
59
|
+
admin_apps:
|
|
67
60
|
group: apps
|
|
68
|
-
index:
|
|
61
|
+
index: 13
|
|
62
|
+
# admin_queue_import:
|
|
63
|
+
# group: apps
|
|
64
|
+
# index: 18
|
|
65
|
+
# admin_datasources:
|
|
66
|
+
# group: apps
|
|
67
|
+
# index: 20
|
|
69
68
|
admin_steedos_packages:
|
|
70
69
|
group: development
|
|
71
70
|
index: 18
|
|
72
71
|
admin_developer:
|
|
73
72
|
group: development
|
|
74
73
|
index: 19.50
|
|
75
|
-
admin_metadata:
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
# admin_metadata:
|
|
75
|
+
# group: development
|
|
76
|
+
# index: 19.505
|
|
78
77
|
admin_developer_triggers:
|
|
79
78
|
group: development
|
|
80
79
|
index: 19.51
|
|
81
|
-
|
|
80
|
+
admin_developer_openapi:
|
|
82
81
|
group: development
|
|
83
82
|
index: 19.52
|
|
84
83
|
admin_process_definition:
|
|
@@ -87,9 +86,6 @@ tab_items:
|
|
|
87
86
|
admin_workflow_rule:
|
|
88
87
|
group: process_automation
|
|
89
88
|
index: 21
|
|
90
|
-
admin_object_validation_rules:
|
|
91
|
-
group: process_automation
|
|
92
|
-
index: 22
|
|
93
89
|
admin_action_field_updates:
|
|
94
90
|
group: process_automation
|
|
95
91
|
index: 23
|
|
@@ -99,36 +95,36 @@ tab_items:
|
|
|
99
95
|
admin_workflow_outbound_messages:
|
|
100
96
|
group: process_automation
|
|
101
97
|
index: 25
|
|
102
|
-
admin_flows:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
admin_roles:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
admin_flow_roles:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
admin_flow_positions:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
admin_categories:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
admin_instance_number_rules:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
admin_space_user_signs:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
admin_instances_statistic:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
admin_webhooks:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
admin_object_workflows:
|
|
130
|
-
|
|
131
|
-
|
|
98
|
+
# admin_flows:
|
|
99
|
+
# group: approval_workflow
|
|
100
|
+
# index: 20
|
|
101
|
+
# admin_roles:
|
|
102
|
+
# group: approval_workflow
|
|
103
|
+
# index: 25
|
|
104
|
+
# admin_flow_roles:
|
|
105
|
+
# group: approval_workflow
|
|
106
|
+
# index: 26
|
|
107
|
+
# admin_flow_positions:
|
|
108
|
+
# group: approval_workflow
|
|
109
|
+
# index: 26.5
|
|
110
|
+
# admin_categories:
|
|
111
|
+
# group: approval_workflow
|
|
112
|
+
# index: 28
|
|
113
|
+
# admin_instance_number_rules:
|
|
114
|
+
# group: approval_workflow
|
|
115
|
+
# index: 29
|
|
116
|
+
# admin_space_user_signs:
|
|
117
|
+
# group: approval_workflow
|
|
118
|
+
# index: 30
|
|
119
|
+
# admin_instances_statistic:
|
|
120
|
+
# group: approval_workflow
|
|
121
|
+
# index: 31
|
|
122
|
+
# admin_webhooks:
|
|
123
|
+
# group: approval_workflow
|
|
124
|
+
# index: 32
|
|
125
|
+
# admin_object_workflows:
|
|
126
|
+
# group: approval_workflow
|
|
127
|
+
# index: 33
|
|
132
128
|
admin_sessions:
|
|
133
129
|
group: advanced_settings
|
|
134
130
|
index: 34
|
|
@@ -141,12 +137,12 @@ tab_items:
|
|
|
141
137
|
# admin_web_forms:
|
|
142
138
|
# group: 高级设置
|
|
143
139
|
# index: 38
|
|
144
|
-
admin_holidays:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
admin_business_hours:
|
|
148
|
-
|
|
149
|
-
|
|
140
|
+
# admin_holidays:
|
|
141
|
+
# group: advanced_settings
|
|
142
|
+
# index: 39
|
|
143
|
+
# admin_business_hours:
|
|
144
|
+
# group: advanced_settings
|
|
145
|
+
# index: 40
|
|
150
146
|
# admin_object_webhooks:
|
|
151
147
|
# group: 高级设置
|
|
152
148
|
# index: 41
|
|
@@ -156,12 +152,21 @@ tab_items:
|
|
|
156
152
|
admin_api_keys:
|
|
157
153
|
group: development
|
|
158
154
|
index: 42
|
|
155
|
+
admin_bull_dashboard:
|
|
156
|
+
group: development
|
|
157
|
+
index: 43
|
|
159
158
|
admin_settings:
|
|
160
159
|
group: advanced_settings
|
|
161
160
|
index: 50
|
|
162
161
|
admin_logs:
|
|
163
162
|
group: advanced_settings
|
|
164
163
|
index: 52
|
|
164
|
+
admin_audit_records:
|
|
165
|
+
group: advanced_settings
|
|
166
|
+
index: 36
|
|
167
|
+
admin_operation_logs:
|
|
168
|
+
group: advanced_settings
|
|
169
|
+
index: 60
|
|
165
170
|
objects: []
|
|
166
171
|
sort: 999999
|
|
167
172
|
#url: /app/admin
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// 创建一个 MutationObserver 实例
|
|
2
|
+
const observer = new MutationObserver((mutationsList) => {
|
|
3
|
+
for (const mutation of mutationsList) {
|
|
4
|
+
if (mutation.type === 'childList') {
|
|
5
|
+
mutation.addedNodes.forEach(node => {
|
|
6
|
+
if (node.nodeType === 1) {
|
|
7
|
+
if (node.matches('[data-radix-popper-content-wrapper]')) {
|
|
8
|
+
if (node.getAttribute('role') !== 'dialog') {
|
|
9
|
+
node.setAttribute('role', 'dialog');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const config = { childList: true, subtree: false };
|
|
20
|
+
|
|
21
|
+
observer.observe(document.body, config);
|
|
@@ -196,3 +196,15 @@ actions:
|
|
|
196
196
|
label: Customize
|
|
197
197
|
reset:
|
|
198
198
|
label: Reset
|
|
199
|
+
enable:
|
|
200
|
+
label: Enable
|
|
201
|
+
disable:
|
|
202
|
+
label: Disable
|
|
203
|
+
CustomLabels:
|
|
204
|
+
apps_not_found: The application Not found
|
|
205
|
+
apps_actions_enable_dialog_title: Enable App
|
|
206
|
+
apps_actions_enable_dialog_content_prefix: "Are you sure you want to enable the application \""
|
|
207
|
+
apps_actions_enable_dialog_content_suffix: "\" ?"
|
|
208
|
+
apps_actions_disable_dialog_title: Disable App
|
|
209
|
+
apps_actions_disable_dialog_content_prefix: "Are you sure you want to disable the application \""
|
|
210
|
+
apps_actions_disable_dialog_content_suffix: "\" ?"
|
|
@@ -59,11 +59,11 @@ fields:
|
|
|
59
59
|
help:
|
|
60
60
|
description:
|
|
61
61
|
is_creator:
|
|
62
|
-
label:
|
|
62
|
+
label: 在桌面中显示
|
|
63
63
|
help:
|
|
64
64
|
description:
|
|
65
65
|
mobile:
|
|
66
|
-
label:
|
|
66
|
+
label: 在手机上显示
|
|
67
67
|
help:
|
|
68
68
|
description:
|
|
69
69
|
members:
|
|
@@ -203,3 +203,15 @@ actions:
|
|
|
203
203
|
label: 自定义
|
|
204
204
|
reset:
|
|
205
205
|
label: 重置
|
|
206
|
+
enable:
|
|
207
|
+
label: 启用
|
|
208
|
+
disable:
|
|
209
|
+
label: 停用
|
|
210
|
+
CustomLabels:
|
|
211
|
+
apps_not_found: 未找到应用
|
|
212
|
+
apps_actions_enable_dialog_title: 启用
|
|
213
|
+
apps_actions_enable_dialog_content_prefix: 确定要启用「
|
|
214
|
+
apps_actions_enable_dialog_content_suffix: 」应用?
|
|
215
|
+
apps_actions_disable_dialog_title: 停用
|
|
216
|
+
apps_actions_disable_dialog_content_prefix: 确定要停用「
|
|
217
|
+
apps_actions_disable_dialog_content_suffix: 」应用?
|
|
@@ -32,10 +32,16 @@ fields:
|
|
|
32
32
|
value: url
|
|
33
33
|
- label: Page
|
|
34
34
|
value: page
|
|
35
|
+
- label: Analytics Dashboard
|
|
36
|
+
value: analytics_dashboard
|
|
35
37
|
object:
|
|
36
38
|
label: Object
|
|
37
39
|
help:
|
|
38
40
|
description:
|
|
41
|
+
analytics_dashboard:
|
|
42
|
+
label: Analytics Dashboard
|
|
43
|
+
help:
|
|
44
|
+
description:
|
|
39
45
|
url:
|
|
40
46
|
label: Url
|
|
41
47
|
help:
|
|
@@ -32,10 +32,16 @@ fields:
|
|
|
32
32
|
value: url
|
|
33
33
|
- label: 页面
|
|
34
34
|
value: page
|
|
35
|
+
- label: 仪表盘
|
|
36
|
+
value: analytics_dashboard
|
|
35
37
|
object:
|
|
36
38
|
label: 对象
|
|
37
39
|
help:
|
|
38
40
|
description:
|
|
41
|
+
analytics_dashboard:
|
|
42
|
+
label: 仪表盘
|
|
43
|
+
help:
|
|
44
|
+
description:
|
|
39
45
|
url:
|
|
40
46
|
label: 外部链接
|
|
41
47
|
help:
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: baozhoutao@hotoa.com
|
|
3
3
|
* @Date: 2021-12-27 10:49:33
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
5
|
+
* @LastEditTime: 2025-08-11 18:09:33
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
module.exports = {
|
|
9
|
-
customize: function (object_name, record_id, fields) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
// customize: function (object_name, record_id, fields) {
|
|
10
|
+
// var doc = Creator.odata.get(object_name, record_id);
|
|
11
|
+
// var newRecord = _.pick(doc, Creator.getObjectFieldsName(object_name));
|
|
12
|
+
// delete newRecord.is_system;
|
|
13
|
+
// delete newRecord._id;
|
|
14
|
+
// delete newRecord.record_permissions;
|
|
15
|
+
// newRecord.from_code_id = record_id;
|
|
16
|
+
// Creator.odata.insert(object_name, newRecord, function(result, error){
|
|
17
|
+
// if(result){
|
|
18
|
+
// FlowRouter.go(`/app/-/${object_name}/view/${result._id}`)
|
|
19
|
+
// }
|
|
20
|
+
// });
|
|
21
21
|
|
|
22
|
-
},
|
|
23
|
-
customizeVisible: function(object_name, record_id, record_permissions, data){
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
22
|
+
// },
|
|
23
|
+
// customizeVisible: function(object_name, record_id, record_permissions, data){
|
|
24
|
+
// var record = data && data.record;
|
|
25
|
+
// if(record._id === 'admin'){return false;}
|
|
26
|
+
// return Steedos.Object.base.actions.standard_new.visible() && record.is_system && !record.from_code_id;
|
|
27
|
+
// },
|
|
28
28
|
reset: function(object_name, record_id, fields){
|
|
29
29
|
var record = Creator.odata.get(object_name, record_id);
|
|
30
30
|
var doc = Creator.odata.get(object_name, record.from_code_id);
|
|
@@ -38,50 +38,8 @@ module.exports = {
|
|
|
38
38
|
},
|
|
39
39
|
resetVisible: function(object_name, record_id, record_permissions, data){
|
|
40
40
|
const record = data && data.record;
|
|
41
|
-
if(
|
|
41
|
+
if(Steedos.Object.base.actions.standard_edit.visible(object_name, record_id, record_permissions)){
|
|
42
42
|
return record.from_code_id;
|
|
43
43
|
}
|
|
44
|
-
},
|
|
45
|
-
createOAuth2App: function (object_name) {
|
|
46
|
-
// const fields = Creator.getObject(object_name).fields;
|
|
47
|
-
// const oauthAppFields = {};
|
|
48
|
-
// _.map(fields, function (v, k) {
|
|
49
|
-
// if (k) {
|
|
50
|
-
// if (_.include(['name', 'code', 'visible', 'description', 'is_creator', 'mobile', 'sort', 'is_use_iframe', 'is_new_window'], k) || k.startsWith("oauth2")) {
|
|
51
|
-
// oauthAppFields[k] = v;
|
|
52
|
-
// }
|
|
53
|
-
// }
|
|
54
|
-
// });
|
|
55
|
-
// const onFinish = async (values = {}) => {
|
|
56
|
-
// return new Promise((resolve, reject) => {
|
|
57
|
-
// try {
|
|
58
|
-
// console.log(`values`, values)
|
|
59
|
-
// Creator.odata.insert(object_name, values)
|
|
60
|
-
// setTimeout(function () { FlowRouter.reload() }, 100)
|
|
61
|
-
// resolve(true);
|
|
62
|
-
// } catch (error) {
|
|
63
|
-
// console.error(`e2`, error);
|
|
64
|
-
// reject(false);
|
|
65
|
-
// }
|
|
66
|
-
// })
|
|
67
|
-
// }
|
|
68
|
-
// SteedosUI.showModal(stores.ComponentRegistry.components.ObjectForm, {
|
|
69
|
-
// name: "createOAuth2App",
|
|
70
|
-
// title: '创建 OAuth 应用',
|
|
71
|
-
// objectSchema: {
|
|
72
|
-
// fields: oauthAppFields
|
|
73
|
-
// },
|
|
74
|
-
// // initialValues: initialValues,
|
|
75
|
-
// onFinish: onFinish //onFinishByFrame
|
|
76
|
-
// }, null, { iconPath: '/assets/icons' })
|
|
77
|
-
},
|
|
78
|
-
createOAuth2AppVisible: function () {
|
|
79
|
-
return false && Creator.baseObject.actions.standard_new.visible();
|
|
80
|
-
},
|
|
81
|
-
standard_editVisible: function(object_name, record_id, record_permissions, record){
|
|
82
|
-
return false
|
|
83
|
-
},
|
|
84
|
-
standard_newVisible: function(object_name, record_id, record_permissions, record){
|
|
85
|
-
return false
|
|
86
44
|
}
|
|
87
45
|
}
|
|
@@ -4,6 +4,7 @@ icon: timeslot
|
|
|
4
4
|
hidden: true
|
|
5
5
|
version: 2.0
|
|
6
6
|
enable_dataloader: false
|
|
7
|
+
isMetadata: true
|
|
7
8
|
paging:
|
|
8
9
|
enabled: false
|
|
9
10
|
fields:
|
|
@@ -29,7 +30,7 @@ fields:
|
|
|
29
30
|
var options;
|
|
30
31
|
options = [];
|
|
31
32
|
|
|
32
|
-
_.forEach(
|
|
33
|
+
_.forEach(Steedos.resources.sldsIcons.standard, function (svg) {
|
|
33
34
|
return options.push({
|
|
34
35
|
value: svg,
|
|
35
36
|
label: svg,
|
|
@@ -53,6 +54,8 @@ fields:
|
|
|
53
54
|
value: url
|
|
54
55
|
- label: Page
|
|
55
56
|
value: page
|
|
57
|
+
- label: Analytics Dashboard
|
|
58
|
+
value: analytics_dashboard
|
|
56
59
|
filterable: true
|
|
57
60
|
mobile:
|
|
58
61
|
label: Display on the Mobile
|
|
@@ -81,6 +84,13 @@ fields:
|
|
|
81
84
|
filterable: true
|
|
82
85
|
required: "{{'object' === formData.type ? true: false}}"
|
|
83
86
|
visible_on: "{{'object' === formData.type ? true: false}}"
|
|
87
|
+
analytics_dashboard:
|
|
88
|
+
label: Analytics Dashboard
|
|
89
|
+
type: lookup
|
|
90
|
+
reference_to: analytics_dashboard
|
|
91
|
+
filterable: true
|
|
92
|
+
required: "{{'analytics_dashboard' === formData.type ? true: false}}"
|
|
93
|
+
visible_on: "{{'analytics_dashboard' === formData.type ? true: false}}"
|
|
84
94
|
url:
|
|
85
95
|
type: text
|
|
86
96
|
label: Url
|
|
@@ -93,6 +103,7 @@ fields:
|
|
|
93
103
|
type: boolean
|
|
94
104
|
label: Open with iframe
|
|
95
105
|
defaultValue: false
|
|
106
|
+
visible_on: "{{'analytics_dashboard' != formData.type ? true: false}}"
|
|
96
107
|
page:
|
|
97
108
|
type: lookup
|
|
98
109
|
label: 页面
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
const express = require("express");
|
|
7
7
|
const router = express.Router();
|
|
8
|
-
const
|
|
8
|
+
const auth = require('@steedos/auth');
|
|
9
9
|
const ejs = require('ejs');
|
|
10
10
|
const fs = require('fs');
|
|
11
11
|
const _ = require('lodash');
|
|
@@ -21,14 +21,14 @@ const getPublicAssetUrls = function(assetUrls){
|
|
|
21
21
|
})
|
|
22
22
|
return _.join(values, ',')
|
|
23
23
|
}
|
|
24
|
-
router.get('/api/amisAppNavSchemaDesign',
|
|
24
|
+
router.get('/api/amisAppNavSchemaDesign', auth.requireAuthentication, async function (req, res) {
|
|
25
25
|
try {
|
|
26
26
|
res.set('Content-Type', 'text/html');
|
|
27
27
|
const userSession = req.user;
|
|
28
28
|
let assetUrls = getPublicAssetUrls(req.query.assetUrls);
|
|
29
29
|
const assetUrl = `assetUrl=${assetUrls.split(',').join("&assetUrl=")}&`;
|
|
30
30
|
// const dataContext = {
|
|
31
|
-
// rootUrl:
|
|
31
|
+
// rootUrl: process.env.ROOT_URL,
|
|
32
32
|
// tenantId: userSession.spaceId,
|
|
33
33
|
// userId: userSession.userId,
|
|
34
34
|
// authToken: userSession.authToken
|
|
@@ -40,7 +40,7 @@ router.get('/api/amisAppNavSchemaDesign', core.requireAuthentication, async func
|
|
|
40
40
|
} else if (req.query.locale == "zh-cn") {
|
|
41
41
|
locale = "zh-CN";
|
|
42
42
|
}
|
|
43
|
-
const retUrl =
|
|
43
|
+
const retUrl = process.env.ROOT_URL + `/app/admin/apps/view/${req.query.id}`
|
|
44
44
|
const steedosBuilderUrl = process.env.STEEDOS_BUILDER_URL || 'https://builder.steedos.cn';
|
|
45
45
|
const builderHost = `${steedosBuilderUrl}/amis?${assetUrl}locale=${locale}&retUrl=${retUrl}`;
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ router.get('/api/amisAppNavSchemaDesign', core.requireAuthentication, async func
|
|
|
48
48
|
const data = {
|
|
49
49
|
builderHost,
|
|
50
50
|
assetUrls,
|
|
51
|
-
rootUrl:
|
|
51
|
+
rootUrl: process.env.ROOT_URL,
|
|
52
52
|
tenantId: userSession.spaceId,
|
|
53
53
|
userId: userSession.userId,
|
|
54
54
|
authToken: userSession.authToken,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
const express = require("express");
|
|
7
7
|
const router = express.Router();
|
|
8
|
-
const
|
|
8
|
+
const auth = require('@steedos/auth');
|
|
9
9
|
const ejs = require('ejs');
|
|
10
10
|
const fs = require('fs');
|
|
11
11
|
const _ = require('lodash');
|
|
@@ -44,7 +44,7 @@ router.get('/main_head.js', async function (req, res) {
|
|
|
44
44
|
res.set('Content-Type', 'application/javascript; charset=UTF-8');
|
|
45
45
|
const filename = path.join(__dirname, 'main_head.ejs');
|
|
46
46
|
const data = {
|
|
47
|
-
ROOT_URL: platform === 'cordova' ?
|
|
47
|
+
ROOT_URL: platform === 'cordova' ? process.env.ROOT_URL : '',
|
|
48
48
|
STEEDOS_SENTRY_ENABLED: process.env.STEEDOS_SENTRY_ENABLED,
|
|
49
49
|
NODE_ENV: process.env.NODE_ENV,
|
|
50
50
|
STEEDOS_SENTRY_DSN: process.env.STEEDOS_SENTRY_DSN,
|
|
@@ -85,7 +85,7 @@ router.get('/main_head.css', async function(req, res){
|
|
|
85
85
|
|
|
86
86
|
const STEEDOS_UNPKG_URL = getConfig('STEEDOS_UNPKG_URL', platform);
|
|
87
87
|
const STEEDOS_AMIS_URL = getConfig('STEEDOS_AMIS_URL', platform);
|
|
88
|
-
const ROOT_URL = platform === 'cordova' ?
|
|
88
|
+
const ROOT_URL = platform === 'cordova' ? process.env.ROOT_URL : '';
|
|
89
89
|
|
|
90
90
|
res.send(`
|
|
91
91
|
@import url("${STEEDOS_UNPKG_URL}/@salesforce-ux/design-system@2.22.2/assets/styles/salesforce-lightning-design-system.min.css");
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* @LastEditTime: 2023-04-21 11:09:05
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
|
-
const util = require('@steedos/standard-objects').util;
|
|
9
8
|
const _ = require('lodash');
|
|
10
9
|
const objectql = require('@steedos/objectql')
|
|
11
10
|
module.exports = {
|
|
@@ -13,7 +12,7 @@ module.exports = {
|
|
|
13
12
|
|
|
14
13
|
beforeInsert: async function(){
|
|
15
14
|
const { object_name, doc } = this;
|
|
16
|
-
await
|
|
15
|
+
await objectql.checkAPIName(object_name, 'name', doc.name, undefined);
|
|
17
16
|
if(doc.type === 'object'){
|
|
18
17
|
const records = await objectql.getObject('tabs').count({filters: [['type', '=', 'object'], ['object', '=', doc.object]]});
|
|
19
18
|
if(records > 0){
|
|
@@ -25,7 +24,7 @@ module.exports = {
|
|
|
25
24
|
beforeUpdate: async function(){
|
|
26
25
|
const {object_name, doc, spaceId, id} = this;
|
|
27
26
|
if(_.has(doc, 'name')){
|
|
28
|
-
await
|
|
27
|
+
await objectql.checkAPIName(object_name, 'name', doc.name, id);
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.100",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"description": "steedos package",
|
|
13
13
|
"repository": {},
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "89c69deb3ceb9d9e97c70ee23694ccecf1b4ce2b",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"clone": "^2.1.2"
|
|
18
18
|
}
|
package/package.service.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2022-07-29 09:40:31
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2025-02-15 13:49:38
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
"use strict";
|
|
9
9
|
const project = require('./package.json');
|
|
10
10
|
const packageName = project.name;
|
|
11
|
-
const packageLoader = require('@steedos/service-
|
|
11
|
+
const packageLoader = require('@steedos/service-package-loader');
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {import('moleculer').Context} Context Moleculer's Context
|
|
14
14
|
*/
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
Creator.openApp = function(app_id, event){
|
|
2
|
-
var app = Creator.getApp(app_id)
|
|
3
|
-
if(!app){
|
|
4
|
-
/* 执行A标签浏览器默认行为 */
|
|
5
|
-
return true;
|
|
6
|
-
}
|
|
7
|
-
if(app.is_use_iframe){
|
|
8
|
-
/*
|
|
9
|
-
如果需要实现单点登录,可以定义app.on_click属性写脚本代码,它会在路由"/app/xxx"中执行
|
|
10
|
-
详情请见源码中Template.creator_app_iframe.onRendered相关代码
|
|
11
|
-
*/
|
|
12
|
-
FlowRouter.go("/app/" + app_id);
|
|
13
|
-
event.preventDefault();
|
|
14
|
-
}
|
|
15
|
-
else if(app.on_click){
|
|
16
|
-
/*
|
|
17
|
-
这里执行的是一个不带参数的闭包函数,用来避免变量污染
|
|
18
|
-
on_click脚本中可以直接调用变量app_id、app、event等上面字义过的变量
|
|
19
|
-
如果想阻止A标签自动跳转行为,可以在脚本中增加代码event.preventDefault();来实现
|
|
20
|
-
注意每次变更on_click脚本内容后,目标浏览器或客户端都需要刷新才能生效
|
|
21
|
-
*/
|
|
22
|
-
var evalFunString = "(function(){" + app.on_click + "})()";
|
|
23
|
-
try{
|
|
24
|
-
eval(evalFunString);
|
|
25
|
-
}
|
|
26
|
-
catch(e){
|
|
27
|
-
/*just console the error when catch error*/
|
|
28
|
-
console.error("catch some error when eval the on_click script for app link:");
|
|
29
|
-
console.error(e.message + "\r\n" + e.stack);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else{
|
|
33
|
-
/* 执行A标签浏览器默认行为 */
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Meteor.startup(function(){
|
|
3
|
-
Tracker.autorun(function(){
|
|
4
|
-
const space = db.spaces.findOne(Steedos.getSpaceId());
|
|
5
|
-
if(space && space.favicon){
|
|
6
|
-
const faviconLink = document.querySelector('link[rel="shortcut icon"]');
|
|
7
|
-
faviconLink.href = Steedos.absoluteUrl("/api/files/avatars/"+space.favicon);
|
|
8
|
-
console.log('update faviconLink.href', faviconLink.href)
|
|
9
|
-
}
|
|
10
|
-
})
|
|
11
|
-
})
|