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