@steedos/standard-object-database 2.3.3 → 2.4.0-beta.3

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.
@@ -18,7 +18,7 @@ amis_schema: |-
18
18
  "weight": 0
19
19
  }
20
20
  },
21
- "className": "slds-button slds-button--neutral p-0"
21
+ "className": ""
22
22
  }
23
23
  ],
24
24
  "regions": [
@@ -31,23 +31,14 @@ amis_schema: |-
31
31
  },
32
32
  "tooltip": "重置列表视图Amis Schema",
33
33
  "tooltipPlacement": "top",
34
- "className": "slds-button slds-button--neutral p-0"
34
+ "className": ""
35
35
  }
36
36
  ],
37
37
  "regions": [
38
38
  "body"
39
39
  ],
40
40
  "data": {
41
- "context": {
42
- "rootUrl": "https://5000-steedos-steedosplatform-uwiv6wkdp2o.ws-us77.gitpod.io"
43
- },
44
- "app_id": "",
45
- "tab_id": "",
46
- "object_name": "",
47
- "dataComponentId": "",
48
- "record_id": "",
49
- "record": {},
50
- "permissions": {}
41
+ "context": "${context}"
51
42
  },
52
43
  "id": "u:9a37e91e4b8d",
53
44
  "bodyClassName": "p-0"
@@ -0,0 +1,87 @@
1
+ name: delete_object
2
+ amis_schema: |-
3
+ {
4
+ "type": "service",
5
+ "body": [
6
+ {
7
+ "type": "button",
8
+ "label": "删除",
9
+ "id": "u:delete_object",
10
+ "onEvent": {
11
+ "click": {
12
+ "actions": [
13
+ {
14
+ "actionType": "dialog",
15
+ "dialog": {
16
+ "type": "dialog",
17
+ "title": "删除对象: ${record.label}",
18
+ "body": [
19
+ {
20
+ "type": "tpl",
21
+ "tpl": "<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</ul>\n</div>",
22
+ "inline": true,
23
+ "id": "u:6d0819fc0bda"
24
+ }
25
+ ],
26
+ "id": "u:b5c0f98dc113",
27
+ "closeOnEsc": false,
28
+ "closeOnOutside": false,
29
+ "showCloseButton": true,
30
+ "data": {
31
+ "&": "$$",
32
+ "record": "${record}"
33
+ },
34
+ "onEvent": {
35
+ "confirm": {
36
+ "weight": 0,
37
+ "actions": [
38
+ {
39
+ "componentId": "",
40
+ "args": {
41
+ "api": {
42
+ "url": "${context.rootUrl}/graphql",
43
+ "method": "post",
44
+ "data": {
45
+ "&": "$$",
46
+ "record": "${record}"
47
+ },
48
+ "requestAdaptor": "console.log(`api`, api);const record = api.body.record; \napi.data = {\n query: `\n mutation{\n objects__delete(id: \"${record._id}\")\n }\n `\n}",
49
+ "headers": {
50
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
51
+ }
52
+ },
53
+ "messages": {}
54
+ },
55
+ "actionType": "ajax"
56
+ },
57
+ {
58
+ "componentId": "",
59
+ "args": {
60
+ "url": "/app/admin/objects/grid/all"
61
+ },
62
+ "actionType": "link"
63
+ }
64
+ ]
65
+ }
66
+ }
67
+ }
68
+ }
69
+ ],
70
+ "weight": 0
71
+ }
72
+ }
73
+ }
74
+ ],
75
+ "regions": [
76
+ "body"
77
+ ],
78
+ "data": {
79
+ },
80
+ "bodyClassName": "p-0",
81
+ "id": "u:46d1821365fc"
82
+ }
83
+ is_enable: true
84
+ label: 删除
85
+ 'on': record_only_more
86
+ type: amis_button
87
+ visible: true
@@ -87,59 +87,59 @@ module.exports = {
87
87
  return true;
88
88
  }
89
89
  },
90
- delete_object: function (object_name, record_id, fields) {
91
- var record = Creator.getObjectRecord(object_name, record_id, 'name');
92
- SteedosUI.showModal(stores.ComponentRegistry.components.ObjectForm, {
93
- name: "remove-object",
94
- title: '删除对象',
95
- width: '540px',
96
- layout: 'horizontal',
97
- modalProps: {
98
- width: "540px",
99
- style: {
100
- width: "540px",
101
- maxWidth: "540px",
102
- minWidth: "480px"
103
- }
104
- },
105
- initialValues:{
106
- md: "删除一个自定义对象进行以下操作:\n\n* 删除对象的字段和按钮\n* 删除对象的选项卡和列表视图\n* 删除对象的页面布局\n* 删除对象的权限\n* 删除对象的验证规则\n* 删除对象的限制规则\n* 删除对象的共享规则\n* 删除使用该对象的流程映射\n* 删除使用该对象的开放流程\n* 删除使用该对象的页面。\n\n\\\n"
107
- },
108
- objectSchema: {
109
- fields: {
110
- md: {
111
- type: 'html',
112
- label: ' ',
113
- is_wide: true,
114
- readonly: true,
115
- }
116
- }
117
- },
118
- onFinish: async (values = {}) => {
119
- return new Promise((resolve, reject) => {
120
- window.$("body").addClass("loading");
121
- Creator.odata.delete(object_name, record_id, function() {
122
- var info= t('creator_record_remove_swal_suc');
123
- window.toastr.success(info);
124
- resolve(true)
125
- if(FlowRouter.current().route.path.endsWith("/:record_id")){
126
- var app_id = Session.get("app_id")
127
- var object_name = Session.get("object_name")
128
- FlowRouter.go(Creator.getListViewUrl(object_name, app_id, 'all'));
129
- }else{
130
- FlowRouter.reload();
131
- }
132
- window.$("body").removeClass("loading");
90
+ // delete_object: function (object_name, record_id, fields) {
91
+ // var record = Creator.getObjectRecord(object_name, record_id, 'name');
92
+ // SteedosUI.showModal(stores.ComponentRegistry.components.ObjectForm, {
93
+ // name: "remove-object",
94
+ // title: '删除对象',
95
+ // width: '540px',
96
+ // layout: 'horizontal',
97
+ // modalProps: {
98
+ // width: "540px",
99
+ // style: {
100
+ // width: "540px",
101
+ // maxWidth: "540px",
102
+ // minWidth: "480px"
103
+ // }
104
+ // },
105
+ // initialValues:{
106
+ // md: "删除一个自定义对象进行以下操作:\n\n* 删除对象的字段和按钮\n* 删除对象的选项卡和列表视图\n* 删除对象的页面布局\n* 删除对象的权限\n* 删除对象的验证规则\n* 删除对象的限制规则\n* 删除对象的共享规则\n* 删除使用该对象的流程映射\n* 删除使用该对象的开放流程\n* 删除使用该对象的页面。\n\n\\\n"
107
+ // },
108
+ // objectSchema: {
109
+ // fields: {
110
+ // md: {
111
+ // type: 'html',
112
+ // label: ' ',
113
+ // is_wide: true,
114
+ // readonly: true,
115
+ // }
116
+ // }
117
+ // },
118
+ // onFinish: async (values = {}) => {
119
+ // return new Promise((resolve, reject) => {
120
+ // window.$("body").addClass("loading");
121
+ // Creator.odata.delete(object_name, record_id, function() {
122
+ // var info= t('creator_record_remove_swal_suc');
123
+ // window.toastr.success(info);
124
+ // resolve(true)
125
+ // if(FlowRouter.current().route.path.endsWith("/:record_id")){
126
+ // var app_id = Session.get("app_id")
127
+ // var object_name = Session.get("object_name")
128
+ // FlowRouter.go(Creator.getListViewUrl(object_name, app_id, 'all'));
129
+ // }else{
130
+ // FlowRouter.reload();
131
+ // }
132
+ // window.$("body").removeClass("loading");
133
133
 
134
- }, function(error) {
135
- toastr.error(error.message);
136
- window.$("body").removeClass("loading");
137
- reject(false);
138
- });
139
- })
140
- }
141
- }, null, { iconPath: '/assets/icons' })
142
- },
134
+ // }, function(error) {
135
+ // toastr.error(error.message);
136
+ // window.$("body").removeClass("loading");
137
+ // reject(false);
138
+ // });
139
+ // })
140
+ // }
141
+ // }, null, { iconPath: '/assets/icons' })
142
+ // },
143
143
  delete_objectVisible: function(object_name, record_id, record_permissions, record){
144
144
  if(!Creator.isSpaceAdmin()){
145
145
  return false
@@ -479,25 +479,25 @@ actions:
479
479
  # label: Export
480
480
  # visible: true
481
481
  # on: record
482
- form:
483
- afterInsert: !!js/function |
484
- function(){
485
- $("body").addClass('loading');
486
- setTimeout(function(){
487
- window.location.reload();
488
- }, 2500);
489
- }
490
- afterView: !!js/function |
491
- function(){
492
- $("div", $(".crm-header-title")).css("display", "inline");
493
- window.stores.API.client.sobject(this.doc.name).getConfig().then((res)=>{
494
- if(!res.idFieldName){
495
- return $(".crm-header-title").append('<span class="text-xs inline-block py-1 px-2.5 leading-none text-center whitespace-nowrap align-baseline font-bold bg-red-600 text-white rounded">'+TAPi18n.__("请配置主键字段")+'</span>')
496
- }
497
- }).catch(function(err){
498
- return console.error(err.message);
499
- });
500
- }
482
+ # form:
483
+ # afterInsert: !!js/function |
484
+ # function(){
485
+ # $("body").addClass('loading');
486
+ # setTimeout(function(){
487
+ # window.location.reload();
488
+ # }, 2500);
489
+ # }
490
+ # afterView: !!js/function |
491
+ # function(){
492
+ # $("div", $(".crm-header-title")).css("display", "inline");
493
+ # window.stores.API.client.sobject(this.doc.name).getConfig().then((res)=>{
494
+ # if(!res.idFieldName){
495
+ # return $(".crm-header-title").append('<span class="text-xs inline-block py-1 px-2.5 leading-none text-center whitespace-nowrap align-baseline font-bold bg-red-600 text-white rounded">'+TAPi18n.__("请配置主键字段")+'</span>')
496
+ # }
497
+ # }).catch(function(err){
498
+ # return console.error(err.message);
499
+ # });
500
+ # }
501
501
  permission_set:
502
502
  user:
503
503
  allowCreate: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-object-database",
3
- "version": "2.3.3",
3
+ "version": "2.4.0-beta.3",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -15,5 +15,5 @@
15
15
  },
16
16
  "repository": {},
17
17
  "license": "MIT",
18
- "gitHead": "9d46ca700b9fc9586b66bcc8410684ff7343f5fb"
18
+ "gitHead": "1c901ac5b13f425f28aedf0f1bf61199f0012663"
19
19
  }
@@ -2,7 +2,7 @@
2
2
  * @Author: sunhaolin@hotoa.com
3
3
  * @Date: 1985-10-26 16:15:00
4
4
  * @LastEditors: sunhaolin@hotoa.com
5
- * @LastEditTime: 2022-07-29 13:29:26
5
+ * @LastEditTime: 2022-12-09 13:41:16
6
6
  * @Description:
7
7
  */
8
8
  "use strict";
@@ -22,7 +22,8 @@ module.exports = {
22
22
  settings: {
23
23
  packageInfo: {
24
24
  path: __dirname,
25
- name: packageName
25
+ name: packageName,
26
+ isPackage: false
26
27
  }
27
28
  },
28
29