sculp-js 1.13.2 → 1.13.4
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/cjs/_virtual/_commonjsHelpers.js +1 -1
- package/dist/cjs/array.js +1 -1
- package/dist/cjs/async.js +1 -1
- package/dist/cjs/base64.js +1 -1
- package/dist/cjs/clipboard.js +4 -2
- package/dist/cjs/cloneDeep.js +1 -1
- package/dist/cjs/cookie.js +1 -1
- package/dist/cjs/date.js +1 -1
- package/dist/cjs/dom.js +1 -1
- package/dist/cjs/download.js +4 -2
- package/dist/cjs/easing.js +1 -1
- package/dist/cjs/file.js +7 -3
- package/dist/cjs/func.js +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/math.js +1 -1
- package/dist/cjs/node_modules/bezier-easing/src/index.js +1 -1
- package/dist/cjs/number.js +1 -1
- package/dist/cjs/object.js +1 -1
- package/dist/cjs/path.js +1 -1
- package/dist/cjs/qs.js +1 -1
- package/dist/cjs/random.js +1 -1
- package/dist/cjs/string.js +1 -1
- package/dist/cjs/tooltip.js +5 -2
- package/dist/cjs/tree.js +79 -79
- package/dist/cjs/type.js +8 -1
- package/dist/cjs/unique.js +1 -1
- package/dist/cjs/url.js +1 -1
- package/dist/cjs/validator.js +1 -1
- package/dist/cjs/variable.js +1 -1
- package/dist/cjs/watermark.js +4 -2
- package/dist/esm/array.js +1 -1
- package/dist/esm/async.js +1 -1
- package/dist/esm/base64.js +1 -1
- package/dist/esm/clipboard.js +4 -2
- package/dist/esm/cloneDeep.js +1 -1
- package/dist/esm/cookie.js +1 -1
- package/dist/esm/date.js +1 -1
- package/dist/esm/dom.js +1 -1
- package/dist/esm/download.js +4 -2
- package/dist/esm/easing.js +1 -1
- package/dist/esm/file.js +7 -3
- package/dist/esm/func.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/math.js +1 -1
- package/dist/esm/number.js +1 -1
- package/dist/esm/object.js +1 -1
- package/dist/esm/path.js +1 -1
- package/dist/esm/qs.js +1 -1
- package/dist/esm/random.js +1 -1
- package/dist/esm/string.js +1 -1
- package/dist/esm/tooltip.js +5 -2
- package/dist/esm/tree.js +80 -80
- package/dist/esm/type.js +8 -2
- package/dist/esm/unique.js +1 -1
- package/dist/esm/url.js +1 -1
- package/dist/esm/validator.js +1 -1
- package/dist/esm/variable.js +1 -1
- package/dist/esm/watermark.js +4 -2
- package/dist/types/array.d.ts +0 -1
- package/dist/types/async.d.ts +0 -1
- package/dist/types/base64.d.ts +0 -1
- package/dist/types/clipboard.d.ts +0 -1
- package/dist/types/cloneDeep.d.ts +0 -1
- package/dist/types/cookie.d.ts +0 -1
- package/dist/types/date.d.ts +0 -1
- package/dist/types/dom.d.ts +0 -1
- package/dist/types/download.d.ts +0 -1
- package/dist/types/easing.d.ts +0 -1
- package/dist/types/file.d.ts +0 -1
- package/dist/types/func.d.ts +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/math.d.ts +0 -1
- package/dist/types/number.d.ts +0 -1
- package/dist/types/object.d.ts +0 -1
- package/dist/types/path.d.ts +0 -1
- package/dist/types/qs.d.ts +0 -1
- package/dist/types/random.d.ts +0 -1
- package/dist/types/string.d.ts +0 -1
- package/dist/types/tooltip.d.ts +0 -1
- package/dist/types/tree.d.ts +4 -3
- package/dist/types/type.d.ts +4 -1
- package/dist/types/unique.d.ts +0 -1
- package/dist/types/url.d.ts +0 -1
- package/dist/types/validator.d.ts +0 -1
- package/dist/types/variable.d.ts +0 -1
- package/dist/types/watermark.d.ts +0 -1
- package/dist/umd/index.min.js +2 -2
- package/package.json +2 -1
- package/dist/types/array.d.ts.map +0 -1
- package/dist/types/async.d.ts.map +0 -1
- package/dist/types/base64.d.ts.map +0 -1
- package/dist/types/clipboard.d.ts.map +0 -1
- package/dist/types/cloneDeep.d.ts.map +0 -1
- package/dist/types/cookie.d.ts.map +0 -1
- package/dist/types/core-index.d.ts +0 -17
- package/dist/types/core-index.d.ts.map +0 -1
- package/dist/types/date.d.ts.map +0 -1
- package/dist/types/dom.d.ts.map +0 -1
- package/dist/types/download.d.ts.map +0 -1
- package/dist/types/easing.d.ts.map +0 -1
- package/dist/types/file.d.ts.map +0 -1
- package/dist/types/func.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -3258
- package/dist/types/math.d.ts.map +0 -1
- package/dist/types/number.d.ts.map +0 -1
- package/dist/types/object.d.ts.map +0 -1
- package/dist/types/path.d.ts.map +0 -1
- package/dist/types/qs.d.ts.map +0 -1
- package/dist/types/random.d.ts.map +0 -1
- package/dist/types/string.d.ts.map +0 -1
- package/dist/types/tooltip.d.ts.map +0 -1
- package/dist/types/tree.d.ts.map +0 -1
- package/dist/types/type.d.ts.map +0 -1
- package/dist/types/unique.d.ts.map +0 -1
- package/dist/types/url.d.ts.map +0 -1
- package/dist/types/validator.d.ts.map +0 -1
- package/dist/types/variable.d.ts.map +0 -1
- package/dist/types/watermark.d.ts.map +0 -1
package/dist/esm/easing.js
CHANGED
package/dist/esm/file.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.13.
|
|
2
|
+
* sculp-js v1.13.4
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -20,7 +20,7 @@ function supportCanvas() {
|
|
|
20
20
|
* @returns {HTMLInputElement}
|
|
21
21
|
*/
|
|
22
22
|
function chooseLocalFile(accept, changeCb) {
|
|
23
|
-
|
|
23
|
+
let inputObj = document.createElement('input');
|
|
24
24
|
inputObj.setAttribute('id', String(Date.now()));
|
|
25
25
|
inputObj.setAttribute('type', 'file');
|
|
26
26
|
inputObj.setAttribute('style', 'visibility:hidden');
|
|
@@ -30,7 +30,11 @@ function chooseLocalFile(accept, changeCb) {
|
|
|
30
30
|
// @ts-ignore
|
|
31
31
|
inputObj.onchange = (e) => {
|
|
32
32
|
changeCb(e.target.files);
|
|
33
|
-
setTimeout(() =>
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
document.body.removeChild(inputObj);
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
inputObj = null;
|
|
37
|
+
});
|
|
34
38
|
};
|
|
35
39
|
}
|
|
36
40
|
/**
|
package/dist/esm/func.js
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.13.
|
|
2
|
+
* sculp-js v1.13.4
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -14,7 +14,7 @@ export { isPlainObject, objectAssign, objectEach, objectEachAsync, objectFill, o
|
|
|
14
14
|
export { pathJoin, pathNormalize } from './path.js';
|
|
15
15
|
export { qsParse, qsStringify } from './qs.js';
|
|
16
16
|
export { STRING_ARABIC_NUMERALS, STRING_LOWERCASE_ALPHA, STRING_UPPERCASE_ALPHA, parseQueryParams, stringAssign, stringCamelCase, stringEscapeHtml, stringFill, stringFormat, stringKebabCase } from './string.js';
|
|
17
|
-
export { arrayLike, isArray, isBigInt, isBoolean, isDate, isEmpty, isError, isFunction, isJsonString, isNaN, isNull, isNullOrUnDef, isNullOrUnDef as isNullish, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, objectHas, typeIs } from './type.js';
|
|
17
|
+
export { arrayLike, isArray, isBigInt, isBoolean, isDate, isEmpty, isError, isFunction, isJsonString, isNaN, isNodeList, isNull, isNullOrUnDef, isNullOrUnDef as isNullish, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, objectHas, typeIs } from './type.js';
|
|
18
18
|
export { urlDelParams, urlParse, urlSetParams, urlStringify } from './url.js';
|
|
19
19
|
export { asyncMap, safeAwait, wait } from './async.js';
|
|
20
20
|
export { chooseLocalFile, compressImg, supportCanvas } from './file.js';
|
package/dist/esm/math.js
CHANGED
package/dist/esm/number.js
CHANGED
package/dist/esm/object.js
CHANGED
package/dist/esm/path.js
CHANGED
package/dist/esm/qs.js
CHANGED
package/dist/esm/random.js
CHANGED
package/dist/esm/string.js
CHANGED
package/dist/esm/tooltip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.13.
|
|
2
|
+
* sculp-js v1.13.4
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -113,9 +113,12 @@ function mouseenter($customTitle, title, e) {
|
|
|
113
113
|
* @returns {*}
|
|
114
114
|
*/
|
|
115
115
|
function handleMouseLeave(rootContainer = '#root') {
|
|
116
|
-
const rootEl = isString(rootContainer) ? document.querySelector(rootContainer) : rootContainer
|
|
116
|
+
const rootEl = isString(rootContainer) ? document.querySelector(rootContainer) : rootContainer;
|
|
117
|
+
let titleEl = document.querySelector('#customTitle1494304949567');
|
|
117
118
|
if (rootEl && titleEl) {
|
|
118
119
|
rootEl.removeChild(titleEl);
|
|
120
|
+
// @ts-ignore
|
|
121
|
+
titleEl = null;
|
|
119
122
|
}
|
|
120
123
|
}
|
|
121
124
|
const tooltipEvent = { handleMouseEnter, handleMouseLeave };
|
package/dist/esm/tree.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.13.
|
|
2
|
+
* sculp-js v1.13.4
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { objectOmit } from './object.js';
|
|
8
|
-
import { isObject, objectHas, isEmpty } from './type.js';
|
|
8
|
+
import { isObject, objectHas, isEmpty, isNodeList } from './type.js';
|
|
9
9
|
|
|
10
10
|
const defaultFieldOptions = { keyField: 'key', childField: 'children', pidField: 'pid' };
|
|
11
11
|
const defaultSearchTreeOptions = {
|
|
@@ -15,115 +15,115 @@ const defaultSearchTreeOptions = {
|
|
|
15
15
|
ignoreCase: true
|
|
16
16
|
};
|
|
17
17
|
/**
|
|
18
|
-
* 树遍历函数(支持continue和break操作),
|
|
18
|
+
* 树遍历函数(支持continue和break操作), 可用于遍历Array和NodeList类型的数据
|
|
19
19
|
* @param {ArrayLike<V>} tree 树形数据
|
|
20
20
|
* @param {Function} iterator 迭代函数, 返回值为true时continue, 返回值为false时break
|
|
21
21
|
* @param {options} options 支持定制子元素名称、反向遍历、广度优先遍历,默认{
|
|
22
22
|
childField: 'children',
|
|
23
23
|
reverse: false,
|
|
24
|
-
breadthFirst: false
|
|
24
|
+
breadthFirst: false,
|
|
25
|
+
isDomNode: false,
|
|
25
26
|
}
|
|
26
27
|
* @returns {*}
|
|
27
28
|
*/
|
|
28
29
|
function forEachDeep(tree, iterator, options = {
|
|
29
30
|
childField: 'children',
|
|
30
31
|
reverse: false,
|
|
31
|
-
breadthFirst: false
|
|
32
|
+
breadthFirst: false,
|
|
33
|
+
isDomNode: false
|
|
32
34
|
}) {
|
|
33
|
-
const { childField = 'children', reverse = false, breadthFirst = false } = isObject(options) ? options : {};
|
|
35
|
+
const { childField = 'children', reverse = false, breadthFirst = false, isDomNode = false } = isObject(options) ? options : {};
|
|
34
36
|
let isBreak = false;
|
|
35
37
|
const queue = [];
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
const reverseWalk = (arr, parent, level = 0) => {
|
|
39
|
+
for (let index = arr.length - 1; index >= 0; index--) {
|
|
40
|
+
if (isBreak) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
const item = arr[index];
|
|
44
|
+
// 广度优先
|
|
45
|
+
if (breadthFirst) {
|
|
46
|
+
queue.push({ item, index, array: arr, tree, parent, level });
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const re = iterator(item, index, arr, tree, parent, level);
|
|
50
|
+
if (re === false) {
|
|
51
|
+
isBreak = true;
|
|
40
52
|
break;
|
|
41
53
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (breadthFirst) {
|
|
45
|
-
queue.push({ item, index, array: arr, tree, parent, level });
|
|
54
|
+
else if (re === true) {
|
|
55
|
+
continue;
|
|
46
56
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (re === false) {
|
|
50
|
-
isBreak = true;
|
|
51
|
-
break;
|
|
52
|
-
}
|
|
53
|
-
else if (re === true) {
|
|
54
|
-
continue;
|
|
55
|
-
}
|
|
56
|
-
if (item && Array.isArray(item[childField])) {
|
|
57
|
-
walk(item[childField], item, level + 1);
|
|
58
|
-
}
|
|
57
|
+
if (item && (isDomNode ? isNodeList(item[childField]) : Array.isArray(item[childField]))) {
|
|
58
|
+
reverseWalk(item[childField], item, level + 1);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
}
|
|
62
|
+
if (breadthFirst) {
|
|
63
|
+
// Process queue
|
|
64
|
+
while (queue.length > 0 && !isBreak) {
|
|
65
|
+
const current = queue.shift();
|
|
66
|
+
const { item, index, array, tree, parent, level } = current;
|
|
67
|
+
const re = iterator(item, index, array, tree, parent, level);
|
|
68
|
+
if (re === false) {
|
|
69
|
+
isBreak = true;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
else if (re === true) {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (item && (isDomNode ? isNodeList(item[childField]) : Array.isArray(item[childField]))) {
|
|
76
|
+
reverseWalk(item[childField], item, level + 1);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
};
|
|
81
|
+
const walk = (arr, parent, level = 0) => {
|
|
82
|
+
for (let index = 0, len = arr.length; index < len; index++) {
|
|
83
|
+
if (isBreak) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
const item = arr[index];
|
|
87
|
+
if (breadthFirst) {
|
|
88
|
+
// 广度优先
|
|
89
|
+
queue.push({ item, index: index, array: arr, tree, parent, level });
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
// 深度优先
|
|
93
|
+
const re = iterator(item, index, arr, tree, parent, level);
|
|
94
|
+
if (re === false) {
|
|
95
|
+
isBreak = true;
|
|
83
96
|
break;
|
|
84
97
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
// 广度优先
|
|
88
|
-
queue.push({ item, index: index, array: arr, tree, parent, level });
|
|
98
|
+
else if (re === true) {
|
|
99
|
+
continue;
|
|
89
100
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const re = iterator(item, index, arr, tree, parent, level);
|
|
93
|
-
if (re === false) {
|
|
94
|
-
isBreak = true;
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
else if (re === true) {
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
if (item && Array.isArray(item[childField])) {
|
|
101
|
-
walk(item[childField], item, level + 1);
|
|
102
|
-
}
|
|
101
|
+
if (item && (isDomNode ? isNodeList(item[childField]) : Array.isArray(item[childField]))) {
|
|
102
|
+
walk(item[childField], item, level + 1);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
105
|
+
}
|
|
106
|
+
if (breadthFirst) {
|
|
107
|
+
while (queue.length > 0 && !isBreak) {
|
|
108
|
+
const current = queue.shift();
|
|
109
|
+
if (!current)
|
|
110
|
+
break;
|
|
111
|
+
const { item, index, array, tree, parent, level } = current;
|
|
112
|
+
const re = iterator(item, index, array, tree, parent, level);
|
|
113
|
+
if (re === false) {
|
|
114
|
+
isBreak = true;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
else if (re === true) {
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (item && (isDomNode ? isNodeList(item[childField]) : Array.isArray(item[childField]))) {
|
|
121
|
+
walk(item[childField], item, level + 1);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
|
-
walk(tree, null, 0);
|
|
126
|
+
reverse ? reverseWalk(tree, null, 0) : walk(tree, null, 0);
|
|
127
127
|
// @ts-ignore
|
|
128
128
|
tree = null;
|
|
129
129
|
}
|
package/dist/esm/type.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.13.
|
|
2
|
+
* sculp-js v1.13.4
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -124,5 +124,11 @@ function isEmpty(value) {
|
|
|
124
124
|
}
|
|
125
125
|
return !Object.keys(value).length;
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Checks if `value` is an NodeList object
|
|
129
|
+
*/
|
|
130
|
+
function isNodeList(value) {
|
|
131
|
+
return isUndefined(NodeList) ? false : NodeList.prototype.isPrototypeOf(value);
|
|
132
|
+
}
|
|
127
133
|
|
|
128
|
-
export { arrayLike, typeIs as default, isArray, isBigInt, isBoolean, isDate, isEmpty, isError, isFunction, isJsonString, isNaN, isNull, isNullOrUnDef, isNullOrUnDef as isNullish, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, objectHas, typeIs };
|
|
134
|
+
export { arrayLike, typeIs as default, isArray, isBigInt, isBoolean, isDate, isEmpty, isError, isFunction, isJsonString, isNaN, isNodeList, isNull, isNullOrUnDef, isNullOrUnDef as isNullish, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined, objectHas, typeIs };
|
package/dist/esm/unique.js
CHANGED
package/dist/esm/url.js
CHANGED
package/dist/esm/validator.js
CHANGED
package/dist/esm/variable.js
CHANGED
package/dist/esm/watermark.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* sculp-js v1.13.
|
|
2
|
+
* sculp-js v1.13.4
|
|
3
3
|
* (c) 2023-present chandq
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -60,7 +60,7 @@ function genCanvasWM(content = '请勿外传', canvasWM) {
|
|
|
60
60
|
const MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
|
|
61
61
|
if (MutationObserver) {
|
|
62
62
|
let mo = new MutationObserver(function () {
|
|
63
|
-
|
|
63
|
+
let __wm = document.querySelector(`#${watermarkId}`); // 只在__wm元素变动才重新调用 __canvasWM
|
|
64
64
|
if (!__wm) {
|
|
65
65
|
// 避免一直触发
|
|
66
66
|
// console.log('regenerate watermark by delete::')
|
|
@@ -78,6 +78,8 @@ function genCanvasWM(content = '请勿外传', canvasWM) {
|
|
|
78
78
|
mo.disconnect();
|
|
79
79
|
mo = null;
|
|
80
80
|
container.removeChild(__wm);
|
|
81
|
+
// @ts-ignore
|
|
82
|
+
__wm = null;
|
|
81
83
|
genCanvasWM(content, canvasWM);
|
|
82
84
|
}
|
|
83
85
|
}
|
package/dist/types/array.d.ts
CHANGED
package/dist/types/async.d.ts
CHANGED
package/dist/types/base64.d.ts
CHANGED
package/dist/types/cookie.d.ts
CHANGED
package/dist/types/date.d.ts
CHANGED
|
@@ -71,4 +71,3 @@ export declare function calculateDate(originDate: DateValue, n: number, sep?: st
|
|
|
71
71
|
* @returns {string} 转换后的目标日期时间
|
|
72
72
|
*/
|
|
73
73
|
export declare function calculateDateTime(originDateTime: DateValue, n: number, dateSep?: string, timeSep?: string): string;
|
|
74
|
-
//# sourceMappingURL=date.d.ts.map
|
package/dist/types/dom.d.ts
CHANGED
package/dist/types/download.d.ts
CHANGED
package/dist/types/easing.d.ts
CHANGED
package/dist/types/file.d.ts
CHANGED
package/dist/types/func.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
package/dist/types/math.d.ts
CHANGED
package/dist/types/number.d.ts
CHANGED
package/dist/types/object.d.ts
CHANGED
package/dist/types/path.d.ts
CHANGED
package/dist/types/qs.d.ts
CHANGED
package/dist/types/random.d.ts
CHANGED
package/dist/types/string.d.ts
CHANGED
|
@@ -64,4 +64,3 @@ export declare const stringFill: (length: number, value?: string) => string;
|
|
|
64
64
|
* @returns {Record<string, string | string[]>}
|
|
65
65
|
*/
|
|
66
66
|
export declare function parseQueryParams(searchStr?: string): Record<string, string | string[]>;
|
|
67
|
-
//# sourceMappingURL=string.d.ts.map
|
package/dist/types/tooltip.d.ts
CHANGED
package/dist/types/tree.d.ts
CHANGED
|
@@ -14,13 +14,14 @@ export interface IFilterCondition<V> {
|
|
|
14
14
|
filter?: (args: V) => boolean;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* 树遍历函数(支持continue和break操作),
|
|
17
|
+
* 树遍历函数(支持continue和break操作), 可用于遍历Array和NodeList类型的数据
|
|
18
18
|
* @param {ArrayLike<V>} tree 树形数据
|
|
19
19
|
* @param {Function} iterator 迭代函数, 返回值为true时continue, 返回值为false时break
|
|
20
20
|
* @param {options} options 支持定制子元素名称、反向遍历、广度优先遍历,默认{
|
|
21
21
|
childField: 'children',
|
|
22
22
|
reverse: false,
|
|
23
|
-
breadthFirst: false
|
|
23
|
+
breadthFirst: false,
|
|
24
|
+
isDomNode: false,
|
|
24
25
|
}
|
|
25
26
|
* @returns {*}
|
|
26
27
|
*/
|
|
@@ -28,6 +29,7 @@ export declare function forEachDeep<V>(tree: ArrayLike<V>, iterator: (val: V, in
|
|
|
28
29
|
childField?: string;
|
|
29
30
|
reverse?: boolean;
|
|
30
31
|
breadthFirst?: boolean;
|
|
32
|
+
isDomNode?: boolean;
|
|
31
33
|
}): void;
|
|
32
34
|
/**
|
|
33
35
|
* 创建一个新数组, 深度优先遍历的Map函数(支持continue和break操作), 可用于insert tree item 和 remove tree item
|
|
@@ -95,4 +97,3 @@ export declare function flatTree(treeList: any[], options?: IFieldOptions): any[
|
|
|
95
97
|
* @returns {V[]}
|
|
96
98
|
*/
|
|
97
99
|
export declare function fuzzySearchTree<V>(nodes: V[], filterCondition: IFilterCondition<V>, options?: ISearchTreeOpts): V[];
|
|
98
|
-
//# sourceMappingURL=tree.d.ts.map
|
package/dist/types/type.d.ts
CHANGED
|
@@ -120,5 +120,8 @@ export declare function isJsonString(str: string): Object | boolean;
|
|
|
120
120
|
* // => false
|
|
121
121
|
*/
|
|
122
122
|
export declare function isEmpty(value: any): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Checks if `value` is an NodeList object
|
|
125
|
+
*/
|
|
126
|
+
export declare function isNodeList(value: any): boolean;
|
|
123
127
|
export default typeIs;
|
|
124
|
-
//# sourceMappingURL=type.d.ts.map
|
package/dist/types/unique.d.ts
CHANGED
package/dist/types/url.d.ts
CHANGED
package/dist/types/variable.d.ts
CHANGED
|
@@ -68,4 +68,3 @@ export declare function replaceVarFromString(sourceStr: string, targetObj: Recor
|
|
|
68
68
|
* executeInScope("return $.fun.time.now()", scope)
|
|
69
69
|
*/
|
|
70
70
|
export declare function executeInScope(code: string, scope?: Record<string, any>): any;
|
|
71
|
-
//# sourceMappingURL=variable.d.ts.map
|