@flatbiz/pro-layout 5.0.11 → 5.0.13
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 +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +218 -56
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
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}.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}
|
|
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:10}.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;z-index:5}.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
|
@@ -567,6 +567,12 @@ export type BootstrapOptions = {
|
|
|
567
567
|
hideBreadsPathList?: string[];
|
|
568
568
|
/** iframeTab 激活事件 */
|
|
569
569
|
onIframeTabActiveEvent?: (item: TPlainObject) => void;
|
|
570
|
+
/** iframeTab 渲染前处理函数,只有execute返回Promise.resolve()时,才会继续渲染 */
|
|
571
|
+
iframeTabRenderPreHook?: {
|
|
572
|
+
execute: () => Promise<void>;
|
|
573
|
+
/** 执行异常渲染 */
|
|
574
|
+
errorRender?: (data?: TPlainObject) => ReactElement;
|
|
575
|
+
};
|
|
570
576
|
};
|
|
571
577
|
export type LayoutCtxProps = {
|
|
572
578
|
menus: TMenuItem[];
|
|
@@ -647,6 +653,8 @@ export declare const useRegisterRefreshCurrentIframeTab: (refreshKey: string, on
|
|
|
647
653
|
* @returns
|
|
648
654
|
*/
|
|
649
655
|
export declare const useRefreshRegisterIframeTab: () => (refreshKey: string, params?: TPlainObject) => void;
|
|
656
|
+
/** iframe tab 激活回调 */
|
|
657
|
+
export declare const useIframeTabActive: (callback: () => void) => void;
|
|
650
658
|
export type IframeHandler<T = unknown> = (data: T) => void;
|
|
651
659
|
/**
|
|
652
660
|
* iframe通信Demo:https://xx.xx.com/docs/admin/main/exchange
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { pick } from '@dimjs/utils/pick/pick';
|
|
|
13
13
|
import { paramStrToJson } from '@dimjs/utils/uri/param-str-to-json';
|
|
14
14
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
15
15
|
import { isPromise } from '@dimjs/lang/is-promise';
|
|
16
|
-
import { ButtonWrapper, fbaHooks, dialogLoading, ConfigProviderWrapper, SvgHttpView, InputWrapper, IconWrapper, FbaApp } from '@flatbiz/antd';
|
|
16
|
+
import { ButtonWrapper, fbaHooks, dialogLoading, ConfigProviderWrapper, SvgHttpView, InputWrapper, IconWrapper, Gap, FbaApp } from '@flatbiz/antd';
|
|
17
17
|
import { modifyQueryString } from '@dimjs/utils/uri/modify-query-string';
|
|
18
18
|
import { uriParse } from '@dimjs/utils/uri/uri-parse';
|
|
19
19
|
import { isArray } from '@dimjs/lang/is-array';
|
|
@@ -76,20 +76,20 @@ function _classCallCheck(a, n) {
|
|
|
76
76
|
function _defineProperties(e, r) {
|
|
77
77
|
for (var t = 0; t < r.length; t++) {
|
|
78
78
|
var o = r[t];
|
|
79
|
-
o.enumerable = o.enumerable ||
|
|
79
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
function _createClass(e, r, t) {
|
|
83
83
|
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
84
|
-
writable:
|
|
84
|
+
writable: false
|
|
85
85
|
}), e;
|
|
86
86
|
}
|
|
87
87
|
function _defineProperty(e, r, t) {
|
|
88
88
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
89
89
|
value: t,
|
|
90
|
-
enumerable:
|
|
91
|
-
configurable:
|
|
92
|
-
writable:
|
|
90
|
+
enumerable: true,
|
|
91
|
+
configurable: true,
|
|
92
|
+
writable: true
|
|
93
93
|
}) : e[r] = t, e;
|
|
94
94
|
}
|
|
95
95
|
function _getPrototypeOf(t) {
|
|
@@ -102,11 +102,11 @@ function _inherits(t, e) {
|
|
|
102
102
|
t.prototype = Object.create(e && e.prototype, {
|
|
103
103
|
constructor: {
|
|
104
104
|
value: t,
|
|
105
|
-
writable:
|
|
106
|
-
configurable:
|
|
105
|
+
writable: true,
|
|
106
|
+
configurable: true
|
|
107
107
|
}
|
|
108
108
|
}), Object.defineProperty(t, "prototype", {
|
|
109
|
-
writable:
|
|
109
|
+
writable: false
|
|
110
110
|
}), e && _setPrototypeOf(t, e);
|
|
111
111
|
}
|
|
112
112
|
function _isNativeReflectConstruct() {
|
|
@@ -128,15 +128,15 @@ function _iterableToArrayLimit(r, l) {
|
|
|
128
128
|
i,
|
|
129
129
|
u,
|
|
130
130
|
a = [],
|
|
131
|
-
f =
|
|
132
|
-
o =
|
|
131
|
+
f = true,
|
|
132
|
+
o = false;
|
|
133
133
|
try {
|
|
134
134
|
if (i = (t = t.call(r)).next, 0 === l) {
|
|
135
135
|
if (Object(t) !== t) return;
|
|
136
136
|
f = !1;
|
|
137
137
|
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
138
138
|
} catch (r) {
|
|
139
|
-
o =
|
|
139
|
+
o = true, n = r;
|
|
140
140
|
} finally {
|
|
141
141
|
try {
|
|
142
142
|
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
@@ -166,7 +166,7 @@ function ownKeys(e, r) {
|
|
|
166
166
|
function _objectSpread2(e) {
|
|
167
167
|
for (var r = 1; r < arguments.length; r++) {
|
|
168
168
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
169
|
-
r % 2 ? ownKeys(Object(t),
|
|
169
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
170
170
|
_defineProperty(e, r, t[r]);
|
|
171
171
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
172
172
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
@@ -180,8 +180,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
180
180
|
r,
|
|
181
181
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
182
182
|
if (Object.getOwnPropertySymbols) {
|
|
183
|
-
var
|
|
184
|
-
for (r = 0; r <
|
|
183
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
184
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
185
185
|
}
|
|
186
186
|
return i;
|
|
187
187
|
}
|
|
@@ -189,7 +189,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
189
189
|
if (null == r) return {};
|
|
190
190
|
var t = {};
|
|
191
191
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
192
|
-
if (e.
|
|
192
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
193
193
|
t[n] = r[n];
|
|
194
194
|
}
|
|
195
195
|
return t;
|
|
@@ -214,11 +214,11 @@ function _toPrimitive(t, r) {
|
|
|
214
214
|
if ("object" != typeof t || !t) return t;
|
|
215
215
|
var e = t[Symbol.toPrimitive];
|
|
216
216
|
if (void 0 !== e) {
|
|
217
|
-
var i = e.call(t, r
|
|
217
|
+
var i = e.call(t, r);
|
|
218
218
|
if ("object" != typeof i) return i;
|
|
219
219
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
220
220
|
}
|
|
221
|
-
return (
|
|
221
|
+
return (String )(t);
|
|
222
222
|
}
|
|
223
223
|
function _toPropertyKey(t) {
|
|
224
224
|
var i = _toPrimitive(t, "string");
|
|
@@ -256,6 +256,9 @@ var _createCtx3 = createCtx(),
|
|
|
256
256
|
BootstrapCtx = _createCtx4[1];
|
|
257
257
|
|
|
258
258
|
var IFrameEvents = /*#__PURE__*/function (IFrameEvents) {
|
|
259
|
+
/**
|
|
260
|
+
* 接收从子iframe通知过来的消息, 或者父window发出的通知的消息
|
|
261
|
+
*/
|
|
259
262
|
IFrameEvents["messageReceived"] = "messageReceived";
|
|
260
263
|
return IFrameEvents;
|
|
261
264
|
}({});
|
|
@@ -586,7 +589,7 @@ var useRegisterRefreshCurrentIframeTab = function useRegisterRefreshCurrentIfram
|
|
|
586
589
|
if (data.type === '__refresh-iframe-tab') {
|
|
587
590
|
var $Try_1_Post = function () {
|
|
588
591
|
try {
|
|
589
|
-
return $
|
|
592
|
+
return $If_5.call(this);
|
|
590
593
|
} catch ($boundEx) {
|
|
591
594
|
return $error($boundEx);
|
|
592
595
|
}
|
|
@@ -616,7 +619,7 @@ var useRegisterRefreshCurrentIframeTab = function useRegisterRefreshCurrentIfram
|
|
|
616
619
|
refreshFunc.start();
|
|
617
620
|
var $Try_2_Post = function () {
|
|
618
621
|
try {
|
|
619
|
-
return $
|
|
622
|
+
return $If_6.call(this);
|
|
620
623
|
} catch ($boundEx) {
|
|
621
624
|
return $Try_1_Catch($boundEx);
|
|
622
625
|
}
|
|
@@ -629,7 +632,7 @@ var useRegisterRefreshCurrentIframeTab = function useRegisterRefreshCurrentIfram
|
|
|
629
632
|
}
|
|
630
633
|
};
|
|
631
634
|
try {
|
|
632
|
-
return Promise.resolve(onRefresh(data.data.params)).then(function ($
|
|
635
|
+
return Promise.resolve(onRefresh(data.data.params)).then(function ($await_9) {
|
|
633
636
|
try {
|
|
634
637
|
return $Try_2_Finally($Try_2_Post)();
|
|
635
638
|
} catch ($boundEx) {
|
|
@@ -640,18 +643,18 @@ var useRegisterRefreshCurrentIframeTab = function useRegisterRefreshCurrentIfram
|
|
|
640
643
|
$Try_2_Catch($exception_3);
|
|
641
644
|
}
|
|
642
645
|
}
|
|
643
|
-
function $
|
|
646
|
+
function $If_6() {
|
|
644
647
|
return $Try_1_Post();
|
|
645
648
|
}
|
|
646
|
-
return $
|
|
649
|
+
return $If_6.call(this);
|
|
647
650
|
} catch (error) {
|
|
648
651
|
$Try_1_Catch(error);
|
|
649
652
|
}
|
|
650
653
|
}
|
|
651
|
-
function $
|
|
654
|
+
function $If_5() {
|
|
652
655
|
return $return();
|
|
653
656
|
}
|
|
654
|
-
return $
|
|
657
|
+
return $If_5.call(this);
|
|
655
658
|
});
|
|
656
659
|
});
|
|
657
660
|
};
|
|
@@ -677,6 +680,57 @@ var useRefreshRegisterIframeTab = function useRefreshRegisterIframeTab() {
|
|
|
677
680
|
};
|
|
678
681
|
};
|
|
679
682
|
|
|
683
|
+
/** iframe tab 激活回调 */
|
|
684
|
+
var useIframeTabActive = function useIframeTabActive(callback) {
|
|
685
|
+
useEffect(function () {
|
|
686
|
+
callback();
|
|
687
|
+
}, []);
|
|
688
|
+
useIframe(function (data) {
|
|
689
|
+
return new Promise(function ($return, $error) {
|
|
690
|
+
var iframeNodeKey;
|
|
691
|
+
if (data.type === '__iframe-tab-active') {
|
|
692
|
+
var $Try_4_Post = function () {
|
|
693
|
+
try {
|
|
694
|
+
return $If_7.call(this);
|
|
695
|
+
} catch ($boundEx) {
|
|
696
|
+
return $error($boundEx);
|
|
697
|
+
}
|
|
698
|
+
}.bind(this);
|
|
699
|
+
var $Try_4_Catch = function (error) {
|
|
700
|
+
try {
|
|
701
|
+
console.error(error);
|
|
702
|
+
return $Try_4_Post();
|
|
703
|
+
} catch ($boundEx) {
|
|
704
|
+
return $error($boundEx);
|
|
705
|
+
}
|
|
706
|
+
};
|
|
707
|
+
try {
|
|
708
|
+
iframeNodeKey = window['__iframe_node_key'];
|
|
709
|
+
if (data.data.activeKey === iframeNodeKey) {
|
|
710
|
+
return Promise.resolve(callback()).then(function ($await_10) {
|
|
711
|
+
try {
|
|
712
|
+
return $If_8.call(this);
|
|
713
|
+
} catch ($boundEx) {
|
|
714
|
+
return $Try_4_Catch($boundEx);
|
|
715
|
+
}
|
|
716
|
+
}.bind(this), $Try_4_Catch);
|
|
717
|
+
}
|
|
718
|
+
function $If_8() {
|
|
719
|
+
return $Try_4_Post();
|
|
720
|
+
}
|
|
721
|
+
return $If_8.call(this);
|
|
722
|
+
} catch (error) {
|
|
723
|
+
$Try_4_Catch(error);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
function $If_7() {
|
|
727
|
+
return $return();
|
|
728
|
+
}
|
|
729
|
+
return $If_7.call(this);
|
|
730
|
+
});
|
|
731
|
+
});
|
|
732
|
+
};
|
|
733
|
+
|
|
680
734
|
var Bread = function Bread(props) {
|
|
681
735
|
var _ctx$breadcrumbProps;
|
|
682
736
|
var ctx = bootstrapCtx();
|
|
@@ -1155,7 +1209,7 @@ var useHistoryBack = function useHistoryBack(props) {
|
|
|
1155
1209
|
routeBaseName = _getHostUrlAndRouteBa2.routeBaseName;
|
|
1156
1210
|
var routerList = useBread(ctx.breads, routeBaseName);
|
|
1157
1211
|
var path = useMemo(function () {
|
|
1158
|
-
var newLevel = level
|
|
1212
|
+
var newLevel = level;
|
|
1159
1213
|
if (routerList.length >= 2) {
|
|
1160
1214
|
var routerItem = routerList[routerList.length - 1 - Math.abs(newLevel)] || routerList[routerList.length - 2];
|
|
1161
1215
|
if (routerItem) {
|
|
@@ -2541,7 +2595,7 @@ var SiderBarIcon = function SiderBarIcon(props) {
|
|
|
2541
2595
|
});
|
|
2542
2596
|
};
|
|
2543
2597
|
var SiderBar = function SiderBar() {
|
|
2544
|
-
var _layoutCtx$sidebarThe, _layoutCtx$sidebarThe2, _layoutCtx$sidebarThe3, _layoutCtx$sidebarThe4, _layoutCtx$sidebarThe5, _layoutCtx$sidebarThe6, _layoutCtx$sidebarThe7, _layoutCtx$sidebarThe8, _layoutCtx$sidebarThe9, _layoutCtx$
|
|
2598
|
+
var _layoutCtx$sidebarThe, _layoutCtx$sidebarThe2, _layoutCtx$sidebarThe3, _layoutCtx$sidebarThe4, _layoutCtx$sidebarThe5, _layoutCtx$sidebarThe6, _layoutCtx$sidebarThe7, _layoutCtx$sidebarThe8, _layoutCtx$sidebarThe9, _layoutCtx$sidebarThe0, _layoutCtx$sidebarThe1, _layoutCtx$sidebarThe10, _layoutCtx$sidebarThe11, _layoutCtx$sidebarThe12, _layoutCtx$sidebarThe13;
|
|
2545
2599
|
var _useState = useState(),
|
|
2546
2600
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2547
2601
|
searchValue = _useState2[0],
|
|
@@ -2701,12 +2755,12 @@ var SiderBar = function SiderBar() {
|
|
|
2701
2755
|
itemBg: (_layoutCtx$sidebarThe7 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe7 === void 0 ? void 0 : _layoutCtx$sidebarThe7.bgColor,
|
|
2702
2756
|
itemColor: (_layoutCtx$sidebarThe8 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe8 === void 0 ? void 0 : _layoutCtx$sidebarThe8.menuColor,
|
|
2703
2757
|
itemHoverColor: (_layoutCtx$sidebarThe9 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe9 === void 0 ? void 0 : _layoutCtx$sidebarThe9.menuActiveTextColor,
|
|
2704
|
-
itemHoverBg: (_layoutCtx$
|
|
2705
|
-
itemActiveBg: (_layoutCtx$
|
|
2706
|
-
itemSelectedColor: (_layoutCtx$
|
|
2707
|
-
itemSelectedBg: (_layoutCtx$
|
|
2708
|
-
subMenuItemBg: (_layoutCtx$
|
|
2709
|
-
subMenuItemSelectedColor: (_layoutCtx$
|
|
2758
|
+
itemHoverBg: (_layoutCtx$sidebarThe0 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe0 === void 0 ? void 0 : _layoutCtx$sidebarThe0.menuActiveBgColor,
|
|
2759
|
+
itemActiveBg: (_layoutCtx$sidebarThe1 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe1 === void 0 ? void 0 : _layoutCtx$sidebarThe1.menuActiveBgColor,
|
|
2760
|
+
itemSelectedColor: (_layoutCtx$sidebarThe10 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe10 === void 0 ? void 0 : _layoutCtx$sidebarThe10.menuSelectedTextColor,
|
|
2761
|
+
itemSelectedBg: (_layoutCtx$sidebarThe11 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe11 === void 0 ? void 0 : _layoutCtx$sidebarThe11.menuSelectedBgColor,
|
|
2762
|
+
subMenuItemBg: (_layoutCtx$sidebarThe12 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe12 === void 0 ? void 0 : _layoutCtx$sidebarThe12.menuSubMenuBgColor,
|
|
2763
|
+
subMenuItemSelectedColor: (_layoutCtx$sidebarThe13 = layoutCtx.sidebarThemeConfig) === null || _layoutCtx$sidebarThe13 === void 0 ? void 0 : _layoutCtx$sidebarThe13.menuSelectedTextColor
|
|
2710
2764
|
}
|
|
2711
2765
|
}
|
|
2712
2766
|
}
|
|
@@ -2999,6 +3053,7 @@ var PageContent = function PageContent() {
|
|
|
2999
3053
|
try {
|
|
3000
3054
|
if (target.contentWindow) {
|
|
3001
3055
|
target.contentWindow['__iframe_node_key'] = "iframe_".concat(item.id);
|
|
3056
|
+
target.contentWindow['__iframe_node'] = item;
|
|
3002
3057
|
}
|
|
3003
3058
|
} catch (_error) {
|
|
3004
3059
|
// 异常不处理,iframe写入属性可能会存在跨域问题
|
|
@@ -3152,6 +3207,108 @@ var PageLevelContent = function PageLevelContent() {
|
|
|
3152
3207
|
};
|
|
3153
3208
|
var LayoutIFrame = function LayoutIFrame() {
|
|
3154
3209
|
var layoutCtx = useLayoutCtx();
|
|
3210
|
+
var _useState9 = useState('init'),
|
|
3211
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
3212
|
+
renderStatus = _useState0[0],
|
|
3213
|
+
setRenderStatus = _useState0[1];
|
|
3214
|
+
var _useState1 = useState(),
|
|
3215
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
3216
|
+
errorData = _useState10[0],
|
|
3217
|
+
setErrorData = _useState10[1];
|
|
3218
|
+
var iframeTabRenderPreHook = layoutCtx.iframeTabRenderPreHook;
|
|
3219
|
+
fbaHooks.useEffectCustomAsync(function () {
|
|
3220
|
+
return new Promise(function ($return, $error) {
|
|
3221
|
+
var $Try_2_Post = function () {
|
|
3222
|
+
try {
|
|
3223
|
+
return $return();
|
|
3224
|
+
} catch ($boundEx) {
|
|
3225
|
+
return $error($boundEx);
|
|
3226
|
+
}
|
|
3227
|
+
};
|
|
3228
|
+
var $Try_2_Catch = function (error) {
|
|
3229
|
+
try {
|
|
3230
|
+
setRenderStatus('error');
|
|
3231
|
+
setErrorData(error);
|
|
3232
|
+
return $Try_2_Post();
|
|
3233
|
+
} catch ($boundEx) {
|
|
3234
|
+
return $error($boundEx);
|
|
3235
|
+
}
|
|
3236
|
+
};
|
|
3237
|
+
try {
|
|
3238
|
+
if (iframeTabRenderPreHook !== null && iframeTabRenderPreHook !== void 0 && iframeTabRenderPreHook.execute) {
|
|
3239
|
+
return Promise.resolve(iframeTabRenderPreHook === null || iframeTabRenderPreHook === void 0 ? void 0 : iframeTabRenderPreHook.execute()).then(function ($await_4) {
|
|
3240
|
+
try {
|
|
3241
|
+
return $If_3.call(this);
|
|
3242
|
+
} catch ($boundEx) {
|
|
3243
|
+
return $Try_2_Catch($boundEx);
|
|
3244
|
+
}
|
|
3245
|
+
}.bind(this), $Try_2_Catch);
|
|
3246
|
+
}
|
|
3247
|
+
function $If_3() {
|
|
3248
|
+
setRenderStatus('yes');
|
|
3249
|
+
return $Try_2_Post();
|
|
3250
|
+
}
|
|
3251
|
+
return $If_3.call(this);
|
|
3252
|
+
} catch (error) {
|
|
3253
|
+
$Try_2_Catch(error);
|
|
3254
|
+
}
|
|
3255
|
+
});
|
|
3256
|
+
}, []);
|
|
3257
|
+
if (renderStatus === 'init') {
|
|
3258
|
+
return /*#__PURE__*/jsxs("div", {
|
|
3259
|
+
className: "iframe-tab-render-pre-hook",
|
|
3260
|
+
style: {
|
|
3261
|
+
position: 'relative',
|
|
3262
|
+
flex: 1,
|
|
3263
|
+
display: 'flex',
|
|
3264
|
+
flexDirection: 'column'
|
|
3265
|
+
},
|
|
3266
|
+
children: [/*#__PURE__*/jsx(Gap, {
|
|
3267
|
+
height: 38
|
|
3268
|
+
}), /*#__PURE__*/jsx("div", {
|
|
3269
|
+
style: {
|
|
3270
|
+
position: 'relative',
|
|
3271
|
+
flex: 1
|
|
3272
|
+
},
|
|
3273
|
+
children: /*#__PURE__*/jsx(Loader, {
|
|
3274
|
+
spinning: true,
|
|
3275
|
+
style: {
|
|
3276
|
+
backgroundColor: 'var(--bg-color)'
|
|
3277
|
+
}
|
|
3278
|
+
})
|
|
3279
|
+
})]
|
|
3280
|
+
});
|
|
3281
|
+
}
|
|
3282
|
+
if (renderStatus === 'error') {
|
|
3283
|
+
return /*#__PURE__*/jsx("div", {
|
|
3284
|
+
className: "iframe-tab-render-pre-hook",
|
|
3285
|
+
style: {
|
|
3286
|
+
position: 'relative',
|
|
3287
|
+
flex: 1,
|
|
3288
|
+
display: 'flex',
|
|
3289
|
+
flexDirection: 'column',
|
|
3290
|
+
justifyContent: 'center'
|
|
3291
|
+
},
|
|
3292
|
+
children: iframeTabRenderPreHook !== null && iframeTabRenderPreHook !== void 0 && iframeTabRenderPreHook.errorRender ? iframeTabRenderPreHook === null || iframeTabRenderPreHook === void 0 ? void 0 : iframeTabRenderPreHook.errorRender(errorData) : /*#__PURE__*/jsx(Result, {
|
|
3293
|
+
style: {
|
|
3294
|
+
backgroundColor: '#fff',
|
|
3295
|
+
width: 500,
|
|
3296
|
+
margin: '0 auto',
|
|
3297
|
+
borderRadius: 10,
|
|
3298
|
+
boxShadow: '0 0 20px rgba(0, 0, 0, 0.01)',
|
|
3299
|
+
transform: 'translateY(-20%)'
|
|
3300
|
+
},
|
|
3301
|
+
status: "error",
|
|
3302
|
+
title: /*#__PURE__*/jsx("span", {
|
|
3303
|
+
style: {
|
|
3304
|
+
fontSize: 20
|
|
3305
|
+
},
|
|
3306
|
+
children: "\u9875\u9762\u6E32\u67D3\u524D\u7F6E\u5904\u7406\u5931\u8D25"
|
|
3307
|
+
}),
|
|
3308
|
+
subTitle: errorData === null || errorData === void 0 ? void 0 : errorData.message
|
|
3309
|
+
})
|
|
3310
|
+
});
|
|
3311
|
+
}
|
|
3155
3312
|
if (layoutCtx.multiFrameTabs) {
|
|
3156
3313
|
return /*#__PURE__*/jsx(PageContent, {});
|
|
3157
3314
|
}
|
|
@@ -3226,6 +3383,7 @@ var AppProvider = function AppProvider(props) {
|
|
|
3226
3383
|
var isMobile = useMediaQuery({
|
|
3227
3384
|
query: '(max-width: 767px)'
|
|
3228
3385
|
});
|
|
3386
|
+
var iframeApi = useIframe();
|
|
3229
3387
|
var _useState = useState(props.initSidebarShrinkClosed),
|
|
3230
3388
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3231
3389
|
collapsed = _useState2[0],
|
|
@@ -3243,17 +3401,17 @@ var AppProvider = function AppProvider(props) {
|
|
|
3243
3401
|
redDotMap = _useState8[0],
|
|
3244
3402
|
setRedDotMap = _useState8[1];
|
|
3245
3403
|
var _useState9 = useState(),
|
|
3246
|
-
|
|
3247
|
-
siderBarMenuActiveItem =
|
|
3248
|
-
setSiderBarMenuActiveItem =
|
|
3249
|
-
var
|
|
3404
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
3405
|
+
siderBarMenuActiveItem = _useState0[0],
|
|
3406
|
+
setSiderBarMenuActiveItem = _useState0[1];
|
|
3407
|
+
var _useState1 = useState(),
|
|
3408
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
3409
|
+
topMenuActiveItem = _useState10[0],
|
|
3410
|
+
setTopMenuActiveItem = _useState10[1];
|
|
3411
|
+
var _useState11 = useState([]),
|
|
3250
3412
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
var _useState13 = useState([]),
|
|
3254
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
3255
|
-
siderBarMenus = _useState14[0],
|
|
3256
|
-
setSiderBarMenus = _useState14[1];
|
|
3413
|
+
siderBarMenus = _useState12[0],
|
|
3414
|
+
setSiderBarMenus = _useState12[1];
|
|
3257
3415
|
// const initSiderBarMenuActiveItemRef = useRef<TMenuItem>();
|
|
3258
3416
|
|
|
3259
3417
|
hooks.useUpdateEffect(function () {
|
|
@@ -3362,14 +3520,14 @@ var AppProvider = function AppProvider(props) {
|
|
|
3362
3520
|
}, [isIframeMain, options.disableTopbarMenu, unMatchHiddenSiderBar]),
|
|
3363
3521
|
menus = _useMemo.menus,
|
|
3364
3522
|
tileMenus = _useMemo.tileMenus;
|
|
3365
|
-
var
|
|
3523
|
+
var _useState13 = useState(getCacheIframeActiveItem()),
|
|
3524
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
3525
|
+
iframeTabActiveItem = _useState14[0],
|
|
3526
|
+
setIframeTabActiveItem = _useState14[1];
|
|
3527
|
+
var _useState15 = useState(getIframeTabCacheList()),
|
|
3366
3528
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
var _useState17 = useState(getIframeTabCacheList()),
|
|
3370
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
3371
|
-
iframeTabList = _useState18[0],
|
|
3372
|
-
setIframeTabList = _useState18[1];
|
|
3529
|
+
iframeTabList = _useState16[0],
|
|
3530
|
+
setIframeTabList = _useState16[1];
|
|
3373
3531
|
fbaHooks.useEffectCustom(function () {
|
|
3374
3532
|
saveIframeTabToCache(iframeTabList);
|
|
3375
3533
|
}, [iframeTabList]);
|
|
@@ -3379,6 +3537,13 @@ var AppProvider = function AppProvider(props) {
|
|
|
3379
3537
|
document.title = iframeTabActiveItem.metaTitle || iframeTabActiveItem.name;
|
|
3380
3538
|
navigate(iframeTabActiveItem.pathSearch);
|
|
3381
3539
|
onIframeTabActiveEvent === null || onIframeTabActiveEvent === void 0 || onIframeTabActiveEvent(iframeTabActiveItem);
|
|
3540
|
+
iframeApi.broadcastMessages({
|
|
3541
|
+
type: '__iframe-tab-active',
|
|
3542
|
+
data: {
|
|
3543
|
+
activeKey: "iframe_".concat(iframeTabActiveItem.id),
|
|
3544
|
+
iframeTabItem: iframeTabActiveItem
|
|
3545
|
+
}
|
|
3546
|
+
});
|
|
3382
3547
|
}
|
|
3383
3548
|
}, [iframeTabActiveItem === null || iframeTabActiveItem === void 0 ? void 0 : iframeTabActiveItem.id]);
|
|
3384
3549
|
var onChangeCollapsed = function onChangeCollapsed(boo) {
|
|
@@ -3592,8 +3757,7 @@ var AppProvider = function AppProvider(props) {
|
|
|
3592
3757
|
var onIframeChangeByHttpUrl = function onIframeChangeByHttpUrl(url, data) {
|
|
3593
3758
|
var prevIframeTabActiveItem = cloneObject(iframeTabActiveItem);
|
|
3594
3759
|
var cahceTabList = getIframeTabCacheList();
|
|
3595
|
-
|
|
3596
|
-
pathSearch = _parseIframeTabItemUr.pathSearch;
|
|
3760
|
+
parseIframeTabItemUrlInfo(url);
|
|
3597
3761
|
var iframeTablink = guessIframeTabItemLink(url);
|
|
3598
3762
|
var siderbarTargetMenu = parseSiderTargetMenuByPath(tileMenus, url);
|
|
3599
3763
|
if (siderbarTargetMenu) {
|
|
@@ -3645,9 +3809,7 @@ var AppProvider = function AppProvider(props) {
|
|
|
3645
3809
|
var _addIframeTabListByMe = addIframeTabListByMenuItem(cahceTabList, {
|
|
3646
3810
|
link: iframeTablink,
|
|
3647
3811
|
name: getIframeTabName(iframeTablink, (data === null || data === void 0 ? void 0 : data.name) || '未知页面'),
|
|
3648
|
-
metaTitle: options === null || options === void 0 ? void 0 : options.metaTitle,
|
|
3649
|
-
pathSearch: pathSearch
|
|
3650
|
-
}),
|
|
3812
|
+
metaTitle: options === null || options === void 0 ? void 0 : options.metaTitle}),
|
|
3651
3813
|
_iframeTabListNew2 = _addIframeTabListByMe.iframeTabListNew,
|
|
3652
3814
|
_iframeTabActiveItem3 = _addIframeTabListByMe.iframeTabActiveItem;
|
|
3653
3815
|
setIframeTabList(_toConsumableArray(_iframeTabListNew2));
|
|
@@ -4231,5 +4393,5 @@ var getIframeTabUid = function getIframeTabUid(prefix) {
|
|
|
4231
4393
|
return "".concat(prefix, "_").concat(iframeId);
|
|
4232
4394
|
};
|
|
4233
4395
|
|
|
4234
|
-
export { Bread, HistoryBackButton, LayoutPage, Page, PageWrapper, ProLayoutModel, bootstrap, getIframeTabUid, message, modal, notification, proLayoutModels, useHistoryBack, useIframe, usePageWrapper, useRefreshRegisterIframeTab, useRegisterRefreshCurrentIframeTab };
|
|
4396
|
+
export { Bread, HistoryBackButton, LayoutPage, Page, PageWrapper, ProLayoutModel, bootstrap, getIframeTabUid, message, modal, notification, proLayoutModels, useHistoryBack, useIframe, useIframeTabActive, usePageWrapper, useRefreshRegisterIframeTab, useRegisterRefreshCurrentIframeTab };
|
|
4235
4397
|
//# sourceMappingURL=index.js.map
|