@next-core/brick-kit 2.159.0 → 2.159.2
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 +9 -1
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +10 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Kernel.d.ts +1 -0
- package/dist/types/core/Kernel.d.ts.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/core/Runtime.d.ts.map +1 -1
- package/dist/types/internal/menu.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
import _asyncToGenerator$3 from '@babel/runtime/helpers/asyncToGenerator';
|
|
5
5
|
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import React, { useState, useEffect, useRef, useMemo, useCallback, forwardRef, useImperativeHandle, useContext, createContext, useReducer } from 'react';
|
|
7
|
-
import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, trackFormState, scanPermissionActionsInStoryboard, precookFunction, cook, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, matchPath, deepFreeze, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript, scanAppGetMenuInAny, asyncProcessBrick, scanInstalledAppsInStoryboard, removeDeadConditions, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
|
|
7
|
+
import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, trackFormState, scanPermissionActionsInStoryboard, precookFunction, cook, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, scanPermissionActionsInAny, matchPath, deepFreeze, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript, scanAppGetMenuInAny, asyncProcessBrick, scanInstalledAppsInStoryboard, removeDeadConditions, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
|
|
8
8
|
import _, { set, get, difference, identity, uniqueId, cloneDeep, clamp, isNil, isEmpty, sortBy, orderBy, merge, isObject as isObject$1, uniq, pick, omit, findLastIndex, noop, isString as isString$1 } from 'lodash';
|
|
9
9
|
import { http, HttpResponseError, HttpAbortError, HttpFetchError } from '@next-core/brick-http';
|
|
10
10
|
import moment from 'moment';
|
|
@@ -2911,6 +2911,8 @@ function _processMenu() {
|
|
|
2911
2911
|
app
|
|
2912
2912
|
} = _yield$fetchMenuById,
|
|
2913
2913
|
restMenuData = _objectWithoutProperties(_yield$fetchMenuById, _excluded3);
|
|
2914
|
+
var usedActions = scanPermissionActionsInAny([items, restMenuData]);
|
|
2915
|
+
yield validatePermissions(usedActions);
|
|
2914
2916
|
var appsRequireI18nFulfilled = new Set();
|
|
2915
2917
|
var rootAppId = app[0].appId;
|
|
2916
2918
|
if (rootAppId !== context.app.id && !restMenuData[symbolMenuI18nNamespace]) {
|
|
@@ -3396,7 +3398,9 @@ class Runtime {
|
|
|
3396
3398
|
var _kernel$bootstrapData3;
|
|
3397
3399
|
return Object.assign({
|
|
3398
3400
|
base_title: "DevOps 管理专家"
|
|
3399
|
-
}, (_kernel$bootstrapData3 = kernel.bootstrapData.settings) === null || _kernel$bootstrapData3 === void 0 ? void 0 : _kernel$bootstrapData3.brand)
|
|
3401
|
+
}, (_kernel$bootstrapData3 = kernel.bootstrapData.settings) === null || _kernel$bootstrapData3 === void 0 ? void 0 : _kernel$bootstrapData3.brand, kernel.getOriginFaviconHref() ? {
|
|
3402
|
+
favicon: kernel.getOriginFaviconHref()
|
|
3403
|
+
} : {});
|
|
3400
3404
|
}
|
|
3401
3405
|
getLaunchpadSettings() {
|
|
3402
3406
|
var _kernel$bootstrapData4;
|
|
@@ -8790,6 +8794,9 @@ class Kernel {
|
|
|
8790
8794
|
return filterMenus;
|
|
8791
8795
|
})();
|
|
8792
8796
|
}
|
|
8797
|
+
setOriginFaviconHref(href) {
|
|
8798
|
+
this.originFaviconHref = href;
|
|
8799
|
+
}
|
|
8793
8800
|
getOriginFaviconHref() {
|
|
8794
8801
|
return this.originFaviconHref;
|
|
8795
8802
|
}
|
|
@@ -10893,6 +10900,7 @@ class Router {
|
|
|
10893
10900
|
} else {
|
|
10894
10901
|
faviconElement.href = _this3.kernel.getOriginFaviconHref();
|
|
10895
10902
|
}
|
|
10903
|
+
_this3.kernel.setOriginFaviconHref(faviconElement.href);
|
|
10896
10904
|
}
|
|
10897
10905
|
setTheme(((_getLocalAppsTheme = getLocalAppsTheme()) === null || _getLocalAppsTheme === void 0 ? void 0 : _getLocalAppsTheme[currentApp === null || currentApp === void 0 ? void 0 : currentApp.id]) || (currentApp === null || currentApp === void 0 ? void 0 : currentApp.theme) || "light");
|
|
10898
10906
|
setMode("default");
|