@next-core/brick-kit 2.117.7 → 2.117.10
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 +34 -0
- package/dist/index.bundle.js +9 -11
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +10 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Router.d.ts +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,40 @@
|
|
|
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.117.10](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.117.9...@next-core/brick-kit@2.117.10) (2022-04-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* put template preview route between specific ones and others ([923d6f3](https://github.com/easyops-cn/next-core/commit/923d6f3e71f4d9211516045e4b09b96c0c82285b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [2.117.9](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.117.8...@next-core/brick-kit@2.117.9) (2022-04-14)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* put template preview route before others ([bcb1cac](https://github.com/easyops-cn/next-core/commit/bcb1cac988befac5dab41c325921d7738bb8c306))
|
|
23
|
+
* support setting targetRef as array ([ec822f3](https://github.com/easyops-cn/next-core/commit/ec822f37f881efe96a06b7fe53af17e6a40c79c6))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [2.117.8](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.117.7...@next-core/brick-kit@2.117.8) (2022-04-14)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* put template preview route before others ([590153d](https://github.com/easyops-cn/next-core/commit/590153d5ce84c4ba0f410931d6c35846342c3436))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
6
40
|
## [2.117.7](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.117.6...@next-core/brick-kit@2.117.7) (2022-04-12)
|
|
7
41
|
|
|
8
42
|
|
package/dist/index.bundle.js
CHANGED
|
@@ -6259,15 +6259,12 @@
|
|
|
6259
6259
|
} else if (handler.target) {
|
|
6260
6260
|
targets.push(handler.target);
|
|
6261
6261
|
} else if (handler.targetRef) {
|
|
6262
|
-
var _tpl$$$getElementByRe;
|
|
6263
|
-
|
|
6264
6262
|
var tpl = getTplContext(context.tplContextId).getBrick().element;
|
|
6263
|
+
targets.push(...[].concat(handler.targetRef).map(ref => {
|
|
6264
|
+
var _tpl$$$getElementByRe;
|
|
6265
6265
|
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
if (_found) {
|
|
6269
|
-
targets.push(_found);
|
|
6270
|
-
}
|
|
6266
|
+
return (_tpl$$$getElementByRe = tpl.$$getElementByRef) === null || _tpl$$$getElementByRe === void 0 ? void 0 : _tpl$$$getElementByRe.call(tpl, ref);
|
|
6267
|
+
}).filter(Boolean));
|
|
6271
6268
|
}
|
|
6272
6269
|
|
|
6273
6270
|
if (targets.length === 0) {
|
|
@@ -8089,7 +8086,7 @@
|
|
|
8089
8086
|
};
|
|
8090
8087
|
|
|
8091
8088
|
if (previewRouteIndex === -1) {
|
|
8092
|
-
routes.
|
|
8089
|
+
routes.unshift(newPreviewRoute);
|
|
8093
8090
|
} else {
|
|
8094
8091
|
routes.splice(previewRouteIndex, 1, newPreviewRoute);
|
|
8095
8092
|
}
|
|
@@ -10212,15 +10209,16 @@
|
|
|
10212
10209
|
};
|
|
10213
10210
|
|
|
10214
10211
|
try {
|
|
10215
|
-
|
|
10216
|
-
storyboard.routes.
|
|
10212
|
+
var specificTemplatePreviewIndex = lodash.findLastIndex(storyboard.routes, route => route.path.startsWith("${APP.homepage}/_dev_only_/template-preview/"));
|
|
10213
|
+
var mergedRoutes = [...storyboard.routes.slice(0, specificTemplatePreviewIndex + 1), {
|
|
10217
10214
|
path: "${APP.homepage}/_dev_only_/template-preview/:templateId",
|
|
10218
10215
|
bricks: [{
|
|
10219
10216
|
brick: "span"
|
|
10220
10217
|
}],
|
|
10221
10218
|
menu: false,
|
|
10222
10219
|
exact: true
|
|
10223
|
-
}
|
|
10220
|
+
}, ...storyboard.routes.slice(specificTemplatePreviewIndex + 1)];
|
|
10221
|
+
yield locationContext.mountRoutes(mergedRoutes, undefined, mountRoutesResult);
|
|
10224
10222
|
} catch (error) {
|
|
10225
10223
|
// eslint-disable-next-line no-console
|
|
10226
10224
|
console.error(error); // Redirect to login page if not logged in.
|