@steedos-widgets/amis-lib 1.3.4-beta.10 → 1.3.4-beta.11

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
@@ -297,7 +297,7 @@ toolbarReloadButton={"type":"reload","align":"right",//TODO: dropdown-button只
297
297
  var toolbars=[];if(formFactor==='SMALL'){if(toolbarCount){toolbars.push(toolbarCount);}if(toolbarFilter){toolbars.push(toolbarFilter);}toolbars.push(toolbarReloadButton);toolbars.push(toolbarDisplayAsButton);toolbars.push(toolbarDQuickSearchBox);return[].concat(_toConsumableArray(headerToolbarItems||[]),toolbars);}else{var _mainObject$permissio;if(toolbarCount){toolbars.push(toolbarCount);}if(toolbarFilter){toolbars.push(toolbarFilter);}toolbars.push(toolbarReloadButton);toolbars.push(toolbarDisplayAsButton);if(mainObject!==null&&mainObject!==void 0&&(_mainObject$permissio=mainObject.permissions)!==null&&_mainObject$permissio!==void 0&&_mainObject$permissio.allowCreateListViews){toolbars.push(getSettingListviewToolbarButtonSchema());}toolbars.push(toolbarDQuickSearchBox);return[].concat(_toConsumableArray(headerToolbarItems||[]),["bulkActions"],toolbars);}}function getObjectFooterToolbar(mainObject,formFactor,options){if(formFactor==='SMALL'){// return [
298
298
  // "load-more",
299
299
  // ]
300
- if(options.displayAs==='split'){return["switch-per-page",{"type":"pagination","maxButtons":5}];}else{return[{"type":"pagination","maxButtons":5}];}}else{if(options&&options.isRelated){return["statistics","pagination"];}else{return["switch-per-page","statistics","pagination"];}}}function getObjectFilter(_x77,_x78,_x79){return _getObjectFilter.apply(this,arguments);}function _getObjectFilter(){_getObjectFilter=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee70(objectSchema,fields,options){var fieldsFilterBarSchema;return _regeneratorRuntime().wrap(function _callee70$(_context70){while(1){switch(_context70.prev=_context70.next){case 0:_context70.next=2;return getObjectListHeaderFieldsFilterBar(objectSchema,null,options);case 2:fieldsFilterBarSchema=_context70.sent;return _context70.abrupt("return",{"title":"","submitText":"","className":"",// "debug": true,
300
+ if(options.displayAs==='split'){return["switch-per-page",{"type":"pagination","maxButtons":5}];}else{return["statistics",{"type":"pagination","maxButtons":5}];}}else{if(options&&options.isRelated){return["statistics","pagination"];}else{return["switch-per-page","statistics","pagination"];}}}function getObjectFilter(_x77,_x78,_x79){return _getObjectFilter.apply(this,arguments);}function _getObjectFilter(){_getObjectFilter=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee70(objectSchema,fields,options){var fieldsFilterBarSchema;return _regeneratorRuntime().wrap(function _callee70$(_context70){while(1){switch(_context70.prev=_context70.next){case 0:_context70.next=2;return getObjectListHeaderFieldsFilterBar(objectSchema,null,options);case 2:fieldsFilterBarSchema=_context70.sent;return _context70.abrupt("return",{"title":"","submitText":"","className":"",// "debug": true,
301
301
  "mode":"normal","wrapWithPanel":false,"body":[fieldsFilterBarSchema]});case 4:case"end":return _context70.stop();}}},_callee70);}));return _getObjectFilter.apply(this,arguments);}function getSource(_x80,_x81){return _getSource.apply(this,arguments);}function _getSource(){_getSource=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee71(field,ctx){var refObjectName,data,defaultValueOptionsData,valueField,requestAdaptor,adaptor;return _regeneratorRuntime().wrap(function _callee71$(_context71){while(1){switch(_context71.prev=_context71.next){case 0:// data.query 最终格式 "{ \tleftOptions:organizations(filters: {__filters}){value:_id,label:name,children}, children:organizations(filters: {__filters}){ref:_id,children}, defaultValueOptions:space_users(filters: {__options_filters}){user,name} }"
302
302
  refObjectName=ctx.objectName;_context71.next=3;return getFindQuery({name:refObjectName},null,[{name:ctx.valueField,alias:"value"},{name:ctx.labelField,alias:"label"},{name:"children"}],{alias:"options",filters:"{__filters}"});case 3:data=_context71.sent;data.query=data.query.replace(/,count\:.+/,"}");// const childrenData = await graphql.getFindQuery({ name: refObjectName }, null, [{ name: ctx.valueField, alias: "ref" }], {
303
303
  // alias: "children",