@steedos/service-core-objects 3.0.0-beta.92 → 3.0.0-beta.93

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.
Files changed (21) hide show
  1. package/main/default/objectTranslations/base.en/base.en.objectTranslation.yml +4 -0
  2. package/main/default/objectTranslations/base.zh-CN/base.zh-CN.objectTranslation.yml +4 -0
  3. package/main/default/objectTranslations/company.en/company.en.objectTranslation.yml +5 -0
  4. package/main/default/objectTranslations/company.zh-CN/company.zh-CN.objectTranslation.yml +5 -0
  5. package/main/default/objectTranslations/object_actions.en/object_actions.en.objectTranslation.yml +2 -0
  6. package/main/default/objectTranslations/object_actions.zh-CN/object_actions.zh-CN.objectTranslation.yml +2 -0
  7. package/main/default/objectTranslations/object_triggers.en/object_triggers.en.objectTranslation.yml +9 -0
  8. package/main/default/objectTranslations/object_triggers.zh-CN/object_triggers.zh-CN.objectTranslation.yml +9 -0
  9. package/main/default/objectTranslations/object_webhooks.en/object_webhooks.en.objectTranslation.yml +8 -6
  10. package/main/default/objectTranslations/object_webhooks.zh-CN/object_webhooks.zh-CN.objectTranslation.yml +8 -6
  11. package/main/default/objectTranslations/objects.en/objects.en.objectTranslation.yml +5 -1
  12. package/main/default/objectTranslations/objects.zh-CN/objects.zh-CN.objectTranslation.yml +5 -1
  13. package/main/default/objectTranslations/settings.en/settings.en.objectTranslation.yml +9 -0
  14. package/main/default/objectTranslations/settings.zh-CN/settings.zh-CN.objectTranslation.yml +9 -0
  15. package/main/default/objects/api_keys/buttons/copy.button.yml +1 -1
  16. package/main/default/objects/apps/buttons/disable.button.js +6 -6
  17. package/main/default/objects/apps/buttons/enable.button.js +6 -6
  18. package/main/default/objects/company/buttons/updateOrgs.button.yml +3 -6
  19. package/main/default/objects/object_actions/fields/is_system.field.yml +1 -1
  20. package/main/default/objects/objects/buttons/custom.button.yml +1 -5
  21. package/package.json +3 -3
@@ -2,6 +2,10 @@ name: base
2
2
  label:
3
3
  description:
4
4
  fields:
5
+ external_id:
6
+ label: External Id
7
+ help:
8
+ description:
5
9
  owner:
6
10
  label: Owner
7
11
  help:
@@ -2,6 +2,10 @@ name: base
2
2
  label: base
3
3
  description:
4
4
  fields:
5
+ external_id:
6
+ label: 外部ID
7
+ help:
8
+ description:
5
9
  owner:
6
10
  label: 所有者
7
11
  help:
@@ -48,3 +48,8 @@ listviews:
48
48
  actions:
49
49
  updateOrgs:
50
50
  label: Update The Whole Company
51
+ CustomLabels:
52
+ company_actions_updateOrgs_confirmText_prefix: Update the company「
53
+ company_actions_updateOrgs_confirmText_suffix: 」info?
54
+ company_actions_updateOrgs_success: The company has updated successfully
55
+ company_actions_updateOrgs_failed: The company failed to update. Please try again later
@@ -48,3 +48,8 @@ listviews:
48
48
  actions:
49
49
  updateOrgs:
50
50
  label: 更新组织
51
+ CustomLabels:
52
+ company_actions_updateOrgs_confirmText_prefix: 更新「
53
+ company_actions_updateOrgs_confirmText_suffix: 」组织信息?
54
+ company_actions_updateOrgs_success: 更新组织信息成功
55
+ company_actions_updateOrgs_failed: 更新组织信息失败,请稍后再试
@@ -66,6 +66,8 @@ fields:
66
66
  label: Execute Script
67
67
  help:
68
68
  description:
69
+ is_system:
70
+ label: System
69
71
  listviews:
70
72
  all:
71
73
  label: All
@@ -63,6 +63,8 @@ fields:
63
63
  label: 执行的脚本
64
64
  help:
65
65
  description:
66
+ is_system:
67
+ label: 系统
66
68
  listviews:
67
69
  all:
68
70
  label: 所有
@@ -44,6 +44,15 @@ fields:
44
44
  label: System
45
45
  help:
46
46
  description:
47
+ type:
48
+ label: Type
49
+ help:
50
+ description:
51
+ options:
52
+ - label: Code
53
+ value: code
54
+ - label: Url
55
+ value: url
47
56
  listviews:
48
57
  all:
49
58
  label: All Triggers
@@ -41,6 +41,15 @@ fields:
41
41
  label: 系统
42
42
  help:
43
43
  description:
44
+ type:
45
+ label: 类型
46
+ help:
47
+ description:
48
+ options:
49
+ - label: 代码
50
+ value: code
51
+ - label: 接口
52
+ value: url
44
53
  listviews:
45
54
  all:
46
55
  label: 所有
@@ -10,21 +10,23 @@ fields:
10
10
  label: Object
11
11
  help:
12
12
  description:
13
- events:
14
- label: Events
13
+ event:
14
+ label: When to trigger
15
15
  help:
16
16
  options:
17
- - label: create
17
+ - label: The record has been created.
18
18
  value: create
19
- - label: update
19
+ - label: The record has been updated.
20
20
  value: update
21
- - label: delete
21
+ - label: The record has been created or updated
22
+ value: createAndUpdate
23
+ - label: The record has been deleted.
22
24
  value: delete
23
25
  description:
24
26
  fields:
25
27
  label: Fields
26
28
  help:
27
- description:
29
+ description: If not configured, push all fields
28
30
  payload_url:
29
31
  label: Payload URL
30
32
  help:
@@ -10,21 +10,23 @@ fields:
10
10
  label: 对象
11
11
  help:
12
12
  description:
13
- events:
14
- label: 事件
13
+ event:
14
+ label: 何时触发
15
15
  help:
16
16
  options:
17
- - label: 新增
17
+ - label: 记录已创建
18
18
  value: create
19
- - label: 修改
19
+ - label: 记录已更新
20
20
  value: update
21
- - label: 删除
21
+ - label: 记录已创建或已更新
22
+ value: createAndUpdate
23
+ - label: 记录已删除
22
24
  value: delete
23
25
  description:
24
26
  fields:
25
27
  label: 推送字段
26
28
  help:
27
- description:
29
+ description: 如果未配置, 则推送所有字段
28
30
  payload_url:
29
31
  label: URL
30
32
  help:
@@ -194,6 +194,8 @@ actions:
194
194
  label: Reset
195
195
  delete_object:
196
196
  label: Delete
197
+ custom:
198
+ label: Customize
197
199
  CustomLabels:
198
200
  objects_field_datasource_defaultValue: Default data source
199
201
  objects_field_datasource_meteor: Meteor
@@ -204,4 +206,6 @@ CustomLabels:
204
206
  objects_actions_delete_object_dialog_title_prefix: "Delete Object:"
205
207
  objects_actions_delete_object_dialog_content: "<div>\n<div style=\"text-align: left;\">To delete a custom object, perform the following operations:</div>\n<ul>\n<li style=\"text-align: left;\">Delete the fields and buttons of the object</li>\n<li style=\"text-align: left;\">Delete the tabs and list views of the object</li>\n<li style=\"text-align: left;\">Delete the page layouts of the object</li>\n<li style=\"text-align: left;\">Delete the permission of the object</li>\n<li style=\"text-align: left;\">Delete the validation rules of the object</li>\n<li style=\"text-align: left;\">Delete the restriction rules of the object</li>\n<li style=\"text-align: left;\">Delete the sharing rules of the object</li>\n<li style=\"text-align: left;\">Delete the workflow mapping that uses this object</li>\n<li style=\"text-align: left;\">Delete the open processes that use this object</li>\n<li style=\"text-align: left;\">Delete the pages that uses this object</li>\n</ul>\n</div>"
206
208
  objects_actions_reset_dialog_title_prefix: "Reset Object:"
207
- objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">Reset a custom object by performing the following operations:</div>\n<ul>\n<li style=\"text-align: left;\">Delete the custom object</li>\n<li style=\"text-align: left;\">Delete the fields of the custom object</li>\n</ul>\n</div>"
209
+ objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">Reset a custom object by performing the following operations:</div>\n<ul>\n<li style=\"text-align: left;\">Delete the custom object</li>\n<li style=\"text-align: left;\">Delete the fields of the custom object</li>\n</ul>\n</div>"
210
+ objects_actions_custom_success: The object has been customized.
211
+ objects_actions_custom_failed: Custom failed====
@@ -199,6 +199,8 @@ actions:
199
199
  label: 重置
200
200
  delete_object:
201
201
  label: 删除
202
+ custom:
203
+ label: 自定义
202
204
  CustomLabels:
203
205
  objects_field_datasource_defaultValue: 默认数据源
204
206
  objects_field_datasource_meteor: Meteor
@@ -209,4 +211,6 @@ CustomLabels:
209
211
  objects_actions_delete_object_dialog_title_prefix: "删除对象:"
210
212
  objects_actions_delete_object_dialog_content: "<div>\n<div style=\"text-align: left;\">删除一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除对象的字段和按钮</li>\n<li style=\"text-align: left;\">删除对象的选项卡和列表视图</li>\n<li style=\"text-align: left;\">删除对象的页面布局</li>\n<li style=\"text-align: left;\">删除对象的权限</li>\n<li style=\"text-align: left;\">删除对象的验证规则</li>\n<li style=\"text-align: left;\">删除对象的限制规则</li>\n<li style=\"text-align: left;\">删除对象的共享规则</li>\n<li style=\"text-align: left;\">删除使用该对象的流程映射</li>\n<li style=\"text-align: left;\">删除使用该对象的开放流程</li>\n<li style=\"text-align: left;\">删除使用该对象的页面</li>\n</ul>\n</div>"
211
213
  objects_actions_reset_dialog_title_prefix: "重置对象: "
212
- objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">重置一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除自定义的对象</li>\n<li style=\"text-align: left;\">删除自定义对象的字段</li>\n</ul>\n</div>"
214
+ objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">重置一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除自定义的对象</li>\n<li style=\"text-align: left;\">删除自定义对象的字段</li>\n</ul>\n</div>"
215
+ objects_actions_custom_success: 对象已自定义。
216
+ objects_actions_custom_failed: 自定义失败
@@ -18,3 +18,12 @@ fields:
18
18
  label: Settings
19
19
  help:
20
20
  description:
21
+ is_public:
22
+ label: Public
23
+ help: Accessible at the front end
24
+ description:
25
+ listviews:
26
+ all:
27
+ label: All
28
+ recent:
29
+ label: Recent
@@ -18,3 +18,12 @@ fields:
18
18
  label: 设置
19
19
  help:
20
20
  description:
21
+ is_public:
22
+ label: 前端可访问
23
+ help: 在前端可访问
24
+ description:
25
+ listviews:
26
+ all:
27
+ label: 全部
28
+ recent:
29
+ label: 最近查看
@@ -9,7 +9,7 @@ amis_schema: |-
9
9
  "type": "service",
10
10
  "body": [
11
11
  {
12
- "label": "复制API Key",
12
+ "label": "${'CustomAction.api_keys.copy' | t}",
13
13
  "type": "button",
14
14
  "actionType": "copy",
15
15
  "content": "${api_key}"
@@ -1,20 +1,20 @@
1
1
  /*
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2024-03-30 11:37:53
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2024-04-15 10:43:38
4
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5
+ * @LastEditTime: 2025-09-01 20:52:46
6
6
  * @Description:
7
7
  */
8
8
  module.exports = {
9
9
  disable: function (object_name, record_id, record_permissions, data) {
10
10
  Steedos.sobject(object_name).retrieve(record_id).then((record)=>{
11
11
  if(!record){
12
- return SteedosUI.notification.error({message: '未找到应用'})
12
+ return SteedosUI.notification.error({message: t('apps_not_found')})
13
13
  }
14
14
  SteedosUI.Modal.confirm({
15
- title: '停用',
16
- content: `确定要停用「${record.name}」应用?`,
17
- okText: '停用',
15
+ title: t('apps_actions_disable_dialog_title'),
16
+ content: `${t('apps_actions_disable_dialog_content_prefix')}${record.name}${t('apps_actions_disable_dialog_content_suffix')}`,
17
+ okText: t('CustomAction.apps.disable'),
18
18
  cancelText: t('Cancel'),
19
19
  onOk: function(){
20
20
  Steedos.authRequest(Steedos.absoluteUrl(`/api/v1/apps/${record_id}`), {type: 'put', async: false, data: JSON.stringify({
@@ -1,20 +1,20 @@
1
1
  /*
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2024-03-30 11:37:53
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2024-04-15 10:43:45
4
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5
+ * @LastEditTime: 2025-09-01 20:52:51
6
6
  * @Description:
7
7
  */
8
8
  module.exports = {
9
9
  enable: function (object_name, record_id) {
10
10
  Steedos.sobject(object_name).retrieve(record_id).then((record)=>{
11
11
  if(!record){
12
- return SteedosUI.notification.error({message: '未找到应用'})
12
+ return SteedosUI.notification.error({message: t('apps_not_found')})
13
13
  }
14
14
  SteedosUI.Modal.confirm({
15
- title: '启用',
16
- content: `确定要启用「${record.name}」应用?`,
17
- okText: '启用',
15
+ title: t('apps_actions_enable_dialog_title'),
16
+ content: `${t('apps_actions_enable_dialog_content_prefix')}${record.name}${t('apps_actions_enable_dialog_content_suffix')}`,
17
+ okText: t('CustomAction.apps.enable'),
18
18
  cancelText: t('Cancel'),
19
19
  onOk: function(){
20
20
  Steedos.authRequest(Steedos.absoluteUrl(`/api/v1/apps/${record_id}`), {type: 'put', async: false, data: JSON.stringify({
@@ -5,10 +5,10 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "更新组织",
8
+ "label": "${'CustomAction.company.updateOrgs' | t}",
9
9
  "id": "u:updateOrgs",
10
10
  "editorState": "default",
11
- "confirmText": "更新「${record.name}」组织信息?",
11
+ "confirmText": "${'CustomLabels.company_actions_updateOrgs_confirmText_prefix' | t}${name}${'CustomLabels.company_actions_updateOrgs_confirmText_suffix' | t}",
12
12
  "onEvent": {
13
13
  "click": {
14
14
  "weight": 0,
@@ -23,10 +23,7 @@ amis_schema: |-
23
23
  "method": "post",
24
24
  "requestAdaptor": "api.data = {\n companyId: context.recordId\n}\nreturn api;",
25
25
  "adaptor": "",
26
- "messages": {
27
- "success": "更新组织信息成功",
28
- "failed": "更新组织信息失败"
29
- },
26
+ "adaptor": "return payload.updatedOrgs ? {data: {...payload}, status: 0, msg: t('CustomLabels.company_actions_updateOrgs_success')} : {...payload, status: 1, msg: t('CustomLabels.company_actions_updateOrgs_failed')};",
30
27
  "dataType": "json"
31
28
  }
32
29
  }
@@ -1,6 +1,6 @@
1
1
  name: is_system
2
2
  type: boolean
3
- label: 系统
3
+ label: System
4
4
  readonly: true
5
5
  visible_on: '{{global.mode ===''read'' ? true : false}}'
6
6
  disabled: true
@@ -32,11 +32,7 @@ amis_schema: |-
32
32
  "method": "post",
33
33
  "sendOn": "docForCustomize",
34
34
  "requestAdaptor": "var doc = context.docForCustomize;\ndoc.is_customize = true;\ndoc.is_enable = true;\ndoc.in_development = \"0\";\n// delete doc.is_system;\ndelete doc.record_permissions;\ndelete doc.NAME_FIELD_KEY;\ndelete doc.idFieldName;\ndelete doc.idFieldNames;\ndelete doc.table_name;\ndelete doc.originalFields;\ndelete doc.extend;\ndelete doc.listeners;\ndelete doc.responseData;\ndelete doc.responseNsg;\ndelete doc.responseStatus;\ndelete doc.__filename;\ndelete doc.__timestamp;\nvar data = {\n query: `mutation{objects__upsert(id: \"${doc.name}\", doc: ${JSON.stringify(JSON.stringify(doc))}){_id,name}}`\n};\nreturn {\n ...api,\n data\n};",
35
- "adaptor": "",
36
- "messages": {
37
- "success": "对象已自定义。",
38
- "failed": "${msg}"
39
- }
35
+ "adaptor": "return payload.data.objects__upsert ? {...payload, status: 0, msg: t('CustomLabels.objects_actions_custom_success')} : {...payload, status: 1, msg: t('CustomLabels.objects_actions_custom_failed')};"
40
36
  }
41
37
  },
42
38
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-core-objects",
3
- "version": "3.0.0-beta.92",
3
+ "version": "3.0.0-beta.93",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -10,12 +10,12 @@
10
10
  "steedos"
11
11
  ],
12
12
  "dependencies": {
13
- "@steedos/service-package-loader": "3.0.0-beta.92",
13
+ "@steedos/service-package-loader": "3.0.0-beta.93",
14
14
  "json2xls": "^0.1.2",
15
15
  "lodash": "^4.17.21"
16
16
  },
17
17
  "description": "steedos package",
18
18
  "repository": {},
19
19
  "license": "MIT",
20
- "gitHead": "16a684ff645d0a9b745e4b49309f2c63d6a41395"
20
+ "gitHead": "676b116f1701dcdba8a665c4e7930f43242dd22f"
21
21
  }