@steedos-widgets/amis-lib 6.10.1-beta.35 → 6.10.1-beta.37
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 +57 -36
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +57 -36
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +20 -20
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/fields/lookup.d.ts +2 -5
- package/dist/types/lib/converter/amis/fields_filter.d.ts +2 -4
- package/dist/types/lib/converter/amis/header.d.ts +1 -2
- package/dist/types/lib/converter/amis/toolbar.d.ts +1 -2
- package/dist/types/workflow/flow.d.ts +6 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1546,6 +1546,7 @@ var frontend_objects_related_alert_start$1 = "No related table fields associated
|
|
|
1546
1546
|
var frontend_objects_related_alert_end$1 = "were found.";
|
|
1547
1547
|
var frontend_no_records_found$1 = "No records found.";
|
|
1548
1548
|
var frontend_records_no_allowedit$1 = "You do not have edit permission for this record";
|
|
1549
|
+
var frontend_app_menu_save_order_group_nesting_error$1 = "Group nesting is not supported";
|
|
1549
1550
|
var en_us = {
|
|
1550
1551
|
frontend_field_group_generalization: frontend_field_group_generalization$1,
|
|
1551
1552
|
frontend_download: frontend_download$1,
|
|
@@ -1636,7 +1637,8 @@ var en_us = {
|
|
|
1636
1637
|
frontend_objects_related_alert_start: frontend_objects_related_alert_start$1,
|
|
1637
1638
|
frontend_objects_related_alert_end: frontend_objects_related_alert_end$1,
|
|
1638
1639
|
frontend_no_records_found: frontend_no_records_found$1,
|
|
1639
|
-
frontend_records_no_allowedit: frontend_records_no_allowedit$1
|
|
1640
|
+
frontend_records_no_allowedit: frontend_records_no_allowedit$1,
|
|
1641
|
+
frontend_app_menu_save_order_group_nesting_error: frontend_app_menu_save_order_group_nesting_error$1
|
|
1640
1642
|
};
|
|
1641
1643
|
|
|
1642
1644
|
var frontend_field_group_generalization = "通用";
|
|
@@ -1730,6 +1732,7 @@ var frontend_objects_related_alert_start = "未找到与相关列表对象";
|
|
|
1730
1732
|
var frontend_objects_related_alert_end = "关联的相关表字段";
|
|
1731
1733
|
var frontend_no_records_found = "无法找到记录";
|
|
1732
1734
|
var frontend_records_no_allowedit = "您对这条记录没有编辑权限";
|
|
1735
|
+
var frontend_app_menu_save_order_group_nesting_error = "不支持分组嵌套";
|
|
1733
1736
|
var zh_cn = {
|
|
1734
1737
|
frontend_field_group_generalization: frontend_field_group_generalization,
|
|
1735
1738
|
frontend_download: frontend_download,
|
|
@@ -1821,7 +1824,8 @@ var zh_cn = {
|
|
|
1821
1824
|
frontend_objects_related_alert_start: frontend_objects_related_alert_start,
|
|
1822
1825
|
frontend_objects_related_alert_end: frontend_objects_related_alert_end,
|
|
1823
1826
|
frontend_no_records_found: frontend_no_records_found,
|
|
1824
|
-
frontend_records_no_allowedit: frontend_records_no_allowedit
|
|
1827
|
+
frontend_records_no_allowedit: frontend_records_no_allowedit,
|
|
1828
|
+
frontend_app_menu_save_order_group_nesting_error: frontend_app_menu_save_order_group_nesting_error
|
|
1825
1829
|
};
|
|
1826
1830
|
|
|
1827
1831
|
const resources = {
|
|
@@ -3133,7 +3137,7 @@ async function getTableApi(mainObject, fields, options){
|
|
|
3133
3137
|
let valueField = mainObject.key_field || '_id';
|
|
3134
3138
|
const api = await getApi$1(mainObject, null, fields, {count: options.queryCount, alias: 'rows', limit: top, queryOptions: `filters: {__filters}, top: {__top}, skip: {__skip}, sort: "{__sort}"`});
|
|
3135
3139
|
|
|
3136
|
-
api.url;//设计器上对象表格组件需要切换对象重新请求列表数据
|
|
3140
|
+
// api.url;//设计器上对象表格组件需要切换对象重新请求列表数据
|
|
3137
3141
|
// if(options.isRelated){
|
|
3138
3142
|
// api.url += "&recordId=${_master.recordId}";
|
|
3139
3143
|
// }
|
|
@@ -4890,7 +4894,7 @@ const parseSingleExpression = function (func, formData, dataPath, global, userSe
|
|
|
4890
4894
|
* @Author: baozhoutao@steedos.com
|
|
4891
4895
|
* @Date: 2022-11-01 15:51:00
|
|
4892
4896
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
4893
|
-
* @LastEditTime: 2025-07-14
|
|
4897
|
+
* @LastEditTime: 2025-07-22 14:29:15
|
|
4894
4898
|
* @Description:
|
|
4895
4899
|
*/
|
|
4896
4900
|
|
|
@@ -4964,7 +4968,8 @@ const getSchema$5 = async (uiSchema, ctx) => {
|
|
|
4964
4968
|
}
|
|
4965
4969
|
const uiSchema = event.data.uiSchema;
|
|
4966
4970
|
const objectName = event.data.objectName;
|
|
4967
|
-
const
|
|
4971
|
+
const crudId = event.data.crudId || "listview_" + objectName;
|
|
4972
|
+
const listViewRef = event.context.scoped.getComponentById(crudId);
|
|
4968
4973
|
const selectedItems = listViewRef && listViewRef.props.store.toJSON().selectedItems || [];
|
|
4969
4974
|
event.data.selectedIds = _.map(selectedItems, uiSchema.idFieldName || '_id');
|
|
4970
4975
|
`;
|
|
@@ -5509,8 +5514,8 @@ const getSchema = async (uiSchema, ctx) => {
|
|
|
5509
5514
|
/*
|
|
5510
5515
|
* @Author: baozhoutao@steedos.com
|
|
5511
5516
|
* @Date: 2022-11-01 15:53:07
|
|
5512
|
-
* @LastEditors:
|
|
5513
|
-
* @LastEditTime:
|
|
5517
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
5518
|
+
* @LastEditTime: 2025-07-22 14:12:01
|
|
5514
5519
|
* @Description:
|
|
5515
5520
|
*/
|
|
5516
5521
|
|
|
@@ -5540,10 +5545,12 @@ const StandardButtons = {
|
|
|
5540
5545
|
const {
|
|
5541
5546
|
appId,
|
|
5542
5547
|
objectName,
|
|
5543
|
-
uiSchema
|
|
5548
|
+
uiSchema,
|
|
5549
|
+
record
|
|
5544
5550
|
} = this;
|
|
5551
|
+
const crudId = record?.crudId || `listview_${uiSchema.name}`;
|
|
5545
5552
|
const scope = this.scope;
|
|
5546
|
-
const listViewRef = scope.parent?.getComponentById(
|
|
5553
|
+
const listViewRef = scope.parent?.getComponentById(crudId);
|
|
5547
5554
|
if(_.isEmpty(listViewRef.props.store.toJSON().selectedItems)){
|
|
5548
5555
|
listViewRef.handleAction({}, {
|
|
5549
5556
|
"actionType": "toast",
|
|
@@ -6171,19 +6178,11 @@ async function getObjectFieldsFilterFormSchema(ctx) {
|
|
|
6171
6178
|
},
|
|
6172
6179
|
"schemaApi": {
|
|
6173
6180
|
method: 'post',
|
|
6174
|
-
url: `\${context.rootUrl}/graphql?reload=\${filterFormSearchableFields|join}`,
|
|
6175
6181
|
data: {
|
|
6176
6182
|
$self: "$$",
|
|
6177
|
-
query: "
|
|
6183
|
+
query: ""
|
|
6178
6184
|
},
|
|
6179
|
-
|
|
6180
|
-
return {
|
|
6181
|
-
...api,
|
|
6182
|
-
data: {
|
|
6183
|
-
query: api.data.query
|
|
6184
|
-
}
|
|
6185
|
-
};
|
|
6186
|
-
`,
|
|
6185
|
+
url: `/api/amis/health_check?reload=\${filterFormSearchableFields|join}`,
|
|
6187
6186
|
adaptor: `
|
|
6188
6187
|
if(payload.errors){
|
|
6189
6188
|
payload.status = 2;
|
|
@@ -9221,7 +9220,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
9221
9220
|
//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
9222
9221
|
// "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
9223
9222
|
"tooltipPlacement": "top",
|
|
9224
|
-
"className": "bg-white p-2 rounded text-gray-500",
|
|
9223
|
+
"className": "bg-white p-2 rounded text-gray-500 list-view-btn-reload",
|
|
9225
9224
|
"label": "",
|
|
9226
9225
|
"icon": "fa fa-sync",
|
|
9227
9226
|
// "visibleOn": "${!showFieldsFilter}",
|
|
@@ -12742,11 +12741,8 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
12742
12741
|
}else {
|
|
12743
12742
|
apiInfo = {
|
|
12744
12743
|
method: "post",
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
"headers": {
|
|
12748
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
12749
|
-
}
|
|
12744
|
+
data: {$: "$$", query: ""},
|
|
12745
|
+
url: "/api/amis/health_check?reload=\${additionalFilters|join}&listName=\${listName}"
|
|
12750
12746
|
};
|
|
12751
12747
|
}
|
|
12752
12748
|
|
|
@@ -14192,9 +14188,9 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
14192
14188
|
// if(ctx.mode === 'edit'){
|
|
14193
14189
|
let convertDataResult;
|
|
14194
14190
|
if(convertData.type == "steedos-field"){
|
|
14195
|
-
// 如果是steedos-field,不能把amis属性合并到steedos-field根属性中,要合并也是合并到steedos-field的config.amis中
|
|
14196
|
-
// 而steedos-field字段的amis
|
|
14197
|
-
// 目前测试到受影响的是,把字段的amis属性配置为{"type": "checkboxes"}时,ObjectForm只读模式下,lookup字段返回的是type为steedos-field
|
|
14191
|
+
// 如果是steedos-field,不能把field.amis属性合并到steedos-field根属性中,要合并也是合并到steedos-field的config.amis中
|
|
14192
|
+
// 而steedos-field字段的config属性中的amis属性已经有了这里的field.amis,所以这里不需要再合并field.amis
|
|
14193
|
+
// 目前测试到受影响的是,把字段的amis属性配置为{"type": "checkboxes"}时,ObjectForm只读模式下,lookup字段返回的是type为steedos-field的组件,此时如果在这里合并field.amis,那么其type就变成了checkboxes,导致lookup字段显示为复选框
|
|
14198
14194
|
convertDataResult = Object.assign({}, baseData, convertData, { labelClassName: 'text-left', clearValueOnHidden: true, fieldName: field.name}, {name: baseData.name});
|
|
14199
14195
|
}
|
|
14200
14196
|
else {
|
|
@@ -17029,7 +17025,7 @@ const getNextStepUsersInput = async (instance) => {
|
|
|
17029
17025
|
"messages": {
|
|
17030
17026
|
},
|
|
17031
17027
|
"requestAdaptor": "\nconst { context, next_step, $scopeId } = api.data;\nconst formValues = SteedosUI.getRef($scopeId).getComponentById(\"instance_form\").getValues();\n\napi.data = {\n instanceId: context._id,\n nextStepId: next_step._id,\n values: formValues\n}\n\n\n return api;",
|
|
17032
|
-
"adaptor": "
|
|
17028
|
+
"adaptor": "\npayload.data = {value: payload.nextStepUsers.length === 1 ? payload.nextStepUsers[0].id : null, options: payload.nextStepUsers};\nreturn payload;",
|
|
17033
17029
|
"data": {
|
|
17034
17030
|
"&": "$$",
|
|
17035
17031
|
"$scopeId": "$scopeId",
|
|
@@ -17222,10 +17218,10 @@ const getApprovalDrawerSchema = async (instance) => {
|
|
|
17222
17218
|
console.log("=============getApprovalDrawerSchema=============", instance);
|
|
17223
17219
|
return {
|
|
17224
17220
|
type: "drawer",
|
|
17225
|
-
overlay:
|
|
17221
|
+
overlay: false,
|
|
17226
17222
|
resizable: false,
|
|
17227
17223
|
closeOnEsc: true,
|
|
17228
|
-
closeOnOutside:
|
|
17224
|
+
closeOnOutside: false,
|
|
17229
17225
|
size: "sm",
|
|
17230
17226
|
title: `${instance.step.name}`,
|
|
17231
17227
|
className: "approval-drawer absolute",
|
|
@@ -17921,18 +17917,37 @@ const getFieldEditTpl = async (field, label)=>{
|
|
|
17921
17917
|
tpl.type = "input-rich-text";
|
|
17922
17918
|
}
|
|
17923
17919
|
break;
|
|
17920
|
+
// case "table":
|
|
17921
|
+
// tpl.type = "input-table"; //TODO
|
|
17922
|
+
// tpl.addable = field.permission === "editable";
|
|
17923
|
+
// tpl.editable = tpl.addable;
|
|
17924
|
+
// tpl.copyable = tpl.addable;
|
|
17925
|
+
// tpl.removable = tpl.addable;
|
|
17926
|
+
// tpl.columns = [];
|
|
17927
|
+
// for (const sField of field.fields) {
|
|
17928
|
+
// if (sField.type != "hidden") {
|
|
17929
|
+
// sField.permission = field.permission
|
|
17930
|
+
// const column = await getTdInputTpl(sField, true);
|
|
17931
|
+
// tpl.columns.push(column);
|
|
17932
|
+
// }
|
|
17933
|
+
// }
|
|
17934
|
+
// break;
|
|
17924
17935
|
case "table":
|
|
17925
|
-
tpl.type = "input-table"; //TODO
|
|
17936
|
+
tpl.type = "steedos-input-table"; //TODO
|
|
17926
17937
|
tpl.addable = field.permission === "editable";
|
|
17927
17938
|
tpl.editable = tpl.addable;
|
|
17928
17939
|
tpl.copyable = tpl.addable;
|
|
17929
17940
|
tpl.removable = tpl.addable;
|
|
17930
|
-
tpl.
|
|
17941
|
+
tpl.fields = [];
|
|
17931
17942
|
for (const sField of field.fields) {
|
|
17932
17943
|
if (sField.type != "hidden") {
|
|
17933
17944
|
sField.permission = field.permission;
|
|
17934
17945
|
const column = await getTdInputTpl(sField, true);
|
|
17935
|
-
|
|
17946
|
+
if(column.type === 'steedos-field'){
|
|
17947
|
+
tpl.fields.push(column.config);
|
|
17948
|
+
}else {
|
|
17949
|
+
tpl.fields.push(column);
|
|
17950
|
+
}
|
|
17936
17951
|
}
|
|
17937
17952
|
}
|
|
17938
17953
|
break;
|
|
@@ -17941,7 +17956,7 @@ const getFieldEditTpl = async (field, label)=>{
|
|
|
17941
17956
|
break;
|
|
17942
17957
|
default:
|
|
17943
17958
|
tpl.type = 'steedos-field';
|
|
17944
|
-
tpl.config = field.steedos_field;
|
|
17959
|
+
tpl.config = field.steedos_field || field.config;
|
|
17945
17960
|
break;
|
|
17946
17961
|
}
|
|
17947
17962
|
}
|
|
@@ -18285,7 +18300,7 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18285
18300
|
type: "page",
|
|
18286
18301
|
name: "instancePage",
|
|
18287
18302
|
className: "steedos-amis-instance-view",
|
|
18288
|
-
bodyClassName: "overflow-y-auto h-full",
|
|
18303
|
+
bodyClassName: "overflow-y-auto h-full steedos-amis-instance-view-body",
|
|
18289
18304
|
headerClassName: "p-0",
|
|
18290
18305
|
"title": {
|
|
18291
18306
|
"type": "steedos-record-detail-header",
|
|
@@ -18297,6 +18312,9 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18297
18312
|
"className": "p-0 m-0 p0 m0 bg-gray-50"
|
|
18298
18313
|
},
|
|
18299
18314
|
"css": {
|
|
18315
|
+
".steedos-amis-instance-view-body": {
|
|
18316
|
+
"height": "calc(100% - 65px)"
|
|
18317
|
+
},
|
|
18300
18318
|
".instance-approve-history .antd-Table-table thead": {
|
|
18301
18319
|
"display": "none"
|
|
18302
18320
|
},
|
|
@@ -18318,6 +18336,9 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18318
18336
|
".antd-List-placeholder": {
|
|
18319
18337
|
"display": "none"
|
|
18320
18338
|
},
|
|
18339
|
+
".steedos-amis-instance-view .antd-Table-fixedTop":{
|
|
18340
|
+
"top": "-13px"
|
|
18341
|
+
},
|
|
18321
18342
|
".steedos-amis-instance-view .antd-Table-fixedTop:after":{
|
|
18322
18343
|
"box-shadow": "none"
|
|
18323
18344
|
},
|