@steedos-widgets/sortable 6.3.5 → 6.3.7

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.
@@ -54529,8 +54529,8 @@ async function getPage({type, pageId = '', appId, objectName = '', recordId = ''
54529
54529
  /*
54530
54530
  * @Author: baozhoutao@steedos.com
54531
54531
  * @Date: 2022-10-28 14:15:09
54532
- * @LastEditors: liaodaxue
54533
- * @LastEditTime: 2023-12-29 10:46:50
54532
+ * @LastEditors: baozhoutao@steedos.com
54533
+ * @LastEditTime: 2024-08-19 16:26:58
54534
54534
  * @Description:
54535
54535
  */
54536
54536
 
@@ -54553,7 +54553,7 @@ async function getLookupLinkOnClick(field, options) {
54553
54553
  const recordPage = await getPage({ type: 'record', appId: options.appId, objectName: options.objectName, formFactor: options.formFactor });
54554
54554
 
54555
54555
  const drawerRecordDetailSchema = recordPage ? Object.assign({}, recordPage.schema, {
54556
- "recordId": `\${${field.name}}`,
54556
+ "recordId": field.type == "file" ? "${value}":`\${${field.name}}`,
54557
54557
  "data": {
54558
54558
  ...recordPage.schema.data,
54559
54559
  "_inDrawer": true, // 用于判断是否在抽屉中
@@ -54563,7 +54563,7 @@ async function getLookupLinkOnClick(field, options) {
54563
54563
  }) : {
54564
54564
  "type": "steedos-record-detail",
54565
54565
  "objectApiName": options.objectName,
54566
- "recordId": `\${${field.name}}`,
54566
+ "recordId": field.type == "file" ? "${value}":`\${${field.name}}`,
54567
54567
  "showBackButton": false,
54568
54568
  "showButtons": true,
54569
54569
  "data": {
@@ -54659,17 +54659,18 @@ const getAmisFileReadonlySchema = async (steedosField,ctx = {})=>{
54659
54659
  // <a href='<%= item.url %>' target='_self' class='block'><%= item.name %></a>
54660
54660
  // <% });} %>`
54661
54661
  "type": "control",
54662
+ "name": "",//control若存在name,内部each组件的source则会获取不到内容
54662
54663
  "body": {
54663
54664
  type: 'each',
54664
54665
  placeholder: "",
54665
- // className: `steedos-field-lookup-each flex flex-wrap gap-2`,
54666
+ className: steedosField.multiple ? `flex flex-col` : '',
54666
54667
  source: `\${_display.${steedosField.name}|asArray}`,
54667
54668
  items: {
54668
54669
  type: 'static',
54669
54670
  labelClassName: "hidden",
54670
54671
  label: false,
54671
54672
  className: 'm-0',
54672
- tpl: `<a href="/app/-/cfs_files_filerecord/view/\${${steedosField.name}}" ${lookupATagClick}>\${name}</a>`,
54673
+ tpl: `<a href="/app/-/cfs_files_filerecord/view/\${value}" ${lookupATagClick}>\${name}</a>`,
54673
54674
  // tpl: "<%= item.name >",
54674
54675
  // onEvent: window.innerWidth < 768 ? null : REFERENCE_VALUE_ITEM_ONCLICK
54675
54676
  onEvent: window.innerWidth < 768 ? null : await getLookupLinkOnClick(steedosField, {
@@ -54736,6 +54737,11 @@ const getAmisFileEditSchema = (steedosField)=>{
54736
54737
  convertData.multiple = true;
54737
54738
  convertData.joinValues = false;
54738
54739
  convertData.extractValue = true;
54740
+ if(steedosField.type === 'image'){
54741
+ if(Steedos.isCordova() && Steedos.isCordova()){
54742
+ convertData.accept = "";
54743
+ }
54744
+ }
54739
54745
  }
54740
54746
  return convertData;
54741
54747
  };
@@ -55316,6 +55322,8 @@ async function getQuickEditSchema(object, columnField, options){
55316
55322
  _display["${field.name}"].push({
55317
55323
  "name": event.data.result.name,
55318
55324
  "url": event.data.result.url,
55325
+ "value": event.data.result.value,
55326
+ "_id": event.data.result.value,
55319
55327
  "type": event.data.item.type,
55320
55328
  "size": event.data.item.size
55321
55329
  });
@@ -55328,6 +55336,8 @@ async function getQuickEditSchema(object, columnField, options){
55328
55336
  _display["${field.name}"] = {
55329
55337
  "name": event.data.result.name,
55330
55338
  "url": event.data.result.url,
55339
+ "value": event.data.result.value,
55340
+ "_id": event.data.result.value,
55331
55341
  "type": event.data.item.type,
55332
55342
  "size": event.data.item.size
55333
55343
  };
@@ -55773,7 +55783,7 @@ async function getTableColumns(object, fields, options){
55773
55783
  static: true,
55774
55784
  className,
55775
55785
  ...await getAmisFileReadonlySchema(field)
55776
- }, fieldAmis, {name: field.name});
55786
+ }, fieldAmis);
55777
55787
  }
55778
55788
  else if(field.type === 'select'){
55779
55789
  const map = getSelectMap(field.options);