@next-core/brick-kit 2.157.3 → 2.158.0
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 +38 -9
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +38 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/core/standaloneBootstrap.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 +2 -2
package/dist/index.bundle.js
CHANGED
|
@@ -170,6 +170,8 @@
|
|
|
170
170
|
K["SOMETHING_WENT_WRONG"] = "SOMETHING_WENT_WRONG";
|
|
171
171
|
K["LOGIN_TIMEOUT_MESSAGE"] = "LOGIN_TIMEOUT_MESSAGE";
|
|
172
172
|
K["NETWORK_ERROR"] = "NETWORK_ERROR";
|
|
173
|
+
K["PAGE_NOT_FOUND"] = "PAGE_NOT_FOUND";
|
|
174
|
+
K["APP_NOT_FOUND"] = "APP_NOT_FOUND";
|
|
173
175
|
})(K || (K = {}));
|
|
174
176
|
|
|
175
177
|
/**
|
|
@@ -1105,7 +1107,9 @@
|
|
|
1105
1107
|
[K.MODAL_CANCEL]: "Cancel",
|
|
1106
1108
|
[K.SOMETHING_WENT_WRONG]: "Something went wrong!",
|
|
1107
1109
|
[K.LOGIN_TIMEOUT_MESSAGE]: "You haven't logged in or your login session has expired. Login right now?",
|
|
1108
|
-
[K.NETWORK_ERROR]: "Network error, please check your network."
|
|
1110
|
+
[K.NETWORK_ERROR]: "Network error, please check your network.",
|
|
1111
|
+
[K.PAGE_NOT_FOUND]: "Page not found, please check the URL",
|
|
1112
|
+
[K.APP_NOT_FOUND]: "App not found, maybe the URL is wrong or you don't have permission to access"
|
|
1109
1113
|
};
|
|
1110
1114
|
var en = locale$7;
|
|
1111
1115
|
|
|
@@ -1115,7 +1119,9 @@
|
|
|
1115
1119
|
[K.MODAL_CANCEL]: "取消",
|
|
1116
1120
|
[K.SOMETHING_WENT_WRONG]: "出现了一些问题!",
|
|
1117
1121
|
[K.LOGIN_TIMEOUT_MESSAGE]: "您还未登录或登录信息已过期,现在重新登录?",
|
|
1118
|
-
[K.NETWORK_ERROR]: "网络错误,请检查您的网络连接。"
|
|
1122
|
+
[K.NETWORK_ERROR]: "网络错误,请检查您的网络连接。",
|
|
1123
|
+
[K.PAGE_NOT_FOUND]: "请求的页面未找到,请确认 URL 是否正确",
|
|
1124
|
+
[K.APP_NOT_FOUND]: "请求的微应用无法找到, 可能是 URL 错误或者无权限访问"
|
|
1119
1125
|
};
|
|
1120
1126
|
var zh = locale$6;
|
|
1121
1127
|
|
|
@@ -6602,7 +6608,7 @@
|
|
|
6602
6608
|
})];
|
|
6603
6609
|
if (!window.NO_AUTH_GUARD) {
|
|
6604
6610
|
var matches;
|
|
6605
|
-
var appId = window.APP_ID || (window.APP_ROOT && (matches = window.APP_ROOT.match(/^(?:\/next)?\/sa-static\/([^/]+)\/versions\//)) ? matches[1] : null);
|
|
6611
|
+
var appId = window.APP_ID || (window.APP_ROOT && (matches = window.APP_ROOT.match(/^(?:(?:\/next)?\/)?sa-static\/([^/]+)\/versions\//)) ? matches[1] : null);
|
|
6606
6612
|
if (appId) {
|
|
6607
6613
|
// No need to wait.
|
|
6608
6614
|
safeGetRuntimeMicroAppStandalone(appId);
|
|
@@ -6684,6 +6690,7 @@
|
|
|
6684
6690
|
console.warn("request standalone runtime api from micro-app-standalone failed: ", error, ", something might went wrong running standalone micro app");
|
|
6685
6691
|
});
|
|
6686
6692
|
appRuntimeDataMap.set(appId, promise);
|
|
6693
|
+
return promise;
|
|
6687
6694
|
});
|
|
6688
6695
|
return _safeGetRuntimeMicroAppStandalone.apply(this, arguments);
|
|
6689
6696
|
}
|
|
@@ -8194,10 +8201,10 @@
|
|
|
8194
8201
|
_this3.currentLayout = layout;
|
|
8195
8202
|
_this3.presetBricks = layout === "business" ? {
|
|
8196
8203
|
loadingBar: "business-website.loading-bar",
|
|
8197
|
-
pageNotFound: "
|
|
8204
|
+
pageNotFound: "presentational-bricks.brick-result",
|
|
8198
8205
|
pageError: "business-website.page-error"
|
|
8199
8206
|
} : _objectSpread__default["default"](_objectSpread__default["default"]({}, _this3.bootstrapData.navbar), {}, {
|
|
8200
|
-
pageNotFound: "
|
|
8207
|
+
pageNotFound: "presentational-bricks.brick-result",
|
|
8201
8208
|
pageError: "basic-bricks.page-error"
|
|
8202
8209
|
});
|
|
8203
8210
|
for (var item of supportedLayouts) {
|
|
@@ -11139,15 +11146,37 @@
|
|
|
11139
11146
|
redirectToLogin();
|
|
11140
11147
|
return;
|
|
11141
11148
|
}
|
|
11142
|
-
yield _this3.kernel.layoutBootstrap(layoutType);
|
|
11149
|
+
yield _this3.kernel.layoutBootstrap(storyboard ? layoutType : "business");
|
|
11143
11150
|
var brickPageNotFound = _this3.kernel.presetBricks.pageNotFound;
|
|
11144
11151
|
yield _this3.kernel.loadDynamicBricks([brickPageNotFound]);
|
|
11152
|
+
var notFoundAppConfig = {
|
|
11153
|
+
illustrationsConfig: {
|
|
11154
|
+
name: "no-permission",
|
|
11155
|
+
category: "easyops2"
|
|
11156
|
+
},
|
|
11157
|
+
customTitle: i18next__default["default"].t("".concat(NS_BRICK_KIT, ":").concat(K.APP_NOT_FOUND))
|
|
11158
|
+
};
|
|
11159
|
+
var notFoundPageConfig = {
|
|
11160
|
+
illustrationsConfig: {
|
|
11161
|
+
name: "http-404",
|
|
11162
|
+
category: "exception"
|
|
11163
|
+
},
|
|
11164
|
+
customTitle: i18next__default["default"].t("".concat(NS_BRICK_KIT, ":").concat(K.PAGE_NOT_FOUND))
|
|
11165
|
+
};
|
|
11145
11166
|
_this3.state = "ready-to-mount";
|
|
11146
11167
|
mountTree([{
|
|
11147
11168
|
type: brickPageNotFound,
|
|
11148
|
-
properties: {
|
|
11149
|
-
|
|
11150
|
-
|
|
11169
|
+
properties: _objectSpread__default["default"]({
|
|
11170
|
+
status: "illustrations",
|
|
11171
|
+
useNewIllustration: true,
|
|
11172
|
+
style: {
|
|
11173
|
+
display: "flex",
|
|
11174
|
+
alignItems: "center",
|
|
11175
|
+
justifyContent: "center",
|
|
11176
|
+
transform: "translateY(-100px)",
|
|
11177
|
+
height: "calc(100vh - var(--app-bar-height))"
|
|
11178
|
+
}
|
|
11179
|
+
}, storyboard ? notFoundPageConfig : notFoundAppConfig),
|
|
11151
11180
|
events: {}
|
|
11152
11181
|
}], mountPoints.main);
|
|
11153
11182
|
unmountTree(mountPoints.portal);
|