@steedos/standard-object-database 2.4.0-beta.24 → 2.4.0-beta.26

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.
@@ -13,22 +13,6 @@ fields:
13
13
  label: Object
14
14
  create: false
15
15
  sort_no: 110
16
- optionsFunction: !<tag:yaml.org,2002:js/function> |-
17
- function () {
18
- var _options;
19
-
20
- _options = [];
21
-
22
- _.forEach(Creator.objectsByName, function (o, k) {
23
- return _options.push({
24
- label: o.label,
25
- value: k,
26
- icon: o.icon
27
- });
28
- });
29
-
30
- return _options;
31
- }
32
16
  label:
33
17
  type: text
34
18
  label: Label
@@ -14,24 +14,7 @@ fields:
14
14
  reference_to_field: name
15
15
  required: true
16
16
  write_requires_master_read: true
17
- optionsFunction: !<tag:yaml.org,2002:js/function> |-
18
- function () {
19
- var _options;
20
-
21
- _options = [];
22
-
23
- _.forEach(Creator.objectsByName, function (o, k) {
24
- if(!['base','core','space_users_invite','_object_reload_logs'].includes(k)){
25
- return _options.push({
26
- label: o.label,
27
- value: k,
28
- icon: o.icon
29
- });
30
- }
31
- });
32
-
33
- return _options;
34
- }
17
+ filters: ['name', 'notcontains', ['base','core','space_users_invite','_object_reload_logs']]
35
18
  sort_no: 110
36
19
  label:
37
20
  type: text
@@ -124,10 +107,6 @@ fields:
124
107
  label: Reference to
125
108
  reference_to: objects
126
109
  reference_to_field: name
127
- optionsFunction: !<tag:yaml.org,2002:js/function> |-
128
- function () {
129
- return Steedos.getObjectsOptions();
130
- }
131
110
  visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
132
111
  required: "{{['master_detail'].indexOf(formData.type) > -1 ? true: false}}"
133
112
  sort_no: 180
@@ -13,8 +13,9 @@ module.exports = {
13
13
  }
14
14
  });
15
15
  },
16
- customizeVisible: function(object_name, record_id, record_permissions, record){
17
- return Creator.baseObject.actions.standard_new.visible() && record.is_system;
16
+ customizeVisible: function(object_name, record_id, record_permissions, data){
17
+ var record = data && data.record;
18
+ return Creator.baseObject.actions.standard_new.visible() && record.is_system;
18
19
  },
19
20
  /*
20
21
  standard_new: function (object_name, record_id, fields){
@@ -22,18 +22,6 @@ fields:
22
22
  reference_to: objects
23
23
  reference_to_field: name
24
24
  write_requires_master_read: true
25
- optionsFunction: !<tag:yaml.org,2002:js/function> |-
26
- function () {
27
- var _options = [];
28
- _.forEach(Creator.objectsByName, function (o, k) {
29
- return _options.push({
30
- label: o.label,
31
- value: k,
32
- icon: o.icon
33
- });
34
- });
35
- return _options;
36
- }
37
25
  type:
38
26
  type: select
39
27
  options:
@@ -31,8 +31,9 @@ module.exports = {
31
31
  });
32
32
 
33
33
  },
34
- customizeVisible: function(object_name, record_id, record_permissions, record){
35
- return Creator.baseObject.actions.standard_new.visible() && record.is_system;
34
+ customizeVisible: function(object_name, record_id, record_permissions, data){
35
+ var record = data && data.record;
36
+ return Creator.baseObject.actions.standard_new.visible() && record.is_system;
36
37
  },
37
38
  copy: function(object_name, record_id){
38
39
  let newRecord = null; // _.clone(Creator.getListView(Session.get("object_name"), record_id));
@@ -87,7 +88,7 @@ module.exports = {
87
88
  }
88
89
  Steedos.Page.Form.StandardNew.render(Session.get("app_id"), 'object_listviews', t("creator_list_copy_list_view"), data, {});
89
90
  },
90
- copyVisible: function(object_name, record_id, record_permissions, record){
91
+ copyVisible: function(object_name, record_id, record_permissions, data){
91
92
  return true;
92
93
  },
93
94
  showDesign: function (object_name, record_id) {
@@ -22,22 +22,6 @@ fields:
22
22
  required: true
23
23
  reference_to: objects
24
24
  reference_to_field: name
25
- optionsFunction: !<tag:yaml.org,2002:js/function> |-
26
- function () {
27
- var _options;
28
-
29
- _options = [];
30
-
31
- _.forEach(Creator.objectsByName, function (o, k) {
32
- return _options.push({
33
- label: o.label,
34
- value: k,
35
- icon: o.icon
36
- });
37
- });
38
-
39
- return _options;
40
- }
41
25
  filter_scope:
42
26
  label: Filter Scope
43
27
  type: select
@@ -9,22 +9,6 @@ fields:
9
9
  required: true
10
10
  reference_to: objects
11
11
  reference_to_field: name
12
- optionsFunction: !<tag:yaml.org,2002:js/function> |-
13
- function () {
14
- var _options;
15
-
16
- _options = [];
17
-
18
- _.forEach(Creator.objectsByName, function (o, k) {
19
- return _options.push({
20
- label: o.label,
21
- value: k,
22
- icon: o.icon
23
- });
24
- });
25
-
26
- return _options;
27
- }
28
12
  objectName:
29
13
  label: Related Object
30
14
  type: lookup
@@ -18,22 +18,6 @@ fields:
18
18
  reference_to: objects
19
19
  reference_to_field: name
20
20
  required: true
21
- optionsFunction: !<tag:yaml.org,2002:js/function> |-
22
- function () {
23
- var _options;
24
-
25
- _options = [];
26
-
27
- _.forEach(Creator.objectsByName, function (o, k) {
28
- return _options.push({
29
- label: o.label,
30
- value: k,
31
- icon: o.icon
32
- });
33
- });
34
-
35
- return _options;
36
- }
37
21
  # on:
38
22
  # label: 运行于
39
23
  # type: lookup
@@ -24,7 +24,8 @@ module.exports = {
24
24
  }
25
25
  });
26
26
  },
27
- customizeVisible: function(object_name, record_id, record_permissions, record){
27
+ customizeVisible: function(object_name, record_id, record_permissions, data){
28
+ var record = data && data.record;
28
29
  if(!record){
29
30
  record = {}
30
31
  }
@@ -16,10 +16,6 @@ fields:
16
16
  write_requires_master_read: true
17
17
  reference_to_field: name
18
18
  required: true
19
- optionsFunction: !<tag:yaml.org,2002:js/function> |-
20
- function () {
21
- return Steedos.getObjectsOptions();
22
- }
23
19
 
24
20
  active:
25
21
  type: boolean
@@ -34,28 +34,16 @@
34
34
  "type": "tabs",
35
35
  "tabs": [
36
36
  {
37
- "title": "详细信息",
37
+ "title": "详情",
38
38
  "body": [
39
39
  {
40
- "type": "tabs",
41
- "tabs": [
42
- {
43
- "title": "详细",
44
- "body": [
45
- {
46
- "type": "steedos-object-form",
47
- "label": "对象表单",
48
- "mode": "read",
49
- "objectApiName": "${objectName}",
50
- "recordId": "${recordId}",
51
- "labelAlign": "left",
52
- "id": "u:4eb5fa6f6fad"
53
- }
54
- ],
55
- "id": "u:55e5c732daf6"
56
- }
57
- ],
58
- "id": "u:090f4ed96ac2"
40
+ "type": "steedos-object-form",
41
+ "label": "对象表单",
42
+ "mode": "read",
43
+ "objectApiName": "${objectName}",
44
+ "recordId": "${recordId}",
45
+ "labelAlign": "left",
46
+ "id": "u:4eb5fa6f6fad"
59
47
  }
60
48
  ],
61
49
  "id": "u:b2fbc13aabb8"
@@ -181,9 +169,9 @@
181
169
  ],
182
170
  "id": "u:6a3b45d7adcf",
183
171
  "tabsMode": "vertical",
184
- "className": "object-detail-tabs mt-3 bg-white border-b sm:shadow sm:rounded sm:border border-slate-300 p-0.5",
185
- "toolbarClassName": "bg-white",
186
- "linksClassName": "bg-white border-r",
172
+ "className": "object-detail-tabs mt-3 bg-white border-b sm:shadow sm:rounded sm:border border-slate-300",
173
+ "toolbarClassName": "",
174
+ "linksClassName": "",
187
175
  "contentClassName": "bg-white"
188
176
  }
189
177
  ],
@@ -198,10 +186,7 @@
198
186
  }
199
187
  },
200
188
  "id": "page_objects_record_detail",
189
+ "name": "page_objects_record_detail",
201
190
  "bodyClassName": "",
202
- "asideResizor": false,
203
- "pullRefresh": {
204
- "disabled": true
205
- },
206
191
  "className": "object-detail-page"
207
- }
192
+ }
@@ -42,7 +42,8 @@ module.exports = {
42
42
  // Steedos.openWindow(Creator.getRelativeUrl("/app/-/" + record.name + "/grid/all"))
43
43
  // }
44
44
  },
45
- show_objectVisible: function(object_name, record_id, record_permissions, record){
45
+ show_objectVisible: function(object_name, record_id, record_permissions, data){
46
+ var record = data && data.record;
46
47
  if(!Creator.isSpaceAdmin()){
47
48
  return false
48
49
  }
@@ -80,7 +81,8 @@ module.exports = {
80
81
  return toastr.error('复制失败: 未启用API');
81
82
  }
82
83
  },
83
- copy_odataVisible: function(object_name, record_id, record_permissions, record){
84
+ copy_odataVisible: function(object_name, record_id, record_permissions, data){
85
+ var record = data && data.record;
84
86
  if(!Creator.isSpaceAdmin()){
85
87
  return false
86
88
  }
@@ -144,7 +146,8 @@ module.exports = {
144
146
  // }
145
147
  // }, null, { iconPath: '/assets/icons' })
146
148
  // },
147
- delete_objectVisible: function(object_name, record_id, record_permissions, record){
149
+ delete_objectVisible: function(object_name, record_id, record_permissions, data){
150
+ var record = data && data.record;
148
151
  if(!Creator.isSpaceAdmin()){
149
152
  return false
150
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-object-database",
3
- "version": "2.4.0-beta.24",
3
+ "version": "2.4.0-beta.26",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -11,9 +11,9 @@
11
11
  ],
12
12
  "description": "steedos package",
13
13
  "dependencies": {
14
- "@steedos-widgets/amis-lib": "^1.0.21"
14
+ "@steedos-widgets/amis-lib": "^1.0.22"
15
15
  },
16
16
  "repository": {},
17
17
  "license": "MIT",
18
- "gitHead": "ae19a048849a7d17c374f517df5b207f663bd6e4"
18
+ "gitHead": "bdcc1c0dade33d528ae0d5c0552e2b66b5a1e783"
19
19
  }
@@ -1,15 +0,0 @@
1
- (function () {
2
- try {
3
- var styleCss = $(`<style>
4
- .steedos .object-detail-page .object-detail-tabs > .antd-Tabs-linksWrapper{
5
- background-color: #fff;
6
- border-right: solid 1px;
7
- --tw-border-opacity: 0.6;
8
- border-color: rgb(203 213 225 / var(--tw-border-opacity));
9
- }
10
- </style>`);
11
- $("head").append(styleCss);
12
- } catch (error) {
13
- console.log(error);
14
- }
15
- })();