@steedos/service-plugin-amis 2.4.0-beta.16 → 2.4.0-beta.18

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.
@@ -161,17 +161,6 @@
161
161
  "clearValueOnHidden": true,
162
162
  "fieldName": "operation",
163
163
  "id": "u:627e520855b5",
164
- "onEvent": {
165
- "change": {
166
- "weight": 0,
167
- "actions": [
168
- {
169
- "actionType": "custom",
170
- "script": "/* 自定义JS使用说明: \n * 1.动作执行函数doAction,可以执行所有类型的动作\n * 2.通过上下文对象context可以获取当前组件实例,例如context.props可以获取该组件相关属性\n * 3.事件对象event,在doAction之后执行event.stopPropagation = true;可以阻止后续动作执行\n*/\n\nconst current_field_name = context.props.name;\nconst current_field_label = context.props.label;\nconst formData = context.props.data;\nconst current_field_value = formData[current_field_name];\n\nif (current_field_value === 'literal') {\n const target_object_name = formData.object_name;\n const target_field_name = formData.field_name;\n const target_object_uiSchema = Creator.getObject(target_object_name);\n const target_fields = target_object_uiSchema && target_object_uiSchema.fields;\n const target_field_type = target_fields && target_fields[target_field_name].type;\n let literal_value_schema = {\n \"type\": \"text\",\n \"name\": \"literal_value\",\n \"label\": \"指定新字段值\",\n \"required\": false,\n \"is_wide\": true,\n \"labelClassName\": \"text-left\"\n }\n if (target_field_type) {\n literal_value_schema = Object.assign({}, target_object_uiSchema.fields[target_field_name], {\n name: \"literal_value\",\n label: \"指定新字段值\",\n disabled: false,\n readonly: false,\n is_wide: true\n });\n doAction({\n actionType: 'setValue',\n componentId: 'service-action_field_updates-form-edit',\n args: {\n value: {\n literal_value_schema\n }\n }\n });\n }\n}\n\n"
171
- }
172
- ]
173
- }
174
- },
175
164
  "multiple": false
176
165
  },
177
166
  {
@@ -188,13 +177,31 @@
188
177
  "hiddenOn": "this.operation != 'formula'"
189
178
  },
190
179
  {
191
- "type": "steedos-field",
192
- "id": "u:dca4fd13be68",
193
- "name": "literal_value",
194
- "clearValueOnHidden": true,
195
- "fieldName": "literal_value",
196
- "field": "${literal_value_schema}",
197
- "hiddenOn": "this.operation != 'literal' "
180
+ "type": "service",
181
+ "body": [
182
+ {
183
+ "type": "steedos-field",
184
+ "name": "literal_value",
185
+ "clearValueOnHidden": true,
186
+ "fieldName": "literal_value",
187
+ "field": "${literal_value_schema}",
188
+ "visibleOn": "this.operation === 'literal' && !!this.literal_value_schema"
189
+ }
190
+ ],
191
+ "id": "u:d201a629c160",
192
+ "messages": {},
193
+ "api": {
194
+ "method": "get",
195
+ "url": "${context.rootUrl}/service/api/@${object_name}/uiSchema?field_name=${field_name}&operation=${operation}",
196
+ "adaptor": "const formData = api.body;\nconst target_field_name = formData.field_name;\nconst target_object_uiSchema = payload;\nconst target_fields = target_object_uiSchema && target_object_uiSchema.fields;\nconst target_field_type = target_fields && target_fields[target_field_name].type;\nlet literal_value_schema = {\n \"type\": \"text\",\n \"name\": \"literal_value\",\n \"label\": \"指定新字段值\",\n \"required\": false,\n \"is_wide\": true,\n \"labelClassName\": \"text-left\"\n}\nif (target_field_type) {\n literal_value_schema = Object.assign({}, target_object_uiSchema.fields[target_field_name], {\n name: \"literal_value\",\n label: \"指定新字段值\",\n disabled: false,\n readonly: false,\n is_wide: true\n });\n}\npayload = {};\npayload.data = {\n literal_value_schema\n}\nreturn payload;",
197
+ "sendOn": "!!this.object_name && !!this.field_name && this.operation === 'literal'",
198
+ "headers": {
199
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
200
+ },
201
+ "data": {
202
+ "&": "$$"
203
+ }
204
+ }
198
205
  },
199
206
  {
200
207
  "name": "description",
@@ -282,19 +289,7 @@
282
289
  }
283
290
  }
284
291
  ],
285
- "initApi": null,
286
- "id": "service-action_field_updates-form-edit",
287
- "data": {
288
- "$": "$$",
289
- "literal_value_schema": {
290
- "type": "text",
291
- "name": "literal_value",
292
- "label": "指定新字段值",
293
- "required": false,
294
- "is_wide": true,
295
- "labelClassName": "text-left"
296
- }
297
- }
292
+ "initApi": null
298
293
  }
299
294
  ],
300
295
  "data": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-plugin-amis",
3
- "version": "2.4.0-beta.16",
3
+ "version": "2.4.0-beta.18",
4
4
  "main": "package.service.js",
5
5
  "scripts": {
6
6
  "build": "yarn build:tailwind-base && yarn build:tailwind",
@@ -16,5 +16,8 @@
16
16
  "dependencies": {
17
17
  "@steedos-widgets/amis-lib": "^1.0.10"
18
18
  },
19
- "gitHead": "1a6e749338be48912c63f1019b39294267132e3b"
19
+ "gitHead": "62ac67a437778039d0b498d09ffde85912e33dd9",
20
+ "devDependencies": {
21
+ "tailwindcss": "3.2.4"
22
+ }
20
23
  }
@@ -201,10 +201,6 @@ body.steedos .-translate-x-0 {
201
201
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
202
202
  }
203
203
 
204
- body.steedos .transform {
205
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
206
- }
207
-
208
204
  body.steedos .flex-col {
209
205
  flex-direction: column
210
206
  }