@next-core/brick-kit 2.153.8 → 2.154.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
@@ -739,19 +739,17 @@ function getUrlBySegueFactory(app, segues) {
739
739
  function imagesFactory(appId, isBuildPush) {
740
740
  return {
741
741
  get(name) {
742
- var _window$PUBLIC_ROOT;
743
-
744
- return isBuildPush ? "api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/".concat(name) : "".concat((_window$PUBLIC_ROOT = window.PUBLIC_ROOT) !== null && _window$PUBLIC_ROOT !== void 0 ? _window$PUBLIC_ROOT : "", "micro-apps/").concat(appId, "/images/").concat(name);
742
+ 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);
745
743
  }
746
744
 
747
745
  };
748
746
  }
749
- function widgetImagesFactory(widgetId) {
747
+ function widgetImagesFactory(widgetId, widgetVersion) {
750
748
  return {
751
749
  get(name) {
752
- var _window$PUBLIC_ROOT2;
750
+ var _window$PUBLIC_ROOT;
753
751
 
754
- return "".concat((_window$PUBLIC_ROOT2 = window.PUBLIC_ROOT) !== null && _window$PUBLIC_ROOT2 !== void 0 ? _window$PUBLIC_ROOT2 : "", "bricks/").concat(widgetId, "/dist/assets/").concat(name);
752
+ return "".concat((_window$PUBLIC_ROOT = window.PUBLIC_ROOT) !== null && _window$PUBLIC_ROOT !== void 0 ? _window$PUBLIC_ROOT : "", "bricks/").concat(widgetId, "/").concat(window.PUBLIC_ROOT_WITH_VERSION && widgetVersion ? "".concat(widgetVersion, "/") : "", "dist/assets/").concat(name);
755
753
  }
756
754
 
757
755
  };
@@ -1570,6 +1568,7 @@ function getIndividualGlobal(variableName, _ref) {
1570
1568
  var {
1571
1569
  collectCoverage,
1572
1570
  widgetId,
1571
+ widgetVersion,
1573
1572
  app,
1574
1573
  appendI18nNamespace,
1575
1574
  storyboardFunctions,
@@ -1584,7 +1583,7 @@ function getIndividualGlobal(variableName, _ref) {
1584
1583
  return storyboardFunctions;
1585
1584
 
1586
1585
  case "IMG":
1587
- return collectCoverage ? fakeImageFactory() : widgetId ? widgetImagesFactory(widgetId) : imagesFactory(app.id, app.isBuildPush);
1586
+ return collectCoverage ? fakeImageFactory() : widgetId ? widgetImagesFactory(widgetId, widgetVersion) : imagesFactory(app.id, app.isBuildPush);
1588
1587
 
1589
1588
  case "I18N":
1590
1589
  return collectCoverage ? identity : widgetId ? widgetI18nFactory(widgetId) : getFixedT(null, [appendI18nNamespace, getI18nNamespace("app", app.id)].filter(Boolean));
@@ -1644,6 +1643,7 @@ function fakeCheckPermissions() {
1644
1643
  function StoryboardFunctionRegistryFactory() {
1645
1644
  var {
1646
1645
  widgetId,
1646
+ widgetVersion,
1647
1647
  collectCoverage
1648
1648
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1649
1649
  var registeredFunctions = new Map(); // Use `Proxy` with a frozen target, to make a readonly function registry.
@@ -1703,6 +1703,7 @@ function StoryboardFunctionRegistryFactory() {
1703
1703
  globalVariables: supply(precooked.attemptToVisitGlobals, getGeneralGlobals(precooked.attemptToVisitGlobals, {
1704
1704
  collectCoverage,
1705
1705
  widgetId,
1706
+ widgetVersion,
1706
1707
  app: currentApp,
1707
1708
  storyboardFunctions,
1708
1709
  isStoryboardFunction: true
@@ -1743,7 +1744,7 @@ var widgetFunctions = new Proxy(Object.freeze({}), {
1743
1744
  }
1744
1745
 
1745
1746
  });
1746
- function registerWidgetFunctions(widgetId, functions) {
1747
+ function registerWidgetFunctions(widgetId, functions, widgetVersion) {
1747
1748
  if (widgetFunctionRegistry.has(widgetId)) {
1748
1749
  // eslint-disable-next-line no-console
1749
1750
  throw new Error("Widget functions of \"".concat(widgetId, "\" already registered"));
@@ -1753,7 +1754,8 @@ function registerWidgetFunctions(widgetId, functions) {
1753
1754
  storyboardFunctions,
1754
1755
  registerStoryboardFunctions
1755
1756
  } = StoryboardFunctionRegistryFactory({
1756
- widgetId
1757
+ widgetId,
1758
+ widgetVersion
1757
1759
  });
1758
1760
  widgetFunctionRegistry.set(widgetId, storyboardFunctions);
1759
1761
  registerStoryboardFunctions(functions);