@steedos-widgets/amis-object 1.3.2-beta.3 → 1.3.2-beta.5

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.
@@ -13778,8 +13778,8 @@ async function getRelatedListSchema(
13778
13778
  /*
13779
13779
  * @Author: baozhoutao@steedos.com
13780
13780
  * @Date: 2022-07-05 15:55:39
13781
- * @LastEditors: liaodaxue
13782
- * @LastEditTime: 2023-08-25 11:55:15
13781
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
13782
+ * @LastEditTime: 2023-09-14 11:34:23
13783
13783
  * @Description:
13784
13784
  */
13785
13785
 
@@ -14138,6 +14138,12 @@ async function convertColumnsToTableFields(columns, uiSchema, ctx = {}) {
14138
14138
  if (uiSchema.fields[column]) {
14139
14139
  fields.push(Object.assign({}, uiSchema.fields[column], ctx));
14140
14140
  }
14141
+ else if(ctx.extra){
14142
+ // 配置列表视图extra_columns时允许字段是hidden的,hidden的字段在uiSchema.fields中不存在
14143
+ fields.push({
14144
+ name: column
14145
+ });
14146
+ }
14141
14147
  }
14142
14148
  } else if (isObject$1(column)) {
14143
14149
  if (column.field.indexOf('.') > 0) {
@@ -19491,12 +19497,16 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
19491
19497
  * @Author: baozhoutao@steedos.com
19492
19498
  * @Date: 2023-01-14 16:41:24
19493
19499
  * @LastEditors: baozhoutao@steedos.com
19494
- * @LastEditTime: 2023-09-11 16:48:35
19500
+ * @LastEditTime: 2023-09-14 13:08:43
19495
19501
  * @Description:
19496
19502
  */
19497
19503
  var getSelectFlowSchema = function (id, props) {
19498
19504
  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;
19499
19505
  // console.log(`=====onEvent`, onEvent)
19506
+ var allData = props.allData;
19507
+ if (allData != true) {
19508
+ allData = false;
19509
+ }
19500
19510
  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,
19501
19511
  // className: `overflow-y-auto ` + className,
19502
19512
  className: className, required: required, treeContainerClassName: treeContainerClassName, heightAuto: true, menuTpl: mode === 'input-tree' ? {
@@ -19638,7 +19648,7 @@ var getSelectFlowSchema = function (id, props) {
19638
19648
  } : '', source: {
19639
19649
  method: "post",
19640
19650
  url: "${context.rootUrl}/graphql?keywords=${keywords}",
19641
- 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 "),
19651
+ 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 "),
19642
19652
  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 ",
19643
19653
  "headers": {
19644
19654
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
@@ -19717,16 +19727,15 @@ var AmisInstanceDetail = function (props) { return __awaiter(void 0, void 0, voi
19717
19727
  }); };
19718
19728
 
19719
19729
  var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
19720
- var formFactor, appId, objectApiName, display, page, listSchema;
19730
+ var formFactor, appId, objectApiName, display, data, _display, page, listSchema;
19721
19731
  return __generator(this, function (_b) {
19722
19732
  switch (_b.label) {
19723
19733
  case 0:
19724
- // console.time('PageListView')
19725
- console.log("PageListView====>", props);
19726
- formFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.listviewId, display = props.display, props.$schema, props.listName;
19734
+ formFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.listviewId, display = props.display, props.$schema, props.listName, data = props.data;
19735
+ _display = data.display || display;
19727
19736
  //TODO 此代码应该在object page template中处理
19728
- if (display)
19729
- Router$1.setTabDisplayAs(objectApiName, display);
19737
+ if (_display)
19738
+ Router$1.setTabDisplayAs(objectApiName, _display);
19730
19739
  return [4 /*yield*/, getPage({ type: 'list', appId: appId, objectName: objectApiName, formFactor: formFactor })];
19731
19740
  case 1:
19732
19741
  page = _b.sent();
@@ -19775,13 +19784,14 @@ var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, f
19775
19784
  }); };
19776
19785
 
19777
19786
  var PageRecordDetail = function (props) { return __awaiter(void 0, void 0, void 0, function () {
19778
- var defaultFormFactor, appId, objectApiName, display, recordSchema, recordPage;
19787
+ var defaultFormFactor, appId, objectApiName, display, data, _display, recordSchema, recordPage;
19779
19788
  return __generator(this, function (_a) {
19780
19789
  switch (_a.label) {
19781
19790
  case 0:
19782
- defaultFormFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.recordId, display = props.display;
19783
- if (display) {
19784
- Router$1.setTabDisplayAs(objectApiName, display);
19791
+ defaultFormFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.recordId, display = props.display, data = props.data;
19792
+ _display = data.display || display;
19793
+ if (_display) {
19794
+ Router$1.setTabDisplayAs(objectApiName, _display);
19785
19795
  }
19786
19796
  recordSchema = {};
19787
19797
  return [4 /*yield*/, getPage({ type: 'record', appId: appId, objectName: objectApiName, formFactor: defaultFormFactor })];