@next-core/brick-kit 2.178.14 → 2.178.16

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.esm.js CHANGED
@@ -3140,6 +3140,8 @@ function _loadDynamicMenuItems() {
3140
3140
  });
3141
3141
  }
3142
3142
  }
3143
+ var usedActions = scanPermissionActionsInAny(menu.itemsResolve);
3144
+ yield validatePermissions(usedActions);
3143
3145
  yield _internalApiGetResolver().resolveOne("reference", _objectSpread({
3144
3146
  transform: "items",
3145
3147
  transformMapArray: false
@@ -4046,6 +4048,20 @@ function isHttpAbortError(error) {
4046
4048
  return error instanceof HttpAbortError;
4047
4049
  }
4048
4050
 
4051
+ function setLoginStateCookie(location) {
4052
+ // 独立打包应用 登录时间超时后还是由前端控制跳转,后台无法处理设置登录前的 path 和 query 的 cookie 值
4053
+ // 此这场景下前端做下处理
4054
+
4055
+ var {
4056
+ search,
4057
+ pathname
4058
+ } = location;
4059
+ var pathValue = pathname ? window.btoa(encodeURIComponent(pathname)) : "";
4060
+ var searchValue = search ? window.btoa(encodeURIComponent(search)) : "";
4061
+ document.cookie = "SALOGINPATH=".concat(pathValue, "; path=/");
4062
+ document.cookie = "SALOGINQUERY=".concat(searchValue, "; path=/");
4063
+ }
4064
+
4049
4065
  /**
4050
4066
  * 将 http 请求错误转换为可读的字符串。
4051
4067
  *
@@ -4101,6 +4117,7 @@ function handleHttpError(error) {
4101
4117
  onOk: () => {
4102
4118
  var ssoEnabled = getRuntime().getFeatureFlags()["sso-enabled"];
4103
4119
  var history = getHistory();
4120
+ setLoginStateCookie(history.location);
4104
4121
  history.push(ssoEnabled ? "/sso-auth/login" : "/auth/login", {
4105
4122
  from: _objectSpread(_objectSpread({}, history.location), {}, {
4106
4123
  state: undefined
@@ -11726,6 +11743,7 @@ class Router {
11726
11743
  devtoolsHookEmit("rendering");
11727
11744
  unmountTree(mountPoints.bg);
11728
11745
  var redirectToLogin = () => {
11746
+ setLoginStateCookie(location);
11729
11747
  history.replace(_this3.kernel.getFeatureFlags()["sso-enabled"] ? "/sso-auth/login" : "/auth/login", {
11730
11748
  from: location
11731
11749
  });