@next-core/brick-kit 2.153.9 → 2.154.1
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.bundle.js +9 -5
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +9 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/StoryboardFunctionRegistryFactory.d.ts +2 -1
- package/dist/types/core/StoryboardFunctionRegistryFactory.d.ts.map +1 -1
- package/dist/types/core/WidgetFunctions.d.ts +1 -1
- package/dist/types/core/WidgetFunctions.d.ts.map +1 -1
- package/dist/types/internal/getGeneralGlobals.d.ts +1 -0
- package/dist/types/internal/getGeneralGlobals.d.ts.map +1 -1
- package/dist/types/internal/images.d.ts +1 -1
- package/dist/types/internal/images.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.bundle.js
CHANGED
|
@@ -743,12 +743,12 @@
|
|
|
743
743
|
|
|
744
744
|
};
|
|
745
745
|
}
|
|
746
|
-
function widgetImagesFactory(widgetId) {
|
|
746
|
+
function widgetImagesFactory(widgetId, widgetVersion) {
|
|
747
747
|
return {
|
|
748
748
|
get(name) {
|
|
749
749
|
var _window$PUBLIC_ROOT;
|
|
750
750
|
|
|
751
|
-
return "".concat((_window$PUBLIC_ROOT = window.PUBLIC_ROOT) !== null && _window$PUBLIC_ROOT !== void 0 ? _window$PUBLIC_ROOT : "", "bricks/").concat(widgetId, "/dist/assets/").concat(name);
|
|
751
|
+
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);
|
|
752
752
|
}
|
|
753
753
|
|
|
754
754
|
};
|
|
@@ -1567,6 +1567,7 @@
|
|
|
1567
1567
|
var {
|
|
1568
1568
|
collectCoverage,
|
|
1569
1569
|
widgetId,
|
|
1570
|
+
widgetVersion,
|
|
1570
1571
|
app,
|
|
1571
1572
|
appendI18nNamespace,
|
|
1572
1573
|
storyboardFunctions,
|
|
@@ -1581,7 +1582,7 @@
|
|
|
1581
1582
|
return storyboardFunctions;
|
|
1582
1583
|
|
|
1583
1584
|
case "IMG":
|
|
1584
|
-
return collectCoverage ? fakeImageFactory() : widgetId ? widgetImagesFactory(widgetId) : imagesFactory(app.id, app.isBuildPush);
|
|
1585
|
+
return collectCoverage ? fakeImageFactory() : widgetId ? widgetImagesFactory(widgetId, widgetVersion) : imagesFactory(app.id, app.isBuildPush);
|
|
1585
1586
|
|
|
1586
1587
|
case "I18N":
|
|
1587
1588
|
return collectCoverage ? _.identity : widgetId ? widgetI18nFactory(widgetId) : i18next.getFixedT(null, [appendI18nNamespace, getI18nNamespace("app", app.id)].filter(Boolean));
|
|
@@ -1641,6 +1642,7 @@
|
|
|
1641
1642
|
function StoryboardFunctionRegistryFactory() {
|
|
1642
1643
|
var {
|
|
1643
1644
|
widgetId,
|
|
1645
|
+
widgetVersion,
|
|
1644
1646
|
collectCoverage
|
|
1645
1647
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1646
1648
|
var registeredFunctions = new Map(); // Use `Proxy` with a frozen target, to make a readonly function registry.
|
|
@@ -1700,6 +1702,7 @@
|
|
|
1700
1702
|
globalVariables: supply(precooked.attemptToVisitGlobals, getGeneralGlobals(precooked.attemptToVisitGlobals, {
|
|
1701
1703
|
collectCoverage,
|
|
1702
1704
|
widgetId,
|
|
1705
|
+
widgetVersion,
|
|
1703
1706
|
app: currentApp,
|
|
1704
1707
|
storyboardFunctions,
|
|
1705
1708
|
isStoryboardFunction: true
|
|
@@ -1740,7 +1743,7 @@
|
|
|
1740
1743
|
}
|
|
1741
1744
|
|
|
1742
1745
|
});
|
|
1743
|
-
function registerWidgetFunctions(widgetId, functions) {
|
|
1746
|
+
function registerWidgetFunctions(widgetId, functions, widgetVersion) {
|
|
1744
1747
|
if (widgetFunctionRegistry.has(widgetId)) {
|
|
1745
1748
|
// eslint-disable-next-line no-console
|
|
1746
1749
|
throw new Error("Widget functions of \"".concat(widgetId, "\" already registered"));
|
|
@@ -1750,7 +1753,8 @@
|
|
|
1750
1753
|
storyboardFunctions,
|
|
1751
1754
|
registerStoryboardFunctions
|
|
1752
1755
|
} = StoryboardFunctionRegistryFactory({
|
|
1753
|
-
widgetId
|
|
1756
|
+
widgetId,
|
|
1757
|
+
widgetVersion
|
|
1754
1758
|
});
|
|
1755
1759
|
widgetFunctionRegistry.set(widgetId, storyboardFunctions);
|
|
1756
1760
|
registerStoryboardFunctions(functions);
|