@next-core/brick-kit 2.165.7 → 2.166.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
@@ -645,10 +645,25 @@ function getUrlBySegueFactory(app, segues) {
645
645
  };
646
646
  }
647
647
 
648
- function imagesFactory(appId, isBuildPush) {
648
+ function imagesFactory(appId, isBuildPush, version) {
649
649
  return {
650
650
  get(name) {
651
- return isBuildPush ? "api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/".concat(name) : "".concat(window.APP_ROOT ? "".concat(window.APP_ROOT, "-/") : "", "micro-apps/").concat(appId, "/images/").concat(name);
651
+ var getSuffix = () => {
652
+ var suffix = window.APP_ROOT ? "".concat(window.APP_ROOT, "-/") : "";
653
+ if (!suffix.startsWith("/")) {
654
+ suffix = getBasePath() + suffix;
655
+ }
656
+ if (window.APP_ID && window.APP_ID !== appId) {
657
+ return suffix.replace(new RegExp("/(".concat(window.APP_ID, "|\\d+.\\d+.\\d+)/"), "g"), (_, p1) => {
658
+ if (p1 === window.APP_ID) {
659
+ return "/".concat(appId, "/");
660
+ }
661
+ return "/".concat(version, "/");
662
+ });
663
+ }
664
+ return suffix;
665
+ };
666
+ return isBuildPush ? "".concat(getBasePath(), "api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/").concat(name) : "".concat(getSuffix(), "micro-apps/").concat(appId, "/images/").concat(name);
652
667
  }
653
668
  };
654
669
  }
@@ -1403,7 +1418,7 @@ function getIndividualGlobal(variableName, _ref) {
1403
1418
  case "FN":
1404
1419
  return storyboardFunctions;
1405
1420
  case "IMG":
1406
- return collectCoverage ? fakeImageFactory() : widgetId ? widgetImagesFactory(widgetId, widgetVersion) : imagesFactory(app.id, app.isBuildPush);
1421
+ return collectCoverage ? fakeImageFactory() : widgetId ? widgetImagesFactory(widgetId, widgetVersion) : imagesFactory(app.id, app.isBuildPush, app.currentVersion);
1407
1422
  case "I18N":
1408
1423
  return collectCoverage ? identity : widgetId ? widgetI18nFactory(widgetId) : getFixedT(null, [appendI18nNamespace, getI18nNamespace("app", app.id)].filter(Boolean));
1409
1424
  case "I18N_TEXT":
@@ -2908,7 +2923,7 @@ function computeRealValueWithOverrideApp(_x22, _x23, _x24, _x25) {
2908
2923
  function _computeRealValueWithOverrideApp() {
2909
2924
  _computeRealValueWithOverrideApp = _asyncToGenerator$3(function* (data, overrideAppId, context, kernel) {
2910
2925
  var newContext = context;
2911
- if (overrideAppId !== context.app.id && attemptToVisit(data, ["APP", "I18N"])) {
2926
+ if (overrideAppId !== context.app.id && attemptToVisit(data, ["APP", "I18N", "IMG"])) {
2912
2927
  if (window.STANDALONE_MICRO_APPS) {
2913
2928
  if (data[symbolOverrideApp]) {
2914
2929
  data[symbolOverrideApp].config = deepFreeze(merge({}, data[symbolOverrideApp].defaultConfig, data[symbolOverrideApp].userConfig));