@next-core/brick-kit 2.121.3 → 2.122.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.esm.js CHANGED
@@ -9,7 +9,7 @@ import { ExclamationCircleOutlined } from '@ant-design/icons';
9
9
  import i18next, { getFixedT } from 'i18next';
10
10
  import { parsePath, createBrowserHistory, locationsAreEqual, createPath } from 'history';
11
11
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
12
- import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, scanPermissionActionsInStoryboard, precookFunction, cook, resolveContextConcurrently, syncResolveContextConcurrently, shouldAllowRecursiveEvaluations, preevaluate, inject, deepFreeze, createProviderClass, loadScript, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, matchPath, scanAppGetMenuInAny, asyncProcessBrick, restoreDynamicTemplates, mapCustomApisToNameAndNamespace, scanCustomApisInStoryboard } from '@next-core/brick-utils';
12
+ import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, scanPermissionActionsInStoryboard, precookFunction, cook, resolveContextConcurrently, syncResolveContextConcurrently, shouldAllowRecursiveEvaluations, preevaluate, inject, deepFreeze, createProviderClass, loadScript, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, matchPath, scanAppGetMenuInAny, asyncProcessBrick, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
13
13
  import lodash, { set, get, difference, identity, uniqueId, cloneDeep, clamp, isNil, sortBy, merge, pick, orderBy, omit, findLastIndex, noop, isObject as isObject$1, isString } from 'lodash';
14
14
  import moment from 'moment';
15
15
  import { pipes } from '@next-core/pipes';
@@ -7910,19 +7910,6 @@ Object.keys(presetPrimaryColors).forEach(function (key) {
7910
7910
  });
7911
7911
  presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
7912
7912
  });
7913
- presetPalettes.red;
7914
- presetPalettes.volcano;
7915
- presetPalettes.gold;
7916
- presetPalettes.orange;
7917
- presetPalettes.yellow;
7918
- presetPalettes.lime;
7919
- presetPalettes.green;
7920
- presetPalettes.cyan;
7921
- presetPalettes.blue;
7922
- presetPalettes.geekblue;
7923
- presetPalettes.purple;
7924
- presetPalettes.magenta;
7925
- presetPalettes.grey;
7926
7913
 
7927
7914
  function getStyleByBaseColors(theme, baseColors, backgroundColor) {
7928
7915
  return (theme === "dark" ? getDarkStyle : getLightStyle)("".concat(getCssVariableDefinitionsByPalettes(generatePalettes(baseColors, theme, backgroundColor), theme), "\n").concat(getMigratedCssVariableDefinitions(theme, baseColors, backgroundColor)));
@@ -8529,6 +8516,7 @@ class Kernel {
8529
8516
  legacy
8530
8517
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8531
8518
  this.toggleBars(true);
8519
+ getRuntime().applyPageTitle(null);
8532
8520
 
8533
8521
  if (this.currentLayout !== "console") {
8534
8522
  // No bars should be unset for the business layout.
@@ -8543,8 +8531,6 @@ class Kernel {
8543
8531
  // 对于 Legacy 页面,仅当切换应用时重设面包屑。
8544
8532
  this.appBar.setBreadcrumb(null);
8545
8533
  }
8546
-
8547
- getRuntime().applyPageTitle(null);
8548
8534
  }
8549
8535
 
8550
8536
  toggleLegacyIframe(visible) {
@@ -9597,8 +9583,9 @@ class LocationContext {
9597
9583
 
9598
9584
  yield _this6.resolver.resolve(brickConf, brick, context);
9599
9585
  var expandedBrickConf = brickConf;
9586
+ var isBaseLayout = ["base-layout.tpl-homepage-base-module", "base-layout.tpl-base-page-module"].includes(tplTagName);
9600
9587
 
9601
- if (tplTagName) {
9588
+ if (tplTagName && (!isBaseLayout || _this6.kernel.getFeatureFlags()["support-ui-8.0-base-layout"] && isBaseLayout)) {
9602
9589
  var _customTemplateRegist;
9603
9590
 
9604
9591
  yield _this6.preFetchMenu((_customTemplateRegist = customTemplateRegistry.get(tplTagName)) === null || _customTemplateRegist === void 0 ? void 0 : _customTemplateRegist.bricks);
@@ -10574,14 +10561,20 @@ class Router {
10574
10561
  if (storyboard) {
10575
10562
  var _currentApp$breadcrum, _currentApp$breadcrum2;
10576
10563
 
10564
+ var {
10565
+ bricks,
10566
+ customApis
10567
+ } = scanStoryboard(storyboard);
10568
+
10577
10569
  if (appChanged && currentApp.id && isLoggedIn()) {
10578
- var usedCustomApis = mapCustomApisToNameAndNamespace(scanCustomApisInStoryboard(storyboard));
10570
+ var usedCustomApis = mapCustomApisToNameAndNamespace(customApis);
10579
10571
 
10580
10572
  if (usedCustomApis !== null && usedCustomApis !== void 0 && usedCustomApis.length) {
10581
10573
  yield _this3.kernel.loadMicroAppApiOrchestrationAsync(usedCustomApis);
10582
10574
  }
10583
10575
  }
10584
10576
 
10577
+ layoutType = bricks.some(brick => ["base-layout.tpl-base-page-module", "base-layout.tpl-homepage-base-module"].includes(brick)) && layoutType === "business" && !_this3.featureFlags["support-ui-8.0-base-layout"] ? "console" : layoutType;
10585
10578
  var mountRoutesResult = {
10586
10579
  main: [],
10587
10580
  menuInBg: [],