@next-core/brick-kit 2.162.0 → 2.163.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.esm.js CHANGED
@@ -3,8 +3,8 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
4
  import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
5
5
  import _asyncToGenerator$3 from '@babel/runtime/helpers/asyncToGenerator';
6
- 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';
7
- import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, trackFormState, scanPermissionActionsInStoryboard, precookFunction, cook, collectContextUsage, deferResolveContextConcurrently, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, scanPermissionActionsInAny, matchPath, asyncProcessBrick, deepFreeze, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript, scanAppGetMenuInAny, scanInstalledAppsInStoryboard, removeDeadConditions, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
6
+ import _, { set, get, difference, identity, uniqueId, cloneDeep, clamp, isNil, isEmpty, merge, sortBy, orderBy, isObject as isObject$1, uniq, pick, omit, findLastIndex, noop, isString as isString$1 } from 'lodash';
7
+ import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, trackFormState, scanPermissionActionsInStoryboard, precookFunction, cook, collectContextUsage, deferResolveContextConcurrently, resolveContextConcurrently, syncResolveContextConcurrently, trackUsedState, trackUsedContext, shouldAllowRecursiveEvaluations, preevaluate, inject, scanPermissionActionsInAny, deepFreeze, matchPath, asyncProcessBrick, createProviderClass, removeDeadConditionsInTpl, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, loadScript, scanAppGetMenuInAny, scanInstalledAppsInStoryboard, removeDeadConditions, restoreDynamicTemplates, scanStoryboard, mapCustomApisToNameAndNamespace } from '@next-core/brick-utils';
8
8
  import React, { useState, useEffect, useRef, useMemo, useCallback, forwardRef, useImperativeHandle, useContext, createContext, useReducer } from 'react';
9
9
  import { http, HttpResponseError, HttpAbortError, HttpFetchError } from '@next-core/brick-http';
10
10
  import { Modal, message, Empty, ConfigProvider } from 'antd';
@@ -2932,6 +2932,9 @@ function _loadDynamicMenuItems() {
2932
2932
  var newContext = context;
2933
2933
  if (overrideAppId !== context.app.id && attemptToVisit(menu.itemsResolve, ["APP", "I18N"])) {
2934
2934
  if (window.STANDALONE_MICRO_APPS) {
2935
+ if (menu.overrideApp) {
2936
+ menu.overrideApp.config = deepFreeze(merge({}, menu.overrideApp.defaultConfig, menu.overrideApp.userConfig));
2937
+ }
2935
2938
  newContext = _objectSpread(_objectSpread({}, context), {}, {
2936
2939
  overrideApp: menu.overrideApp,
2937
2940
  appendI18nNamespace: menuWithI18n.get(menu)
@@ -3124,6 +3127,9 @@ function _computeRealValueWithOverrideApp() {
3124
3127
  var newContext = context;
3125
3128
  if (overrideAppId !== context.app.id && attemptToVisit(data, ["APP", "I18N"])) {
3126
3129
  if (window.STANDALONE_MICRO_APPS) {
3130
+ if (data[symbolOverrideApp]) {
3131
+ data[symbolOverrideApp].config = deepFreeze(merge({}, data[symbolOverrideApp].defaultConfig, data[symbolOverrideApp].userConfig));
3132
+ }
3127
3133
  newContext = _objectSpread(_objectSpread({}, context), {}, {
3128
3134
  overrideApp: data[symbolOverrideApp],
3129
3135
  appendI18nNamespace: data[symbolMenuI18nNamespace]
@@ -8244,13 +8250,13 @@ class Kernel {
8244
8250
  dll,
8245
8251
  deps,
8246
8252
  bricks,
8247
- byProcessors
8253
+ eager
8248
8254
  } = getDllAndDepsOfStoryboard(yield asyncProcessStoryboard(storyboard, brickTemplateRegistry, templatePackages), brickPackages, {
8249
8255
  ignoreBricksInUnusedCustomTemplates: true
8250
8256
  });
8251
- // 需要先阻塞加载 Custom Processors。
8252
- yield loadScriptOfDll(byProcessors.dll);
8253
- yield loadScriptOfBricksOrTemplates(byProcessors.deps);
8257
+ // 需要先阻塞加载 Custom Processors 和 widgets
8258
+ yield loadScriptOfDll(eager.dll);
8259
+ yield loadScriptOfBricksOrTemplates(eager.deps);
8254
8260
  // 加载构件资源时,不再阻塞后续业务数据的加载,在挂载构件时再等待该任务完成。
8255
8261
  // 挂载构件可能包括:Provider 构件实时挂载、路由准备完成后的统一挂载等。
8256
8262
  return {
@@ -9544,10 +9550,10 @@ function initFormContext(formData, brickConf, isPreview) {
9544
9550
  item.value = brickConf.properties[item.name];
9545
9551
  }
9546
9552
  });
9547
- if (brickConf.properties.condition) {
9553
+ if (brickConf.properties.params) {
9548
9554
  formData.context.push({
9549
- name: "condition",
9550
- value: brickConf.properties.condition
9555
+ name: "params",
9556
+ value: brickConf.properties.params
9551
9557
  });
9552
9558
  }
9553
9559
  }