@flatbiz/pro-layout 5.0.7 → 5.0.9

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.css CHANGED
@@ -1 +1 @@
1
- .bread-wrapper{align-items:center;border-radius:6px;display:flex;justify-content:space-between;margin-bottom:5px;padding:3px 15px 6px 8px}.bread-wrapper .bread{display:inline-block}.bread-wrapper .ant-breadcrumb ol{margin:0;padding:0}.bread-extend{flex:1}.header-account{color:unset;cursor:pointer;flex-shrink:0;height:100%;line-height:normal;margin-right:20px}.header-account:hover{background:var(--header-menuSelectedBgColor);color:var(--header-menuSelectedTextColor)}.header-account .header-account-wraper{align-items:center;display:flex;height:100%;padding:0 15px}.header-account .header-account-wraper img.user-avatar{border-radius:100%;height:24px;object-fit:cover;width:24px}.account-dropdown-overlay{box-shadow:0 4px 8px 0 rgba(0,0,0,.08);z-index:900}.layout-brand{align-items:center;background:var(--header-bgColor);color:var(--header-textColor);display:flex;justify-content:center;overflow:hidden;position:relative;transition:all .2s;white-space:nowrap}.brand-logo{background-position:50%;background-repeat:no-repeat;background-size:40px 100%;height:100%;width:40px}.brand-name{font-size:18px;margin-left:15px;white-space:nowrap}.ant-layout-sider-collapsed .layout-brand{display:block;overflow:hidden}.ant-layout-sider-collapsed .brand-logo{width:60px}.hyperse-layout-main-header{background:var(--header-bgColor);color:var(--header-textColor);display:flex;flex-shrink:0;z-index:1}.hyperse-layout-system-name{align-items:center;color:unset;display:flex;flex-shrink:0;font-size:18px;margin-left:15px}.hyperse-layout-header-fill{display:flex;flex:1;justify-content:flex-end;overflow:hidden}.hyperse-layout-header-fill>.ant-menu{background:unset;border-bottom:none;height:unset}.hyperse-layout-header-fill>.ant-menu.ant-menu-horizontal{border-bottom:none;line-height:inherit}.hyperse-layout-header-fill>.ant-menu .ant-menu-item{align-items:center;border-radius:0!important;display:flex}.hyperse-layout-header-fill>.ant-menu .ant-menu-item:hover:after{border:none}.hyperse-layout-header-fill>.ant-menu .ant-menu-item:after{border-bottom:0;bottom:12px}.hyperse-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-selected:after{background:var(--header-menuSelectedTextColor);border:none}.hyperse-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected){background:var(--header-menuActiveBgColor)}.hyperse-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected):after{background:var(--header-menuActiveTextColor);border:none}.hyperse-layout-header-fill>.ant-menu .ant-menu-item-active:after,.hyperse-layout-header-fill>.ant-menu .ant-menu-item-selected:after{border-radius:3px;bottom:12px;content:"";height:3px;left:50%!important;min-width:22px;position:absolute;transform:translateX(-50%);width:30%}.hyperse-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest{align-items:center;background-color:transparent!important;display:flex}.hyperse-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title{color:var(--header-textColor)!important}.hyperse-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title:hover{color:unset!important}.hyperse-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest:after{width:0}.hyperse-layout-topmenu{flex:1;overflow:hidden}.hyperse-layout-main-header-has-menu .hyperse-layout-header-fill{justify-content:space-between}.hyperse-layout-topmenu-overflowed-modal .ant-menu-submenu{background-color:transparent!important}.light-theme .hyperse-layout-topmenu-overflowed-modal .ant-menu-item{color:#000!important}.dark-theme .hyperse-layout-topmenu-overflowed-modal .ant-menu-item{color:#fff}.loader{align-items:center;background-color:var(--block-bg-color);bottom:0;display:flex;justify-content:center;left:0;opacity:1;position:absolute;right:0;text-align:center;top:0;z-index:100000}.loader.fullScreen{position:fixed}.loader .loader-wrapper{display:inline-flex;flex-direction:column;height:100px;justify-content:space-around;width:100px}.loader .loader-inner{animation:spinner .6s linear infinite;border:2px solid rgba(0,128,227,.08);border-left-color:rgba(0,84,153,.7);border-radius:50%;height:30px;margin:0 auto;text-indent:-12345px;width:30px;z-index:100001}.loader .loader-text{color:#0080e3;font-size:12px;height:20px;letter-spacing:4px;text-align:center;width:100px}.loader.hidden{display:none}@keyframes spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.page{flex:1;overflow-x:hidden;overflow-y:auto;position:relative}.page-flex{display:flex;flex-direction:column}.page-full{flex:1;overflow-y:auto}.layout-shrink{align-items:center;cursor:pointer;display:flex;font-size:18px;justify-content:center;padding:10px 0;transition:all .3s ease-out}.sider-bar-shrink{background-color:var(--sidebar-bgColor);box-shadow:0 0 17px rgba(0,0,0,.1);color:var(--sidebar-menuSelectedTextColor)}.sider-bar-shrink:hover{color:var(--sidebar-menuSelectedBgColor)}.header-shrink{color:var(--header-textColor);width:50px}.header-shrink:hover{color:var(--header-menuSelectedBgColor)}.icon-change-show-active .menu-icon-img-active{display:block}.icon-change-show-active .menu-icon-img{display:none}.menu-icon-img,.menu-icon-img-active{background-position:0;background-repeat:no-repeat;background-size:100% 100%;display:none;flex-shrink:0;height:16px;width:16px}.menu-icon-img{display:block}.hyperse-layout-sider{display:flex;flex:1!important;flex-direction:column;height:100%;overflow:hidden;z-index:10}.hyperse-layout-sider .ant-layout-sider-children{display:flex;flex-direction:column}.hyperse-layout-sider .ant-layout-sider-children>.ant-menu-root{padding-bottom:30px}.hyperse-layout-sider .ant-menu-root{flex:1;overflow-x:hidden;overflow-y:auto}.hyperse-layout-sider .ant-menu-title-content{margin-left:5px}.hyperse-layout-sider .ant-menu-item-selected .menu-icon-img-active{display:block}.hyperse-layout-sider .ant-menu-item-selected .menu-icon-img{display:none}.hyperse-layout-sider .ant-menu-item-active .menu-icon-img-active{display:block}.hyperse-layout-sider .ant-menu-item-active .menu-icon-img{display:none}.hyperse-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img-active,.hyperse-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img-active{display:block}.hyperse-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img,.hyperse-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img{display:none}.hyperse-layout-sider .ant-menu-light.ant-menu-root.ant-menu-inline,.hyperse-layout-sider .ant-menu-light.ant-menu-root.ant-menu-vertical{border-inline-end:none}.ant-menu-root.ant-menu-inline-collapsed>.ant-menu-item,.ant-menu-root.ant-menu-inline-collapsed>.ant-menu-submenu .ant-menu-submenu-title{align-items:center;display:flex}.ant-menu-root.ant-menu-inline-collapsed .menu-icon-img-active+span{display:none}.menu-icon-wrapper{align-items:center;display:flex}.hyperse-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img-active{display:block}.hyperse-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img{display:none}.hyperse-layout-sider-submenu-popup .ant-menu-item-selected .ant-menu-title-content{color:var(--sidebar-menuSelectedTextColor)}.hyperse-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img-active{display:block}.hyperse-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img{display:none}.hyperse-layout-sider-submenu-popup .ant-menu-item-active .ant-menu-title-content{color:var(--sidebar-menuSelectedTextColor)}.hyperse-layout-sider-submenu-popup .ant-menu-item{align-items:center!important;display:flex!important}.hyperse-layout-sider-submenu-popup .ant-menu-title-content{color:rgba(0,0,0,.88);margin-left:5px}.sider-bar-search{align-items:center;background-color:var(--sidebar-bgColor);display:flex;padding:10px}.sider-bar-search input{background-color:transparent}.sider-bar-search:not(.sider-bar-search-bgfff) input{color:#fff}.sider-bar-search:not(.sider-bar-search-bgfff) input::placeholder{color:#fff}.iframe-tabs{overflow:hidden}.iframe-tabs .ant-tabs-tab{background:transparent!important;border:none!important;border-radius:0!important;height:38px;margin:0!important;padding:0 16px!important}.iframe-tabs .ant-tabs-tab.ant-tabs-tab-active{background-color:var(--bg-color)!important;border-bottom:none!important}.iframe-tabs .ant-tabs-tab-btn{margin:0 auto}.iframe-tabs .ant-tabs-tab-remove{display:flex;height:16px;margin-left:4px;padding:0;width:16px}.iframe-tabs .tab-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAV5JREFUWEftVTtSwzAQfZuchJqL2KGJDAMFyKkIDZ+GUJGZDNDwafg0QGUbCpjBdkPsg3AALoKXUUhsF8YfKNRYnaTdt2/falcEzYs0x0dLoFWgVaBSAeftfdLtdtaY6UQK47VO23pBvE7g868kcQarK5Myn0oCT2H0wYxlBdIB2ZvC8MoAvTC2wewoGwI+t4S59C8CKhuAXxYgzDy0rd5jEagXREMA99kdbVSpVqmAAnsOYpmA3RzwnhTGXZ6E60f7RLhOz4gGsm/kfIp1qEVAubr+dJuIHrIAPJL93pXae340AuEiF2JHCjOzLalBbQKzQEG8C/BtWg5gPK/1aVYiHNiWeVPnsc5965r+2Hnh9BBMl4VejCNpmcV3v4RppMACww2iYwLSrNU5A2NbmGfN0pl1SvOllYDWEmh9hFrbUOsg0j6KtX9G2r/j5lOimcefBlGzEOXWLYFWgVaBb9EEtCFLbAZ7AAAAAElFTkSuQmCC);background-size:100% 100%;border-radius:100%;display:inline-block;height:100%;width:100%}.iframe-tabs .tab-icon:hover{background-color:#f96868;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAASdJREFUWEftljtOBDEQRF8dhZjrIIhYIpaET8ISsRICEj4JCwkQARGchwNwk0KWvFJrNcN4dpCcjKORu11dXW13j6i8VDk+I4FRgVGBTgVsXwBbwKWkr5Jna3sbuAHeJKXzrauEwDewmREmkj7+ArQ9SYGzz4+kjaEEUjafAWQq6bUJ1PYUeA62nS7VOhVIYLZ3gfcAfCTpKZKwfQw8hL09SfFMoxBFBDKJfeAloMwk3WfbDLgNtgNJ0Xf9O7CS5SHwGPbm+fsq7J1IWpRc1uRTrMAS0PYpcNcS4ExSm21YCVaUOAdi1sk8l3RdmvnSr7cCueb1CFQtge16l9B2vWdYtRHlwVKvFduuPozqjuO+jaWv/1qNqG+QQf8D/xmsCWtUYFSgugK/gSWEIdTkUcAAAAAASUVORK5CYII=");background-size:100% 100%}.iframe-tabs .ant-tabs-nav{background-color:var(--block-bg-color);margin:0!important}.iframe-tabs .ant-tabs-nav:before{border:none!important}.iframe-tabs .ant-tabs-content{height:100%}.iframe-tabs .ant-tabs-extra-content{margin-right:20px}.iframe-tabs .menu-tabs-operate{text-align:center;width:24px}.content-top-menus{margin:0}.content-top-menus .ant-tabs-tab{background:transparent!important;border:none!important;border-radius:0!important;height:38px;margin:0!important;padding:0 16px!important}.content-top-menus .ant-tabs-tab.ant-tabs-tab-active{background-color:var(--bg-color)!important;border-bottom:none!important}.content-top-menus .ant-tabs-nav{background-color:var(--block-bg-color);margin:0!important}.content-top-menus .ant-tabs-nav:before{border:none!important}.iframe-tabs-tab-badge{position:absolute}.iframe-tabs-tab-badge .ant-badge-dot{transform:none!important}.layout-page-wrapper{background:var(--bg-color);flex:1;padding:8px 8px 0}.layout-page,.layout-page-wrapper{height:100%;overflow:hidden;position:relative}.layout-page{display:flex;flex-direction:column}.layout-page-noheader{padding:0}.layout-page-noheader .bread-wrapper{padding:5px 15px 5px 8px}.layout-page-noheader .page{padding:0 8px 8px}#app,#app>.ant-app,body,html{height:100%;margin:0;width:100%}*,:after,:before{box-sizing:border-box}#app{background-color:var(--bg-color)}.hyperse-layout{bottom:0;display:flex;flex-direction:row;height:100vh;left:0;overflow:auto;position:fixed;right:0;top:0}.hyperse-layout-main{display:flex;flex:1;overflow:hidden}.hyperse-layout-main-content{flex:1;overflow-y:auto}.hyperse-layout-windows ::-webkit-scrollbar,.layout-page-windows ::-webkit-scrollbar,.page-windows ::-webkit-scrollbar{background-color:#eee;height:8px;width:8px}.hyperse-layout-windows ::-webkit-scrollbar-thumb,.layout-page-windows ::-webkit-scrollbar-thumb,.page-windows ::-webkit-scrollbar-thumb{background-color:#cfcfcf;border-radius:10px}.hyperse-layout-windows ::-webkit-scrollbar-thumb:hover,.layout-page-windows ::-webkit-scrollbar-thumb:hover,.page-windows ::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8}.hyperse-layout-windows ::-webkit-scrollbar-thumb:active,.layout-page-windows ::-webkit-scrollbar-thumb:active,.page-windows ::-webkit-scrollbar-thumb:active{background-color:#787878}
1
+ .bread-wrapper{align-items:center;border-radius:6px;display:flex;justify-content:space-between;margin-bottom:5px;padding:3px 15px 6px 8px}.bread-wrapper .bread{display:inline-block}.bread-wrapper .ant-breadcrumb ol{margin:0;padding:0}.bread-extend{flex:1}.header-account{color:unset;cursor:pointer;flex-shrink:0;height:100%;line-height:normal;margin-right:20px}.header-account:hover{background:var(--header-menuSelectedBgColor);color:var(--header-menuSelectedTextColor)}.header-account .header-account-wraper{align-items:center;display:flex;height:100%;padding:0 15px}.header-account .header-account-wraper img.user-avatar{border-radius:100%;height:24px;object-fit:cover;width:24px}.account-dropdown-overlay{box-shadow:0 4px 8px 0 rgba(0,0,0,.08);z-index:900}.layout-brand{align-items:center;background:var(--header-bgColor);color:var(--header-textColor);display:flex;justify-content:center;overflow:hidden;position:relative;transition:all .2s;white-space:nowrap}.brand-logo{background-position:50%;background-repeat:no-repeat;background-size:40px 100%;height:100%;width:40px}.brand-name{font-size:18px;margin-left:15px;white-space:nowrap}.ant-layout-sider-collapsed .layout-brand{display:block;overflow:hidden}.ant-layout-sider-collapsed .brand-logo{width:60px}.flatbiz-layout-main-header{background:var(--header-bgColor);color:var(--header-textColor);display:flex;flex-shrink:0;z-index:1}.flatbiz-layout-system-name{align-items:center;color:unset;display:flex;flex-shrink:0;font-size:18px;margin-left:15px}.flatbiz-layout-header-fill{display:flex;flex:1;justify-content:flex-end;overflow:hidden}.flatbiz-layout-header-fill>.ant-menu{background:unset;border-bottom:none;height:unset}.flatbiz-layout-header-fill>.ant-menu.ant-menu-horizontal{border-bottom:none;line-height:inherit}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item{align-items:center;border-radius:0!important;display:flex}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item:hover:after{border:none}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item:after{border-bottom:0;bottom:12px}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-selected:after{background:var(--header-menuSelectedTextColor);border:none}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected){background:var(--header-menuActiveBgColor)}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item.ant-menu-item-active:not(.ant-menu-item-selected):after{background:var(--header-menuActiveTextColor);border:none}.flatbiz-layout-header-fill>.ant-menu .ant-menu-item-active:after,.flatbiz-layout-header-fill>.ant-menu .ant-menu-item-selected:after{border-radius:3px;bottom:12px;content:"";height:3px;left:50%!important;min-width:22px;position:absolute;transform:translateX(-50%);width:30%}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest{align-items:center;background-color:transparent!important;display:flex}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title{color:var(--header-textColor)!important}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest .ant-menu-submenu-title:hover{color:unset!important}.flatbiz-layout-header-fill>.ant-menu .ant-menu-overflow-item-rest:after{width:0}.flatbiz-layout-topmenu{flex:1;overflow:hidden}.flatbiz-layout-main-header-has-menu .flatbiz-layout-header-fill{justify-content:space-between}.flatbiz-layout-topmenu-overflowed-modal .ant-menu-submenu{background-color:transparent!important}.light-theme .flatbiz-layout-topmenu-overflowed-modal .ant-menu-item{color:#000!important}.dark-theme .flatbiz-layout-topmenu-overflowed-modal .ant-menu-item{color:#fff}.loader{align-items:center;background-color:var(--block-bg-color);bottom:0;display:flex;justify-content:center;left:0;opacity:1;position:absolute;right:0;text-align:center;top:0;z-index:100000}.loader.fullScreen{position:fixed}.loader .loader-wrapper{display:inline-flex;flex-direction:column;height:100px;justify-content:space-around;width:100px}.loader .loader-inner{animation:spinner .6s linear infinite;border:2px solid rgba(0,128,227,.08);border-left-color:rgba(0,84,153,.7);border-radius:50%;height:30px;margin:0 auto;text-indent:-12345px;width:30px;z-index:100001}.loader .loader-text{color:#0080e3;font-size:12px;height:20px;letter-spacing:4px;text-align:center;width:100px}.loader.hidden{display:none}@keyframes spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.page{flex:1;overflow-x:hidden;overflow-y:auto;position:relative}.page-flex{display:flex;flex-direction:column}.page-full{flex:1;overflow-y:auto}.layout-shrink{align-items:center;cursor:pointer;display:flex;font-size:18px;justify-content:center;padding:10px 0;transition:all .3s ease-out}.sider-bar-shrink{background-color:var(--sidebar-bgColor);box-shadow:0 0 17px rgba(0,0,0,.1);color:var(--sidebar-menuSelectedTextColor)}.sider-bar-shrink:hover{color:var(--sidebar-menuSelectedBgColor)}.header-shrink{color:var(--header-textColor);width:50px}.header-shrink:hover{color:var(--header-menuSelectedBgColor)}.icon-change-show-active .menu-icon-img-active{display:block}.icon-change-show-active .menu-icon-img{display:none}.menu-icon-img,.menu-icon-img-active{background-position:0;background-repeat:no-repeat;background-size:100% 100%;display:none;flex-shrink:0;height:16px;width:16px}.menu-icon-img{display:block}.flatbiz-layout-sider{display:flex;flex:1!important;flex-direction:column;height:100%;overflow:hidden;z-index:10}.flatbiz-layout-sider .ant-layout-sider-children{display:flex;flex-direction:column}.flatbiz-layout-sider .ant-layout-sider-children>.ant-menu-root{padding-bottom:30px}.flatbiz-layout-sider .ant-menu-root{flex:1;overflow-x:hidden;overflow-y:auto}.flatbiz-layout-sider .ant-menu-title-content{margin-left:5px}.flatbiz-layout-sider .ant-menu-item-selected .menu-icon-img-active{display:block}.flatbiz-layout-sider .ant-menu-item-selected .menu-icon-img{display:none}.flatbiz-layout-sider .ant-menu-item-active .menu-icon-img-active{display:block}.flatbiz-layout-sider .ant-menu-item-active .menu-icon-img{display:none}.flatbiz-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img-active,.flatbiz-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img-active{display:block}.flatbiz-layout-sider .ant-menu-submenu-active .ant-menu-submenu-title .menu-icon-img,.flatbiz-layout-sider .ant-menu-submenu-selected .ant-menu-submenu-title .menu-icon-img{display:none}.flatbiz-layout-sider .ant-menu-light.ant-menu-root.ant-menu-inline,.flatbiz-layout-sider .ant-menu-light.ant-menu-root.ant-menu-vertical{border-inline-end:none}.ant-menu-root.ant-menu-inline-collapsed>.ant-menu-item,.ant-menu-root.ant-menu-inline-collapsed>.ant-menu-submenu .ant-menu-submenu-title{align-items:center;display:flex}.ant-menu-root.ant-menu-inline-collapsed .menu-icon-img-active+span{display:none}.menu-icon-wrapper{align-items:center;display:flex}.flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img-active{display:block}.flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .menu-icon-img{display:none}.flatbiz-layout-sider-submenu-popup .ant-menu-item-selected .ant-menu-title-content{color:var(--sidebar-menuSelectedTextColor)}.flatbiz-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img-active{display:block}.flatbiz-layout-sider-submenu-popup .ant-menu-item-active .menu-icon-img{display:none}.flatbiz-layout-sider-submenu-popup .ant-menu-item-active .ant-menu-title-content{color:var(--sidebar-menuSelectedTextColor)}.flatbiz-layout-sider-submenu-popup .ant-menu-item{align-items:center!important;display:flex!important}.flatbiz-layout-sider-submenu-popup .ant-menu-title-content{color:rgba(0,0,0,.88);margin-left:5px}.sider-bar-search{align-items:center;background-color:var(--sidebar-bgColor);display:flex;padding:10px}.sider-bar-search input{background-color:transparent}.sider-bar-search:not(.sider-bar-search-bgfff) input{color:#fff}.sider-bar-search:not(.sider-bar-search-bgfff) input::placeholder{color:#fff}.iframe-tabs{overflow:hidden}.iframe-tabs .ant-tabs-tab{background:transparent!important;border:none!important;border-radius:0!important;height:38px;margin:0!important;padding:0 16px!important}.iframe-tabs .ant-tabs-tab.ant-tabs-tab-active{background-color:var(--bg-color)!important;border-bottom:none!important}.iframe-tabs .ant-tabs-tab-btn{margin:0 auto}.iframe-tabs .ant-tabs-tab-remove{display:flex;height:16px;margin-left:4px;padding:0;width:16px}.iframe-tabs .tab-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAV5JREFUWEftVTtSwzAQfZuchJqL2KGJDAMFyKkIDZ+GUJGZDNDwafg0QGUbCpjBdkPsg3AALoKXUUhsF8YfKNRYnaTdt2/falcEzYs0x0dLoFWgVaBSAeftfdLtdtaY6UQK47VO23pBvE7g868kcQarK5Myn0oCT2H0wYxlBdIB2ZvC8MoAvTC2wewoGwI+t4S59C8CKhuAXxYgzDy0rd5jEagXREMA99kdbVSpVqmAAnsOYpmA3RzwnhTGXZ6E60f7RLhOz4gGsm/kfIp1qEVAubr+dJuIHrIAPJL93pXae340AuEiF2JHCjOzLalBbQKzQEG8C/BtWg5gPK/1aVYiHNiWeVPnsc5965r+2Hnh9BBMl4VejCNpmcV3v4RppMACww2iYwLSrNU5A2NbmGfN0pl1SvOllYDWEmh9hFrbUOsg0j6KtX9G2r/j5lOimcefBlGzEOXWLYFWgVaBb9EEtCFLbAZ7AAAAAElFTkSuQmCC);background-size:100% 100%;border-radius:100%;display:inline-block;height:100%;width:100%}.iframe-tabs .tab-icon:hover{background-color:#f96868;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAASdJREFUWEftljtOBDEQRF8dhZjrIIhYIpaET8ISsRICEj4JCwkQARGchwNwk0KWvFJrNcN4dpCcjKORu11dXW13j6i8VDk+I4FRgVGBTgVsXwBbwKWkr5Jna3sbuAHeJKXzrauEwDewmREmkj7+ArQ9SYGzz4+kjaEEUjafAWQq6bUJ1PYUeA62nS7VOhVIYLZ3gfcAfCTpKZKwfQw8hL09SfFMoxBFBDKJfeAloMwk3WfbDLgNtgNJ0Xf9O7CS5SHwGPbm+fsq7J1IWpRc1uRTrMAS0PYpcNcS4ExSm21YCVaUOAdi1sk8l3RdmvnSr7cCueb1CFQtge16l9B2vWdYtRHlwVKvFduuPozqjuO+jaWv/1qNqG+QQf8D/xmsCWtUYFSgugK/gSWEIdTkUcAAAAAASUVORK5CYII=");background-size:100% 100%}.iframe-tabs .ant-tabs-nav{background-color:var(--block-bg-color);margin:0!important}.iframe-tabs .ant-tabs-nav:before{border:none!important}.iframe-tabs .ant-tabs-content{height:100%}.iframe-tabs .ant-tabs-extra-content{margin-right:20px}.iframe-tabs .menu-tabs-operate{text-align:center;width:24px}.content-top-menus{margin:0}.content-top-menus .ant-tabs-tab{background:transparent!important;border:none!important;border-radius:0!important;height:38px;margin:0!important;padding:0 16px!important}.content-top-menus .ant-tabs-tab.ant-tabs-tab-active{background-color:var(--bg-color)!important;border-bottom:none!important}.content-top-menus .ant-tabs-nav{background-color:var(--block-bg-color);margin:0!important}.content-top-menus .ant-tabs-nav:before{border:none!important}.iframe-tabs-tab-badge{position:absolute}.iframe-tabs-tab-badge .ant-badge-dot{transform:none!important}.layout-page-wrapper{background:var(--bg-color);flex:1;padding:8px 8px 0}.layout-page,.layout-page-wrapper{height:100%;overflow:hidden;position:relative}.layout-page{display:flex;flex-direction:column}.layout-page-noheader{padding:0}.layout-page-noheader .bread-wrapper{padding:5px 15px 5px 8px}.layout-page-noheader .page{padding:0 8px 8px}#app,#app>.ant-app,body,html{height:100%;margin:0;width:100%}*,:after,:before{box-sizing:border-box}#app{background-color:var(--bg-color)}.flatbiz-layout{bottom:0;display:flex;flex-direction:row;height:100vh;left:0;overflow:auto;position:fixed;right:0;top:0}.flatbiz-layout-main{display:flex;flex:1;overflow:hidden}.flatbiz-layout-main-content{flex:1;overflow-y:auto}.flatbiz-layout-windows ::-webkit-scrollbar,.layout-page-windows ::-webkit-scrollbar,.page-windows ::-webkit-scrollbar{background-color:#eee;height:8px;width:8px}.flatbiz-layout-windows ::-webkit-scrollbar-thumb,.layout-page-windows ::-webkit-scrollbar-thumb,.page-windows ::-webkit-scrollbar-thumb{background-color:#cfcfcf;border-radius:10px}.flatbiz-layout-windows ::-webkit-scrollbar-thumb:hover,.layout-page-windows ::-webkit-scrollbar-thumb:hover,.page-windows ::-webkit-scrollbar-thumb:hover{background-color:#a8a8a8}.flatbiz-layout-windows ::-webkit-scrollbar-thumb:active,.layout-page-windows ::-webkit-scrollbar-thumb:active,.page-windows ::-webkit-scrollbar-thumb:active{background-color:#787878}
package/dist/index.d.ts CHANGED
@@ -458,7 +458,7 @@ export type BootstrapOptions = {
458
458
  * 2. 匹配不到菜单的情况下,隐藏
459
459
  * ```
460
460
  */
461
- hideSidebarMenu?: boolean | (() => boolean);
461
+ hideSidebarMenu?: boolean | ((pathname: string) => boolean);
462
462
  /**
463
463
  * 未配置到菜单情况下,是否隐藏侧边栏开关, 默认值 true/隐藏
464
464
  * ```
@@ -671,7 +671,7 @@ export type IframeApiProps = {
671
671
  if (menuItem?.id) {
672
672
  window.parent.postMessage(
673
673
  JSON.stringify({
674
- type: 'HYPERSE-LAYOUT',
674
+ type: 'FLATBIZ-LAYOUT',
675
675
  data: {
676
676
  type: 'redirect_to_frame_layout_menu_third_item',
677
677
  data: {
@@ -744,5 +744,9 @@ export declare const ProLayoutModel: ModelType<IState, ActionParams>;
744
744
  export declare const proLayoutModels: import("@dimjs/model").APIs<{
745
745
  ProLayoutModel: ModelType<IState, ActionParams>;
746
746
  }>;
747
+ /**
748
+ * 获取iframeTab下的唯一值,iframeTab未删除时,唯一值不变,iframeTab删除后再打开,唯一值变化
749
+ */
750
+ export declare const getIframeTabUid: (prefix: string) => string;
747
751
 
748
752
  export {};
package/dist/index.js CHANGED
@@ -26,6 +26,7 @@ import { extend } from '@dimjs/utils/extend/extend';
26
26
  import { get } from '@dimjs/utils/get/get';
27
27
  import { isString } from '@dimjs/lang/is-string';
28
28
  import { exception } from '@wove/react/exception';
29
+ import { useMediaQuery } from 'react-responsive';
29
30
  import { findAncestors } from '@dimjs/utils/tree/find-ancestors';
30
31
  import { getEnvName } from '@dimjs/utils/env/get-env-name';
31
32
  import { isPlainObject } from '@dimjs/lang/is-plain-object';
@@ -258,7 +259,7 @@ var IFrameEvents = /*#__PURE__*/function (IFrameEvents) {
258
259
  IFrameEvents["messageReceived"] = "messageReceived";
259
260
  return IFrameEvents;
260
261
  }({});
261
- var IFRAME_EVENT_FLAG = "HYPERSE-LAYOUT";
262
+ var IFRAME_EVENT_FLAG = "FLATBIZ-LAYOUT";
262
263
  var IframeEventEmitter = /*#__PURE__*/function () {
263
264
  function IframeEventEmitter() {
264
265
  _classCallCheck(this, IframeEventEmitter);
@@ -771,8 +772,8 @@ var findOneLeafNode = function findOneLeafNode(tileMenuList) {
771
772
  * 获取 rotue path(不包含routeBaseName)
772
773
  * ```
773
774
  * 例如:
774
- * /pages/hyperse/demo-layout/main/system-set/menu1?env=me
775
- * routeBaseName = pages/hyperse/demo-layout
775
+ * /pages/flatbiz/demo-layout/main/system-set/menu1?env=me
776
+ * routeBaseName = pages/flatbiz/demo-layout
776
777
  * =>
777
778
  * /main/system-set/menu1
778
779
  * ```
@@ -789,8 +790,8 @@ var getPurePath = function getPurePath(path) {
789
790
  * 获取 iframe rotue path(不包含routeBaseName、main)
790
791
  * ```
791
792
  * 例如:
792
- * routeBaseName = pages/hyperse/demo-layout
793
- * 1. /pages/hyperse/demo-layout/main/system-set/menu1?env=me
793
+ * routeBaseName = pages/flatbiz/demo-layout
794
+ * 1. /pages/flatbiz/demo-layout/main/system-set/menu1?env=me
794
795
  * 2. /main/system-set/menu1?env=me
795
796
  * 3. /system-set/menu1
796
797
  * =>
@@ -819,7 +820,7 @@ var getIframeMainPurePath = function getIframeMainPurePath(pathOrUrl) {
819
820
  * 解析指定iframe main url数据
820
821
  * ```
821
822
  * 例如
822
- * http://dev.flatjs.com:6900/pages/hyperse/demo-iframe/main/module1/menu1?name=xxx
823
+ * http://dev.flatjs.com:6900/pages/flatbiz/demo-iframe/main/module1/menu1?name=xxx
823
824
  * =>
824
825
  * path: /main/module1/menu1
825
826
  * search: ?name=xxx
@@ -841,7 +842,7 @@ var parseIframeMainUrlInfo = function parseIframeMainUrlInfo(url) {
841
842
  * 解析指定iframe 内部 url数据
842
843
  * ```
843
844
  * 例如
844
- * http://dev.flatjs.com:6900/pages/hyperse/demo-iframe/main/module1/menu1?name=xxx
845
+ * http://dev.flatjs.com:6900/pages/flatbiz/demo-iframe/main/module1/menu1?name=xxx
845
846
  * =>
846
847
  * path: /module1/menu1
847
848
  * search: ?name=xxx
@@ -868,25 +869,25 @@ var pathStartWithPath = function pathStartWithPath(path1, path2) {
868
869
  *
869
870
  * ```
870
871
  * 例如1
871
- * routeBaseName = pages/hyperse/demo-layout
872
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/main/module1/menu1?name=xxx
873
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/module1/menu1?name=xxx
872
+ * routeBaseName = pages/flatbiz/demo-layout
873
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/main/module1/menu1?name=xxx
874
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/module1/menu1?name=xxx
874
875
  * /main/module1/menu1?name=xxx
875
876
  * /module1/menu1?name=xxx
876
877
  * =>
877
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/module1/menu1?name=xxx
878
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/module1/menu1?name=xxx
878
879
  * ```
879
880
  *
880
881
  * ```
881
882
  * *****
882
883
  * 例如2
883
- * routeBaseName = pages/hyperse/demo-layout
884
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/main/module1/menu1
885
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/module1/menu1
884
+ * routeBaseName = pages/flatbiz/demo-layout
885
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/main/module1/menu1
886
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/module1/menu1
886
887
  * /main/module1/menu1
887
888
  * /module1/menu1
888
889
  * =>
889
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/module1/menu1
890
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/module1/menu1
890
891
  * ```
891
892
  */
892
893
  var guessIframeTabItemLink = function guessIframeTabItemLink(pathOrUrl) {
@@ -923,25 +924,25 @@ var guessNormalItemLink = function guessNormalItemLink(pathOrUrl) {
923
924
  *
924
925
  * ```
925
926
  * 例如1
926
- * routeBaseName = pages/hyperse/demo-layout
927
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/main/module1/menu1?name=xxx
928
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/module1/menu1?name=xxx
927
+ * routeBaseName = pages/flatbiz/demo-layout
928
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/main/module1/menu1?name=xxx
929
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/module1/menu1?name=xxx
929
930
  * /main/module1/menu1?name=xxx
930
931
  * /module1/menu1?name=xxx
931
932
  * =>
932
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/main/module1/menu1?name=xxx
933
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/main/module1/menu1?name=xxx
933
934
  * ```
934
935
  *
935
936
  * ```
936
937
  * *****
937
938
  * 例如2
938
- * routeBaseName = pages/hyperse/demo-layout
939
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/main/module1/menu1
940
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/module1/menu1
939
+ * routeBaseName = pages/flatbiz/demo-layout
940
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/main/module1/menu1
941
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/module1/menu1
941
942
  * /main/module1/menu1
942
943
  * /module1/menu1
943
944
  * =>
944
- * http://dev.flatjs.com/pages/hyperse/demo-iframe/main/module1/menu1
945
+ * http://dev.flatjs.com/pages/flatbiz/demo-iframe/main/module1/menu1
945
946
  * ```
946
947
  */
947
948
  var guessIframeMainLink = function guessIframeMainLink(pathOrUrl) {
@@ -1693,7 +1694,7 @@ var getIframeOpenNewTabItemOperateLinkList = function getIframeOpenNewTabItemOpe
1693
1694
  return isArray(operateLinkData === null || operateLinkData === void 0 ? void 0 : operateLinkData.dataList) ? operateLinkData === null || operateLinkData === void 0 ? void 0 : operateLinkData.dataList : [];
1694
1695
  };
1695
1696
 
1696
- var appName = globalData.appName || 'hyperse-layout';
1697
+ var appName = globalData.appName || 'flatbiz-layout';
1697
1698
  function removeNodesAtDepth(tree, depth, maxDepth) {
1698
1699
  for (var i = tree.length - 1; i >= 0; i--) {
1699
1700
  var node = tree[i];
@@ -1755,6 +1756,7 @@ var getMenus = function getMenus(isIframeType, siderBarMaxMenuLevel, disableTopb
1755
1756
  if (siderBarMaxMenuLevel) {
1756
1757
  var maxDepth = !disableTopbarMenu ? siderBarMaxMenuLevel + 1 : siderBarMaxMenuLevel;
1757
1758
  var newTreeList = removeNodesAtDepth(cloneObject(menus), 1, maxDepth);
1759
+ console.log('menus', menus, newTreeList);
1758
1760
  return {
1759
1761
  menus: newTreeList,
1760
1762
  completeMenus: menus
@@ -1963,7 +1965,7 @@ var initSyncIframeTabCacheByLocation = function initSyncIframeTabCacheByLocation
1963
1965
  // iframe 激活 tab
1964
1966
  var iframeTabActiveItem = getCacheIframeActiveItem();
1965
1967
  if (siderbarTargetMenu) {
1966
- var locationIsLeafNode = judgeTargetLinkIsLeafNodeMenu(location.href, siderBarTileMenus);
1968
+ var locationIsLeafNode = siderBarTileMenus.length > 0 ? judgeTargetLinkIsLeafNodeMenu(location.href, siderBarTileMenus) : true;
1967
1969
  // 是否外部第三方链接
1968
1970
  var siderbarMenuLinkIsThird = judgeLinkIsThird(siderbarTargetMenu.link);
1969
1971
  var siderbarMenuLinkIsExternal = judgeIframeSiblingProject(siderbarTargetMenu.link);
@@ -2361,7 +2363,6 @@ var Header = function Header() {
2361
2363
  var layoutCtx = useLayoutCtx();
2362
2364
  var menus = layoutCtx.menus,
2363
2365
  topMenuActiveItem = layoutCtx.topMenuActiveItem,
2364
- siderBarMenus = layoutCtx.siderBarMenus,
2365
2366
  headerHeight = layoutCtx.headerHeight;
2366
2367
  var activeColor = (_layoutCtx$headerThem = layoutCtx.headerThemeConfig) === null || _layoutCtx$headerThem === void 0 ? void 0 : _layoutCtx$headerThem.menuSelectedTextColor;
2367
2368
  var textColor = (_layoutCtx$headerThem2 = layoutCtx.headerThemeConfig) === null || _layoutCtx$headerThem2 === void 0 ? void 0 : _layoutCtx$headerThem2.textColor;
@@ -2379,7 +2380,7 @@ var Header = function Header() {
2379
2380
  label: item.name
2380
2381
  };
2381
2382
  });
2382
- }, [activeColor, layoutCtx.disableTopbarMenu, layoutCtx.showHeaderMenuIcon, menus, textColor, topMenuActiveItem === null || topMenuActiveItem === void 0 ? void 0 : topMenuActiveItem.id]);
2383
+ }, [activeColor, layoutCtx.disableTopbarMenu, layoutCtx.showHeaderMenuIcon, menus, textColor, topMenuActiveItem]);
2383
2384
  var onClick = hooks.useCallbackRef(function (data) {
2384
2385
  var targetItem = menus.filter(function (item) {
2385
2386
  return valueIsEqual(data.key, item.id);
@@ -2393,7 +2394,14 @@ var Header = function Header() {
2393
2394
  if (!isNormal && isIframeRoute) {
2394
2395
  var _layoutCtx$topMenuAct;
2395
2396
  if (!valueIsEqual((_layoutCtx$topMenuAct = layoutCtx.topMenuActiveItem) === null || _layoutCtx$topMenuAct === void 0 ? void 0 : _layoutCtx$topMenuAct.id, targetItem.id)) {
2396
- layoutCtx.iframeTopRouteMenuChange(targetItem);
2397
+ var _targetItem$children;
2398
+ if (!((_targetItem$children = targetItem.children) !== null && _targetItem$children !== void 0 && _targetItem$children.length)) {
2399
+ layoutCtx.iframeTopRouteMenuChange(_objectSpread2(_objectSpread2({}, targetItem), {}, {
2400
+ link: guessIframeTabItemLink(targetItem.link)
2401
+ }));
2402
+ } else {
2403
+ layoutCtx.iframeTopRouteMenuChange(targetItem);
2404
+ }
2397
2405
  }
2398
2406
  return;
2399
2407
  }
@@ -2420,21 +2428,21 @@ var Header = function Header() {
2420
2428
  }
2421
2429
  }
2422
2430
  });
2423
- var className = classNames('hyperse-layout-main-header', {
2424
- 'hyperse-layout-main-header-has-menu': topMenus.length > 0
2431
+ var className = classNames('flatbiz-layout-main-header', {
2432
+ 'flatbiz-layout-main-header-has-menu': topMenus.length > 0
2425
2433
  });
2426
2434
  return /*#__PURE__*/jsxs("div", {
2427
2435
  className: className,
2428
2436
  style: {
2429
2437
  height: headerHeight
2430
2438
  },
2431
- children: [siderBarMenus.length === 0 || layoutCtx.hideSidebarMenu ? /*#__PURE__*/jsx(HeaderBrand, {}) : null, layoutCtx.showTopMenuShrink ? /*#__PURE__*/jsx(Shrink, {
2439
+ children: [layoutCtx.hideSidebarMenu ? /*#__PURE__*/jsx(HeaderBrand, {}) : null, layoutCtx.showTopMenuShrink ? /*#__PURE__*/jsx(Shrink, {
2432
2440
  className: "header-shrink"
2433
2441
  }) : null, layoutCtx.systemName ? /*#__PURE__*/jsx("div", {
2434
- className: "hyperse-layout-system-name",
2442
+ className: "flatbiz-layout-system-name",
2435
2443
  children: layoutCtx.systemName
2436
2444
  }) : null, /*#__PURE__*/jsxs("div", {
2437
- className: "hyperse-layout-header-fill",
2445
+ className: "flatbiz-layout-header-fill",
2438
2446
  children: [/*#__PURE__*/jsx(ConfigProviderWrapper, _objectSpread2(_objectSpread2({
2439
2447
  theme: {
2440
2448
  token: {
@@ -2451,9 +2459,9 @@ var Header = function Header() {
2451
2459
  }
2452
2460
  }, layoutCtx.topMenuConfigProviderProps), {}, {
2453
2461
  children: topMenus.length > 0 ? /*#__PURE__*/jsx(Menu, {
2454
- className: "hyperse-layout-topmenu",
2462
+ className: "flatbiz-layout-topmenu",
2455
2463
  mode: "horizontal",
2456
- overflowedIndicatorPopupClassName: "hyperse-layout-topmenu-overflowed-modal",
2464
+ overflowedIndicatorPopupClassName: "flatbiz-layout-topmenu-overflowed-modal",
2457
2465
  direction: "rtl",
2458
2466
  triggerSubMenuAction: "click",
2459
2467
  selectedKeys: topMenuActiveItem !== null && topMenuActiveItem !== void 0 && topMenuActiveItem.id ? ["".concat(topMenuActiveItem.id)] : undefined
@@ -2521,7 +2529,7 @@ var SiderBarIcon = function SiderBarIcon(props) {
2521
2529
  });
2522
2530
  };
2523
2531
  var SiderBar = function SiderBar() {
2524
- var _layoutCtx$sidebarThe, _layoutCtx$sidebarThe2, _layoutCtx$sidebarThe3, _layoutCtx$sidebarThe4, _layoutCtx$sidebarThe5, _layoutCtx$sidebarThe6, _layoutCtx$sidebarThe7, _layoutCtx$sidebarThe8, _layoutCtx$sidebarThe9, _layoutCtx$sidebarThe10, _layoutCtx$sidebarThe11, _layoutCtx$sidebarThe12, _layoutCtx$sidebarThe13, _layoutCtx$sidebarThe14;
2532
+ var _layoutCtx$sidebarThe, _layoutCtx$sidebarThe2, _layoutCtx$sidebarThe3, _layoutCtx$sidebarThe4, _layoutCtx$sidebarThe5, _layoutCtx$sidebarThe6, _layoutCtx$sidebarThe7, _layoutCtx$sidebarThe8, _layoutCtx$sidebarThe9, _layoutCtx$sidebarThe10, _layoutCtx$sidebarThe11, _layoutCtx$sidebarThe12, _layoutCtx$sidebarThe13, _layoutCtx$sidebarThe14, _layoutCtx$sidebarThe15;
2525
2533
  var _useState = useState(),
2526
2534
  _useState2 = _slicedToArray(_useState, 2),
2527
2535
  searchValue = _useState2[0],
@@ -2565,8 +2573,8 @@ var SiderBar = function SiderBar() {
2565
2573
  }),
2566
2574
  label: item.name,
2567
2575
  children: _getMenuItem(item.children, index + 1),
2568
- popupClassName: 'hyperse-layout-sider-submenu-popup',
2569
- className: index === 0 && !item.iconImg && !item.iconImgActive ? 'hyperse-layout-menu-item-no-icon' : undefined
2576
+ popupClassName: 'flatbiz-layout-sider-submenu-popup',
2577
+ className: index === 0 && !item.iconImg && !item.iconImgActive ? 'flatbiz-layout-menu-item-no-icon' : undefined
2570
2578
  };
2571
2579
  }
2572
2580
  return {
@@ -2666,7 +2674,7 @@ var SiderBar = function SiderBar() {
2666
2674
  }, 500);
2667
2675
  return /*#__PURE__*/jsxs(Sider, {
2668
2676
  theme: "light",
2669
- className: "hyperse-layout-sider",
2677
+ className: "flatbiz-layout-sider",
2670
2678
  collapsed: layoutCtx.collapsed,
2671
2679
  width: layoutCtx.sidebarWidth,
2672
2680
  collapsedWidth: layoutCtx.collapsedWidth,
@@ -2685,7 +2693,8 @@ var SiderBar = function SiderBar() {
2685
2693
  itemActiveBg: (_layoutCtx$sidebarThe11 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe11 === void 0 ? void 0 : _layoutCtx$sidebarThe11.menuActiveBgColor,
2686
2694
  itemSelectedColor: (_layoutCtx$sidebarThe12 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe12 === void 0 ? void 0 : _layoutCtx$sidebarThe12.menuSelectedTextColor,
2687
2695
  itemSelectedBg: (_layoutCtx$sidebarThe13 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe13 === void 0 ? void 0 : _layoutCtx$sidebarThe13.menuSelectedBgColor,
2688
- subMenuItemBg: (_layoutCtx$sidebarThe14 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe14 === void 0 ? void 0 : _layoutCtx$sidebarThe14.menuSubMenuBgColor
2696
+ subMenuItemBg: (_layoutCtx$sidebarThe14 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe14 === void 0 ? void 0 : _layoutCtx$sidebarThe14.menuSubMenuBgColor,
2697
+ subMenuItemSelectedColor: (_layoutCtx$sidebarThe15 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe15 === void 0 ? void 0 : _layoutCtx$sidebarThe15.menuSelectedTextColor
2689
2698
  }
2690
2699
  }
2691
2700
  }
@@ -3137,11 +3146,11 @@ var App = function App() {
3137
3146
  return /*#__PURE__*/jsxs(Fragment, {
3138
3147
  children: [/*#__PURE__*/jsx(EventHandling, {}), /*#__PURE__*/jsxs(Layout, {
3139
3148
  hasSider: true,
3140
- className: classNames('hyperse-layout', {
3141
- 'hyperse-layout-windows': isWindows
3149
+ className: classNames('flatbiz-layout', {
3150
+ 'flatbiz-layout-windows': isWindows
3142
3151
  }),
3143
- children: [layoutCtx.siderBarMenus.length === 0 || layoutCtx.hideSidebarMenu ? null : /*#__PURE__*/jsx(SiderBar, {}), /*#__PURE__*/jsxs(Layout, {
3144
- className: "hyperse-layout-main",
3152
+ children: [layoutCtx.hideSidebarMenu ? null : /*#__PURE__*/jsx(SiderBar, {}), /*#__PURE__*/jsxs(Layout, {
3153
+ className: "flatbiz-layout-main",
3145
3154
  hasSider: false,
3146
3155
  children: [!layoutCtx.hideHeader ? /*#__PURE__*/jsx(Header, {}) : null, isIframeMain ? /*#__PURE__*/jsx(LayoutIFrame, {}) : /*#__PURE__*/jsx(LayoutContent, {
3147
3156
  className: layoutCtx.layoutPageClassName,
@@ -3193,10 +3202,23 @@ var AppProvider = function AppProvider(props) {
3193
3202
  if (options.disableTopbarMenu) return false;
3194
3203
  return typeof options.hideSidebarMenu === 'function' ? options.hideSidebarMenu() : options.hideSidebarMenu;
3195
3204
  }();
3205
+ var isMobile = useMediaQuery({
3206
+ query: '(max-width: 767px)'
3207
+ });
3196
3208
  var _useState = useState(props.initSidebarShrinkClosed),
3197
3209
  _useState2 = _slicedToArray(_useState, 2),
3198
3210
  collapsed = _useState2[0],
3199
3211
  setCollapsed = _useState2[1];
3212
+ hooks.useUpdateEffect(function () {
3213
+ setCollapsed(isMobile);
3214
+ }, [isMobile]);
3215
+ hooks.useEffectOnce(function () {
3216
+ if (props.initSidebarShrinkClosed) {
3217
+ setCollapsed(true);
3218
+ } else {
3219
+ setCollapsed(isMobile);
3220
+ }
3221
+ }, []);
3200
3222
  var _useState3 = useState([]),
3201
3223
  _useState4 = _slicedToArray(_useState3, 2),
3202
3224
  opendKeys = _useState4[0],
@@ -3244,74 +3266,74 @@ var AppProvider = function AppProvider(props) {
3244
3266
  var siderBarMenus = [];
3245
3267
  var siderbarTargetMenu = undefined;
3246
3268
  // 隐藏 侧边栏
3247
- if (hideSidebarMenu) {
3269
+ // if (hideSidebarMenu) {
3270
+ // if (!options.disableTopbarMenu) {
3271
+ // const target = menus.find((item) => {
3272
+ // return pathIncludePath(getPurePath(location.pathname), item.path);
3273
+ // });
3274
+ // if (target) {
3275
+ // setTopMenuActiveItem(target);
3276
+ // }
3277
+ // }
3278
+ // } else {
3279
+ /**
3280
+ * 先查找叶子节点菜单,再反向查找上级菜单
3281
+ */
3282
+ siderbarTargetMenu = parseSiderTargetMenuByPath(tileMenus, location.href);
3283
+ if (siderbarTargetMenu) {
3284
+ var chainMenuIdList = getTargetMenuParentChain(siderbarTargetMenu.id, menus);
3248
3285
  if (!options.disableTopbarMenu) {
3249
- var target = menus.find(function (item) {
3250
- return pathIncludePath(getPurePath(location.pathname), item.path);
3251
- });
3252
- if (target) {
3253
- setTopMenuActiveItem(target);
3286
+ if (chainMenuIdList.length > 0) {
3287
+ var setTopMenuActiveId = chainMenuIdList[chainMenuIdList.length - 1];
3288
+ var topMenuTarget = menus.find(function (item) {
3289
+ return valueIsEqual(item.id, setTopMenuActiveId);
3290
+ });
3291
+ setTopMenuActiveItem(topMenuTarget);
3292
+ siderBarMenus = (topMenuTarget === null || topMenuTarget === void 0 ? void 0 : topMenuTarget.children) || [];
3254
3293
  }
3294
+ } else {
3295
+ siderBarMenus = menus;
3255
3296
  }
3297
+ setSelectedKeys(chainMenuIdList);
3298
+ setOpendKeys(chainMenuIdList);
3299
+ opendKeysTempRef.current = chainMenuIdList;
3300
+ setSiderBarMenuActiveItem(siderbarTargetMenu);
3301
+ // initSiderBarMenuActiveItemRef.current = siderbarTargetMenu;
3302
+ document.title = siderbarTargetMenu.metaTitle || siderbarTargetMenu.name;
3256
3303
  } else {
3257
- /**
3258
- * 先查找叶子节点菜单,再反向查找上级菜单
3259
- */
3260
- siderbarTargetMenu = parseSiderTargetMenuByPath(tileMenus, location.href);
3261
- if (siderbarTargetMenu) {
3262
- var chainMenuIdList = getTargetMenuParentChain(siderbarTargetMenu.id, menus);
3263
- if (!options.disableTopbarMenu) {
3264
- if (chainMenuIdList.length > 0) {
3265
- var setTopMenuActiveId = chainMenuIdList[chainMenuIdList.length - 1];
3266
- var topMenuTarget = menus.find(function (item) {
3267
- return valueIsEqual(item.id, setTopMenuActiveId);
3268
- });
3269
- setTopMenuActiveItem(topMenuTarget);
3270
- siderBarMenus = (topMenuTarget === null || topMenuTarget === void 0 ? void 0 : topMenuTarget.children) || [];
3271
- }
3272
- } else {
3273
- siderBarMenus = menus;
3274
- }
3275
- setSelectedKeys(chainMenuIdList);
3276
- setOpendKeys(chainMenuIdList);
3277
- opendKeysTempRef.current = chainMenuIdList;
3278
- setSiderBarMenuActiveItem(siderbarTargetMenu);
3304
+ if (options.disableTopbarMenu) {
3305
+ siderBarMenus = menus;
3306
+ setSelectedKeys([]);
3307
+ setOpendKeys([]);
3308
+ opendKeysTempRef.current = [];
3309
+ setSiderBarMenuActiveItem(undefined);
3279
3310
  // initSiderBarMenuActiveItemRef.current = siderbarTargetMenu;
3280
- document.title = siderbarTargetMenu.metaTitle || siderbarTargetMenu.name;
3281
3311
  } else {
3282
- if (options.disableTopbarMenu) {
3283
- siderBarMenus = menus;
3284
- setSelectedKeys([]);
3285
- setOpendKeys([]);
3286
- opendKeysTempRef.current = [];
3287
- setSiderBarMenuActiveItem(undefined);
3288
- // initSiderBarMenuActiveItemRef.current = siderbarTargetMenu;
3312
+ // 当开启顶部菜单时,找不到叶子节点,有可能找到顶部菜单
3313
+ var target = parseFirstMenuByPath(menus, location.href);
3314
+ if (target) {
3315
+ if (!unMatchHiddenSiderBar) {
3316
+ siderBarMenus = (target === null || target === void 0 ? void 0 : target.children) || [];
3317
+ }
3289
3318
  } else {
3290
- // 当开启顶部菜单时,找不到叶子节点,有可能找到顶部菜单
3291
- var _target = parseFirstMenuByPath(menus, location.href);
3292
- if (_target) {
3293
- if (!unMatchHiddenSiderBar) {
3294
- siderBarMenus = (_target === null || _target === void 0 ? void 0 : _target.children) || [];
3295
- }
3296
- } else {
3297
- if (!unMatchHiddenSiderBar) {
3298
- siderBarMenus = menus[0].children || [];
3299
- }
3319
+ if (!unMatchHiddenSiderBar) {
3320
+ siderBarMenus = menus[0].children || [];
3300
3321
  }
3301
- setTopMenuActiveItem(_target);
3302
3322
  }
3303
- }
3304
- if (isIframeMain) {
3305
- var initIframeTabActiveItem = initSyncIframeTabCacheByLocation(treeToArray(siderBarMenus, 'children'), siderbarTargetMenu);
3306
- saveCacheIframeActiveItem(initIframeTabActiveItem);
3323
+ setTopMenuActiveItem(target);
3307
3324
  }
3308
3325
  }
3326
+ if (isIframeMain) {
3327
+ var initIframeTabActiveItem = initSyncIframeTabCacheByLocation(treeToArray(siderBarMenus, 'children'), siderbarTargetMenu);
3328
+ saveCacheIframeActiveItem(initIframeTabActiveItem);
3329
+ }
3330
+ // }
3309
3331
  setSiderBarMenus(siderBarMenus);
3310
3332
  return {
3311
3333
  menus: menus,
3312
3334
  tileMenus: tileMenus
3313
3335
  };
3314
- }, [isIframeMain, options.disableTopbarMenu, hideSidebarMenu, unMatchHiddenSiderBar]),
3336
+ }, [isIframeMain, options.disableTopbarMenu, unMatchHiddenSiderBar]),
3315
3337
  menus = _useMemo.menus,
3316
3338
  tileMenus = _useMemo.tileMenus;
3317
3339
  var _useState15 = useState(getCacheIframeActiveItem()),
@@ -3452,11 +3474,11 @@ var AppProvider = function AppProvider(props) {
3452
3474
  // 每次点击菜单时,都刷新 iframeKey
3453
3475
  iframeTabActiveItemNew.iframeKey = "".concat(Date.now());
3454
3476
  onChangeActiveTabItemRedDot(false, iframeTabActiveItemNew.id);
3455
- var _target2 = _iframeTabListNew.find(function (item) {
3477
+ var _target = _iframeTabListNew.find(function (item) {
3456
3478
  return item.id === iframeTabActiveItemNew.id;
3457
3479
  });
3458
- if (_target2) {
3459
- _target2.iframeKey = iframeTabActiveItemNew.iframeKey;
3480
+ if (_target) {
3481
+ _target.iframeKey = iframeTabActiveItemNew.iframeKey;
3460
3482
  }
3461
3483
  setIframeTabList(_toConsumableArray(_iframeTabListNew));
3462
3484
  setIframeTabActiveItem(iframeTabActiveItemNew);
@@ -3637,20 +3659,21 @@ var AppProvider = function AppProvider(props) {
3637
3659
  }
3638
3660
  };
3639
3661
  var iframeTopRouteMenuChange = function iframeTopRouteMenuChange(item) {
3662
+ var _item$children;
3640
3663
  var leafNode = findFirstLeafNode(item);
3641
3664
  var _addOrUpdateIframeTab5 = addOrUpdateIframeTabListByMenuItem(leafNode, getIframeTabCacheList()),
3642
3665
  iframeTabActiveItem = _addOrUpdateIframeTab5.iframeTabActiveItem,
3643
3666
  iframeTabListNew = _addOrUpdateIframeTab5.iframeTabListNew;
3644
3667
  setIframeTabList(_toConsumableArray(iframeTabListNew));
3645
3668
  setIframeTabActiveItem(iframeTabActiveItem);
3646
- if (leafNode) {
3669
+ if (leafNode && (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) {
3647
3670
  var chainMenuIdList = getTargetMenuParentChain(leafNode.id, menus);
3648
3671
  setSiderBarMenuActiveItem(leafNode);
3649
3672
  setSelectedKeys(chainMenuIdList);
3650
3673
  setOpendKeys(chainMenuIdList);
3651
3674
  }
3652
3675
  setSiderBarMenus(item.children || []);
3653
- setTopMenuActiveItem(item);
3676
+ setTopMenuActiveItem(_objectSpread2({}, item));
3654
3677
  };
3655
3678
 
3656
3679
  /**
@@ -4171,5 +4194,15 @@ var bootstrap = function bootstrap(options) {
4171
4194
  root.render(/*#__PURE__*/jsx(Bootstrap, _objectSpread2({}, options)));
4172
4195
  };
4173
4196
 
4174
- export { Bread, HistoryBackButton, LayoutPage, Page, PageWrapper, ProLayoutModel, bootstrap, message, modal, notification, proLayoutModels, useHistoryBack, useIframe, usePageWrapper, useRefreshRegisterIframeTab, useRegisterRefreshCurrentIframeTab };
4197
+ /**
4198
+ * 获取iframeTab下的唯一值,iframeTab未删除时,唯一值不变,iframeTab删除后再打开,唯一值变化
4199
+ */
4200
+ var getIframeTabUid = function getIframeTabUid(prefix) {
4201
+ var iframe = window.frameElement;
4202
+ // 获取 iframe 的 id 属性
4203
+ var iframeId = iframe === null || iframe === void 0 ? void 0 : iframe.id;
4204
+ return "".concat(prefix, "_").concat(iframeId);
4205
+ };
4206
+
4207
+ export { Bread, HistoryBackButton, LayoutPage, Page, PageWrapper, ProLayoutModel, bootstrap, getIframeTabUid, message, modal, notification, proLayoutModels, useHistoryBack, useIframe, usePageWrapper, useRefreshRegisterIframeTab, useRegisterRefreshCurrentIframeTab };
4175
4208
  //# sourceMappingURL=index.js.map