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