@steedos/standard-object-database 2.5.0-beta.11 → 2.5.0-beta.13

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.
@@ -73,32 +73,32 @@ fields:
73
73
  icon: "lead_list"
74
74
  }];
75
75
  }
76
- type:
77
- type: select
78
- sort_no: 170
79
- options:
80
- - label: Custom JavaScript
81
- value: script
82
- - label: Amis Button
83
- value: amis_button
84
- # - label: 打印模板(word)
85
- # value: word-print
86
- defaultValue: amis_button
76
+ # type:
77
+ # type: select
78
+ # sort_no: 170
79
+ # options:
80
+ # - label: Custom JavaScript
81
+ # value: script
82
+ # - label: Amis Button
83
+ # value: amis_button
84
+ # # - label: 打印模板(word)
85
+ # # value: word-print
86
+ # defaultValue: amis_button
87
87
  # word_template:
88
88
  # type: lookup
89
89
  # reference_to: word_templates
90
90
  # visible_on: "{{formData.type === 'word-print' ? true: false}}"
91
91
  # create: false
92
- todo:
93
- label: Execute Script
94
- sort_no: 180
95
- type: code
96
- language: javascript
97
- required: "{{formData.type != 'amis_button' ? true: false}}"
98
- # omit: true
99
- # hidden: true
100
- is_wide: true
101
- visible_on: "{{formData.type != 'amis_button' ? true: false}}"
92
+ # todo:
93
+ # label: Execute Script
94
+ # sort_no: 180
95
+ # type: code
96
+ # language: javascript
97
+ # required: "{{formData.type != 'amis_button' ? true: false}}"
98
+ # # omit: true
99
+ # # hidden: true
100
+ # is_wide: true
101
+ # visible_on: "{{formData.type != 'amis_button' ? true: false}}"
102
102
  amis_schema:
103
103
  label: Amis Schema
104
104
  sort_no: 180
@@ -108,6 +108,11 @@ fields:
108
108
  is_wide: true
109
109
  hidden: true
110
110
  visible_on: "{{formData.type == 'amis_button' ? true: false}}"
111
+ form:
112
+ initialValues: !!js/function |
113
+ function(){
114
+ return {type: 'amis_button'}
115
+ }
111
116
  paging:
112
117
  enabled: false
113
118
  actions:
@@ -110,23 +110,44 @@ fields:
110
110
  visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
111
111
  required: "{{['master_detail'].indexOf(formData.type) > -1 ? true: false}}"
112
112
  sort_no: 180
113
- # reference_to_field:
114
- # type: lookup
115
- # label: Reference to field
116
- # reference_to: object_fields
117
- # reference_to_field: name
118
- # visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
119
- # depend_on:
120
- # - reference_to
121
- # filtersFunction: !<tag:yaml.org,2002:js/function> |-
122
- # function (filters, values) {
123
- # if(values && values.reference_to){
124
- # return ['object', '=', values.reference_to]
125
- # }else{
126
- # return ['_id', '=', 'no']
127
- # }
128
- # }
129
- # sort_no: 182
113
+ depend_on:
114
+ type: lookup
115
+ group: Advanced
116
+ label: 依赖的字段
117
+ reference_to: object_fields
118
+ reference_to_field: name
119
+ multiple: true
120
+ visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
121
+ depend_on:
122
+ - object
123
+ filtersFunction: !<tag:yaml.org,2002:js/function> |-
124
+ function (filters, values) {
125
+ if(values && values.object){
126
+ return ['object', '=', values.object]
127
+ }else{
128
+ return ['_id', '=', 'no']
129
+ }
130
+ }
131
+ sort_no: 450
132
+ reference_to_field:
133
+ type: lookup
134
+ group: Advanced
135
+ label: 关联的字段
136
+ description: '默认为主键'
137
+ reference_to: object_fields
138
+ reference_to_field: name
139
+ visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
140
+ depend_on:
141
+ - reference_to
142
+ filtersFunction: !<tag:yaml.org,2002:js/function> |-
143
+ function (filters, values) {
144
+ if(values && values.reference_to){
145
+ return ['object', '=', values.reference_to]
146
+ }else{
147
+ return ['_id', '=', 'no']
148
+ }
149
+ }
150
+ sort_no: 450
130
151
  multiple:
131
152
  type: boolean
132
153
  label: Multiple
@@ -163,16 +184,23 @@ fields:
163
184
  sort_no: 220
164
185
  filtersFunction:
165
186
  label: filters Function
166
- type: textarea
167
- is_wide: true
168
- visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
169
- sort_no: 230
170
- optionsFunction:
171
- label: options Function
172
- type: textarea
187
+ type: code
188
+ language: javascript
173
189
  is_wide: true
174
190
  visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
175
- sort_no: 240
191
+ sort_no: 448
192
+ group: Advanced
193
+ amis:
194
+ placeholder: |-
195
+ function(filters, values){
196
+
197
+ }
198
+ # optionsFunction:
199
+ # label: options Function
200
+ # type: textarea
201
+ # is_wide: true
202
+ # visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
203
+ # sort_no: 240
176
204
  precision:
177
205
  type: currency
178
206
  label: Precision
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-object-database",
3
- "version": "2.5.0-beta.11",
3
+ "version": "2.5.0-beta.13",
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": "72a894aab5a9d4e277d0464decda0ba39f2f50bb"
18
+ "gitHead": "7027a5e2cff04814d2284fc63a1d738e32c90feb"
19
19
  }