@next-core/brick-kit 2.157.4 → 2.158.1
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/index.bundle.js +36 -8
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +36 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/i18n/constants.d.ts +3 -1
- package/dist/types/i18n/constants.d.ts.map +1 -1
- package/dist/types/i18n/locales/en.d.ts.map +1 -1
- package/dist/types/i18n/locales/zh.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.esm.js
CHANGED
|
@@ -171,6 +171,8 @@ var K;
|
|
|
171
171
|
K["SOMETHING_WENT_WRONG"] = "SOMETHING_WENT_WRONG";
|
|
172
172
|
K["LOGIN_TIMEOUT_MESSAGE"] = "LOGIN_TIMEOUT_MESSAGE";
|
|
173
173
|
K["NETWORK_ERROR"] = "NETWORK_ERROR";
|
|
174
|
+
K["PAGE_NOT_FOUND"] = "PAGE_NOT_FOUND";
|
|
175
|
+
K["APP_NOT_FOUND"] = "APP_NOT_FOUND";
|
|
174
176
|
})(K || (K = {}));
|
|
175
177
|
|
|
176
178
|
/**
|
|
@@ -1106,7 +1108,9 @@ var locale$7 = {
|
|
|
1106
1108
|
[K.MODAL_CANCEL]: "Cancel",
|
|
1107
1109
|
[K.SOMETHING_WENT_WRONG]: "Something went wrong!",
|
|
1108
1110
|
[K.LOGIN_TIMEOUT_MESSAGE]: "You haven't logged in or your login session has expired. Login right now?",
|
|
1109
|
-
[K.NETWORK_ERROR]: "Network error, please check your network."
|
|
1111
|
+
[K.NETWORK_ERROR]: "Network error, please check your network.",
|
|
1112
|
+
[K.PAGE_NOT_FOUND]: "Page not found, please check the URL",
|
|
1113
|
+
[K.APP_NOT_FOUND]: "App not found, maybe the URL is wrong or you don't have permission to access"
|
|
1110
1114
|
};
|
|
1111
1115
|
var en = locale$7;
|
|
1112
1116
|
|
|
@@ -1116,7 +1120,9 @@ var locale$6 = {
|
|
|
1116
1120
|
[K.MODAL_CANCEL]: "取消",
|
|
1117
1121
|
[K.SOMETHING_WENT_WRONG]: "出现了一些问题!",
|
|
1118
1122
|
[K.LOGIN_TIMEOUT_MESSAGE]: "您还未登录或登录信息已过期,现在重新登录?",
|
|
1119
|
-
[K.NETWORK_ERROR]: "网络错误,请检查您的网络连接。"
|
|
1123
|
+
[K.NETWORK_ERROR]: "网络错误,请检查您的网络连接。",
|
|
1124
|
+
[K.PAGE_NOT_FOUND]: "请求的页面未找到,请确认 URL 是否正确",
|
|
1125
|
+
[K.APP_NOT_FOUND]: "请求的微应用无法找到, 可能是 URL 错误或者无权限访问"
|
|
1120
1126
|
};
|
|
1121
1127
|
var zh = locale$6;
|
|
1122
1128
|
|
|
@@ -8196,10 +8202,10 @@ class Kernel {
|
|
|
8196
8202
|
_this3.currentLayout = layout;
|
|
8197
8203
|
_this3.presetBricks = layout === "business" ? {
|
|
8198
8204
|
loadingBar: "business-website.loading-bar",
|
|
8199
|
-
pageNotFound: "
|
|
8205
|
+
pageNotFound: "presentational-bricks.brick-result",
|
|
8200
8206
|
pageError: "business-website.page-error"
|
|
8201
8207
|
} : _objectSpread(_objectSpread({}, _this3.bootstrapData.navbar), {}, {
|
|
8202
|
-
pageNotFound: "
|
|
8208
|
+
pageNotFound: "presentational-bricks.brick-result",
|
|
8203
8209
|
pageError: "basic-bricks.page-error"
|
|
8204
8210
|
});
|
|
8205
8211
|
for (var item of supportedLayouts) {
|
|
@@ -11141,15 +11147,37 @@ class Router {
|
|
|
11141
11147
|
redirectToLogin();
|
|
11142
11148
|
return;
|
|
11143
11149
|
}
|
|
11144
|
-
yield _this3.kernel.layoutBootstrap(layoutType);
|
|
11150
|
+
yield _this3.kernel.layoutBootstrap(storyboard ? layoutType : "business");
|
|
11145
11151
|
var brickPageNotFound = _this3.kernel.presetBricks.pageNotFound;
|
|
11146
11152
|
yield _this3.kernel.loadDynamicBricks([brickPageNotFound]);
|
|
11153
|
+
var notFoundAppConfig = {
|
|
11154
|
+
illustrationsConfig: {
|
|
11155
|
+
name: "no-permission",
|
|
11156
|
+
category: "easyops2"
|
|
11157
|
+
},
|
|
11158
|
+
customTitle: i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.APP_NOT_FOUND))
|
|
11159
|
+
};
|
|
11160
|
+
var notFoundPageConfig = {
|
|
11161
|
+
illustrationsConfig: {
|
|
11162
|
+
name: "http-404",
|
|
11163
|
+
category: "exception"
|
|
11164
|
+
},
|
|
11165
|
+
customTitle: i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.PAGE_NOT_FOUND))
|
|
11166
|
+
};
|
|
11147
11167
|
_this3.state = "ready-to-mount";
|
|
11148
11168
|
mountTree([{
|
|
11149
11169
|
type: brickPageNotFound,
|
|
11150
|
-
properties: {
|
|
11151
|
-
|
|
11152
|
-
|
|
11170
|
+
properties: _objectSpread({
|
|
11171
|
+
status: "illustrations",
|
|
11172
|
+
useNewIllustration: true,
|
|
11173
|
+
style: {
|
|
11174
|
+
display: "flex",
|
|
11175
|
+
alignItems: "center",
|
|
11176
|
+
justifyContent: "center",
|
|
11177
|
+
transform: "translateY(-100px)",
|
|
11178
|
+
height: "calc(100vh - var(--app-bar-height))"
|
|
11179
|
+
}
|
|
11180
|
+
}, storyboard ? notFoundPageConfig : notFoundAppConfig),
|
|
11153
11181
|
events: {}
|
|
11154
11182
|
}], mountPoints.main);
|
|
11155
11183
|
unmountTree(mountPoints.portal);
|