(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{"./flow-runner/components/sidebar/FlowSidebarContainer/FlowSidebarContainer.tsx":function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,o,n){var r,s=arguments.length,l=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,n);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(l=(s<3?r(l):s>3?r(t,o,l):r(t,o))||l);return s>3&&l&&Object.defineProperty(t,o,l),l},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o("../../node_modules/mobx-react/dist/mobx-react.module.js"),d=l(o("../../node_modules/react/index.js")),u=o("../../node_modules/@postman/aether/esmLib/index.js"),c=i(o("./node_modules/react-virtualized-auto-sizer/dist/index.esm.js")),f=o("./node_modules/react-window/dist/index.esm.js"),m=i(o("../../node_modules/styled-components/dist/styled-components.browser.esm.js")),p=o("./node_modules/lodash/lodash.js"),h=i(o("./js/containers/apps/requester/sidebar/SidebarListItem.js")),b=o("./flow-runner/api/FlowInterface.ts"),w=o("./js/components/base/Dropdowns.js"),y=i(o("./js/services/NavigationService.js")),j=i(o("./appsdk/sidebar/SidebarNoResultsFound/SidebarNoResultsFound.js")),g=i(o("./js/components/base/keymaps/KeyMaps.js")),_=o("./js/controllers/ShortcutsList.js"),v=m.default.div`
  display: flex;
  flex-direction:column;
  flex: 1;

  >.sidebar-list-item {
    flex: unset;
  }
`;let S=class extends d.Component{getActionsMenu(){return d.default.createElement(w.DropdownMenu,{"align-right":!0},d.default.createElement(w.MenuItem,{key:"delete",refKey:"delete",disabled:this.props.model.isOffline,disabledText:this.props.model.getDisabledText()},d.default.createElement("div",{className:"dropdown-menu-item-label"},"删除"),d.default.createElement("div",{className:"dropdown-menu-item-shortcut"},_.getShortcutByName("delete"))))}getKeyMapHandlers(e){return{delete:pm.shortcuts.handle("delete",(()=>{this.props.model.handleAction("delete",e)}))}}getListItem({style:e,index:t}){const{model:o,model:{items:n}}=this.props,r=p.get(n,t);if(!r)return null;const{id:s,state:{name:l}}=r;return d.default.createElement(g.default,{handlers:this.getKeyMapHandlers(r)},d.default.createElement("div",{style:e,key:s},d.default.createElement(h.default,{text:l,onClick:()=>b.openFlowInWorkbench(s),moreActions:this.getActionsMenu(),onActionsDropdownSelect:e=>o.handleAction(e,r),isSelected:y.default.isActive("build.flow",{fid:s})})))}render(){const{model:e}=this.props,t=e.items.length;return d.default.createElement(v,null,d.default.createElement(c.default,null,(({height:e,width:o})=>d.default.createElement(f.FixedSizeList,{height:e,width:o,itemCount:t,itemSize:28,overscanCount:10},(e=>d.default.createElement(a.Observer,null,this.getListItem.bind(this,e)))))),p.isEmpty(e.items)&&!p.isEmpty(e.searchQuery)&&d.default.createElement(j.default,{searchQuery:e.searchQuery,illustration:d.default.createElement(u.IllustrationCreateFlow,null)}))}};S=s([a.observer],S),t.default=S},"./flow-runner/components/sidebar/FlowSidebarView.tsx":function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__decorate||function(e,t,o,n){var r,s=arguments.length,l=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,n);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(l=(s<3?r(l):s>3?r(t,o,l):r(t,o))||l);return s>3&&l&&Object.defineProperty(t,o,l),l},l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o("./node_modules/lodash/lodash.js"),d=o("../../node_modules/mobx-react/dist/mobx-react.module.js"),u=l(o("../../node_modules/react/index.js")),c=o("../../node_modules/@postman/aether/esmLib/index.js"),f=o("./runtime-repl/_common/components/molecule.js"),m=i(o("./js/containers/apps/requester/sidebar/SidebarListActions.js")),p=i(o("./appsdk/sidebar/SidebarEmptyState/SidebarEmptyState.js")),h=i(o("./appsdk/sidebar/SidebarLoadingState/SidebarLoadingState.js")),b=o("./js/stores/get-store.js"),w=i(o("./flow-runner/components/sidebar/FlowSidebarContainer/FlowSidebarContainer.tsx")),y=o("./flow-runner/api/FlowInterface.ts");let j=class extends u.Component{getToolTip(e){return!e||e.isLoading?"加载中...":e.isOffline?"重新联网后即可执行此操作":e.isPublicWorkspace?"即将进入公共工作区":"创建新流程"}getView(){const{controller:e}=this.props,{isConsistentlyOffline:t}=b.getStore("SyncStatusStore");if(t)return u.default.createElement(f.SidebarOfflineState,null);if(!e.model||e.model.isLoading)return u.default.createElement(h.default,{hasIcon:!0});const{isPublicWorkspace:o}=e.model;return(a.isEmpty(e.model.items)||o)&&a.isEmpty(e.model.searchQuery)?u.default.createElement(p.default,{illustration:u.default.createElement(c.IllustrationCreateFlow,null),title:o?"即将进入公共工作区":"创建您的第一个流程",message:"流程通过逻辑连接请求来帮助您测试实际流程. "+(o?"同时, 您可以在其他工作区中尝试流程.":""),action:!o&&{label:"创建流程",handler:()=>y.createNewFlow()},hasPermissions:!e.model.isOffline}):u.default.createElement(w.default,{model:e.model})}render(){var e;const{controller:t}=this.props;return u.default.createElement(u.default.Fragment,null,u.default.createElement(m.default,{createNewConfig:{tooltip:this.getToolTip(t.model),onCreate:()=>y.createNewFlow(),disabled:!t.model||t.model.isOffline||t.model.isLoading||t.model.isPublicWorkspace},onSearch:e=>{var o;return null===(o=t.model)||void 0===o?void 0:o.setSearchQuery(e)},searchQuery:null===(e=t.model)||void 0===e?void 0:e.searchQuery}),this.getView())}};j=s([d.observer],j),t.default=j}}]);