@fangzhongya/utils 0.0.8-7 → 0.0.8-70
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/basic/array/asyncMergeArray.cjs +2 -2
- package/dist/basic/array/asyncMergeArray.d.ts +6 -6
- package/dist/basic/array/asyncMergeArray.js +1 -1
- package/dist/basic/array/deleteArray.cjs +7 -0
- package/dist/basic/array/deleteArray.d.ts +6 -0
- package/dist/basic/array/deleteArray.js +7 -0
- package/dist/basic/array/duplicateRemoval.d.ts +6 -6
- package/dist/basic/array/index.cjs +10 -6
- package/dist/basic/array/index.d.ts +2 -1
- package/dist/basic/array/index.js +10 -6
- package/dist/basic/array/isArray.d.ts +5 -5
- package/dist/basic/array/replaceAfter.cjs +2 -2
- package/dist/basic/array/replaceAfter.d.ts +9 -8
- package/dist/basic/array/replaceAfter.js +1 -1
- package/dist/basic/array/toggleArray.cjs +2 -2
- package/dist/basic/array/toggleArray.d.ts +8 -8
- package/dist/basic/array/toggleArray.js +1 -1
- package/dist/basic/index.cjs +18 -9
- package/dist/basic/index.d.ts +14 -5
- package/dist/basic/index.js +17 -8
- package/dist/basic/object/attrValueSort.cjs +7 -0
- package/dist/basic/object/attrValueSort.d.ts +12 -0
- package/dist/basic/object/attrValueSort.js +7 -0
- package/dist/basic/object/deepCopy.cjs +7 -0
- package/dist/basic/object/deepCopy.d.ts +8 -0
- package/dist/basic/object/deepCopy.js +7 -0
- package/dist/basic/object/filterObject.cjs +7 -0
- package/dist/basic/object/filterObject.d.ts +14 -0
- package/dist/basic/object/filterObject.js +7 -0
- package/dist/basic/object/getSort.cjs +7 -0
- package/dist/basic/object/getSort.d.ts +10 -0
- package/dist/basic/object/getSort.js +7 -0
- package/dist/basic/object/hasOwn.cjs +7 -0
- package/dist/basic/object/hasOwn.d.ts +9 -0
- package/dist/basic/object/hasOwn.js +7 -0
- package/dist/basic/object/index.cjs +26 -2
- package/dist/basic/object/index.d.ts +7 -1
- package/dist/basic/object/index.js +25 -1
- package/dist/basic/object/isObject.d.ts +5 -5
- package/dist/basic/object/isObjectArray.d.ts +5 -5
- package/dist/basic/object/mergeObject.d.ts +8 -8
- package/dist/basic/object/setSort.cjs +7 -0
- package/dist/basic/object/setSort.d.ts +7 -0
- package/dist/basic/object/setSort.js +7 -0
- package/dist/basic/object/unmergeObject.d.ts +8 -8
- package/dist/basic/string/appearNum.d.ts +6 -6
- package/dist/basic/string/appearNumSeat.d.ts +7 -7
- package/dist/basic/string/firstLower.d.ts +5 -5
- package/dist/basic/string/firstUpper.d.ts +5 -5
- package/dist/basic/string/getStartSame.d.ts +6 -6
- package/dist/basic/string/getStartSames.d.ts +6 -6
- package/dist/basic/string/index.cjs +15 -3
- package/dist/basic/string/index.d.ts +2 -0
- package/dist/basic/string/index.js +16 -4
- package/dist/basic/string/splitUpper.d.ts +5 -5
- package/dist/basic/string/toFunction.cjs +9 -0
- package/dist/basic/string/toFunction.d.ts +11 -0
- package/dist/basic/string/toFunction.js +9 -0
- package/dist/basic/string/toJson.cjs +10 -0
- package/dist/basic/string/toJson.d.ts +7 -0
- package/dist/basic/string/toJson.js +10 -0
- package/dist/chunk-2OR4FUOA.cjs +47 -0
- package/dist/chunk-2QGQBPEX.js +15 -0
- package/dist/chunk-3IR2ABRO.js +8 -0
- package/dist/chunk-3LWFUVER.js +60 -0
- package/dist/{chunk-X6SR256S.js → chunk-3YREMQDD.js} +4 -4
- package/dist/chunk-4X7AFGTV.cjs +21 -0
- package/dist/{chunk-VIVEXAEC.cjs → chunk-6OF3XP3W.cjs} +5 -5
- package/dist/chunk-6YI3CDEW.js +35 -0
- package/dist/chunk-7AIT4XSD.cjs +13 -0
- package/dist/chunk-AFKJQ4QP.js +35 -0
- package/dist/chunk-ANTSTMDG.cjs +20 -0
- package/dist/chunk-APKFW4LU.js +36 -0
- package/dist/chunk-BMUGXWAO.cjs +26 -0
- package/dist/{chunk-PB6FN2XC.cjs → chunk-BYKL65GO.cjs} +24 -0
- package/dist/chunk-CNJ65RGV.js +54 -0
- package/dist/chunk-CTLBHJGF.cjs +20 -0
- package/dist/chunk-D3SX7OUV.cjs +11 -0
- package/dist/chunk-D3YMEKIF.js +20 -0
- package/dist/chunk-DBSRZCFK.js +54 -0
- package/dist/chunk-DGQF7OEN.js +20 -0
- package/dist/chunk-EA5E23TA.cjs +54 -0
- package/dist/chunk-EWXBN4VG.cjs +21 -0
- package/dist/{chunk-XN4JGC3A.cjs → chunk-FGQXKLTH.cjs} +8 -2
- package/dist/{chunk-V3FWFWP2.cjs → chunk-FWSMHV24.cjs} +14 -2
- package/dist/chunk-GFAUQTB2.cjs +33 -0
- package/dist/chunk-GIAO77MY.js +49 -0
- package/dist/chunk-GOUC2DFA.cjs +8 -0
- package/dist/chunk-GVVJIN46.js +81 -0
- package/dist/chunk-HJTIJGIF.cjs +21 -0
- package/dist/{chunk-JE4B4G3M.js → chunk-IBZAWBSL.js} +3 -3
- package/dist/chunk-IIKQHLKT.cjs +60 -0
- package/dist/chunk-J2GSJKCY.cjs +20 -0
- package/dist/chunk-JDKNU726.cjs +20 -0
- package/dist/{chunk-76ZUEOEJ.js → chunk-JU6FQE2Q.js} +9 -5
- package/dist/chunk-JYPJ5QJ5.cjs +35 -0
- package/dist/chunk-K33LOE73.js +29 -0
- package/dist/{chunk-JLEIVV37.cjs → chunk-KHGCW3A7.cjs} +7 -7
- package/dist/chunk-KQR7FXBF.js +20 -0
- package/dist/{chunk-SYXWQKOO.cjs → chunk-L6DY4GCH.cjs} +5 -5
- package/dist/chunk-LEPZYF2N.cjs +49 -0
- package/dist/chunk-M323GS33.js +21 -0
- package/dist/chunk-MGX7U2CG.cjs +20 -0
- package/dist/chunk-MHHMXDHD.cjs +29 -0
- package/dist/chunk-MQHLAQQA.js +21 -0
- package/dist/chunk-N3FZ4WUI.js +16 -0
- package/dist/chunk-NCSN3MC5.js +21 -0
- package/dist/{chunk-P2CYIUCC.js → chunk-NLYMUIJC.js} +15 -3
- package/dist/{chunk-ZQX2TYQB.js → chunk-NSG7ZMXT.js} +4 -4
- package/dist/chunk-OJFV3426.js +17 -0
- package/dist/{chunk-NKIDWRRS.cjs → chunk-OYFW373E.cjs} +11 -7
- package/dist/chunk-PTLVJ5OL.cjs +17 -0
- package/dist/{chunk-2W7EPKCY.js → chunk-PVYBDMBK.js} +5 -5
- package/dist/chunk-Q63V2U5G.js +47 -0
- package/dist/chunk-Q6FMBSK4.js +27 -0
- package/dist/chunk-Q7NVWXFP.cjs +24 -0
- package/dist/chunk-QFRZFZAA.js +20 -0
- package/dist/{chunk-WVKZTLXW.js → chunk-QJVB3JIZ.js} +8 -2
- package/dist/{chunk-KI5O5MZR.cjs → chunk-QZVMLHFW.cjs} +2 -2
- package/dist/chunk-S42NGJ5W.js +11 -0
- package/dist/chunk-SOAKYJIG.cjs +36 -0
- package/dist/chunk-T4BAVDTH.js +31 -0
- package/dist/{chunk-VNVG4BJ4.cjs → chunk-TCMJPIRM.cjs} +16 -12
- package/dist/chunk-TE3XNGF4.cjs +16 -0
- package/dist/{chunk-HQFPDOWY.js → chunk-TYRSVKNE.js} +24 -0
- package/dist/chunk-UFYLVZNU.cjs +31 -0
- package/dist/{chunk-O2RP4UZQ.cjs → chunk-UGFSIZ5P.cjs} +2 -23
- package/dist/chunk-UPPSZFBE.cjs +121 -0
- package/dist/chunk-UX6A432F.cjs +11 -0
- package/dist/chunk-VBS6YE6H.js +121 -0
- package/dist/chunk-VCZ62DR2.js +11 -0
- package/dist/chunk-VOMPPHW6.js +26 -0
- package/dist/chunk-VY5VQ7WE.cjs +21 -0
- package/dist/chunk-VYOTXPMM.cjs +8 -0
- package/dist/chunk-W45DTA4D.js +8 -0
- package/dist/chunk-WIYZQNGO.js +33 -0
- package/dist/chunk-WLBKU7NM.cjs +15 -0
- package/dist/chunk-WPW3M5AP.js +20 -0
- package/dist/{chunk-QKLVFB74.js → chunk-WX3JYE47.js} +2 -23
- package/dist/chunk-XSQOJWXL.cjs +54 -0
- package/dist/chunk-XUL6LPTN.js +21 -0
- package/dist/{chunk-AMKJIDHO.js → chunk-Y5WYKSYG.js} +1 -1
- package/dist/chunk-YAD5PHVF.cjs +81 -0
- package/dist/chunk-ZEAT23CI.js +13 -0
- package/dist/chunk-ZJIRJ4YJ.cjs +35 -0
- package/dist/css/fetchUnitValue.cjs +2 -2
- package/dist/css/fetchUnitValue.d.ts +7 -7
- package/dist/css/fetchUnitValue.js +1 -1
- package/dist/css/getAttrObj.cjs +7 -0
- package/dist/css/getAttrObj.d.ts +11 -0
- package/dist/css/getAttrObj.js +7 -0
- package/dist/css/getCss.d.ts +7 -1
- package/dist/css/getPositionRelative.cjs +8 -0
- package/dist/css/getPositionRelative.d.ts +7 -0
- package/dist/css/getPositionRelative.js +8 -0
- package/dist/css/getPrentClass.cjs +8 -0
- package/dist/css/getPrentClass.d.ts +7 -0
- package/dist/css/getPrentClass.js +8 -0
- package/dist/css/getPrentCorres.cjs +7 -0
- package/dist/css/getPrentCorres.d.ts +7 -0
- package/dist/css/getPrentCorres.js +7 -0
- package/dist/css/getSVG.cjs +8 -0
- package/dist/css/getSVG.d.ts +14 -0
- package/dist/css/getSVG.js +8 -0
- package/dist/css/index.cjs +35 -4
- package/dist/css/index.d.ts +8 -1
- package/dist/css/index.js +36 -5
- package/dist/css/setClassName.cjs +7 -0
- package/dist/css/setClassName.d.ts +6 -0
- package/dist/css/setClassName.js +7 -0
- package/dist/css/setCss.cjs +3 -2
- package/dist/css/setCss.d.ts +9 -1
- package/dist/css/setCss.js +2 -1
- package/dist/css/setObjStyle.cjs +9 -0
- package/dist/css/setObjStyle.d.ts +12 -0
- package/dist/css/setObjStyle.js +9 -0
- package/dist/dom/getLocus.cjs +7 -0
- package/dist/dom/getLocus.d.ts +14 -0
- package/dist/dom/getLocus.js +7 -0
- package/dist/dom/getShiftEvent.cjs +13 -0
- package/dist/dom/getShiftEvent.d.ts +25 -0
- package/dist/dom/getShiftEvent.js +13 -0
- package/dist/dom/index.cjs +18 -0
- package/dist/dom/index.d.ts +2 -0
- package/dist/dom/index.js +18 -0
- package/dist/html/analysisHtml.cjs +8 -0
- package/dist/html/analysisHtml.d.ts +13 -0
- package/dist/html/analysisHtml.js +8 -0
- package/dist/html/htmlEscape.cjs +7 -0
- package/dist/html/htmlEscape.d.ts +8 -0
- package/dist/html/htmlEscape.js +7 -0
- package/dist/html/index.cjs +13 -0
- package/dist/html/index.d.ts +2 -0
- package/dist/html/index.js +13 -0
- package/dist/index-082de317.d.ts +13 -0
- package/dist/{index-e7b43a74.d.ts → index-123cda08.d.ts} +4 -1
- package/dist/index-22ee0e10.d.ts +13 -0
- package/dist/{index-eef2a16c.d.ts → index-4d550d78.d.ts} +10 -0
- package/dist/index-5aea66bb.d.ts +21 -0
- package/dist/index-92feece4.d.ts +39 -0
- package/dist/index-ae0241ec.d.ts +13 -0
- package/dist/index-bc08cd32.d.ts +14 -0
- package/dist/index-ed8c0e9f.d.ts +37 -0
- package/dist/index.cjs +71 -32
- package/dist/index.d.ts +40 -13
- package/dist/index.js +73 -34
- package/dist/iss/index.d.ts +1 -1
- package/dist/judge/index.cjs +6 -6
- package/dist/judge/index.d.ts +1 -1
- package/dist/judge/index.js +5 -5
- package/dist/judge/matchs.cjs +3 -3
- package/dist/judge/matchs.d.ts +7 -7
- package/dist/judge/matchs.js +2 -2
- package/dist/judge/matchsEnd.d.ts +6 -6
- package/dist/judge/matchsStart.d.ts +6 -6
- package/dist/judge/matchsWhole.d.ts +6 -6
- package/dist/load/getSynch.d.ts +5 -5
- package/dist/log/styleLog.d.ts +65 -65
- package/dist/name/getComponentNames.cjs +3 -3
- package/dist/name/getComponentNames.d.ts +5 -5
- package/dist/name/getComponentNames.js +2 -2
- package/dist/name/getNames.cjs +3 -3
- package/dist/name/getNames.d.ts +5 -5
- package/dist/name/getNames.js +2 -2
- package/dist/name/humpToLine.d.ts +5 -5
- package/dist/name/index.cjs +7 -7
- package/dist/name/index.d.ts +1 -1
- package/dist/name/index.js +6 -6
- package/dist/name/lineToLargeHump.d.ts +5 -5
- package/dist/name/lineToSmallHump.d.ts +5 -5
- package/dist/node/getPort.cjs +2 -2
- package/dist/node/getPort.d.ts +10 -10
- package/dist/node/getPort.js +1 -1
- package/dist/node/index.cjs +3 -3
- package/dist/node/index.js +2 -2
- package/dist/tree/getTreeObj.cjs +11 -0
- package/dist/tree/getTreeObj.d.ts +26 -0
- package/dist/tree/getTreeObj.js +11 -0
- package/dist/tree/index.cjs +12 -0
- package/dist/tree/index.d.ts +1 -0
- package/dist/tree/index.js +12 -0
- package/dist/urls/getImportUrl.d.ts +6 -6
- package/dist/urls/getImportUrlSuffix.d.ts +6 -6
- package/dist/urls/getNewFileName.d.ts +5 -5
- package/dist/urls/getReplaceImportUrl.d.ts +6 -6
- package/dist/urls/getReplaceUrl.cjs +3 -3
- package/dist/urls/getReplaceUrl.d.ts +6 -6
- package/dist/urls/getReplaceUrl.js +2 -2
- package/dist/urls/getSuffix.d.ts +5 -5
- package/dist/urls/getUrlCatalogue.d.ts +5 -5
- package/dist/urls/getUrlCatalogueLast.d.ts +5 -5
- package/dist/urls/getUrlCatalogueObj.d.ts +14 -14
- package/dist/urls/index.cjs +7 -7
- package/dist/urls/index.js +6 -6
- package/dist/window/copy.cjs +7 -0
- package/dist/window/copy.d.ts +3 -0
- package/dist/window/copy.js +7 -0
- package/dist/window/getParam.cjs +7 -0
- package/dist/window/getParam.d.ts +6 -0
- package/dist/window/getParam.js +7 -0
- package/dist/window/index.cjs +12 -0
- package/dist/window/index.d.ts +2 -0
- package/dist/window/index.js +12 -0
- package/package.json +210 -76
- package/dist/chunk-36NQW7GX.cjs +0 -24
- package/dist/chunk-6WSP6FLZ.cjs +0 -8
- package/dist/chunk-7IXRH3MU.js +0 -8
- package/dist/chunk-7KXJO4NI.js +0 -24
- package/dist/chunk-AXMOZZCM.cjs +0 -22
- package/dist/chunk-DGOE2UXJ.cjs +0 -24
- package/dist/chunk-GOH6G74S.js +0 -17
- package/dist/chunk-GOJN3OQ4.js +0 -22
- package/dist/chunk-LG7MY5KL.cjs +0 -17
- package/dist/chunk-XQB2HUHZ.js +0 -23
- package/dist/index-610215b0.d.ts +0 -16
- package/dist/index-e5ab7f28.d.ts +0 -13
- package/dist/index-f7cb4d19.d.ts +0 -19
- package/dist/{chunk-T2QKEABG.js → chunk-33X65PQS.js} +3 -3
- package/dist/{chunk-T22I7TJQ.cjs → chunk-3YUI42XN.cjs} +3 -3
- package/dist/{chunk-6RIGEV6G.cjs → chunk-4MDPNVDF.cjs} +2 -2
- package/dist/{chunk-BWNLZJJG.js → chunk-EJWFLQF3.js} +3 -3
- package/dist/{chunk-PAJDTMC5.cjs → chunk-KRBTSMT2.cjs} +3 -3
- package/dist/{chunk-5UV36ZIW.cjs → chunk-O6P3QI3B.cjs} +3 -3
- package/dist/{chunk-ZRZ5HATA.js → chunk-QRPNQFNF.js} +3 -3
- package/dist/{chunk-MXLYIZIX.js → chunk-VRRDYCUH.js} +3 -3
- package/dist/{index-38b73962.d.ts → index-09cd203a.d.ts} +1 -1
- package/dist/{index-110fd300.d.ts → index-445fe401.d.ts} +1 -1
- package/dist/{index-f6ea5a6a.d.ts → index-a65f6120.d.ts} +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkVYOTXPMMcjs = require('./chunk-VYOTXPMM.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkUX6A432Fcjs = require('./chunk-UX6A432F.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
10
|
+
|
|
11
|
+
// packages/window/index.ts
|
|
12
|
+
var window_exports = {};
|
|
13
|
+
_chunk5AZGAKWRcjs.__export.call(void 0, window_exports, {
|
|
14
|
+
copy: () => _chunkVYOTXPMMcjs.copy,
|
|
15
|
+
getParam: () => _chunkUX6A432Fcjs.getParam
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.window_exports = window_exports;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// packages/basic/array/toggleArray.ts
|
|
2
|
+
function toggleArray(arr, obj, id, is) {
|
|
3
|
+
const varr = [];
|
|
4
|
+
let iss = true;
|
|
5
|
+
if (id) {
|
|
6
|
+
arr.forEach((a) => {
|
|
7
|
+
const element = a;
|
|
8
|
+
const vs = obj;
|
|
9
|
+
if (element[id] === vs[id]) {
|
|
10
|
+
iss = false;
|
|
11
|
+
} else {
|
|
12
|
+
varr.push(a);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
} else {
|
|
16
|
+
arr.forEach((element) => {
|
|
17
|
+
if (element === obj) {
|
|
18
|
+
iss = false;
|
|
19
|
+
} else {
|
|
20
|
+
varr.push(element);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
if (iss) {
|
|
25
|
+
if (is) {
|
|
26
|
+
varr.unshift(obj);
|
|
27
|
+
} else {
|
|
28
|
+
varr.push(obj);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return varr;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
toggleArray
|
|
36
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunk2OR4FUOAcjs = require('./chunk-2OR4FUOA.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkUPPSZFBEcjs = require('./chunk-UPPSZFBE.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
13
|
+
|
|
14
|
+
// packages/dom/index.ts
|
|
15
|
+
var dom_exports = {};
|
|
16
|
+
_chunk5AZGAKWRcjs.__export.call(void 0, dom_exports, {
|
|
17
|
+
foundEvent: () => _chunkUPPSZFBEcjs.foundEvent,
|
|
18
|
+
foundEventCallback: () => _chunkUPPSZFBEcjs.foundEventCallback,
|
|
19
|
+
getLocus: () => _chunk2OR4FUOAcjs.getLocus,
|
|
20
|
+
pressEvent: () => _chunkUPPSZFBEcjs.pressEvent,
|
|
21
|
+
shiftEvent: () => _chunkUPPSZFBEcjs.shiftEvent
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
exports.dom_exports = dom_exports;
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkGOUC2DFAcjs = require('./chunk-GOUC2DFA.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
var _chunkNRJPCN4Jcjs = require('./chunk-NRJPCN4J.cjs');
|
|
4
7
|
|
|
5
8
|
|
|
9
|
+
var _chunkIIKQHLKTcjs = require('./chunk-IIKQHLKT.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
6
12
|
var _chunk3VYRYSWKcjs = require('./chunk-3VYRYSWK.cjs');
|
|
7
13
|
|
|
8
14
|
|
|
15
|
+
var _chunkUFYLVZNUcjs = require('./chunk-UFYLVZNU.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunkJ2GSJKCYcjs = require('./chunk-J2GSJKCY.cjs');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunkD3SX7OUVcjs = require('./chunk-D3SX7OUV.cjs');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var _chunk7AIT4XSDcjs = require('./chunk-7AIT4XSD.cjs');
|
|
25
|
+
|
|
26
|
+
|
|
9
27
|
var _chunkA5LHXE5Xcjs = require('./chunk-A5LHXE5X.cjs');
|
|
10
28
|
|
|
11
29
|
|
|
@@ -17,9 +35,15 @@ var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
|
17
35
|
// packages/basic/object/index.ts
|
|
18
36
|
var object_exports = {};
|
|
19
37
|
_chunk5AZGAKWRcjs.__export.call(void 0, object_exports, {
|
|
38
|
+
attrValueSort: () => _chunkUFYLVZNUcjs.attrValueSort,
|
|
39
|
+
deepCopy: () => _chunkJ2GSJKCYcjs.deepCopy,
|
|
40
|
+
filterObject: () => _chunkD3SX7OUVcjs.filterObject,
|
|
41
|
+
getSort: () => _chunk7AIT4XSDcjs.getSort,
|
|
42
|
+
hasOwn: () => _chunkGOUC2DFAcjs.hasOwn,
|
|
20
43
|
isObject: () => _chunkMIC3W2VYcjs.isObject,
|
|
21
44
|
isObjectArray: () => _chunkA5LHXE5Xcjs.isObjectArray,
|
|
22
45
|
mergeObject: () => _chunkNRJPCN4Jcjs.mergeObject,
|
|
46
|
+
setSort: () => _chunkIIKQHLKTcjs.setSort,
|
|
23
47
|
unmergeObject: () => _chunk3VYRYSWKcjs.unmergeObject
|
|
24
48
|
});
|
|
25
49
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
setClassName
|
|
3
|
+
} from "./chunk-D3YMEKIF.js";
|
|
4
|
+
import {
|
|
5
|
+
setCss
|
|
6
|
+
} from "./chunk-XUL6LPTN.js";
|
|
7
|
+
import {
|
|
8
|
+
setObjStyle,
|
|
9
|
+
toStyleString
|
|
10
|
+
} from "./chunk-M323GS33.js";
|
|
11
|
+
import {
|
|
12
|
+
fetchUnitValue
|
|
13
|
+
} from "./chunk-WX3JYE47.js";
|
|
14
|
+
import {
|
|
15
|
+
getPositionRelative
|
|
16
|
+
} from "./chunk-MQHLAQQA.js";
|
|
17
|
+
import {
|
|
18
|
+
getCss
|
|
19
|
+
} from "./chunk-5RZYHE3X.js";
|
|
20
|
+
import {
|
|
21
|
+
getPrentClass
|
|
22
|
+
} from "./chunk-2QGQBPEX.js";
|
|
23
|
+
import {
|
|
24
|
+
getPrentCorres
|
|
25
|
+
} from "./chunk-OJFV3426.js";
|
|
26
|
+
import {
|
|
27
|
+
getSVG
|
|
28
|
+
} from "./chunk-WIYZQNGO.js";
|
|
29
|
+
import {
|
|
30
|
+
getAttrObj
|
|
31
|
+
} from "./chunk-N3FZ4WUI.js";
|
|
32
|
+
import {
|
|
33
|
+
__export
|
|
34
|
+
} from "./chunk-UICA3PK6.js";
|
|
35
|
+
|
|
36
|
+
// packages/css/index.ts
|
|
37
|
+
var css_exports = {};
|
|
38
|
+
__export(css_exports, {
|
|
39
|
+
fetchUnitValue: () => fetchUnitValue,
|
|
40
|
+
getAttrObj: () => getAttrObj,
|
|
41
|
+
getCss: () => getCss,
|
|
42
|
+
getPositionRelative: () => getPositionRelative,
|
|
43
|
+
getPrentClass: () => getPrentClass,
|
|
44
|
+
getPrentCorres: () => getPrentCorres,
|
|
45
|
+
getSVG: () => getSVG,
|
|
46
|
+
setClassName: () => setClassName,
|
|
47
|
+
setCss: () => setCss,
|
|
48
|
+
setObjStyle: () => setObjStyle,
|
|
49
|
+
toStyleString: () => toStyleString
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
css_exports
|
|
54
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/setClassName.ts
|
|
2
|
+
function setClassName(dom, newValue = "", oldValue = "") {
|
|
3
|
+
if (dom) {
|
|
4
|
+
let className = dom.className;
|
|
5
|
+
oldValue = oldValue.trim();
|
|
6
|
+
if (oldValue) {
|
|
7
|
+
className = " " + className + " ";
|
|
8
|
+
className = className.replace(" " + oldValue + " ", " ");
|
|
9
|
+
}
|
|
10
|
+
newValue = newValue.trim();
|
|
11
|
+
if (newValue) {
|
|
12
|
+
className = className.trim() + " " + newValue;
|
|
13
|
+
}
|
|
14
|
+
dom.className = className.trim();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.setClassName = setClassName;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/basic/object/filterObject.ts
|
|
2
|
+
function filterObject(obj, arr) {
|
|
3
|
+
arr.forEach((key) => {
|
|
4
|
+
delete obj[key];
|
|
5
|
+
});
|
|
6
|
+
return obj;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
exports.filterObject = filterObject;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// packages/css/setClassName.ts
|
|
2
|
+
function setClassName(dom, newValue = "", oldValue = "") {
|
|
3
|
+
if (dom) {
|
|
4
|
+
let className = dom.className;
|
|
5
|
+
oldValue = oldValue.trim();
|
|
6
|
+
if (oldValue) {
|
|
7
|
+
className = " " + className + " ";
|
|
8
|
+
className = className.replace(" " + oldValue + " ", " ");
|
|
9
|
+
}
|
|
10
|
+
newValue = newValue.trim();
|
|
11
|
+
if (newValue) {
|
|
12
|
+
className = className.trim() + " " + newValue;
|
|
13
|
+
}
|
|
14
|
+
dom.className = className.trim();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
setClassName
|
|
20
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// packages/basic/array/deleteArray.ts
|
|
2
|
+
function deleteArray(arr, obj, key, is) {
|
|
3
|
+
const wz = [];
|
|
4
|
+
if (is) {
|
|
5
|
+
if (key) {
|
|
6
|
+
arr.forEach((a, index) => {
|
|
7
|
+
const element = a;
|
|
8
|
+
const vs = obj;
|
|
9
|
+
if (element[key] !== vs[key]) {
|
|
10
|
+
wz.push(index);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
} else {
|
|
14
|
+
arr.forEach((element, index) => {
|
|
15
|
+
if (element !== obj) {
|
|
16
|
+
wz.push(index);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
} else {
|
|
21
|
+
if (key) {
|
|
22
|
+
for (let index = 0; index < arr.length; index++) {
|
|
23
|
+
const element = arr[index];
|
|
24
|
+
const vs = obj;
|
|
25
|
+
if (element[key] === vs[key]) {
|
|
26
|
+
wz.push(index);
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
for (let index = 0; index < arr.length; index++) {
|
|
32
|
+
const element = arr[index];
|
|
33
|
+
if (element === obj) {
|
|
34
|
+
wz.push(index);
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (wz.length > 0) {
|
|
41
|
+
const rs = [];
|
|
42
|
+
for (let index = wz.length - 1; index >= 0; index--) {
|
|
43
|
+
const scz = arr.splice(wz[index], 1);
|
|
44
|
+
rs.unshift(...scz);
|
|
45
|
+
}
|
|
46
|
+
return rs;
|
|
47
|
+
} else {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {
|
|
53
|
+
deleteArray
|
|
54
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
arrayToTree,
|
|
3
|
+
getTreeObj,
|
|
4
|
+
treeToArray
|
|
5
|
+
} from "./chunk-GVVJIN46.js";
|
|
6
|
+
import {
|
|
7
|
+
__export
|
|
8
|
+
} from "./chunk-UICA3PK6.js";
|
|
9
|
+
|
|
10
|
+
// packages/tree/index.ts
|
|
11
|
+
var tree_exports = {};
|
|
12
|
+
__export(tree_exports, {
|
|
13
|
+
arrayToTree: () => arrayToTree,
|
|
14
|
+
getTreeObj: () => getTreeObj,
|
|
15
|
+
treeToArray: () => treeToArray
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
tree_exports
|
|
20
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkCTLBHJGFcjs = require('./chunk-CTLBHJGF.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunk4X7AFGTVcjs = require('./chunk-4X7AFGTV.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkHJTIJGIFcjs = require('./chunk-HJTIJGIF.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkUGFSIZ5Pcjs = require('./chunk-UGFSIZ5P.cjs');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkVY5VQ7WEcjs = require('./chunk-VY5VQ7WE.cjs');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
var _chunkUGS2F6DKcjs = require('./chunk-UGS2F6DK.cjs');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunkWLBKU7NMcjs = require('./chunk-WLBKU7NM.cjs');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _chunkPTLVJ5OLcjs = require('./chunk-PTLVJ5OL.cjs');
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
var _chunkGFAUQTB2cjs = require('./chunk-GFAUQTB2.cjs');
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var _chunkTE3XNGF4cjs = require('./chunk-TE3XNGF4.cjs');
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
var _chunk5AZGAKWRcjs = require('./chunk-5AZGAKWR.cjs');
|
|
35
|
+
|
|
36
|
+
// packages/css/index.ts
|
|
37
|
+
var css_exports = {};
|
|
38
|
+
_chunk5AZGAKWRcjs.__export.call(void 0, css_exports, {
|
|
39
|
+
fetchUnitValue: () => _chunkUGFSIZ5Pcjs.fetchUnitValue,
|
|
40
|
+
getAttrObj: () => _chunkTE3XNGF4cjs.getAttrObj,
|
|
41
|
+
getCss: () => _chunkUGS2F6DKcjs.getCss,
|
|
42
|
+
getPositionRelative: () => _chunkVY5VQ7WEcjs.getPositionRelative,
|
|
43
|
+
getPrentClass: () => _chunkWLBKU7NMcjs.getPrentClass,
|
|
44
|
+
getPrentCorres: () => _chunkPTLVJ5OLcjs.getPrentCorres,
|
|
45
|
+
getSVG: () => _chunkGFAUQTB2cjs.getSVG,
|
|
46
|
+
setClassName: () => _chunkCTLBHJGFcjs.setClassName,
|
|
47
|
+
setCss: () => _chunk4X7AFGTVcjs.setCss,
|
|
48
|
+
setObjStyle: () => _chunkHJTIJGIFcjs.setObjStyle,
|
|
49
|
+
toStyleString: () => _chunkHJTIJGIFcjs.toStyleString
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
exports.css_exports = css_exports;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/html/htmlEscape.ts
|
|
2
|
+
var zObj = {
|
|
3
|
+
"<": "<",
|
|
4
|
+
">": ">",
|
|
5
|
+
'"': """,
|
|
6
|
+
"'": "'",
|
|
7
|
+
" ": " "
|
|
8
|
+
};
|
|
9
|
+
function htmlEscape(str) {
|
|
10
|
+
str = str.replace(/&(?!\w+;)/g, "&");
|
|
11
|
+
return str.replace(/[<>&" ']/g, (c) => {
|
|
12
|
+
if (c) {
|
|
13
|
+
return zObj[c] || c;
|
|
14
|
+
}
|
|
15
|
+
return c;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
exports.htmlEscape = htmlEscape;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/node/getPort.ts
|
|
2
2
|
var _net = require('net');
|
|
3
|
-
function getPort(port = 5173,
|
|
3
|
+
function getPort(host, port = 5173, isLocal = true) {
|
|
4
4
|
return new Promise((resolve, reject) => {
|
|
5
5
|
isPortOccupied(port, host, isLocal).then((v) => {
|
|
6
6
|
resolve({ port: v, host });
|
|
@@ -39,10 +39,16 @@ function getPortNotOccupied(port, host, isLocal) {
|
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
+
var hosts = ["0.0.0.0"];
|
|
42
43
|
function isPortOccupied(port, host, isLocal) {
|
|
43
44
|
return new Promise((resolve, reject) => {
|
|
45
|
+
if (isLocal) {
|
|
46
|
+
if (!host || hosts.includes(host)) {
|
|
47
|
+
host = "localhost";
|
|
48
|
+
}
|
|
49
|
+
}
|
|
44
50
|
const server = _net.createServer.call(void 0, ).listen({
|
|
45
|
-
host
|
|
51
|
+
host,
|
|
46
52
|
port,
|
|
47
53
|
exclusive: true
|
|
48
54
|
});
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
var _chunkJYPJ5QJ5cjs = require('./chunk-JYPJ5QJ5.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
3
7
|
var _chunkJ7S3KBHLcjs = require('./chunk-J7S3KBHL.cjs');
|
|
4
8
|
|
|
5
9
|
|
|
6
10
|
var _chunkL7FSHU27cjs = require('./chunk-L7FSHU27.cjs');
|
|
7
11
|
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
|
|
14
|
+
var _chunkZJIRJ4YJcjs = require('./chunk-ZJIRJ4YJ.cjs');
|
|
10
15
|
|
|
11
16
|
|
|
12
17
|
var _chunkJR6ZN6QDcjs = require('./chunk-JR6ZN6QD.cjs');
|
|
13
18
|
|
|
14
19
|
|
|
20
|
+
var _chunk3HXQ7TGVcjs = require('./chunk-3HXQ7TGV.cjs');
|
|
21
|
+
|
|
22
|
+
|
|
15
23
|
var _chunkPW7RP73Jcjs = require('./chunk-PW7RP73J.cjs');
|
|
16
24
|
|
|
17
25
|
|
|
@@ -30,9 +38,13 @@ _chunk5AZGAKWRcjs.__export.call(void 0, string_exports, {
|
|
|
30
38
|
appearNumSeat: () => _chunkJR6ZN6QDcjs.appearNumSeat,
|
|
31
39
|
firstLower: () => _chunkUEVMS6QDcjs.firstLower,
|
|
32
40
|
firstUpper: () => _chunkOQL4GIEJcjs.firstUpper,
|
|
41
|
+
getFunctionFormat: () => _chunkZJIRJ4YJcjs.getFunctionFormat,
|
|
33
42
|
getStartSame: () => _chunkJ7S3KBHLcjs.getStartSame,
|
|
34
43
|
getStartSames: () => _chunkPW7RP73Jcjs.getStartSames,
|
|
35
|
-
splitUpper: () => _chunkL7FSHU27cjs.splitUpper
|
|
44
|
+
splitUpper: () => _chunkL7FSHU27cjs.splitUpper,
|
|
45
|
+
toFunction: () => _chunkZJIRJ4YJcjs.toFunction,
|
|
46
|
+
toJSONParse: () => _chunkJYPJ5QJ5cjs.toJSONParse,
|
|
47
|
+
toJSONStringify: () => _chunkJYPJ5QJ5cjs.toJSONStringify
|
|
36
48
|
});
|
|
37
49
|
|
|
38
50
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkTE3XNGF4cjs = require('./chunk-TE3XNGF4.cjs');
|
|
4
|
+
|
|
5
|
+
// packages/css/getSVG.ts
|
|
6
|
+
function getSVG(str) {
|
|
7
|
+
const reg = /<svg([^>]*)>((.|\n|\r|\t)*)<\/svg>/g;
|
|
8
|
+
const rs = reg.exec(str);
|
|
9
|
+
if (rs && rs.length > 0) {
|
|
10
|
+
const css = rs[1];
|
|
11
|
+
const body = rs[2];
|
|
12
|
+
const attr = _chunkTE3XNGF4cjs.getAttrObj.call(void 0, css);
|
|
13
|
+
const b = attr["viewBox"] || "";
|
|
14
|
+
const bs = b.split(" ") || [];
|
|
15
|
+
const l = Number(bs[0]) || 0;
|
|
16
|
+
const t = Number(bs[1]) || 0;
|
|
17
|
+
const w = Number(bs[2] || attr["width"]) || 24;
|
|
18
|
+
const h = Number(bs[3] || attr["height"]) || 24;
|
|
19
|
+
return {
|
|
20
|
+
body,
|
|
21
|
+
viewBox: b,
|
|
22
|
+
left: l,
|
|
23
|
+
top: t,
|
|
24
|
+
width: w,
|
|
25
|
+
height: h
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
exports.getSVG = getSVG;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getAttrObj
|
|
3
|
+
} from "./chunk-N3FZ4WUI.js";
|
|
4
|
+
|
|
5
|
+
// packages/html/analysisHtml.ts
|
|
6
|
+
function analysisHtml(str) {
|
|
7
|
+
const arr = [];
|
|
8
|
+
getHtml(arr, str);
|
|
9
|
+
return arr;
|
|
10
|
+
}
|
|
11
|
+
function getHtml(arr, str) {
|
|
12
|
+
const reg = /(<\/([a-z|A-Z][^\s|>]*)>)|(<([a-z|A-Z][^\s>/]*)((\s*([^\s="'/|>]+)(=('([^']*)'|"([^"]*)"|([^\s/>]*)))?\s*)*)(>|\/>))/g;
|
|
13
|
+
const rs = reg.exec(str);
|
|
14
|
+
if (rs && rs.length > 0) {
|
|
15
|
+
if (rs.index != 0) {
|
|
16
|
+
arr.push(str.substring(0, rs.index));
|
|
17
|
+
}
|
|
18
|
+
str = str.substring(rs.index + rs[0].length);
|
|
19
|
+
const js = rs[2];
|
|
20
|
+
if (js) {
|
|
21
|
+
return str;
|
|
22
|
+
}
|
|
23
|
+
const obj = {
|
|
24
|
+
div: rs[4],
|
|
25
|
+
attr: rs[5] ? getAttrObj(rs[5]) : void 0,
|
|
26
|
+
value: []
|
|
27
|
+
};
|
|
28
|
+
if (rs[13] == "/>") {
|
|
29
|
+
arr.push(obj);
|
|
30
|
+
} else {
|
|
31
|
+
arr.push(obj);
|
|
32
|
+
if (str) {
|
|
33
|
+
str = getHtml(obj.value, str);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (str) {
|
|
37
|
+
return getHtml(arr, str);
|
|
38
|
+
} else {
|
|
39
|
+
return "";
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
arr.push(str);
|
|
43
|
+
return "";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
analysisHtml
|
|
49
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// packages/tree/getTreeObj.ts
|
|
2
|
+
function getTreeObj(type, arr, param) {
|
|
3
|
+
if (type == 1) {
|
|
4
|
+
return treeToArray(arr, param);
|
|
5
|
+
} else {
|
|
6
|
+
return arrayToTree(arr, param, true);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function getTreeChildren(arr, param, fid, objs) {
|
|
10
|
+
arr.forEach((v) => {
|
|
11
|
+
const obj = Object.assign({}, v);
|
|
12
|
+
obj[param.fid] = fid;
|
|
13
|
+
const id = obj[param.id];
|
|
14
|
+
objs[id] = obj;
|
|
15
|
+
const arr2 = obj[param.children];
|
|
16
|
+
if (arr2 && arr2.length > 0) {
|
|
17
|
+
getTreeChildren(arr2, param, id, objs);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function treeToArray(arr, param) {
|
|
22
|
+
const objs = {};
|
|
23
|
+
arr.forEach((v) => {
|
|
24
|
+
const obj = Object.assign({}, v);
|
|
25
|
+
const id = obj[param.id];
|
|
26
|
+
const arr2 = obj[param.children];
|
|
27
|
+
if (arr2 && arr2.length > 0) {
|
|
28
|
+
getTreeChildren(arr2, param, id, objs);
|
|
29
|
+
}
|
|
30
|
+
objs[id] = obj;
|
|
31
|
+
});
|
|
32
|
+
const array = Object.values(objs).map((o) => {
|
|
33
|
+
const v = Object.assign({}, o);
|
|
34
|
+
delete v[param.children];
|
|
35
|
+
return v;
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
tree: arr,
|
|
39
|
+
array,
|
|
40
|
+
obj: objs
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function arrayToTree(arr, param, is) {
|
|
44
|
+
const djs = [];
|
|
45
|
+
const objs = {};
|
|
46
|
+
arr.forEach((v) => {
|
|
47
|
+
const obj = Object.assign({}, v);
|
|
48
|
+
const id = obj[param.id];
|
|
49
|
+
const fid = obj[param.fid];
|
|
50
|
+
if (fid) {
|
|
51
|
+
objs[fid] = objs[fid] || {};
|
|
52
|
+
objs[fid][param.children] = objs[fid][param.children] || [];
|
|
53
|
+
objs[fid][param.children].push(obj);
|
|
54
|
+
} else {
|
|
55
|
+
djs.push(obj);
|
|
56
|
+
}
|
|
57
|
+
if (objs[id]) {
|
|
58
|
+
obj[param.children] = objs[id][param.children];
|
|
59
|
+
}
|
|
60
|
+
objs[id] = obj;
|
|
61
|
+
});
|
|
62
|
+
if (is) {
|
|
63
|
+
Object.keys(objs).forEach((key) => {
|
|
64
|
+
const o = objs[key];
|
|
65
|
+
if (o && Object.keys(o).length === 1) {
|
|
66
|
+
djs.push(...o.children);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
tree: djs,
|
|
72
|
+
array: arr,
|
|
73
|
+
obj: objs
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
getTreeObj,
|
|
79
|
+
treeToArray,
|
|
80
|
+
arrayToTree
|
|
81
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/css/setObjStyle.ts
|
|
2
|
+
function toStyleString(obj) {
|
|
3
|
+
let st = "";
|
|
4
|
+
Object.keys(obj).forEach((key) => {
|
|
5
|
+
st += key + ":" + obj[key] + ";";
|
|
6
|
+
});
|
|
7
|
+
return st;
|
|
8
|
+
}
|
|
9
|
+
function setObjStyle(style, objColor) {
|
|
10
|
+
if (typeof style == "string") {
|
|
11
|
+
style = style + ";" + toStyleString(objColor);
|
|
12
|
+
} else {
|
|
13
|
+
style = Object.assign(style || {}, objColor);
|
|
14
|
+
}
|
|
15
|
+
return style;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
exports.toStyleString = toStyleString; exports.setObjStyle = setObjStyle;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
string_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NLYMUIJC.js";
|
|
4
4
|
import {
|
|
5
5
|
object_exports
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TYRSVKNE.js";
|
|
7
7
|
import {
|
|
8
8
|
array_exports
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JU6FQE2Q.js";
|
|
10
10
|
import {
|
|
11
11
|
__export
|
|
12
12
|
} from "./chunk-UICA3PK6.js";
|