@next-core/brick-utils 2.32.0 → 2.32.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/CHANGELOG.md +38 -0
- package/README.md +1 -1
- package/dist/index.bundle.js +13 -2
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +13 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/types/visitStoryboard.d.ts +7 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.32.4](https://github.com/easyops-cn/next-core/compare/@next-core/brick-utils@2.32.3...@next-core/brick-utils@2.32.4) (2022-01-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* refine some types ([13d041a](https://github.com/easyops-cn/next-core/commit/13d041a8e5d0b714d96a7b6e41a5e8167993733a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.32.3](https://github.com/easyops-cn/next-core/compare/@next-core/brick-utils@2.32.2...@next-core/brick-utils@2.32.3) (2021-12-30)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @next-core/brick-utils
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [2.32.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-utils@2.32.1...@next-core/brick-utils@2.32.2) (2021-12-29)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @next-core/brick-utils
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [2.32.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-utils@2.32.0...@next-core/brick-utils@2.32.1) (2021-12-28)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* refine visiting storyboard ([5352ba4](https://github.com/easyops-cn/next-core/commit/5352ba460a333094e74a38257488085ebdad649e))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
# [2.32.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-utils@2.31.5...@next-core/brick-utils@2.32.0) (2021-12-28)
|
|
7
45
|
|
|
8
46
|
|
package/README.md
CHANGED
package/dist/index.bundle.js
CHANGED
|
@@ -19354,12 +19354,20 @@
|
|
|
19354
19354
|
}
|
|
19355
19355
|
}
|
|
19356
19356
|
}
|
|
19357
|
-
function visitStoryboardExpressions(data, beforeVisitGlobal, keyword
|
|
19357
|
+
function visitStoryboardExpressions(data, beforeVisitGlobal, // If `options` is a string, it means the *keyword*.
|
|
19358
|
+
options) {
|
|
19358
19359
|
var memo = new WeakSet();
|
|
19360
|
+
var {
|
|
19361
|
+
matchExpressionString,
|
|
19362
|
+
visitNonExpressionString,
|
|
19363
|
+
visitObject
|
|
19364
|
+
} = typeof options === "string" ? {
|
|
19365
|
+
matchExpressionString: v => v.includes(options)
|
|
19366
|
+
} : options;
|
|
19359
19367
|
|
|
19360
19368
|
function visit(value) {
|
|
19361
19369
|
if (typeof value === "string") {
|
|
19362
|
-
if (value
|
|
19370
|
+
if (matchExpressionString(value) && isEvaluable(value)) {
|
|
19363
19371
|
try {
|
|
19364
19372
|
preevaluate(value, {
|
|
19365
19373
|
withParent: true,
|
|
@@ -19371,6 +19379,8 @@
|
|
|
19371
19379
|
// eslint-disable-next-line no-console
|
|
19372
19380
|
console.error("Parse storyboard expression failed:", error);
|
|
19373
19381
|
}
|
|
19382
|
+
} else {
|
|
19383
|
+
visitNonExpressionString === null || visitNonExpressionString === void 0 ? void 0 : visitNonExpressionString(value);
|
|
19374
19384
|
}
|
|
19375
19385
|
} else if (isObject(value)) {
|
|
19376
19386
|
// Avoid call stack overflow.
|
|
@@ -19379,6 +19389,7 @@
|
|
|
19379
19389
|
}
|
|
19380
19390
|
|
|
19381
19391
|
memo.add(value);
|
|
19392
|
+
visitObject === null || visitObject === void 0 ? void 0 : visitObject(value);
|
|
19382
19393
|
|
|
19383
19394
|
for (var item of Array.isArray(value) ? value : Object.values(value)) {
|
|
19384
19395
|
visit(item);
|