@steedos-widgets/amis-lib 6.3.3 → 6.3.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.
package/dist/index.umd.js CHANGED
@@ -465,7 +465,7 @@ reg=new RegExp('_','g');standardIcon=icon&&icon.replace(reg,'-');gridBody=[];if(
465
465
  "tpl":"<svg class=\"slds-icon slds-icon_container slds-icon-standard-".concat(standardIcon," slds-page-header__icon\" aria-hidden=\"true\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#").concat(icon,"\"></use></svg>")}],"md":"auto","className":"","columnClassName":"flex justify-center items-center"},{"body":[{"type":"tpl","tpl":"".concat(label),"inline":false,"wrapperComponent":"","className":"leading-4 text-md"},{"type":"tpl","tpl":"${NAME_FIELD_VALUE}","inline":false,"wrapperComponent":"","className":"record-detail-header-name leading-5 text-xl font-bold"}],"columnClassName":"p-l-xs"}],"className":"flex justify-between"}],"columnClassName":"flex-initial","md":"auto"});}gridBody.push({"body":{"type":"flex","items":amisButtonsSchema},"md":"auto"// "hiddenOn": "${recordLoaded != true}"
466
466
  });body=[{"type":"wrapper","className":"p-4 border-b","body":[{"type":"grid","columns":gridBody,"className":"flex justify-between flex-nowrap"}],"hiddenOn":"${recordLoaded != true}"}];if(showRecordTitle){body.push({"type":"wrapper","className":"p-4","body":[{"type":"grid","columns":[gridBody[0]],"className":"flex justify-between"}],"hiddenOn":"${recordLoaded == true}"});}max=10;if(options.formFactor==='SMALL'){max=4;}else{divWidth=window.innerWidth;if(options.display==='split'){divWidth=divWidth-388;}if(document.body.classList.contains('sidebar')){divWidth=divWidth-210;}if(options._inDrawer){try{divWidth=new Number($("html").css("font-size").replace('px',''))*60;}catch(error){console.error(error);divWidth=16*60;}}// 根据屏幕宽度计算显示数量, 使高亮字段只占1行
467
467
  max=Math.trunc(divWidth/200);if(max>10){max=10;}}// console.log('=======================max=========================', max)
468
- if(objectSchema.compactLayouts){details=[];_.each(_.slice(_.difference(objectSchema.compactLayouts,[objectSchema.NAME_FIELD_KEY]),0,max),function(fieldName){var field=objectSchema.fields[fieldName];if(field){details.push({type:'steedos-field',"static":true,config:field});}});// 注意: 以下注释不能删除. tailwind css 动态编译时会识别以下注释, 生成对应的样式
468
+ if(objectSchema.compactLayouts&&objectSchema.compactLayouts.length>0){details=[];_.each(_.slice(_.difference(objectSchema.compactLayouts,[objectSchema.NAME_FIELD_KEY]),0,max),function(fieldName){var field=objectSchema.fields[fieldName];if(field){details.push({type:'steedos-field',"static":true,config:field});}});// 注意: 以下注释不能删除. tailwind css 动态编译时会识别以下注释, 生成对应的样式
469
469
  // lg:grid-cols-1
470
470
  // lg:grid-cols-2
471
471
  // lg:grid-cols-3
@@ -531,7 +531,7 @@ return{"type":"tooltip-wrapper","id":"steedos_crud_toolbar_quick_search","align"
531
531
  // }
532
532
  }}]};}function getObjectHeaderToolbar(mainObject,fields,formFactor){var _ref15=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{},_ref15$showDisplayAs=_ref15.showDisplayAs,showDisplayAs=_ref15$showDisplayAs===void 0?false:_ref15$showDisplayAs,_ref15$hiddenCount=_ref15.hiddenCount,hiddenCount=_ref15$hiddenCount===void 0?false:_ref15$hiddenCount,headerToolbarItems=_ref15.headerToolbarItems,_ref15$filterVisible=_ref15.filterVisible,filterVisible=_ref15$filterVisible===void 0?true:_ref15$filterVisible,_ref15$isLookup=_ref15.isLookup,isLookup=_ref15$isLookup===void 0?false:_ref15$isLookup,keywordsSearchBoxName=_ref15.keywordsSearchBoxName;// console.log(`getObjectHeaderToolbar====>`, filterVisible)
533
533
  // console.log(`getObjectHeaderToolbar`, mainObject)
534
- var isMobile=window.innerWidth<768;if(isMobile){showDisplayAs=false;}var toolbarCount;if(!hiddenCount){toolbarCount={"type":"tpl","tpl":"${count} "+i18next__default["default"].t('frontend_record_sum')};}var toolbarReloadButton;var onReloadScript="\n // const scope = event.context.scoped;\n // var listView = scope.parent.getComponents().find(function(n){\n // return n.props.type === \"crud\";\n // });\n // listView.handleChangePage(1);\n\n\n // \u89E6\u53D1\u641C\u7D22\uFF0C\u800C\u4E0D\u662Freload\uFF0C\u56E0\u4E3A\u4F7F\u7528search-box\u53EF\u4EE5\u5728amissdk\u662F3.6.3-patch.8+\u5B9E\u73B0\u5728\u975E\u7B2C\u4E00\u9875\u7684\u60C5\u51B5\u4E0B\uFF0C\u5FEB\u901F\u641C\u7D22\u8F93\u5165\u6846\u4E2D\u8FC7\u6EE4\u6761\u4EF6\u53D8\u66F4\u65F6\u518D\u70B9\u5237\u65B0\u53EF\u4EE5\u81EA\u52A8\u8DF3\u8F6C\u7FFB\u9875\u5230\u7B2C\u4E00\u9875\n const scope = event.context.scoped;\n const sb = SteedosUI.getClosestAmisComponentByType(scope, \"search-box\");\n const sbValue = sb.state.value;\n sb.handleSearch(sbValue);\n ";toolbarReloadButton={// "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页,这在加载更多按钮的翻页模式下会有问题
534
+ var isMobile=window.innerWidth<768;if(isMobile){showDisplayAs=false;}var toolbarCount;if(!hiddenCount){toolbarCount={"type":"tpl","tpl":"${count} "+i18next__default["default"].t('frontend_record_sum')};}var toolbarReloadButton;var onReloadScript="\n // \u89E6\u53D1\u641C\u7D22\uFF0C\u800C\u4E0D\u662Freload\uFF0C\u56E0\u4E3A\u4F7F\u7528search-box\u53EF\u4EE5\u5728amissdk\u662F3.6.3-patch.8+\u5B9E\u73B0\u5728\u975E\u7B2C\u4E00\u9875\u7684\u60C5\u51B5\u4E0B\uFF0C\u5FEB\u901F\u641C\u7D22\u8F93\u5165\u6846\u4E2D\u8FC7\u6EE4\u6761\u4EF6\u53D8\u66F4\u65F6\u518D\u70B9\u5237\u65B0\u53EF\u4EE5\u81EA\u52A8\u8DF3\u8F6C\u7FFB\u9875\u5230\u7B2C\u4E00\u9875\n const scope = event.context.scoped;\n const sb = SteedosUI.getClosestAmisComponentByType(scope, \"search-box\");\n if (sb) {\n const sbValue = sb.state.value;\n sb.handleSearch(sbValue);\n }else{\n var listView = scope.parent.getComponents().find(function(n){\n return n.props.type === \"crud\";\n });\n listView.handleChangePage(1);\n }\n \n ";toolbarReloadButton={// "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页,这在加载更多按钮的翻页模式下会有问题
535
535
  "type":"button","align":"right",//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
536
536
  // "tooltip": i18next.t('frontend_button_reload_tooltip'),
537
537
  "tooltipPlacement":"top","className":"bg-white p-2 rounded text-gray-500","label":"","icon":"fa fa-sync",// "visibleOn": "${!showFieldsFilter}",