@gingkoo/pandora-explorer 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/es/components/icons/index.d.ts +0 -1
- package/lib/es/components/menu/menulist.d.ts +0 -1
- package/lib/es/components/tree/components/utils/diffUtil.d.ts +0 -1
- package/lib/es/css.d.ts +7 -7
- package/lib/es/index.js +9 -31
- package/lib/es/index.js.map +1 -1
- package/lib/es/types.d.ts +0 -1
- package/package.json +2 -2
package/lib/es/css.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare const flush: () => void, hydrate: (ids: string
|
|
2
|
-
(template: TemplateStringsArray, ...args: import("@emotion/css/create-instance").CSSInterpolation
|
|
3
|
-
(...args: import("@emotion/css/create-instance").CSSInterpolation
|
|
1
|
+
export declare const flush: () => void, hydrate: (ids: Array<string>) => void, cx: (...classNames: Array<import("@emotion/css/create-instance").ClassNamesArg>) => string, merge: (className: string) => string, getRegisteredStyles: (registeredStyles: Array<string>, className: string) => string, injectGlobal: {
|
|
2
|
+
(template: TemplateStringsArray, ...args: Array<import("@emotion/css/create-instance").CSSInterpolation>): void;
|
|
3
|
+
(...args: Array<import("@emotion/css/create-instance").CSSInterpolation>): void;
|
|
4
4
|
}, keyframes: {
|
|
5
|
-
(template: TemplateStringsArray, ...args: import("@emotion/css/create-instance").CSSInterpolation
|
|
6
|
-
(...args: import("@emotion/css/create-instance").CSSInterpolation
|
|
5
|
+
(template: TemplateStringsArray, ...args: Array<import("@emotion/css/create-instance").CSSInterpolation>): string;
|
|
6
|
+
(...args: Array<import("@emotion/css/create-instance").CSSInterpolation>): string;
|
|
7
7
|
}, css: {
|
|
8
|
-
(template: TemplateStringsArray, ...args: import("@emotion/css/create-instance").CSSInterpolation
|
|
9
|
-
(...args: import("@emotion/css/create-instance").CSSInterpolation
|
|
8
|
+
(template: TemplateStringsArray, ...args: Array<import("@emotion/css/create-instance").CSSInterpolation>): string;
|
|
9
|
+
(...args: Array<import("@emotion/css/create-instance").CSSInterpolation>): string;
|
|
10
10
|
}, sheet: import("@emotion/css/create-instance").CSSStyleSheet, cache: import("@emotion/css/create-instance").EmotionCache;
|
package/lib/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @gingkoo/pandora-explorer v0.1.
|
|
2
|
+
* @gingkoo/pandora-explorer v0.1.11
|
|
3
3
|
*/
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import cx$1 from 'classnames';
|
|
@@ -1291,9 +1291,6 @@ var css_248z$9 = "._dropdown_menu {\n background: #fff;\n min-width: 45px;\n
|
|
|
1291
1291
|
styleInject(css_248z$9);
|
|
1292
1292
|
|
|
1293
1293
|
function returnDocument(element) {
|
|
1294
|
-
if (element) {
|
|
1295
|
-
return element.ownerDocument;
|
|
1296
|
-
}
|
|
1297
1294
|
return window.document;
|
|
1298
1295
|
}
|
|
1299
1296
|
function Dropdown(props) {
|
|
@@ -1889,7 +1886,7 @@ function menuIcon(icon) {
|
|
|
1889
1886
|
suffix: icon
|
|
1890
1887
|
}, 'explorer-menu-icon');
|
|
1891
1888
|
}
|
|
1892
|
-
if (
|
|
1889
|
+
if (/*#__PURE__*/React__default.isValidElement(icon)) {
|
|
1893
1890
|
return jsx("span", {
|
|
1894
1891
|
className: 'explorer-menu-icon x-icon',
|
|
1895
1892
|
children: icon
|
|
@@ -4352,9 +4349,7 @@ function cleanConductCheck(keys, halfKeys, levelEntities, maxLevel, syntheticGet
|
|
|
4352
4349
|
*/
|
|
4353
4350
|
function conductCheck(keyList, checked, keyEntities, getCheckDisabled) {
|
|
4354
4351
|
let syntheticGetCheckDisabled;
|
|
4355
|
-
|
|
4356
|
-
syntheticGetCheckDisabled = getCheckDisabled;
|
|
4357
|
-
} else {
|
|
4352
|
+
{
|
|
4358
4353
|
syntheticGetCheckDisabled = isCheckDisabled;
|
|
4359
4354
|
}
|
|
4360
4355
|
// We only handle exist keys
|
|
@@ -5003,7 +4998,6 @@ let Tree$1 = class Tree extends React.Component {
|
|
|
5003
4998
|
checkedKeys,
|
|
5004
4999
|
halfCheckedKeys
|
|
5005
5000
|
} = conductCheck(Array.from(keySet), {
|
|
5006
|
-
checked: false,
|
|
5007
5001
|
halfCheckedKeys
|
|
5008
5002
|
}, keyEntities));
|
|
5009
5003
|
}
|
|
@@ -5758,7 +5752,7 @@ function TableItem(props) {
|
|
|
5758
5752
|
});
|
|
5759
5753
|
}
|
|
5760
5754
|
|
|
5761
|
-
var TreeItem =
|
|
5755
|
+
var TreeItem = props => {
|
|
5762
5756
|
const {
|
|
5763
5757
|
onRename,
|
|
5764
5758
|
onMenuClick,
|
|
@@ -5872,7 +5866,7 @@ var TreeItem = (props => {
|
|
|
5872
5866
|
})]
|
|
5873
5867
|
})
|
|
5874
5868
|
});
|
|
5875
|
-
}
|
|
5869
|
+
};
|
|
5876
5870
|
|
|
5877
5871
|
var css_248z$6 = ".explorer-notdata {\n display: flex;\n height: 100%;\n justify-content: center;\n}\n.explorer-notdata .tree-empty {\n position: relative;\n top: 100px;\n width: 200px;\n height: 135px;\n text-align: center;\n}\n.explorer-notdata .tree-empty .empty-svg {\n width: 200px;\n height: 115px;\n overflow: hidden;\n}\n.explorer-notdata .tree-empty > span {\n display: inline-block;\n background: rgba(160, 160, 160, 0.1);\n padding: 3px 10px;\n border-radius: 10px;\n font-size: 0.9em;\n margin-top: 10px;\n line-height: 1;\n color: #999;\n user-select: none;\n}\n";
|
|
5878
5872
|
styleInject(css_248z$6);
|
|
@@ -6085,7 +6079,7 @@ var Tree = /*#__PURE__*/forwardRef((props, _ref) => {
|
|
|
6085
6079
|
//树s的懒加载
|
|
6086
6080
|
const getNewTreeData = (treeData, curKey, child, level) => {
|
|
6087
6081
|
const loop = (data, levelkey) => {
|
|
6088
|
-
if (
|
|
6082
|
+
if (curKey.length - 3 > level * 2) return;
|
|
6089
6083
|
data.forEach((item, index) => {
|
|
6090
6084
|
let l = levelkey + `-${index}`;
|
|
6091
6085
|
if (curKey.indexOf(l) === 0) {
|
|
@@ -9544,8 +9538,8 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9544
9538
|
const [menutype, setMenutype] = useState('tile');
|
|
9545
9539
|
const [infoshow, setInfoShow] = useState(false);
|
|
9546
9540
|
const [loading, setLoading] = useState(ApiStatusEnum.READY);
|
|
9547
|
-
useState(100);
|
|
9548
|
-
useState(1);
|
|
9541
|
+
const [pageNum, setPageNum] = useState(100);
|
|
9542
|
+
const [curpage, setCurPage] = useState(1);
|
|
9549
9543
|
const [totalNum, setTotalNum] = useState(0);
|
|
9550
9544
|
const [shift, setShift] = useState(false);
|
|
9551
9545
|
const [control, setControl] = useState(false);
|
|
@@ -9813,35 +9807,19 @@ const Explorer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
9813
9807
|
item.children = arr;
|
|
9814
9808
|
return item;
|
|
9815
9809
|
};
|
|
9816
|
-
const updateinfo = (item, params) => {
|
|
9817
|
-
return {
|
|
9818
|
-
...item,
|
|
9819
|
-
...params
|
|
9820
|
-
};
|
|
9821
|
-
};
|
|
9822
|
-
const delNode = (arr, index) => {
|
|
9823
|
-
arr.splice(index, 1);
|
|
9824
|
-
return arr;
|
|
9825
|
-
};
|
|
9826
9810
|
const filterData = (data, key) => {
|
|
9827
9811
|
let arr = data;
|
|
9828
9812
|
let i = 0;
|
|
9829
|
-
let del_index = null;
|
|
9830
9813
|
while (i < arr.length) {
|
|
9831
9814
|
let item = arr[i];
|
|
9832
9815
|
if (key == item.key) {
|
|
9833
|
-
|
|
9834
|
-
if (type == 'update') item = updateinfo(item, params);
|
|
9835
|
-
if (type == 'del') del_index = i;
|
|
9816
|
+
item = addNode(item, params);
|
|
9836
9817
|
}
|
|
9837
9818
|
if (Array.isArray(item.children)) {
|
|
9838
9819
|
item.children = filterData(item.children, key);
|
|
9839
9820
|
}
|
|
9840
9821
|
i++;
|
|
9841
9822
|
}
|
|
9842
|
-
if (type == 'del' && typeof del_index == 'number') {
|
|
9843
|
-
arr = delNode(arr, del_index);
|
|
9844
|
-
}
|
|
9845
9823
|
return arr || [];
|
|
9846
9824
|
};
|
|
9847
9825
|
let datas = filterData(cloneDeep(data) || [], key);
|