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