@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.
@@ -9108,7 +9108,8 @@ async function lookupToAmisPicker(field, readonly, ctx){
9108
9108
 
9109
9109
  pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, fieldsArr, ctx.formFactor, { headerToolbarItems, isLookup: true, keywordsSearchBoxName });
9110
9110
  const isAllowCreate = refObjectConfig.permissions.allowCreate;
9111
- if (isAllowCreate) {
9111
+ const isCreate = _$1.isBoolean(field.create) ? field.create : true;
9112
+ if (isAllowCreate && isCreate) {
9112
9113
  const new_button = await getSchema$5(refObjectConfig, { appId: ctx.appId, objectName: refObjectConfig.name, formFactor: ctx.formFactor });
9113
9114
  new_button.align = "right";
9114
9115
  // 保持快速搜索放在最左侧,新建按钮往里插,而不是push到最后
@@ -13777,8 +13778,8 @@ async function getRelatedListSchema(
13777
13778
  /*
13778
13779
  * @Author: baozhoutao@steedos.com
13779
13780
  * @Date: 2022-07-05 15:55:39
13780
- * @LastEditors: liaodaxue
13781
- * @LastEditTime: 2023-08-25 11:55:15
13781
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
13782
+ * @LastEditTime: 2023-09-14 10:19:56
13782
13783
  * @Description:
13783
13784
  */
13784
13785
 
@@ -14137,6 +14138,11 @@ async function convertColumnsToTableFields(columns, uiSchema, ctx = {}) {
14137
14138
  if (uiSchema.fields[column]) {
14138
14139
  fields.push(Object.assign({}, uiSchema.fields[column], ctx));
14139
14140
  }
14141
+ else if(ctx.extra){
14142
+ fields.push({
14143
+ name: column
14144
+ });
14145
+ }
14140
14146
  }
14141
14147
  } else if (isObject$1(column)) {
14142
14148
  if (column.field.indexOf('.') > 0) {
@@ -19716,16 +19722,15 @@ var AmisInstanceDetail = function (props) { return __awaiter(void 0, void 0, voi
19716
19722
  }); };
19717
19723
 
19718
19724
  var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
19719
- var formFactor, appId, objectApiName, display, page, listSchema;
19725
+ var formFactor, appId, objectApiName, display, data, _display, page, listSchema;
19720
19726
  return __generator(this, function (_b) {
19721
19727
  switch (_b.label) {
19722
19728
  case 0:
19723
- // console.time('PageListView')
19724
- console.log("PageListView====>", props);
19725
- formFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.listviewId, display = props.display, props.$schema, props.listName;
19729
+ formFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.listviewId, display = props.display, props.$schema, props.listName, data = props.data;
19730
+ _display = data.display || display;
19726
19731
  //TODO 此代码应该在object page template中处理
19727
- if (display)
19728
- Router$1.setTabDisplayAs(objectApiName, display);
19732
+ if (_display)
19733
+ Router$1.setTabDisplayAs(objectApiName, _display);
19729
19734
  return [4 /*yield*/, getPage({ type: 'list', appId: appId, objectName: objectApiName, formFactor: formFactor })];
19730
19735
  case 1:
19731
19736
  page = _b.sent();
@@ -19774,13 +19779,14 @@ var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, f
19774
19779
  }); };
19775
19780
 
19776
19781
  var PageRecordDetail = function (props) { return __awaiter(void 0, void 0, void 0, function () {
19777
- var defaultFormFactor, appId, objectApiName, display, recordSchema, recordPage;
19782
+ var defaultFormFactor, appId, objectApiName, display, data, _display, recordSchema, recordPage;
19778
19783
  return __generator(this, function (_a) {
19779
19784
  switch (_a.label) {
19780
19785
  case 0:
19781
- defaultFormFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.recordId, display = props.display;
19782
- if (display) {
19783
- Router$1.setTabDisplayAs(objectApiName, display);
19786
+ defaultFormFactor = props.formFactor, appId = props.appId, objectApiName = props.objectApiName, props.recordId, display = props.display, data = props.data;
19787
+ _display = data.display || display;
19788
+ if (_display) {
19789
+ Router$1.setTabDisplayAs(objectApiName, _display);
19784
19790
  }
19785
19791
  recordSchema = {};
19786
19792
  return [4 /*yield*/, getPage({ type: 'record', appId: appId, objectName: objectApiName, formFactor: defaultFormFactor })];