@next-core/brick-kit 2.117.9 → 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 CHANGED
@@ -3,6 +3,17 @@
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
+
6
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)
7
18
 
8
19
 
@@ -10209,15 +10209,16 @@
10209
10209
  };
10210
10210
 
10211
10211
  try {
10212
- yield locationContext.mountRoutes( // Concat with a placeholder when loading template preview settings.
10213
- [{
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), {
10214
10214
  path: "${APP.homepage}/_dev_only_/template-preview/:templateId",
10215
10215
  bricks: [{
10216
10216
  brick: "span"
10217
10217
  }],
10218
10218
  menu: false,
10219
10219
  exact: true
10220
- }].concat(storyboard.routes), undefined, mountRoutesResult);
10220
+ }, ...storyboard.routes.slice(specificTemplatePreviewIndex + 1)];
10221
+ yield locationContext.mountRoutes(mergedRoutes, undefined, mountRoutesResult);
10221
10222
  } catch (error) {
10222
10223
  // eslint-disable-next-line no-console
10223
10224
  console.error(error); // Redirect to login page if not logged in.