@steedos-widgets/amis-object 1.3.2-beta.4 → 1.3.2-beta.6

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.
@@ -13807,7 +13807,7 @@ async function getRelatedListSchema(
13807
13807
  * @Author: baozhoutao@steedos.com
13808
13808
  * @Date: 2022-07-05 15:55:39
13809
13809
  * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
13810
- * @LastEditTime: 2023-09-14 10:19:56
13810
+ * @LastEditTime: 2023-09-14 13:57:32
13811
13811
  * @Description:
13812
13812
  */
13813
13813
 
@@ -14167,7 +14167,9 @@ async function convertColumnsToTableFields(columns, uiSchema, ctx = {}) {
14167
14167
  fields.push(Object.assign({}, uiSchema.fields[column], ctx));
14168
14168
  }
14169
14169
  else if(ctx.extra){
14170
+ // 配置列表视图extra_columns时允许字段是hidden的,hidden的字段在uiSchema.fields中不存在
14170
14171
  fields.push({
14172
+ extra: true,
14171
14173
  name: column
14172
14174
  });
14173
14175
  }
@@ -14199,6 +14201,13 @@ async function convertColumnsToTableFields(columns, uiSchema, ctx = {}) {
14199
14201
  })
14200
14202
  );
14201
14203
  }
14204
+ else if(ctx.extra){
14205
+ // 配置列表视图extra_columns时允许字段是hidden的,hidden的字段在uiSchema.fields中不存在
14206
+ fields.push({
14207
+ extra: true,
14208
+ name: column.field
14209
+ });
14210
+ }
14202
14211
  }
14203
14212
  }
14204
14213
  }
@@ -19524,12 +19533,16 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
19524
19533
  * @Author: baozhoutao@steedos.com
19525
19534
  * @Date: 2023-01-14 16:41:24
19526
19535
  * @LastEditors: baozhoutao@steedos.com
19527
- * @LastEditTime: 2023-09-11 16:48:35
19536
+ * @LastEditTime: 2023-09-14 13:08:43
19528
19537
  * @Description:
19529
19538
  */
19530
19539
  var getSelectFlowSchema = function (id, props) {
19531
19540
  var label = props.label, data = props.data, name = props.name, required = props.required, _a = props.action, action = _a === void 0 ? "query" : _a, _b = props.distributeInstanceId, distributeInstanceId = _b === void 0 ? "" : _b, _c = props.distributeStepId, distributeStepId = _c === void 0 ? "" : _c, _d = props.mode, mode = _d === void 0 ? "input-tree" : _d, className = props.className, onEvent = props.onEvent, _e = props.multiple, multiple = _e === void 0 ? false : _e, delimiter = props.delimiter, joinValues = props.joinValues, extractValue = props.extractValue, searchable = props.searchable, _f = props.showIcon, showIcon = _f === void 0 ? true : _f, _g = props.showRadio, showRadio = _g === void 0 ? false : _g, showOutline = props.showOutline, initiallyOpen = props.initiallyOpen, unfoldedLevel = props.unfoldedLevel, treeContainerClassName = props.treeContainerClassName, _h = props.amis, amis = _h === void 0 ? {} : _h;
19532
19541
  // console.log(`=====onEvent`, onEvent)
19542
+ var allData = props.allData;
19543
+ if (allData != true) {
19544
+ allData = false;
19545
+ }
19533
19546
  return __assign$2({ type: mode, id: id, label: label, name: name, options: [], multiple: multiple, delimiter: delimiter, joinValues: joinValues, extractValue: extractValue, searchable: searchable, showOutline: showOutline, initiallyOpen: initiallyOpen, unfoldedLevel: unfoldedLevel,
19534
19547
  // className: `overflow-y-auto ` + className,
19535
19548
  className: className, required: required, treeContainerClassName: treeContainerClassName, heightAuto: true, menuTpl: mode === 'input-tree' ? {
@@ -19671,7 +19684,7 @@ var getSelectFlowSchema = function (id, props) {
19671
19684
  } : '', source: {
19672
19685
  method: "post",
19673
19686
  url: "${context.rootUrl}/graphql?keywords=${keywords}",
19674
- requestAdaptor: "\n const keywords = api.body.keywords || '';\n const appId = '".concat(data.app_id || "", "';\n api.data = {\n query: `\n {\n options: flows__getList(action: \"").concat(action, "\", keywords: \"${keywords}\", appId: \"${appId}\", distributeInstanceId: \"").concat(distributeInstanceId, "\", distributeStepId: \"").concat(distributeStepId, "\"){\n value:_id\n label:name\n children: flows{\n value: _id,\n label: name\n }\n }\n }\n `\n }\n "),
19687
+ requestAdaptor: "\n const keywords = api.body.keywords || '';\n const appId = '".concat(data.app_id || "", "';\n api.data = {\n query: `\n {\n options: flows__getList(action: \"").concat(action, "\", keywords: \"${keywords}\", appId: \"${appId}\", distributeInstanceId: \"").concat(distributeInstanceId, "\", distributeStepId: \"").concat(distributeStepId, "\", allData: ").concat(allData, "){\n value:_id\n label:name\n children: flows{\n value: _id,\n label: name\n }\n }\n }\n `\n }\n "),
19675
19688
  adaptor: "\n var options = payload.data.options;\n if(options){\n options.forEach(function(item,index) {\n if(item.value != 'startFlows' && (!item.children || item.children.length == 0)){\n payload.data.options.splice(index,1)\n }\n })\n }\n // if(payload.data.options.length === 1 && payload.data.options[0].children.length === 1){\n // payload.data.value = payload.data.options[0].children[0].value\n // }\n return payload;\n ",
19676
19689
  "headers": {
19677
19690
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"