@next-core/brick-kit 2.165.4 → 2.165.5

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
@@ -8788,6 +8788,14 @@ class Kernel {
8788
8788
  yield _this9.loadDynamicBricks(bricks, processors);
8789
8789
  })();
8790
8790
  }
8791
+ loadResourceOfTemplate(tplTagName) {
8792
+ var _this10 = this;
8793
+ return _asyncToGenerator$3(function* () {
8794
+ var template = customTemplateRegistry.get(tplTagName);
8795
+ var processors = scanProcessorsInAny([template.state, template.bricks]);
8796
+ yield _this10.loadDynamicBricks([], processors);
8797
+ })();
8798
+ }
8791
8799
  loadDynamicBricks(bricks, processors) {
8792
8800
  return this.gracefullyLoadDeps(this._loadDynamicBricks, bricks, processors);
8793
8801
  }
@@ -8872,9 +8880,9 @@ class Kernel {
8872
8880
  this.allMicroAppApiOrchestrationPromise = this.loadMicroAppApiOrchestration(usedCustomApis);
8873
8881
  }
8874
8882
  getMicroAppApiOrchestrationMapAsync() {
8875
- var _this10 = this;
8883
+ var _this11 = this;
8876
8884
  return _asyncToGenerator$3(function* () {
8877
- return yield _this10.allMicroAppApiOrchestrationPromise;
8885
+ return yield _this11.allMicroAppApiOrchestrationPromise;
8878
8886
  })();
8879
8887
  }
8880
8888
  loadMicroAppApiOrchestration(usedCustomApis) {
@@ -8947,12 +8955,12 @@ class Kernel {
8947
8955
  return Object.assign({}, (_this$bootstrapData = this.bootstrapData) === null || _this$bootstrapData === void 0 ? void 0 : (_this$bootstrapData$s = _this$bootstrapData.settings) === null || _this$bootstrapData$s === void 0 ? void 0 : _this$bootstrapData$s.featureFlags, (_this$nextApp = this.nextApp) === null || _this$nextApp === void 0 ? void 0 : (_this$nextApp$config = _this$nextApp.config) === null || _this$nextApp$config === void 0 ? void 0 : (_this$nextApp$config$ = _this$nextApp$config.settings) === null || _this$nextApp$config$ === void 0 ? void 0 : _this$nextApp$config$.featureFlags);
8948
8956
  }
8949
8957
  getStandaloneMenus(menuId, isPreFetch) {
8950
- var _this11 = this;
8958
+ var _this12 = this;
8951
8959
  return _asyncToGenerator$3(function* () {
8952
8960
  var _currentStoryboard$me, _currentStoryboard$me2;
8953
- var app = isPreFetch ? _this11.nextApp : _this11.currentApp;
8961
+ var app = isPreFetch ? _this12.nextApp : _this12.currentApp;
8954
8962
  var currentAppId = app.id;
8955
- var currentStoryboard = _this11.bootstrapData.storyboards.find(storyboard => storyboard.app.id === currentAppId);
8963
+ var currentStoryboard = _this12.bootstrapData.storyboards.find(storyboard => storyboard.app.id === currentAppId);
8956
8964
  var menus = (_currentStoryboard$me = currentStoryboard.meta) !== null && _currentStoryboard$me !== void 0 && _currentStoryboard$me.injectMenus ? cloneDeep(currentStoryboard.meta.injectMenus) : (_currentStoryboard$me2 = currentStoryboard.meta) !== null && _currentStoryboard$me2 !== void 0 && _currentStoryboard$me2.menus ? cloneDeep(currentStoryboard.meta.menus) : [];
8957
8965
  var filterMenus = menus.filter(menu => menu.menuId === menuId).map(menu => {
8958
8966
  var _menu$app;
@@ -9005,23 +9013,23 @@ class Kernel {
9005
9013
  return this.originFaviconHref;
9006
9014
  }
9007
9015
  getProviderBrick(provider) {
9008
- var _this12 = this;
9016
+ var _this13 = this;
9009
9017
  return _asyncToGenerator$3(function* () {
9010
9018
  if (isCustomApiProvider(provider)) {
9011
9019
  provider = CUSTOM_API_PROVIDER;
9012
9020
  }
9013
- if (_this12.providerRepository.has(provider)) {
9014
- return _this12.providerRepository.get(provider);
9021
+ if (_this13.providerRepository.has(provider)) {
9022
+ return _this13.providerRepository.get(provider);
9015
9023
  }
9016
9024
  if (provider === CUSTOM_API_PROVIDER && !customElements.get(provider)) {
9017
9025
  registerCustomApi();
9018
9026
  }
9019
- yield _this12.loadDynamicBricks([provider]);
9027
+ yield _this13.loadDynamicBricks([provider]);
9020
9028
  if (!customElements.get(provider)) {
9021
9029
  throw new Error("Provider not defined: \"".concat(provider, "\"."));
9022
9030
  }
9023
9031
  var brick = document.createElement(provider);
9024
- _this12.providerRepository.set(provider, brick);
9032
+ _this13.providerRepository.set(provider, brick);
9025
9033
  return brick;
9026
9034
  })();
9027
9035
  }
@@ -10143,6 +10151,7 @@ class LocationContext {
10143
10151
  if (tplTagName && (!isBaseLayout || _this10.kernel.getFeatureFlags()["support-ui-8.0-base-layout"] && isBaseLayout)) {
10144
10152
  var _customTemplateRegist;
10145
10153
  yield _this10.preFetchMenu((_customTemplateRegist = customTemplateRegistry.get(tplTagName)) === null || _customTemplateRegist === void 0 ? void 0 : _customTemplateRegist.bricks);
10154
+ yield _this10.kernel.loadResourceOfTemplate(tplTagName);
10146
10155
  expandedBrickConf = yield asyncExpandCustomTemplate(_objectSpread(_objectSpread({}, brickConf), {}, {
10147
10156
  brick: tplTagName,
10148
10157
  // Properties are computed for custom templates.