@next-core/brick-kit 2.117.6 → 2.117.9
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 +8 -11
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +8 -11
- 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.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)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* put template preview route before others ([bcb1cac](https://github.com/easyops-cn/next-core/commit/bcb1cac988befac5dab41c325921d7738bb8c306))
|
|
12
|
+
* support setting targetRef as array ([ec822f3](https://github.com/easyops-cn/next-core/commit/ec822f37f881efe96a06b7fe53af17e6a40c79c6))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [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)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* put template preview route before others ([590153d](https://github.com/easyops-cn/next-core/commit/590153d5ce84c4ba0f410931d6c35846342c3436))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [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)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **template-preview:** support setting lifeCycle and events ([275cf02](https://github.com/easyops-cn/next-core/commit/275cf02fe2a2ce46241cb55d93b4822768e20459))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
6
40
|
## [2.117.6](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.117.5...@next-core/brick-kit@2.117.6) (2022-04-11)
|
|
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) {
|
|
@@ -8083,13 +8080,13 @@
|
|
|
8083
8080
|
path: previewPath,
|
|
8084
8081
|
bricks: [_objectSpread__default["default"]({
|
|
8085
8082
|
brick: templateId
|
|
8086
|
-
}, lodash.pick(settings, "properties"))],
|
|
8083
|
+
}, lodash.pick(settings, "properties", "events", "lifeCycle"))],
|
|
8087
8084
|
menu: false,
|
|
8088
8085
|
exact: true
|
|
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
|
}
|
|
@@ -10213,14 +10210,14 @@
|
|
|
10213
10210
|
|
|
10214
10211
|
try {
|
|
10215
10212
|
yield locationContext.mountRoutes( // Concat with a placeholder when loading template preview settings.
|
|
10216
|
-
|
|
10213
|
+
[{
|
|
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
|
-
}), undefined, mountRoutesResult);
|
|
10220
|
+
}].concat(storyboard.routes), undefined, mountRoutesResult);
|
|
10224
10221
|
} catch (error) {
|
|
10225
10222
|
// eslint-disable-next-line no-console
|
|
10226
10223
|
console.error(error); // Redirect to login page if not logged in.
|