@next-core/brick-kit 2.164.2 → 2.164.4

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.
@@ -1899,7 +1899,12 @@
1899
1899
  }
1900
1900
  }
1901
1901
  getResolveOptions(coreContext) {
1902
- return this.tplContextId ? {
1902
+ return this.formContextId ? {
1903
+ mergedContext: _objectSpread__default["default"](_objectSpread__default["default"]({}, coreContext), {}, {
1904
+ formContextId: this.formContextId
1905
+ }),
1906
+ keyword: "FORM_STATE"
1907
+ } : this.tplContextId ? {
1903
1908
  mergedContext: _objectSpread__default["default"](_objectSpread__default["default"]({}, coreContext), {}, {
1904
1909
  tplContextId: this.tplContextId
1905
1910
  }),
@@ -2017,8 +2022,9 @@
2017
2022
  }
2018
2023
  if (contextConf.track) {
2019
2024
  var isTemplateState = !!storyboardContextWrapper.tplContextId;
2025
+ var isFormState = !!storyboardContextWrapper.formContextId;
2020
2026
  // Track its dependencies and auto update when each of them changed.
2021
- var deps = (isTemplateState ? brickUtils.trackUsedState : brickUtils.trackUsedContext)(load ? contextConf.resolve : contextConf.value);
2027
+ var deps = (isFormState ? brickUtils.trackUsedFormState : isTemplateState ? brickUtils.trackUsedState : brickUtils.trackUsedContext)(load ? contextConf.resolve : contextConf.value);
2022
2028
  for (var dep of deps) {
2023
2029
  var _eventTarget;
2024
2030
  var ctx = storyboardContextWrapper.get().get(dep);
@@ -11111,7 +11117,7 @@
11111
11117
  render(location) {
11112
11118
  var _this3 = this;
11113
11119
  return _asyncToGenerator__default["default"](function* () {
11114
- var _apiAnalyzer$getInsta, _currentApp$config, _currentApp$config$_e, _getLocalAppsTheme;
11120
+ var _apiAnalyzer$getInsta, _currentApp$config, _currentApp$config$_e, _this3$kernel$bootstr, _this3$kernel$bootstr2, _getLocalAppsTheme;
11115
11121
  _this3.state = "initial";
11116
11122
  _this3.renderId = _.uniqueId("render-id-");
11117
11123
  resetAllInjected();
@@ -11188,9 +11194,12 @@
11188
11194
  var layoutType = (currentApp === null || currentApp === void 0 ? void 0 : currentApp.layoutType) || "console";
11189
11195
  var faviconElement = document.querySelector("link[rel='shortcut icon']");
11190
11196
  var customFaviconHref = currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$config = currentApp.config) === null || _currentApp$config === void 0 ? void 0 : (_currentApp$config$_e = _currentApp$config._easyops_app_favicon) === null || _currentApp$config$_e === void 0 ? void 0 : _currentApp$config$_e.default;
11197
+ var settingsFaviconHref = (_this3$kernel$bootstr = _this3.kernel.bootstrapData.settings) === null || _this3$kernel$bootstr === void 0 ? void 0 : (_this3$kernel$bootstr2 = _this3$kernel$bootstr.brand) === null || _this3$kernel$bootstr2 === void 0 ? void 0 : _this3$kernel$bootstr2.favicon;
11191
11198
  if (faviconElement) {
11192
11199
  if (customFaviconHref) {
11193
11200
  faviconElement.href = /^(?:https?|data):|^\//.test(customFaviconHref) ? customFaviconHref : imagesFactory(currentApp.id, currentApp.isBuildPush).get(customFaviconHref);
11201
+ } else if (settingsFaviconHref) {
11202
+ faviconElement.href = settingsFaviconHref;
11194
11203
  } else {
11195
11204
  faviconElement.href = _this3.kernel.getOriginFaviconHref();
11196
11205
  }
@@ -11358,7 +11367,7 @@
11358
11367
  // When we have a matched route other than an abstract route,
11359
11368
  // we say *page found*, otherwise, *page not found*.
11360
11369
  if (route && route.type !== "routes" || failed) {
11361
- var _this3$kernel$bootstr, _this3$kernel$bootstr2, _getAuth$license;
11370
+ var _this3$kernel$bootstr3, _this3$kernel$bootstr4, _getAuth$license;
11362
11371
  yield pendingTask;
11363
11372
  main.length > 0 && mountTree(main, mountPoints.main);
11364
11373
  portal.length > 0 && mountTree(portal, mountPoints.portal);
@@ -11397,7 +11406,7 @@
11397
11406
  var {
11398
11407
  loadTime = 0,
11399
11408
  loadInfoPage
11400
- } = (_this3$kernel$bootstr = (_this3$kernel$bootstr2 = _this3.kernel.bootstrapData.settings) === null || _this3$kernel$bootstr2 === void 0 ? void 0 : _this3$kernel$bootstr2.misc) !== null && _this3$kernel$bootstr !== void 0 ? _this3$kernel$bootstr : {};
11409
+ } = (_this3$kernel$bootstr3 = (_this3$kernel$bootstr4 = _this3.kernel.bootstrapData.settings) === null || _this3$kernel$bootstr4 === void 0 ? void 0 : _this3$kernel$bootstr4.misc) !== null && _this3$kernel$bootstr3 !== void 0 ? _this3$kernel$bootstr3 : {};
11401
11410
  if (currentApp.isBuildPush && loadTime > 0 && renderTime > loadTime) {
11402
11411
  var getSecond = time => Math.floor(time * 100) / 100;
11403
11412
  tipsDetail.push(_objectSpread__default["default"]({