@steedos-widgets/amis-lib 6.10.1-beta.35 → 6.10.1-beta.36

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/index.esm.js CHANGED
@@ -3133,7 +3133,7 @@ async function getTableApi(mainObject, fields, options){
3133
3133
  let valueField = mainObject.key_field || '_id';
3134
3134
  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
3135
 
3136
- api.url;//设计器上对象表格组件需要切换对象重新请求列表数据
3136
+ // api.url;//设计器上对象表格组件需要切换对象重新请求列表数据
3137
3137
  // if(options.isRelated){
3138
3138
  // api.url += "&recordId=${_master.recordId}";
3139
3139
  // }
@@ -4890,7 +4890,7 @@ const parseSingleExpression = function (func, formData, dataPath, global, userSe
4890
4890
  * @Author: baozhoutao@steedos.com
4891
4891
  * @Date: 2022-11-01 15:51:00
4892
4892
  * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
4893
- * @LastEditTime: 2025-07-14 11:56:42
4893
+ * @LastEditTime: 2025-07-22 14:29:15
4894
4894
  * @Description:
4895
4895
  */
4896
4896
 
@@ -4964,7 +4964,8 @@ const getSchema$5 = async (uiSchema, ctx) => {
4964
4964
  }
4965
4965
  const uiSchema = event.data.uiSchema;
4966
4966
  const objectName = event.data.objectName;
4967
- const listViewRef = event.context.scoped.getComponentById("listview_" + objectName);
4967
+ const crudId = event.data.crudId || "listview_" + objectName;
4968
+ const listViewRef = event.context.scoped.getComponentById(crudId);
4968
4969
  const selectedItems = listViewRef && listViewRef.props.store.toJSON().selectedItems || [];
4969
4970
  event.data.selectedIds = _.map(selectedItems, uiSchema.idFieldName || '_id');
4970
4971
  `;
@@ -5509,8 +5510,8 @@ const getSchema = async (uiSchema, ctx) => {
5509
5510
  /*
5510
5511
  * @Author: baozhoutao@steedos.com
5511
5512
  * @Date: 2022-11-01 15:53:07
5512
- * @LastEditors: baozhoutao@steedos.com
5513
- * @LastEditTime: 2023-02-28 17:06:22
5513
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5514
+ * @LastEditTime: 2025-07-22 14:12:01
5514
5515
  * @Description:
5515
5516
  */
5516
5517
 
@@ -5540,10 +5541,12 @@ const StandardButtons = {
5540
5541
  const {
5541
5542
  appId,
5542
5543
  objectName,
5543
- uiSchema
5544
+ uiSchema,
5545
+ record
5544
5546
  } = this;
5547
+ const crudId = record?.crudId || `listview_${uiSchema.name}`;
5545
5548
  const scope = this.scope;
5546
- const listViewRef = scope.parent?.getComponentById(`listview_${uiSchema.name}`);
5549
+ const listViewRef = scope.parent?.getComponentById(crudId);
5547
5550
  if(_.isEmpty(listViewRef.props.store.toJSON().selectedItems)){
5548
5551
  listViewRef.handleAction({}, {
5549
5552
  "actionType": "toast",
@@ -6171,19 +6174,11 @@ async function getObjectFieldsFilterFormSchema(ctx) {
6171
6174
  },
6172
6175
  "schemaApi": {
6173
6176
  method: 'post',
6174
- url: `\${context.rootUrl}/graphql?reload=\${filterFormSearchableFields|join}`,
6175
6177
  data: {
6176
6178
  $self: "$$",
6177
- query: "{\n data: objects(filters: [[\"_id\",\"=\",null]],top: 1, skip: 0){_id}\n }"
6179
+ query: ""
6178
6180
  },
6179
- requestAdaptor: `
6180
- return {
6181
- ...api,
6182
- data: {
6183
- query: api.data.query
6184
- }
6185
- };
6186
- `,
6181
+ url: `/api/amis/health_check?reload=\${filterFormSearchableFields|join}`,
6187
6182
  adaptor: `
6188
6183
  if(payload.errors){
6189
6184
  payload.status = 2;
@@ -12742,11 +12737,8 @@ async function lookupToAmisSelect(field, readonly, ctx){
12742
12737
  }else {
12743
12738
  apiInfo = {
12744
12739
  method: "post",
12745
- url: getApi$2(),
12746
- data: {query: '{objects(filters: ["_id", "=", "-1"]){_id}}', $: "$$"},
12747
- "headers": {
12748
- "Authorization": "Bearer ${context.tenantId},${context.authToken}"
12749
- }
12740
+ data: {$: "$$", query: ""},
12741
+ url: "/api/amis/health_check?reload=\${additionalFilters|join}&listName=\${listName}"
12750
12742
  };
12751
12743
  }
12752
12744
 
@@ -14192,9 +14184,9 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
14192
14184
  // if(ctx.mode === 'edit'){
14193
14185
  let convertDataResult;
14194
14186
  if(convertData.type == "steedos-field"){
14195
- // 如果是steedos-field,不能把amis属性合并到steedos-field根属性中,要合并也是合并到steedos-field的config.amis中
14196
- // 而steedos-field字段的amis属性本身就在config.amis中了,所以这里不需要再合并field.amis
14197
- // 目前测试到受影响的是,把字段的amis属性配置为{"type": "checkboxes"}时,ObjectForm只读模式下,lookup字段返回的是type为steedos-field的组件,此时field.amis中的type不应该合并到steedos-field根属性中
14187
+ // 如果是steedos-field,不能把field.amis属性合并到steedos-field根属性中,要合并也是合并到steedos-field的config.amis中
14188
+ // 而steedos-field字段的config属性中的amis属性已经有了这里的field.amis,所以这里不需要再合并field.amis
14189
+ // 目前测试到受影响的是,把字段的amis属性配置为{"type": "checkboxes"}时,ObjectForm只读模式下,lookup字段返回的是type为steedos-field的组件,此时如果在这里合并field.amis,那么其type就变成了checkboxes,导致lookup字段显示为复选框
14198
14190
  convertDataResult = Object.assign({}, baseData, convertData, { labelClassName: 'text-left', clearValueOnHidden: true, fieldName: field.name}, {name: baseData.name});
14199
14191
  }
14200
14192
  else {
@@ -17029,7 +17021,7 @@ const getNextStepUsersInput = async (instance) => {
17029
17021
  "messages": {
17030
17022
  },
17031
17023
  "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": "debugger;\npayload.data = {value: payload.nextStepUsers.length === 1 ? payload.nextStepUsers[0].id : null, options: payload.nextStepUsers};\nreturn payload;",
17024
+ "adaptor": "\npayload.data = {value: payload.nextStepUsers.length === 1 ? payload.nextStepUsers[0].id : null, options: payload.nextStepUsers};\nreturn payload;",
17033
17025
  "data": {
17034
17026
  "&": "$$",
17035
17027
  "$scopeId": "$scopeId",
@@ -17222,10 +17214,10 @@ const getApprovalDrawerSchema = async (instance) => {
17222
17214
  console.log("=============getApprovalDrawerSchema=============", instance);
17223
17215
  return {
17224
17216
  type: "drawer",
17225
- overlay: true,
17217
+ overlay: false,
17226
17218
  resizable: false,
17227
17219
  closeOnEsc: true,
17228
- closeOnOutside: true,
17220
+ closeOnOutside: false,
17229
17221
  size: "sm",
17230
17222
  title: `${instance.step.name}`,
17231
17223
  className: "approval-drawer absolute",
@@ -18285,7 +18277,7 @@ const getFlowFormSchema = async (instance, box) => {
18285
18277
  type: "page",
18286
18278
  name: "instancePage",
18287
18279
  className: "steedos-amis-instance-view",
18288
- bodyClassName: "overflow-y-auto h-full",
18280
+ bodyClassName: "overflow-y-auto h-full steedos-amis-instance-view-body",
18289
18281
  headerClassName: "p-0",
18290
18282
  "title": {
18291
18283
  "type": "steedos-record-detail-header",
@@ -18297,6 +18289,9 @@ const getFlowFormSchema = async (instance, box) => {
18297
18289
  "className": "p-0 m-0 p0 m0 bg-gray-50"
18298
18290
  },
18299
18291
  "css": {
18292
+ ".steedos-amis-instance-view-body": {
18293
+ "height": "calc(100% - 65px)"
18294
+ },
18300
18295
  ".instance-approve-history .antd-Table-table thead": {
18301
18296
  "display": "none"
18302
18297
  },
@@ -18318,6 +18313,9 @@ const getFlowFormSchema = async (instance, box) => {
18318
18313
  ".antd-List-placeholder": {
18319
18314
  "display": "none"
18320
18315
  },
18316
+ ".steedos-amis-instance-view .antd-Table-fixedTop":{
18317
+ "top": "-13px"
18318
+ },
18321
18319
  ".steedos-amis-instance-view .antd-Table-fixedTop:after":{
18322
18320
  "box-shadow": "none"
18323
18321
  },