@next-core/brick-kit 2.199.10 → 2.200.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
@@ -7162,7 +7162,7 @@ function processBootstrapResponse(bootstrapResponse) {
7162
7162
  for (var storyboard of bootstrapResponse.storyboards) {
7163
7163
  var app = storyboard.app;
7164
7164
  if (app) {
7165
- app.config = deepFreeze(merge({}, app.defaultConfig, app.userConfig));
7165
+ initializeAppConfig(app);
7166
7166
  setAppLocales(storyboard.app);
7167
7167
  }
7168
7168
  }
@@ -7172,6 +7172,12 @@ function processBootstrapResponse(bootstrapResponse) {
7172
7172
  bootstrapResponse.brickPackages = deepFreeze(bootstrapResponse.brickPackages);
7173
7173
  bootstrapResponse.templatePackages = deepFreeze(bootstrapResponse.templatePackages);
7174
7174
  }
7175
+ function initializeAppConfig(app) {
7176
+ var _app$userConfig$__mer, _app$userConfig, _app$defaultConfig;
7177
+ // Manually add `__merge_method: override` to `app.userConfig` to avoid being deep merged.
7178
+ var mergedConfig = ((_app$userConfig$__mer = (_app$userConfig = app.userConfig) === null || _app$userConfig === void 0 ? void 0 : _app$userConfig.__merge_method) !== null && _app$userConfig$__mer !== void 0 ? _app$userConfig$__mer : (_app$defaultConfig = app.defaultConfig) === null || _app$defaultConfig === void 0 ? void 0 : _app$defaultConfig.__merge_method) === "override" ? _objectSpread(_objectSpread({}, app.defaultConfig), app.userConfig) : merge({}, app.defaultConfig, app.userConfig);
7179
+ app.config = deepFreeze(mergedConfig);
7180
+ }
7175
7181
 
7176
7182
  var CUSTOM_API_PROVIDER = "brick-kit.provider-custom-api";
7177
7183
  function hasFields(ext_fields, type) {
@@ -9260,7 +9266,7 @@ class Kernel {
9260
9266
  if (appRuntimeData) {
9261
9267
  // Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
9262
9268
  storyboard.app.userConfig = _objectSpread(_objectSpread({}, storyboard.app.userConfig), appRuntimeData.userConfig);
9263
- storyboard.app.config = deepFreeze(merge({}, storyboard.app.defaultConfig, storyboard.app.userConfig));
9269
+ initializeAppConfig(storyboard.app);
9264
9270
  // get inject menus (Actually, appRuntimeData contains both main and inject menus)
9265
9271
  storyboard.meta = _objectSpread(_objectSpread({}, storyboard.meta), {}, {
9266
9272
  injectMenus: appRuntimeData.injectMenus