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

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.
@@ -9136,7 +9136,8 @@ async function lookupToAmisPicker(field, readonly, ctx){
9136
9136
 
9137
9137
  pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, fieldsArr, ctx.formFactor, { headerToolbarItems, isLookup: true, keywordsSearchBoxName });
9138
9138
  const isAllowCreate = refObjectConfig.permissions.allowCreate;
9139
- if (isAllowCreate) {
9139
+ const isCreate = _$1__namespace.isBoolean(field.create) ? field.create : true;
9140
+ if (isAllowCreate && isCreate) {
9140
9141
  const new_button = await getSchema$5(refObjectConfig, { appId: ctx.appId, objectName: refObjectConfig.name, formFactor: ctx.formFactor });
9141
9142
  new_button.align = "right";
9142
9143
  // 保持快速搜索放在最左侧,新建按钮往里插,而不是push到最后
@@ -13805,8 +13806,8 @@ async function getRelatedListSchema(
13805
13806
  /*
13806
13807
  * @Author: baozhoutao@steedos.com
13807
13808
  * @Date: 2022-07-05 15:55:39
13808
- * @LastEditors: liaodaxue
13809
- * @LastEditTime: 2023-08-25 11:55:15
13809
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
13810
+ * @LastEditTime: 2023-09-14 10:19:56
13810
13811
  * @Description:
13811
13812
  */
13812
13813
 
@@ -14165,6 +14166,11 @@ async function convertColumnsToTableFields(columns, uiSchema, ctx = {}) {
14165
14166
  if (uiSchema.fields[column]) {
14166
14167
  fields.push(Object.assign({}, uiSchema.fields[column], ctx));
14167
14168
  }
14169
+ else if(ctx.extra){
14170
+ fields.push({
14171
+ name: column
14172
+ });
14173
+ }
14168
14174
  }
14169
14175
  } else if (_$1.isObject(column)) {
14170
14176
  if (column.field.indexOf('.') > 0) {
@@ -19744,16 +19750,15 @@ var AmisInstanceDetail = function (props) { return __awaiter(void 0, void 0, voi
19744
19750
  }); };
19745
19751
 
19746
19752
  var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
19747
- var formFactor, appId, objectApiName, display, page, listSchema;
19753
+ var formFactor, appId, objectApiName, display, data, _display, page, listSchema;
19748
19754
  return __generator(this, function (_b) {
19749
19755
  switch (_b.label) {
19750
19756
  case 0:
19751
- // console.time('PageListView')
19752
- console.log("PageListView====>", props);
19753
- formFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.listviewId, display = props.display, props.$schema, props.listName;
19757
+ formFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.listviewId, display = props.display, props.$schema, props.listName, data = props.data;
19758
+ _display = data.display || display;
19754
19759
  //TODO 此代码应该在object page template中处理
19755
- if (display)
19756
- Router$1.setTabDisplayAs(objectApiName, display);
19760
+ if (_display)
19761
+ Router$1.setTabDisplayAs(objectApiName, _display);
19757
19762
  return [4 /*yield*/, getPage({ type: 'list', appId: appId, objectName: objectApiName, formFactor: formFactor })];
19758
19763
  case 1:
19759
19764
  page = _b.sent();
@@ -19802,13 +19807,14 @@ var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, f
19802
19807
  }); };
19803
19808
 
19804
19809
  var PageRecordDetail = function (props) { return __awaiter(void 0, void 0, void 0, function () {
19805
- var defaultFormFactor, appId, objectApiName, display, recordSchema, recordPage;
19810
+ var defaultFormFactor, appId, objectApiName, display, data, _display, recordSchema, recordPage;
19806
19811
  return __generator(this, function (_a) {
19807
19812
  switch (_a.label) {
19808
19813
  case 0:
19809
- defaultFormFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.recordId, display = props.display;
19810
- if (display) {
19811
- Router$1.setTabDisplayAs(objectApiName, display);
19814
+ defaultFormFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.recordId, display = props.display, data = props.data;
19815
+ _display = data.display || display;
19816
+ if (_display) {
19817
+ Router$1.setTabDisplayAs(objectApiName, _display);
19812
19818
  }
19813
19819
  recordSchema = {};
19814
19820
  return [4 /*yield*/, getPage({ type: 'record', appId: appId, objectName: objectApiName, formFactor: defaultFormFactor })];