@gingkoo/pandora-explorer 0.0.1-alpha.23 → 0.0.1-alpha.25

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/lib/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @gingkoo/pandora-explorer v0.0.1-alpha.23
2
+ * @gingkoo/pandora-explorer v0.0.1-alpha.25
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import cx$1 from 'classnames';
@@ -877,6 +877,17 @@ function SuffixIcon({
877
877
  })
878
878
  });
879
879
  }
880
+ function UploadSvg() {
881
+ return jsx("svg", {
882
+ className: 'icon',
883
+ viewBox: '0 0 1024 1024',
884
+ version: '1.1',
885
+ xmlns: 'http://www.w3.org/2000/svg',
886
+ children: jsx("path", {
887
+ d: 'M768 640v128H256V640h-85.333v128c0 46.933 38.4 85.333 85.333 85.333h512c46.933 0 85.333-38.4 85.333-85.333V640H768zM298.667 384l60.16 60.16 110.506-110.08v348.587h85.334V334.08l110.506 110.08 60.16-60.16L512 170.667 298.667 384z'
888
+ })
889
+ });
890
+ }
880
891
 
881
892
  var css_248z$b = ".app-wrapper {\n height: 100%;\n}\n.frame-explorer-main {\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.frame-left {\n position: relative;\n border-right: 1px solid rgba(100, 100, 100, 0.1);\n height: 100%;\n}\n.frame-left::after {\n position: absolute;\n content: ' ';\n top: 50%;\n right: 1px;\n width: 1px;\n height: 18px;\n margin-left: -1px;\n margin-top: -9px;\n border: 1px solid #ddd;\n border-top: none;\n border-bottom: none;\n backdrop-filter: none;\n border-radius: 0;\n background: transparent;\n box-sizing: content-box;\n -webkit-backdrop-filter: blur(10px);\n z-index: 2;\n}\n.frame-right {\n border-right: 1px solid #f5f5f5;\n height: 100%;\n}\n.frame-right .frame-header {\n width: 100%;\n height: 85px;\n min-width: 400px;\n position: relative;\n background: #fff;\n}\n.frame-right .frame-main {\n position: relative;\n height: 100%;\n}\n.box {\n display: flex;\n}\n.box .item {\n position: relative;\n width: 100px;\n height: 100px;\n background: red;\n margin-left: 20px;\n transition: 0.3s;\n top: 0;\n left: 0;\n}\n.explorer-label-icon {\n display: inline-block;\n position: relative;\n box-sizing: border-box !important;\n}\n.explorer-label-icon > div {\n position: relative;\n width: 100%;\n height: 100%;\n border-radius: 50% !important;\n}\n.explorer-label-icon > div::after {\n width: 40%;\n height: 40%;\n border-radius: 50%;\n content: ' ';\n background: linear-gradient(45deg, #ffffff7d, #ffffff00);\n margin-top: 4px;\n position: absolute;\n right: 15%;\n top: 15%;\n}\n";
882
893
  styleInject(css_248z$b);
@@ -1910,7 +1921,7 @@ function Slider(props) {
1910
1921
  var css_248z$7 = ".explorer-menu {\n height: 100%;\n}\n";
1911
1922
  styleInject(css_248z$7);
1912
1923
 
1913
- var css_248z$6 = ".explorer-tree {\n width: 100%;\n height: 100%;\n}\n.explorer-tree-switch {\n height: 31px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n vertical-align: top !important;\n color: #aaa;\n border-radius: 2px;\n}\n.explorer-tree-switch:hover {\n color: #1890ff;\n background-color: rgba(0, 0, 0, 0.03);\n}\n.explorer-tree-switch.open {\n color: #1890ff;\n}\n.explorer-tree-switch.open > svg {\n transform: rotate(90deg);\n}\n.explorer-tree-switch.loading {\n background: transparent;\n animation: rotate 1s linear infinite;\n}\n.explorer-tree-icon {\n display: inline-block;\n width: 20px;\n height: 20px;\n margin: 6px 0px;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n border-radius: 5px;\n font-style: normal;\n pointer-events: none;\n vertical-align: top;\n}\n.explorer-tree-node {\n display: flex;\n height: 100%;\n align-items: center;\n}\n.explorer-tree-node .node-title {\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-tree-node .node-menu {\n display: none;\n flex-shrink: 0;\n width: 30px;\n justify-content: center;\n align-items: center;\n}\n.explorer-tree-node .node-menu .node-menu-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 14px;\n height: 14px;\n border: 1px solid #ccc;\n border-radius: 2px;\n cursor: pointer;\n z-index: 50;\n background: #fff;\n color: #ccc;\n font-size: 7px;\n transition: 0.3s;\n}\n.explorer-tree-node .node-menu .node-menu-icon > svg {\n transform: rotate(90deg);\n}\n.explorer-tree-node .node-menu .node-menu-icon:hover {\n border: 1px solid #1890ff;\n color: #1890ff;\n}\n.explorer-tree-node .node-input {\n display: inline-block;\n width: 100%;\n height: 24px;\n outline: 0;\n border: 1px solid #eee;\n border-radius: 3px;\n transition: 0.3s;\n padding: 0 5px;\n}\n.explorer-tree-node .node-input:hover {\n border: 1px solid #1890ff;\n}\n.explorer-tree-node .node-input:focus {\n border: 1px solid #1890ff;\n}\n.explorer-tree-node:hover .node-menu {\n display: flex;\n}\n.explorer-tree-row {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n.explorer-tree-row .row-item {\n display: flex;\n padding: 0 10px;\n flex: 1 0 0;\n user-select: none;\n}\n.explorer-tree-row .row-item .row-item-content {\n flex: 1 0 0;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-tree-row .row-item .row-item-content > input {\n height: 24px;\n outline: none;\n width: 100%;\n outline: 0;\n border: 0;\n}\n.explorer-tree-row .row-item-check {\n display: flex;\n width: 19px;\n align-items: center;\n box-sizing: border-box;\n pointer-events: all;\n}\n.explorer-tree-row .row-item-check .btn-check {\n display: inline-block;\n height: 19px;\n width: 19px;\n flex-shrink: 0;\n z-index: 11;\n font-size: 20px;\n text-align: center;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.05);\n color: #fff;\n line-height: 0;\n opacity: 0;\n cursor: pointer;\n transition: opacity 0.3s;\n margin: 2px;\n}\n.explorer-tree-row .row-item-check .btn-check > svg {\n position: relative;\n width: 23px;\n height: 23px;\n left: -2px;\n top: -2px;\n}\n.explorer-tree-row .row-item-check.active .btn-check {\n opacity: 1;\n background: #3b8cff;\n}\n.explorer-tree.table .tree-scroll-x {\n width: 100%;\n overflow: hidden;\n overflow-x: auto;\n}\n.explorer-tree.table .tree-scroll-x::-webkit-scrollbar {\n display: none;\n}\n.explorer-tree.table .tree-scroll {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 10;\n overflow: auto;\n}\n.explorer-tree.table .rc-tree {\n height: calc(100% - 26px);\n}\n.explorer-tree.table .rc-tree-list-holder-inner {\n overflow: auto;\n}\n.explorer-tree.table .rc-tree-list {\n height: 100%;\n}\n.explorer-tree.table .rc-tree-checkbox {\n display: none !important;\n}\n.explorer-tree.table .rc-tree-treenode {\n border-radius: 2px;\n width: fit-content;\n opacity: 0.8;\n z-index: 100;\n pointer-events: all;\n}\n.explorer-tree.table .rc-tree-treenode:nth-child(odd) {\n background: #4664780d;\n}\n.explorer-tree.table .rc-tree-list-holder-inner {\n padding: 8px 0 0 8px;\n}\n.explorer-tree.table .rc-tree-treenode-leaf-last:last-child {\n height: 200px;\n width: 1px;\n}\n.explorer-tree.table .rc-tree-treenode-checkbox-checked {\n background: #cce8ff !important;\n border: 1px solid #99d1ff;\n}\n.explorer-tree .rc-tree-iconEle {\n height: 31px !important;\n vertical-align: top !important;\n width: auto !important;\n}\n.explorer-tree .rc-tree-treenode {\n position: relative;\n height: 31px;\n line-height: 31px;\n border: 1px solid transparent;\n display: flex;\n}\n.explorer-tree .rc-tree-treenode > .rc-tree-node-content-wrapper {\n height: 31px !important;\n display: flex !important;\n flex: 1;\n margin-left: calc(24px - 20px);\n}\n.explorer-tree .rc-tree-treenode > .rc-tree-node-selected {\n background-color: transparent;\n box-shadow: none;\n opacity: 1;\n}\n.explorer-tree .rc-tree-treenode.rc-tree-treenode-selected {\n background-color: #cce8ff !important;\n border: 1px solid #1890ff;\n opacity: 0.8;\n}\n.explorer-tree .rc-tree-treenode.rc-tree-treenode-selected .node-menu {\n display: flex;\n}\n.explorer-tree .rc-tree-treenode:hover {\n background: #e5f3ff !important;\n box-shadow: 0 0 0 1px transparent;\n}\n.explorer-tree .rc-tree-switcher {\n flex-shrink: 0;\n width: 20px !important;\n height: 31px !important;\n vertical-align: top !important;\n background-image: none !important;\n}\n.explorer-tree .rc-tree-title {\n display: inline-block;\n height: 31px;\n width: 100%;\n}\n.explorer-tree.showLine .rc-tree-indent {\n height: 31px;\n}\n.explorer-tree.showLine .rc-tree-indent > .rc-tree-indent-unit {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-indent > .rc-tree-indent-unit::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n height: 31px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-indent-unit {\n width: 20px;\n height: 31px;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child::before {\n content: '';\n display: inline-block;\n position: absolute;\n width: 8px;\n top: calc(31px / 2);\n left: 10px;\n height: 1px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n top: 0;\n height: calc(31px / 2);\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child::before {\n display: none;\n content: '';\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n height: 31px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.explorer-checks .rc-tree-treenode:hover .row-item-check .btn-check {\n opacity: 1;\n}\n.explorer-tree .rc-tree-list-scrollbar-thumb {\n background: #bbb !important;\n}\n.explorer-tree .rc-tree-list-scrollbar {\n width: 5px !important;\n}\n.explorer-tree .node-motion {\n transition: all 0.3s;\n overflow-y: hidden;\n}\n.explorer-tree .rc-tree-child-tree {\n display: block;\n}\n.explorer-table-header {\n display: flex;\n width: fit-content;\n min-width: 100%;\n height: 25px;\n line-height: 25px;\n color: #448;\n border-bottom: 1px solid #e3e3e3;\n box-shadow: 0 6px 10px rgba(0, 0, 0, 0.05);\n background: #fff;\n}\n.explorer-table-header .item {\n padding: 0 10px 0 0;\n flex: 1 0 0;\n margin-left: -10px;\n border-right: 1px solid #eee;\n user-select: none;\n min-width: 80px;\n}\n.explorer-table-header .item:first-child {\n padding-left: 20px;\n}\n.explorer-table-header .resize {\n position: relative;\n flex: 0 0 20px;\n width: 20px;\n z-index: 10;\n cursor: col-resize;\n left: -10px;\n transition: background 0.2s;\n}\n.explorer-table-header .resize::before {\n content: '';\n position: fixed;\n width: 1px;\n height: 2000px;\n z-index: 10;\n margin-left: 10px;\n visibility: hidden;\n opacity: 0;\n transition: all 0.2s;\n}\n.explorer-table-header .resize:hover {\n background: #1890ff30;\n}\n.explorer-table-header .resize.resize-focus {\n z-index: 9999;\n}\n.explorer-table-header .resize.resize-focus:before {\n opacity: 1;\n background: #1890ff;\n visibility: visible;\n}\n.explorer-table-header .resize:last-child {\n flex: 0 0 10px;\n width: 10px;\n}\n.explorer-table-header.item-resize {\n z-index: 10;\n}\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
1924
+ var css_248z$6 = ".explorer-tree {\n width: 100%;\n height: 100%;\n}\n.explorer-tree-switch {\n height: 31px;\n width: 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n vertical-align: top !important;\n color: #aaa;\n border-radius: 2px;\n}\n.explorer-tree-switch:hover {\n color: #1890ff;\n background-color: rgba(0, 0, 0, 0.03);\n}\n.explorer-tree-switch.open {\n color: #1890ff;\n}\n.explorer-tree-switch.open > svg {\n transform: rotate(90deg);\n}\n.explorer-tree-switch.loading {\n background: transparent;\n animation: rotate 1s linear infinite;\n}\n.explorer-tree-icon {\n display: inline-block;\n width: 20px;\n height: 20px;\n margin: 6px 0px;\n background-repeat: no-repeat;\n background-position: center;\n background-size: cover;\n border-radius: 5px;\n font-style: normal;\n pointer-events: none;\n vertical-align: top;\n}\n.explorer-tree-node {\n display: flex;\n height: 100%;\n align-items: center;\n}\n.explorer-tree-node .node-title {\n flex: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-tree-node .node-menu {\n display: none;\n flex-shrink: 0;\n width: 30px;\n justify-content: center;\n align-items: center;\n}\n.explorer-tree-node .node-menu .node-menu-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 14px;\n height: 14px;\n border: 1px solid #ccc;\n border-radius: 2px;\n cursor: pointer;\n z-index: 50;\n background: #fff;\n color: #ccc;\n font-size: 7px;\n transition: 0.3s;\n}\n.explorer-tree-node .node-menu .node-menu-icon > svg {\n transform: rotate(90deg);\n}\n.explorer-tree-node .node-menu .node-menu-icon:hover {\n border: 1px solid #1890ff;\n color: #1890ff;\n}\n.explorer-tree-node .node-input {\n display: inline-block;\n width: 100%;\n height: 24px;\n outline: 0;\n border: 1px solid #eee;\n border-radius: 3px;\n transition: 0.3s;\n padding: 0 5px;\n}\n.explorer-tree-node .node-input:hover {\n border: 1px solid #1890ff;\n}\n.explorer-tree-node .node-input:focus {\n border: 1px solid #1890ff;\n}\n.explorer-tree-node:hover .node-menu {\n display: flex;\n}\n.explorer-tree-row {\n display: flex;\n width: 100%;\n height: 100%;\n align-items: center;\n}\n.explorer-tree-row .row-item {\n display: flex;\n padding: 0 10px;\n flex: 1 0 0;\n user-select: none;\n}\n.explorer-tree-row .row-item .row-item-content {\n flex: 1 0 0;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.explorer-tree-row .row-item .row-item-content > input {\n height: 24px;\n outline: none;\n width: 100%;\n outline: 0;\n border: 0;\n}\n.explorer-tree-row .row-item-check {\n display: flex;\n width: 19px;\n align-items: center;\n box-sizing: border-box;\n pointer-events: all;\n}\n.explorer-tree-row .row-item-check .btn-check {\n display: inline-block;\n height: 19px;\n width: 19px;\n flex-shrink: 0;\n z-index: 11;\n font-size: 20px;\n text-align: center;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.05);\n color: #fff;\n line-height: 0;\n opacity: 0;\n cursor: pointer;\n transition: opacity 0.3s;\n margin: 2px;\n}\n.explorer-tree-row .row-item-check .btn-check > svg {\n position: relative;\n width: 23px;\n height: 23px;\n left: -2px;\n top: -2px;\n}\n.explorer-tree-row .row-item-check.active .btn-check {\n opacity: 1;\n background: #3b8cff;\n}\n.explorer-tree.table .tree-scroll-x {\n width: 100%;\n overflow: hidden;\n overflow-x: auto;\n}\n.explorer-tree.table .tree-scroll-x::-webkit-scrollbar {\n display: none;\n}\n.explorer-tree.table .tree-scroll {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: 10;\n overflow: auto;\n}\n.explorer-tree.table .rc-tree {\n height: calc(100% - 26px);\n}\n.explorer-tree.table .rc-tree-list-holder-inner {\n overflow: auto;\n}\n.explorer-tree.table .rc-tree-list {\n height: 100%;\n}\n.explorer-tree.table .rc-tree-checkbox {\n display: none !important;\n}\n.explorer-tree.table .rc-tree-treenode {\n border-radius: 2px;\n width: fit-content;\n opacity: 0.8;\n z-index: 100;\n pointer-events: all;\n}\n.explorer-tree.table .rc-tree-treenode:nth-child(odd) {\n background: #4664780d;\n}\n.explorer-tree.table .rc-tree-list-holder-inner {\n padding: 8px 0 0 8px;\n}\n.explorer-tree.table .rc-tree-treenode-leaf-last:last-child {\n height: 200px;\n width: 1px;\n}\n.explorer-tree.table .rc-tree-treenode-checkbox-checked {\n background: #cce8ff !important;\n border: 1px solid #99d1ff;\n}\n.explorer-tree .rc-tree-iconEle {\n height: 31px !important;\n vertical-align: top !important;\n width: auto !important;\n}\n.explorer-tree .rc-tree-treenode {\n position: relative;\n height: 31px;\n line-height: 31px;\n border: 1px solid transparent;\n display: flex;\n}\n.explorer-tree .rc-tree-treenode > .rc-tree-node-content-wrapper {\n height: 31px !important;\n display: flex !important;\n flex: 1;\n margin-left: calc(24px - 20px);\n}\n.explorer-tree .rc-tree-treenode > .rc-tree-node-selected {\n background-color: transparent;\n box-shadow: none;\n opacity: 1;\n}\n.explorer-tree .rc-tree-treenode.rc-tree-treenode-selected {\n background-color: #cce8ff !important;\n border: 1px solid #1890ff;\n opacity: 0.8;\n}\n.explorer-tree .rc-tree-treenode.rc-tree-treenode-selected .node-menu {\n display: flex;\n}\n.explorer-tree .rc-tree-treenode:hover {\n background: #e5f3ff !important;\n box-shadow: 0 0 0 1px transparent;\n}\n.explorer-tree .rc-tree-treenode.hover {\n background: #e5f3ff !important;\n}\n.explorer-tree .rc-tree-switcher {\n flex-shrink: 0;\n width: 20px !important;\n height: 31px !important;\n vertical-align: top !important;\n background-image: none !important;\n}\n.explorer-tree .rc-tree-title {\n display: inline-block;\n height: 31px;\n width: 100%;\n}\n.explorer-tree.showLine .rc-tree-indent {\n height: 31px;\n}\n.explorer-tree.showLine .rc-tree-indent > .rc-tree-indent-unit {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-indent > .rc-tree-indent-unit::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n height: 31px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-indent-unit {\n width: 20px;\n height: 31px;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child::before {\n content: '';\n display: inline-block;\n position: absolute;\n width: 8px;\n top: calc(31px / 2);\n left: 10px;\n height: 1px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:last-child::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n top: 0;\n height: calc(31px / 2);\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child {\n position: relative;\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child::before {\n display: none;\n content: '';\n}\n.explorer-tree.showLine .rc-tree-treenode-leaf-last .rc-tree-indent > .rc-tree-indent-unit:first-child::after {\n display: inline-block;\n position: absolute;\n content: '';\n width: 1px;\n left: 10px;\n height: 31px;\n background-color: rgba(0, 0, 0, 0.075);\n}\n.explorer-tree.explorer-checks .rc-tree-treenode:hover .row-item-check .btn-check {\n opacity: 1;\n}\n.explorer-tree .rc-tree-list-scrollbar-thumb {\n background: #bbb !important;\n}\n.explorer-tree .rc-tree-list-scrollbar {\n width: 5px !important;\n}\n.explorer-tree .node-motion {\n transition: all 0.3s;\n overflow-y: hidden;\n}\n.explorer-tree .rc-tree-child-tree {\n display: block;\n}\n.explorer-table-header {\n display: flex;\n width: fit-content;\n min-width: 100%;\n height: 25px;\n line-height: 25px;\n color: #448;\n border-bottom: 1px solid #e3e3e3;\n box-shadow: 0 6px 10px rgba(0, 0, 0, 0.05);\n background: #fff;\n}\n.explorer-table-header .item {\n padding: 0 10px 0 0;\n flex: 1 0 0;\n margin-left: -10px;\n border-right: 1px solid #eee;\n user-select: none;\n min-width: 80px;\n}\n.explorer-table-header .item:first-child {\n padding-left: 20px;\n}\n.explorer-table-header .resize {\n position: relative;\n flex: 0 0 20px;\n width: 20px;\n z-index: 10;\n cursor: col-resize;\n left: -10px;\n transition: background 0.2s;\n}\n.explorer-table-header .resize::before {\n content: '';\n position: fixed;\n width: 1px;\n height: 2000px;\n z-index: 10;\n margin-left: 10px;\n visibility: hidden;\n opacity: 0;\n transition: all 0.2s;\n}\n.explorer-table-header .resize:hover {\n background: #1890ff30;\n}\n.explorer-table-header .resize.resize-focus {\n z-index: 9999;\n}\n.explorer-table-header .resize.resize-focus:before {\n opacity: 1;\n background: #1890ff;\n visibility: visible;\n}\n.explorer-table-header .resize:last-child {\n flex: 0 0 10px;\n width: 10px;\n}\n.explorer-table-header.item-resize {\n z-index: 10;\n}\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
1914
1925
  styleInject(css_248z$6);
1915
1926
 
1916
1927
  /**
@@ -5373,6 +5384,30 @@ function NotData() {
5373
5384
  });
5374
5385
  }
5375
5386
 
5387
+ //添加层级
5388
+ const addLevel = (data, levelIndex = 0, filedata) => {
5389
+ let arr = data;
5390
+ if (filedata) {
5391
+ arr = arr.filter(v => filedata?.(v));
5392
+ }
5393
+ let i = 0;
5394
+ while (i < arr.length) {
5395
+ let item = arr[i];
5396
+ item['level'] = levelIndex;
5397
+ if (!item?.api && !item?.children) {
5398
+ item['isLeaf'] = true;
5399
+ }
5400
+ if (Array.isArray(item.children) && item.children.length > 0) {
5401
+ if (filedata) {
5402
+ item.children = addLevel(item.children, levelIndex + 1, filedata);
5403
+ } else {
5404
+ addLevel(item.children, levelIndex + 1, filedata);
5405
+ }
5406
+ }
5407
+ i++;
5408
+ }
5409
+ return arr;
5410
+ };
5376
5411
  //下拉动画
5377
5412
  const motion = {
5378
5413
  motionName: 'node-motion',
@@ -5436,11 +5471,11 @@ var Tree = (props => {
5436
5471
  }, 0);
5437
5472
  return size > w ? size : Math.ceil(w);
5438
5473
  }, [width, _widht]);
5439
- // useEffect(() => {
5440
- // let arr = cloneDeep(treeData);
5441
- // arr = addLevel(arr, 0, filterData);
5442
- // setData(arr);
5443
- // }, [treeData, type, filterData]);
5474
+ useEffect(() => {
5475
+ let arr = cloneDeep(treeData);
5476
+ arr = addLevel(arr, 0, filterData);
5477
+ setData(arr);
5478
+ }, [treeData, type, filterData]);
5444
5479
  useEffect(() => {
5445
5480
  if (!Array.isArray(columns)) return;
5446
5481
  if (!ref.current) return;
@@ -5814,13 +5849,14 @@ const ExplorerMenu = props => {
5814
5849
  } = props;
5815
5850
  const store = useContext(ExampleContext);
5816
5851
  const [eventKey, setEventKey] = useState([]);
5817
- if (!store) return;
5852
+ const [loadKey, setLoadKey] = useState([]);
5818
5853
  return jsx("div", {
5819
5854
  className: 'frame-left',
5820
5855
  children: jsx(Tree, {
5821
5856
  isload: true,
5822
5857
  treeData: data,
5823
5858
  height: height,
5859
+ loadedKeys: loadKey,
5824
5860
  expandedKeys: eventKey,
5825
5861
  icon: (v, className) => {
5826
5862
  if (v.icon == false) return jsx(Fragment, {});
@@ -5831,17 +5867,16 @@ const ExplorerMenu = props => {
5831
5867
  onChange: onChange,
5832
5868
  onSelect: v => {
5833
5869
  store.setPathDisplay(v?.pathDisplay);
5834
- if (Array.isArray(v?.children)) {
5835
- store.setCurInfo(v);
5836
- store.setCurList(v?.children || []);
5837
- } else {
5838
- loadData(v.key);
5839
- }
5870
+ loadData(v.key);
5840
5871
  },
5841
5872
  filterData: v => {
5842
5873
  if (v.type == 'file') return false;
5843
5874
  return true;
5844
5875
  },
5876
+ onLoad: key => {
5877
+ setLoadKey(key);
5878
+ },
5879
+ setLoadKey: setLoadKey,
5845
5880
  onExpand: v => {
5846
5881
  setEventKey(v);
5847
5882
  }
@@ -6069,6 +6104,9 @@ function Tile(props) {
6069
6104
  });
6070
6105
  }
6071
6106
 
6107
+ var css_248z$2 = ".explorer-drop-tip {\n position: absolute;\n display: inline-block;\n padding: 3px 5px;\n background: #00000044;\n color: #fff;\n border-radius: 3px;\n white-space: nowrap;\n}\n.explorer-drop-tip.select {\n background: #1677ff;\n}\n.explorer-drop-tip .drop-tip-content {\n font-size: 14px;\n margin-right: 5px;\n}\n.explorer-drop-tip .drop-tip-content .content-icon {\n display: inline-block;\n height: 20px;\n width: 20px;\n border-radius: 50%;\n background: #52c41a;\n color: #fff;\n text-align: center;\n line-height: 20px;\n margin-right: 5px;\n}\n.explorer-drop-tip .drop-tip-title {\n font-size: 14px;\n display: inline-block;\n padding: 2px;\n background: rgba(0, 0, 0, 0.2);\n font-weight: 500;\n padding: 3px 5px;\n line-height: 1;\n border-right: 4px;\n}\n.file-select-box {\n width: 100%;\n border: 2px solid transparent;\n}\n";
6108
+ styleInject(css_248z$2);
6109
+
6072
6110
  var time = null;
6073
6111
  const SelectBox = props => {
6074
6112
  let {
@@ -6077,12 +6115,14 @@ const SelectBox = props => {
6077
6115
  dataClass,
6078
6116
  selectClass = '',
6079
6117
  regionClass,
6118
+ getContainer = '',
6080
6119
  isDrag = true,
6081
6120
  isSelectBoxes = true,
6082
6121
  checkType = '',
6083
6122
  checkMode,
6084
6123
  action = 'stack',
6085
- onChange
6124
+ onChange,
6125
+ onUpload
6086
6126
  } = props;
6087
6127
  const selectionRef = useRef(null);
6088
6128
  const clickRef = useRef(true);
@@ -6096,8 +6136,12 @@ const SelectBox = props => {
6096
6136
  const box = useRef(null);
6097
6137
  //当前
6098
6138
  const cur = useRef([]);
6139
+ //文案
6140
+ const text = useRef(null);
6099
6141
  //判断单机还双击
6100
6142
  const isDclick = useRef(null);
6143
+ const store = useContext(ExampleContext);
6144
+ const [isDragfile, setIsDragFile] = useState(false);
6101
6145
  const [selects, setSelect] = useState([]);
6102
6146
  const [stageClickInfo, setStageClickInfo] = useState({
6103
6147
  show: false
@@ -6105,6 +6149,29 @@ const SelectBox = props => {
6105
6149
  useEffect(() => {
6106
6150
  setSelect(checks);
6107
6151
  }, [checks]);
6152
+ useEffect(() => {
6153
+ if (isDragfile) {
6154
+ createText();
6155
+ } else {
6156
+ box.current?.remove();
6157
+ text.current = null;
6158
+ box.current = null;
6159
+ }
6160
+ }, [isDragfile]);
6161
+ useEffect(() => {
6162
+ // 在这里执行需要操作 DOM 的代码
6163
+ document.querySelector(getContainer)?.addEventListener('dragenter', bodyDragEnter);
6164
+ document.addEventListener('dragover', handleDragOver, false);
6165
+ document.addEventListener('dragleave', handleDragLeave, false);
6166
+ document?.addEventListener('dragenter', handleDragEnter);
6167
+ document?.addEventListener('drop', handleDrop);
6168
+ return () => {
6169
+ document.removeEventListener('dragenter', bodyDragEnter);
6170
+ document.removeEventListener('dragover', handleDragOver);
6171
+ document.removeEventListener('dragleave', handleDragLeave);
6172
+ document?.addEventListener('drop', handleDrop);
6173
+ };
6174
+ }, []);
6108
6175
  useEffect(() => {
6109
6176
  document.addEventListener('mousemove', handleBodyMousemove);
6110
6177
  document.addEventListener('mouseup', handleBodyMouseup);
@@ -6114,22 +6181,32 @@ const SelectBox = props => {
6114
6181
  };
6115
6182
  }, [stageClickInfo, checkMode]);
6116
6183
  //判断鼠标点击位置 是否为目标区域
6117
- function isSelectTarget(e) {
6184
+ function isSelectTarget(e, checkType, status) {
6118
6185
  let idx = [];
6119
6186
  Array.from(document.querySelectorAll(selectClass)).filter(v => {
6120
6187
  if (v.contains(e.target)) {
6121
6188
  let dataDom = v;
6122
6189
  if (dataClass) {
6123
6190
  dataDom = v.querySelector(dataClass);
6124
- let id = dataDom.getAttribute('data-id');
6191
+ let id = dataDom?.getAttribute('data-id');
6125
6192
  if (checkType) {
6126
- let type = dataDom.getAttribute('data-type');
6193
+ let type = dataDom?.getAttribute('data-type');
6127
6194
  if (type !== checkType) return;
6195
+ if (status == 'select') {
6196
+ v.classList.add('hover');
6197
+ }
6128
6198
  }
6129
6199
  if (id) {
6130
6200
  idx.push(id);
6131
6201
  }
6132
6202
  }
6203
+ } else {
6204
+ if (status == 'select') {
6205
+ v.classList.remove('hover');
6206
+ }
6207
+ }
6208
+ if (status == 'remove') {
6209
+ v.classList.remove('hover');
6133
6210
  }
6134
6211
  });
6135
6212
  if (idx.length) {
@@ -6195,6 +6272,111 @@ const SelectBox = props => {
6195
6272
  }, 300);
6196
6273
  }
6197
6274
  }
6275
+ //拖动时
6276
+ const handleDragOver = e => {
6277
+ e.preventDefault();
6278
+ const {
6279
+ clientX: x,
6280
+ clientY: y
6281
+ } = e;
6282
+ if (text.current) {
6283
+ const data = isSelectTarget(e, 'folder', 'select');
6284
+ let param = {};
6285
+ let is = false;
6286
+ if (ref.current.contains(e.target)) {
6287
+ param = store.curInfo;
6288
+ is = true;
6289
+ }
6290
+ if (typeof data?.[0] == 'string' && store?.dataMap?.[data?.[0]]) {
6291
+ param = store?.dataMap?.[data?.[0]];
6292
+ is = false;
6293
+ }
6294
+ if (is) {
6295
+ ref.current.style.cssText = `
6296
+ border:2px solid #1677ff;
6297
+ `;
6298
+ } else {
6299
+ ref.current.style.cssText = `
6300
+ border:2px solid transparent;
6301
+ `;
6302
+ }
6303
+ let element = renderDragtext({
6304
+ x: x + 20,
6305
+ y: y + 20,
6306
+ ...param
6307
+ });
6308
+ text.current.render(element);
6309
+ }
6310
+ };
6311
+ const handleDrop = e => {
6312
+ setIsDragFile(false);
6313
+ e.preventDefault();
6314
+ e.stopPropagation();
6315
+ const files = [...e.dataTransfer.files];
6316
+ let data = isSelectTarget(e, 'folder', 'remove');
6317
+ let key = null;
6318
+ if (ref.current.contains(e.target)) {
6319
+ key = store.curInfo;
6320
+ ref.current.style.cssText = `
6321
+ border:2px solid transparent;
6322
+ `;
6323
+ }
6324
+ if (typeof data?.[0] == 'string' && store?.dataMap?.[data?.[0]]) {
6325
+ key = store?.dataMap?.[data?.[0]];
6326
+ }
6327
+ if (!key) return;
6328
+ typeof onUpload === 'function' && onUpload(files, key);
6329
+ };
6330
+ function handleDragEnter(e) {
6331
+ e.preventDefault();
6332
+ e.stopPropagation();
6333
+ }
6334
+ //退出当前区域
6335
+ function handleDragLeave(e) {
6336
+ let cont = document.querySelector(getContainer);
6337
+ e.preventDefault();
6338
+ e.stopPropagation();
6339
+ if (!cont?.contains(e.target) || e.clientX <= 0 || e.clientY <= 0) {
6340
+ setIsDragFile(false);
6341
+ }
6342
+ }
6343
+ //拖入div
6344
+ function bodyDragEnter(e) {
6345
+ e?.preventDefault();
6346
+ e?.stopPropagation();
6347
+ if (e?.dataTransfer?.types && !e?.dataTransfer?.types.includes('Files')) {
6348
+ return;
6349
+ }
6350
+ setIsDragFile(true);
6351
+ }
6352
+ //创建文案
6353
+ function createText() {
6354
+ let _box = null;
6355
+ let body = null;
6356
+ let _text = null;
6357
+ _text = document.createElement('div');
6358
+ text.current = createRoot(_text);
6359
+ if (box.current) {
6360
+ box.current?.appendChild(text);
6361
+ } else {
6362
+ body = document.querySelector('body');
6363
+ _box = document.createElement('div');
6364
+ _box.className = `_selectbox ${className}`;
6365
+ _box.style.cssText = `
6366
+ position: absolute;
6367
+ top:1px;
6368
+ left: 1px;
6369
+ width: 0px;
6370
+ height: 0px;
6371
+ pointer-events: none;
6372
+ overflow: visible !important;
6373
+ z-index: 999;
6374
+ `;
6375
+ box.current = _box;
6376
+ _box?.appendChild(_text);
6377
+ body?.appendChild(_box);
6378
+ }
6379
+ }
6198
6380
  //创建选框
6199
6381
  function createBox(e) {
6200
6382
  if (stageClickInfo.show) {
@@ -6390,17 +6572,51 @@ const SelectBox = props => {
6390
6572
  box.current = null;
6391
6573
  clickRef.current = false;
6392
6574
  }
6575
+ function renderDragtext({
6576
+ x,
6577
+ y,
6578
+ ...props
6579
+ }) {
6580
+ return jsx("div", {
6581
+ className: cx$1('explorer-drop-tip', {
6582
+ select: props?.title
6583
+ }),
6584
+ style: {
6585
+ top: y,
6586
+ left: x
6587
+ },
6588
+ children: props?.title ? jsxs(Fragment, {
6589
+ children: [jsxs("span", {
6590
+ className: 'drop-tip-content',
6591
+ children: [jsx("span", {
6592
+ className: 'content-icon',
6593
+ children: jsx(UploadSvg, {})
6594
+ }), jsx(Fragment, {
6595
+ children: " \u4E0A\u4F20\u81F3:"
6596
+ })]
6597
+ }), jsx("span", {
6598
+ className: 'drop-tip-title',
6599
+ children: props?.title
6600
+ })]
6601
+ }) : jsx(Fragment, {
6602
+ children: "\u62D6\u5230\u6587\u4EF6\u5939\u4E0A\u4F20"
6603
+ })
6604
+ });
6605
+ }
6393
6606
  return jsxs("div", {
6394
6607
  ref: ref,
6395
- className: cx$1(`${className}`),
6396
- onClick: e => {},
6608
+ className: cx$1(`file-select-box ${className}`),
6609
+ onDragLeave: e => {
6610
+ e.preventDefault();
6611
+ e.stopPropagation();
6612
+ },
6397
6613
  onMouseDown: e => {
6398
6614
  if (e.button === 2) return;
6399
6615
  if (isDclick.current) {
6400
6616
  clearTimeout(isDclick.current);
6401
6617
  isDclick.current = null;
6402
6618
  } else {
6403
- let type = isSelectTarget(e);
6619
+ let type = isSelectTarget(e, checkType);
6404
6620
  //选中
6405
6621
  //在区域未选中
6406
6622
  isDclick.current = setTimeout(() => {
@@ -6450,8 +6666,8 @@ const SelectBox = props => {
6450
6666
  });
6451
6667
  };
6452
6668
 
6453
- var css_248z$2 = ".explorer-columns {\n width: 100%;\n height: 100%;\n display: flex;\n position: relative;\n}\n.explorer-columns .layer {\n position: relative;\n flex: 1 0 0;\n border-right: 1px solid #f5f5f5;\n}\n.explorer-columns .layer.select_col {\n box-shadow: 0 0 20px #e9f5ff inset;\n}\n.explorer-columns .layer.select_col::after {\n content: '';\n position: absolute;\n height: 4px;\n bottom: 0px;\n background: #50afff;\n left: 0;\n right: 0;\n}\n.explorer-columns .layer.list {\n min-width: 200px;\n}\n.explorer-columns .layer.list::before {\n position: absolute;\n content: '';\n top: 50%;\n right: 1px;\n width: 1px;\n height: 18px;\n margin-left: -1px;\n margin-top: -9px;\n border: 1px solid #ddd;\n border-top: none;\n border-bottom: none;\n backdrop-filter: none;\n border-radius: 0;\n background: transparent;\n box-sizing: content-box;\n -webkit-backdrop-filter: blur(10px);\n}\n.explorer-columns .layer.list .list-main {\n width: 100%;\n height: 100%;\n transition: 0.3s;\n padding-top: 5px;\n}\n.explorer-columns .layer.list .list-main .list-scroll::-webkit-scrollbar {\n width: 6px;\n}\n.explorer-columns .layer.list .list-main .list-scroll::-webkit-scrollbar-thumb {\n background-color: transparent;\n border-radius: 6px;\n transition: 0.3s;\n}\n.explorer-columns .layer.list .list-main:hover .list-scroll::-webkit-scrollbar-thumb {\n background-color: #00000030;\n}\n.explorer-columns .layer.list .drag {\n position: absolute;\n width: 8px;\n border-right: 1px solid #f5f5f5;\n right: -3px;\n top: 0;\n bottom: 0;\n cursor: col-resize;\n z-index: 10;\n}\n.explorer-columns .layer.list .drag:hover {\n background: #40a9ff4d;\n}\n.explorer-columns .layer.empty {\n display: flex;\n justify-content: center;\n padding-top: 100px;\n}\n.explorer-columns .layer.empty .empty-is-null {\n width: 200px;\n}\n.explorer-columns .layer.empty .empty-icon {\n height: 140px;\n}\n.explorer-columns .layer.empty .empty-desc {\n display: flex;\n justify-content: center;\n}\n.explorer-columns .layer.empty .empty-desc > span {\n display: inline-block;\n padding: 3px 10px;\n border-radius: 10px;\n line-height: 1;\n background: #a0a0a01a;\n color: #bbb;\n font-size: 0.9em;\n}\n.explorer-columns-list {\n padding-left: 10px;\n display: flex;\n height: 30px;\n margin-bottom: 2px;\n margin: 0 5px 3px 5px;\n align-items: center;\n border: 1px solid transparent;\n user-select: none;\n}\n.explorer-columns-list .columns-list-icon {\n display: flex;\n width: 18px;\n height: 18px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.explorer-columns-list .columns-list-title {\n flex: 1;\n display: flex;\n}\n.explorer-columns-list .columns-list-title .title {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.explorer-columns-list .columns-list-title .edit {\n display: inline-block;\n width: 20px;\n line-height: 20px;\n font-size: 10px;\n text-align: center;\n border-radius: 3px;\n margin-left: 5px;\n color: #666;\n opacity: 0;\n transition: 0.3s;\n}\n.explorer-columns-list .columns-list-title .edit:hover {\n color: #50afff;\n background: #ffffff8a;\n cursor: pointer;\n}\n.explorer-columns-list .columns-list-tool {\n min-width: 30px;\n}\n.explorer-columns-list .columns-list-input {\n flex: 1;\n height: 100%;\n outline: 0;\n border: 0;\n margin-right: 10px;\n background: #fff;\n}\n.explorer-columns-list.acitve {\n background: #e3f0ff;\n}\n.explorer-columns-list.last {\n margin-bottom: 100px;\n}\n.explorer-columns-list.checks {\n background: #cce8ff;\n border-color: #a8d8ff !important;\n}\n.explorer-columns-list:hover {\n background: #e3f0ff;\n border-color: #c9e2ff;\n}\n.explorer-columns-list:hover .edit {\n opacity: 1;\n}\n.explorer-columns-loading {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.explorer-columns-loading .loading-content {\n width: 100px;\n height: 106px;\n border-radius: 6px;\n background: rgba(255, 255, 255, 0.7);\n box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.07);\n color: #888;\n}\n.explorer-columns-loading .loading-content-icon {\n display: flex;\n justify-content: center;\n margin: 25px auto 6px auto;\n font-size: 30px;\n}\n.explorer-columns-loading .loading-content-icon > i {\n animation: rotate 1.5s linear infinite;\n}\n.explorer-columns-loading .loading-content-title {\n padding-top: 15px;\n text-align: center;\n}\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
6454
- styleInject(css_248z$2);
6669
+ var css_248z$1 = ".explorer-columns {\n width: 100%;\n height: 100%;\n display: flex;\n position: relative;\n}\n.explorer-columns .layer {\n position: relative;\n flex: 1 0 0;\n border-right: 1px solid #f5f5f5;\n}\n.explorer-columns .layer.select_col {\n box-shadow: 0 0 20px #e9f5ff inset;\n}\n.explorer-columns .layer.select_col::after {\n content: '';\n position: absolute;\n height: 4px;\n bottom: 0px;\n background: #50afff;\n left: 0;\n right: 0;\n}\n.explorer-columns .layer.list {\n min-width: 200px;\n}\n.explorer-columns .layer.list::before {\n position: absolute;\n content: '';\n top: 50%;\n right: 1px;\n width: 1px;\n height: 18px;\n margin-left: -1px;\n margin-top: -9px;\n border: 1px solid #ddd;\n border-top: none;\n border-bottom: none;\n backdrop-filter: none;\n border-radius: 0;\n background: transparent;\n box-sizing: content-box;\n -webkit-backdrop-filter: blur(10px);\n}\n.explorer-columns .layer.list .list-main {\n width: 100%;\n height: 100%;\n transition: 0.3s;\n padding-top: 5px;\n}\n.explorer-columns .layer.list .list-main .list-scroll::-webkit-scrollbar {\n width: 6px;\n}\n.explorer-columns .layer.list .list-main .list-scroll::-webkit-scrollbar-thumb {\n background-color: transparent;\n border-radius: 6px;\n transition: 0.3s;\n}\n.explorer-columns .layer.list .list-main:hover .list-scroll::-webkit-scrollbar-thumb {\n background-color: #00000030;\n}\n.explorer-columns .layer.list .drag {\n position: absolute;\n width: 8px;\n border-right: 1px solid #f5f5f5;\n right: -3px;\n top: 0;\n bottom: 0;\n cursor: col-resize;\n z-index: 10;\n}\n.explorer-columns .layer.list .drag:hover {\n background: #40a9ff4d;\n}\n.explorer-columns .layer.empty {\n display: flex;\n justify-content: center;\n padding-top: 100px;\n}\n.explorer-columns .layer.empty .empty-is-null {\n width: 200px;\n}\n.explorer-columns .layer.empty .empty-icon {\n height: 140px;\n}\n.explorer-columns .layer.empty .empty-desc {\n display: flex;\n justify-content: center;\n}\n.explorer-columns .layer.empty .empty-desc > span {\n display: inline-block;\n padding: 3px 10px;\n border-radius: 10px;\n line-height: 1;\n background: #a0a0a01a;\n color: #bbb;\n font-size: 0.9em;\n}\n.explorer-columns-list {\n padding-left: 10px;\n display: flex;\n height: 30px;\n margin-bottom: 2px;\n margin: 0 5px 3px 5px;\n align-items: center;\n border: 1px solid transparent;\n user-select: none;\n}\n.explorer-columns-list .columns-list-icon {\n display: flex;\n width: 18px;\n height: 18px;\n margin-right: 10px;\n flex-shrink: 0;\n}\n.explorer-columns-list .columns-list-title {\n flex: 1;\n display: flex;\n}\n.explorer-columns-list .columns-list-title .title {\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.explorer-columns-list .columns-list-title .edit {\n display: inline-block;\n width: 20px;\n line-height: 20px;\n font-size: 10px;\n text-align: center;\n border-radius: 3px;\n margin-left: 5px;\n color: #666;\n opacity: 0;\n transition: 0.3s;\n}\n.explorer-columns-list .columns-list-title .edit:hover {\n color: #50afff;\n background: #ffffff8a;\n cursor: pointer;\n}\n.explorer-columns-list .columns-list-tool {\n min-width: 30px;\n}\n.explorer-columns-list .columns-list-input {\n flex: 1;\n height: 100%;\n outline: 0;\n border: 0;\n margin-right: 10px;\n background: #fff;\n}\n.explorer-columns-list.acitve {\n background: #e3f0ff;\n}\n.explorer-columns-list.last {\n margin-bottom: 100px;\n}\n.explorer-columns-list.checks {\n background: #cce8ff;\n border-color: #a8d8ff !important;\n}\n.explorer-columns-list:hover {\n background: #e3f0ff;\n border-color: #c9e2ff;\n}\n.explorer-columns-list:hover .edit {\n opacity: 1;\n}\n.explorer-columns-loading {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.explorer-columns-loading .loading-content {\n width: 100px;\n height: 106px;\n border-radius: 6px;\n background: rgba(255, 255, 255, 0.7);\n box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.07);\n color: #888;\n}\n.explorer-columns-loading .loading-content-icon {\n display: flex;\n justify-content: center;\n margin: 25px auto 6px auto;\n font-size: 30px;\n}\n.explorer-columns-loading .loading-content-icon > i {\n animation: rotate 1.5s linear infinite;\n}\n.explorer-columns-loading .loading-content-title {\n padding-top: 15px;\n text-align: center;\n}\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n";
6670
+ styleInject(css_248z$1);
6455
6671
 
6456
6672
  function Item(props) {
6457
6673
  const {
@@ -6689,286 +6905,6 @@ function Columns(props) {
6689
6905
  });
6690
6906
  }
6691
6907
 
6692
- var css_248z$1 = "._modal {\n position: absolute;\n justify-content: center;\n display: flex;\n top: 0;\n left: 0;\n right: 0;\n z-index: 100;\n}\n._modal-content {\n position: absolute;\n width: 800px;\n height: 400px;\n top: 100px;\n background-color: #fff;\n background-clip: padding-box;\n border: 0;\n border-radius: 8px;\n border: 1px solid #eee;\n transition: box-shadow 0.2s;\n box-shadow: 0 6px 8px 0 rgba(0, 0, 0, 0.04), 0 3px 6px -4px rgba(0, 0, 0, 0.08), 0 0 8px 8px rgba(0, 0, 0, 0.03);\n pointer-events: auto;\n}\n._modal-content.focus {\n box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.12), 0 3px 6px -4px rgba(0, 0, 0, 0.16), 0 9px 28px 8px rgba(0, 0, 0, 0.03);\n}\n._modal-content.maximize {\n width: 100% !important;\n height: 100% !important;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n}\n._modal-content.maximize .header-title {\n cursor: default;\n}\n._modal-content.minimize {\n animation: _modal_minimize 0.3s forwards;\n}\n._modal-content.minimize-out {\n transition: 0.3s;\n}\n._modal-content.animation {\n transition: 0.3s;\n}\n._modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 30px;\n padding: 0 10px;\n border-bottom: 1px solid #f1f1f1;\n}\n._modal-header .header-title {\n flex: 1;\n cursor: move;\n}\n._modal-header .header-toolbar {\n display: flex;\n}\n._modal-header .header-toolbar .tool {\n width: 30px;\n height: 30px;\n vertical-align: top;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 10px;\n cursor: pointer;\n}\n._modal-header .header-toolbar .tool > svg {\n top: 0;\n}\n._modal-header .header-toolbar .tool.close {\n font-size: 12px;\n}\n._modal-header .header-toolbar .tool.close:hover {\n background: #ff0000d0;\n color: #fff;\n}\n._modal-header .header-toolbar .tool:hover {\n background: #e5e5e5;\n}\n._modal-navbar {\n height: 30px;\n width: 100%;\n padding: 0px 10px;\n}\n._modal-navbar ._modal-navbar-item {\n position: relative;\n display: inline-block;\n z-index: 100;\n height: 30px;\n line-height: 30px;\n padding: 0 10px;\n background-color: #fff3;\n border: 1px solid #f1f1f1;\n border-radius: 4px 4px 0 0;\n transition: 0.3s;\n margin-right: 2px;\n cursor: pointer;\n}\n._modal-navbar ._modal-navbar-item.acitve {\n z-index: 10;\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);\n}\n._modal-navbar ._modal-navbar-item:hover {\n box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n}\n@keyframes _modal_minimize {\n 0% {\n opacity: 1;\n transform: translateY(0px);\n }\n 90% {\n opacity: 0;\n transform: translateY(30px);\n }\n 100% {\n opacity: 0;\n display: none;\n }\n}\n";
6693
- styleInject(css_248z$1);
6694
-
6695
- function Modal(props) {
6696
- const {
6697
- id,
6698
- show,
6699
- title,
6700
- onBlur,
6701
- onFocus,
6702
- isfocus,
6703
- onMinimize: onMin,
6704
- onMaximize: onMax,
6705
- minimize
6706
- } = props;
6707
- const content = useRef(null);
6708
- const mask = useRef(null);
6709
- const root = useRef(null);
6710
- const [drag, setDrag] = useState(false);
6711
- const [d_value, D_value] = useState([0, 0]); //点击时的差值
6712
- const [win_size, setWinsize] = useState(getSize);
6713
- const [focus, setFocus] = useState(false);
6714
- const [ismax, setMax] = useState(false);
6715
- useLayoutEffect(() => {
6716
- window.addEventListener('resize', handleResize);
6717
- return () => window.removeEventListener('resize', handleResize);
6718
- }, []);
6719
- //拖动监听
6720
- useLayoutEffect(() => {
6721
- document.addEventListener('mousemove', lie);
6722
- return () => {
6723
- document.removeEventListener('mousemove', lie);
6724
- };
6725
- }, [drag]);
6726
- //创建
6727
- useEffect(() => {
6728
- if (show) {
6729
- let box = null;
6730
- let body = document.querySelector('body');
6731
- box = document.createElement('div');
6732
- box.className = '_modal';
6733
- mask.current = box;
6734
- body?.appendChild(box);
6735
- let roots = createRoot(box);
6736
- roots.render( /*#__PURE__*/React__default.cloneElement(render()));
6737
- root.current = roots;
6738
- } else {
6739
- onClose();
6740
- }
6741
- }, [show]);
6742
- //重新渲染
6743
- useEffect(() => {
6744
- if (root.current) {
6745
- root.current.render( /*#__PURE__*/React__default.cloneElement(render()));
6746
- }
6747
- }, [root.current, ismax, minimize]);
6748
- useEffect(() => {
6749
- if (typeof minimize !== 'boolean') return;
6750
- onMinimize();
6751
- }, [minimize]);
6752
- //切换
6753
- useEffect(() => {
6754
- if (!mask?.current) return;
6755
- if (focus) {
6756
- mask.current.style.zIndex = 200;
6757
- content.current?.classList.add('focus');
6758
- } else {
6759
- mask.current.style.zIndex = '';
6760
- content.current?.classList.remove('focus');
6761
- }
6762
- }, [mask.current, focus]);
6763
- //焦点控制
6764
- useEffect(() => {
6765
- if (typeof isfocus == 'boolean') {
6766
- setFocus(isfocus);
6767
- }
6768
- }, [isfocus]);
6769
- //头
6770
- const header = useMemo(() => {
6771
- if (title === false) {
6772
- return jsx(Fragment, {});
6773
- }
6774
- if ( /*#__PURE__*/React__default.isValidElement(title)) {
6775
- return title;
6776
- }
6777
- return jsxs("div", {
6778
- className: '_modal-header',
6779
- onMouseDown: e => {
6780
- D_value([e.nativeEvent?.layerX || 0, e.nativeEvent?.layerY || 0]);
6781
- setDrag(true);
6782
- },
6783
- onMouseUp: () => {
6784
- setDrag(false);
6785
- },
6786
- children: [jsx("div", {
6787
- className: 'header-title',
6788
- children: title
6789
- }), jsxs("div", {
6790
- className: 'header-toolbar',
6791
- children: [jsx("span", {
6792
- className: 'tool',
6793
- onClick: () => {
6794
- onMin && onMin();
6795
- }
6796
- }), jsx("span", {
6797
- className: 'tool',
6798
- onClick: () => {
6799
- setMax(!ismax);
6800
- onMaximize();
6801
- }
6802
- }), jsx("span", {
6803
- className: 'tool close',
6804
- onClick: () => {
6805
- props.onClose && props.onClose();
6806
- }
6807
- })]
6808
- })]
6809
- });
6810
- }, [drag, title, ismax]);
6811
- function handleResize() {
6812
- setWinsize(getSize());
6813
- }
6814
- //最小化
6815
- function onMinimize() {
6816
- if (!minimize) {
6817
- content.current?.classList.add('animation');
6818
- content.current?.classList.add('minimize');
6819
- } else {
6820
- content.current?.classList.remove('minimize');
6821
- content.current?.classList.remove('animation');
6822
- }
6823
- }
6824
- //最大化
6825
- function onMaximize() {
6826
- if (!ismax) {
6827
- if (mask?.current) {
6828
- mask.current.style.bottom = '0px';
6829
- mask.current.style.zIndex = 300;
6830
- }
6831
- content.current?.classList.add('animation');
6832
- content.current?.classList.add('maximize');
6833
- } else {
6834
- content.current?.classList.remove('animation');
6835
- content.current?.classList.remove('maximize');
6836
- mask.current.style.bottom = '';
6837
- mask.current.style.zIndex = '';
6838
- }
6839
- }
6840
- function onClose() {
6841
- mask?.current?.remove();
6842
- mask.current == null;
6843
- content?.current?.remove();
6844
- content.current == null;
6845
- }
6846
- function getSize() {
6847
- return {
6848
- width: window?.innerWidth || 0,
6849
- height: window?.innerHeight || 0
6850
- };
6851
- }
6852
- const lie = e => {
6853
- if (ismax) return;
6854
- if (!drag) return;
6855
- let x = (e.x || 0) - d_value[0];
6856
- let y = (e.y || 0) - d_value[1];
6857
- if (!content?.current) return;
6858
- let c_lie = content.current.getBoundingClientRect();
6859
- if (x < 0) x = 0;
6860
- if (y < 0) y = 0;
6861
- if (y + c_lie.height > win_size.height) {
6862
- y = win_size.height - c_lie.height;
6863
- }
6864
- if (x + c_lie.width > win_size.width) {
6865
- x = win_size.width - c_lie.width;
6866
- }
6867
- content.current.style.top = y + 'px';
6868
- content.current.style.left = x + 'px';
6869
- return {
6870
- x,
6871
- y
6872
- };
6873
- };
6874
- function render() {
6875
- return jsxs("div", {
6876
- ref: content,
6877
- className: cx$1('_modal-content', {
6878
- minimize: minimize,
6879
- animation: minimize
6880
- }),
6881
- tabIndex: 0,
6882
- onFocus: () => {
6883
- onFocus && onFocus();
6884
- typeof isfocus == 'boolean' ? null : setFocus(true);
6885
- },
6886
- onBlur: () => {
6887
- typeof isfocus == 'boolean' ? null : setFocus(false);
6888
- onBlur && onBlur();
6889
- },
6890
- children: [props?.title && header, props.children]
6891
- });
6892
- }
6893
- return jsx(Fragment, {});
6894
- }
6895
-
6896
- function ModalTab(props) {
6897
- const {
6898
- items,
6899
- onClone,
6900
- showKey,
6901
- className
6902
- } = props;
6903
- const shrink = useRef(null);
6904
- const [show, setShow] = useState([]);
6905
- const [select, setSelect] = useState('');
6906
- const [_shrink, setShink] = useState([]);
6907
- useEffect(() => {
6908
- if (typeof showKey[0] == 'string') {
6909
- setSelect(showKey[0]);
6910
- }
6911
- }, []);
6912
- useEffect(() => {
6913
- setShow(showKey);
6914
- }, [showKey]);
6915
- return jsxs("div", {
6916
- className: cx$1('_modal-navbar', {
6917
- [className || '']: className
6918
- }),
6919
- children: [items.map((v, index) => {
6920
- return jsx(React__default.Fragment, {
6921
- children: jsx(Modal, {
6922
- tabIndex: index,
6923
- show: show.includes(v.key),
6924
- title: v.title,
6925
- onClose: () => {
6926
- onClone && onClone?.(v.key, v);
6927
- },
6928
- minimize: shrink.current?.includes(v.key),
6929
- onMinimize: () => {
6930
- let arr = [...(shrink.current || []), v.key];
6931
- shrink.current = arr;
6932
- setShink(arr);
6933
- },
6934
- isfocus: v.key == select,
6935
- onFocus: () => {
6936
- setSelect(v.key);
6937
- },
6938
- children: v.content
6939
- }, index)
6940
- }, index);
6941
- }), items.map((v, index) => {
6942
- return jsx("div", {
6943
- className: cx$1('_modal-navbar-item', {
6944
- acitve: select == v.key
6945
- }),
6946
- onClick: () => {
6947
- if (shrink.current?.includes(v.key)) {
6948
- let arr = shrink.current.filter(item => item !== v.key);
6949
- shrink.current = arr;
6950
- setShink(arr);
6951
- setSelect(v.key);
6952
- return;
6953
- }
6954
- if (select == v.key) {
6955
- let arr = [...(shrink.current || []), v.key];
6956
- shrink.current = arr;
6957
- setShink(arr);
6958
- setSelect('');
6959
- return;
6960
- }
6961
- if (!show.includes(v.key)) {
6962
- setShow([...show, v.key]);
6963
- }
6964
- setSelect(v.key);
6965
- },
6966
- children: v.title
6967
- }, index);
6968
- })]
6969
- });
6970
- }
6971
-
6972
6908
  const template = {
6973
6909
  tile: {
6974
6910
  action: 'rotate',
@@ -7001,7 +6937,8 @@ const Layout$1 = props => {
7001
6937
  onCheck,
7002
6938
  onDblclick,
7003
6939
  onRename,
7004
- onMenuClick
6940
+ onMenuClick,
6941
+ onUpload
7005
6942
  } = props;
7006
6943
  const store = useContext(ExampleContext);
7007
6944
  const [expandkey, setExpandkey] = useState([]);
@@ -7038,6 +6975,7 @@ const Layout$1 = props => {
7038
6975
  return jsxs("div", {
7039
6976
  className: 'file-continer-main',
7040
6977
  children: [store?.loading == ApiStatusEnum.LOADING && jsx(Loading, {}), jsxs(SelectBox, {
6978
+ getContainer: '.explorer-container',
7041
6979
  checks: checks,
7042
6980
  checkType: store.checkType,
7043
6981
  checkMode: store.checkMode,
@@ -7046,6 +6984,10 @@ const Layout$1 = props => {
7046
6984
  }),
7047
6985
  isDrag: isDrag,
7048
6986
  isSelectBoxes: isSelectBoxes,
6987
+ dataClass: template?.[store.menutype]?.dataClass,
6988
+ selectClass: template?.[store.menutype]?.selectClass,
6989
+ action: template?.[store.menutype]?.action,
6990
+ regionClass: template?.[store.menutype]?.regionClass,
7049
6991
  onChange: v => {
7050
6992
  let map = store.dataMap || {};
7051
6993
  let param = [];
@@ -7056,13 +6998,10 @@ const Layout$1 = props => {
7056
6998
  });
7057
6999
  onCheck?.(v, param);
7058
7000
  },
7001
+ onUpload: onUpload,
7059
7002
  onDrag: () => {},
7060
7003
  onEndDrag: () => {},
7061
7004
  onStartDrag: () => {},
7062
- dataClass: template?.[store.menutype]?.dataClass,
7063
- selectClass: template?.[store.menutype]?.selectClass,
7064
- action: template?.[store.menutype]?.action,
7065
- regionClass: template?.[store.menutype]?.regionClass,
7066
7005
  children: [store?.menutype == 'column' && jsx(Columns, {
7067
7006
  icons: store.getIcons,
7068
7007
  data: store.curlist,
@@ -7131,9 +7070,6 @@ const Layout$1 = props => {
7131
7070
  onMenuClick: onMenuClick,
7132
7071
  loadData: loadData
7133
7072
  })]
7134
- }), jsx(ModalTab, {
7135
- items: [],
7136
- showKey: []
7137
7073
  })]
7138
7074
  });
7139
7075
  };
@@ -7511,14 +7447,14 @@ const Explorer = props => {
7511
7447
  setCurSelect,
7512
7448
  setLoadKey
7513
7449
  },
7514
- children: jsxs("div", {
7450
+ children: jsx("div", {
7515
7451
  className: 'explorer-container',
7516
- children: [jsx(Layout, {
7452
+ children: jsx(Layout, {
7517
7453
  ...props,
7518
7454
  loadData: loadData,
7519
7455
  loadNode: loadNode,
7520
7456
  onRename: onRename
7521
- }), ";"]
7457
+ })
7522
7458
  })
7523
7459
  });
7524
7460
  };