@steedos-widgets/amis-lib 1.3.0-beta.13 → 1.3.0-beta.14
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.
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +19 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +19 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +13 -12
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -968,7 +968,7 @@ function getApi$2 (isMobile){
|
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
|
|
971
|
-
var frontend_field_group_generalization$1 = "
|
|
971
|
+
var frontend_field_group_generalization$1 = "General";
|
|
972
972
|
var frontend_download$1 = "Download";
|
|
973
973
|
var frontend_form_save$1 = "Save";
|
|
974
974
|
var frontend_form_save_and_new$1 = "Save and New";
|
|
@@ -6038,8 +6038,8 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
6038
6038
|
modalTitle: i18next.t('frontend_form_please_select') + " " + refObjectConfig.label,
|
|
6039
6039
|
labelField: referenceTo.labelField.name,
|
|
6040
6040
|
valueField: referenceTo.valueField.name,
|
|
6041
|
-
// disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey
|
|
6042
|
-
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
|
|
6041
|
+
// disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段,多选字段可以编辑。
|
|
6042
|
+
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
6043
6043
|
modalMode: 'dialog', //TODO 设置 dialog 或者 drawer,用来配置弹出方式
|
|
6044
6044
|
source: source,
|
|
6045
6045
|
size: "lg",
|
|
@@ -6219,8 +6219,8 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
6219
6219
|
joinValues: false,
|
|
6220
6220
|
extractValue: true,
|
|
6221
6221
|
clearable: true,
|
|
6222
|
-
// disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey
|
|
6223
|
-
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
|
|
6222
|
+
// disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段,多选字段可以编辑。
|
|
6223
|
+
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
6224
6224
|
// labelField: labelField,
|
|
6225
6225
|
// valueField: valueField,
|
|
6226
6226
|
source: apiInfo,
|
|
@@ -6407,8 +6407,8 @@ async function getIdsPickerSchema(field, readonly, ctx){
|
|
|
6407
6407
|
valueField: referenceTo.valueField.name,
|
|
6408
6408
|
modalMode: 'dialog',
|
|
6409
6409
|
source: source,
|
|
6410
|
-
// disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey
|
|
6411
|
-
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || (this.relatedKey ==='${field.name}') )`,
|
|
6410
|
+
// disabledOn: this._master目的是相关表新建时禁止编辑关联字段; this.relatedKey目的是相关表编辑时禁止编辑关联字段,多选字段可以编辑。
|
|
6411
|
+
disabledOn: `${readonly} || ( (this._master && (this._master.relatedKey ==='${field.name}')) || ((this.relatedKey ==='${field.name}') && (${field.multiple} != true)) )`,
|
|
6412
6412
|
size: "lg",
|
|
6413
6413
|
pickerSchema: pickerSchema,
|
|
6414
6414
|
joinValues: false,
|
|
@@ -9539,14 +9539,15 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
9539
9539
|
/*
|
|
9540
9540
|
* @Author: baozhoutao@steedos.com
|
|
9541
9541
|
* @Date: 2022-05-26 16:02:08
|
|
9542
|
-
* @LastEditors:
|
|
9543
|
-
* @LastEditTime: 2023-
|
|
9542
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
9543
|
+
* @LastEditTime: 2023-09-05 15:42:26
|
|
9544
9544
|
* @Description:
|
|
9545
9545
|
*/
|
|
9546
9546
|
|
|
9547
|
-
const getFieldSchemaArray = (formFields) => {
|
|
9547
|
+
const getFieldSchemaArray = (formFields, ctx) => {
|
|
9548
9548
|
let fieldSchemaArray = [];
|
|
9549
9549
|
fieldSchemaArray.length = 0;
|
|
9550
|
+
const recordId = ctx && ctx.recordId;
|
|
9550
9551
|
|
|
9551
9552
|
_$1.forEach(formFields, (field) => {
|
|
9552
9553
|
if (!field.group || field.group == 'null' || field.group == '-')
|
|
@@ -9558,8 +9559,14 @@ const getFieldSchemaArray = (formFields) => {
|
|
|
9558
9559
|
field.is_wide = true;
|
|
9559
9560
|
}
|
|
9560
9561
|
|
|
9562
|
+
let forceHidden = false;
|
|
9563
|
+
if(!recordId && field.readonly){
|
|
9564
|
+
// 新建记录时,只读字段先隐藏,后续支持显示后,即任务:https://github.com/steedos/steedos-platform/issues/3164 完成后再放开
|
|
9565
|
+
forceHidden = true;
|
|
9566
|
+
}
|
|
9567
|
+
|
|
9561
9568
|
if (!isObjectField) {
|
|
9562
|
-
if (!field.hidden) {
|
|
9569
|
+
if (!field.hidden && !forceHidden) {
|
|
9563
9570
|
fieldSchemaArray.push(Object.assign({ name: fieldName }, field, { permission: { allowEdit: true } }));
|
|
9564
9571
|
}
|
|
9565
9572
|
}
|
|
@@ -9630,7 +9637,7 @@ const getSections = async (permissionFields, formFields, ctx) => {
|
|
|
9630
9637
|
if (!ctx) {
|
|
9631
9638
|
ctx = {};
|
|
9632
9639
|
}
|
|
9633
|
-
const fieldSchemaArray = getFieldSchemaArray(formFields);
|
|
9640
|
+
const fieldSchemaArray = getFieldSchemaArray(formFields, ctx);
|
|
9634
9641
|
const _sections = _$1.groupBy(fieldSchemaArray, 'group');
|
|
9635
9642
|
const sections = [];
|
|
9636
9643
|
var sectionVisibleOns = [];
|