@next-core/brick-kit 2.190.0 → 2.191.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 +23 -19
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +23 -19
- package/dist/index.esm.js.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/core/processors.d.ts.map +1 -1
- package/dist/types/core/setAppLocales.d.ts +3 -0
- package/dist/types/core/setAppLocales.d.ts.map +1 -0
- package/package.json +3 -3
package/dist/index.bundle.js
CHANGED
|
@@ -7054,25 +7054,6 @@
|
|
|
7054
7054
|
var app = storyboard.app;
|
|
7055
7055
|
if (app) {
|
|
7056
7056
|
app.config = brickUtils.deepFreeze(_.merge({}, app.defaultConfig, app.userConfig));
|
|
7057
|
-
if (app.locales) {
|
|
7058
|
-
(function () {
|
|
7059
|
-
// Prefix to avoid conflict between brick package's i18n namespace.
|
|
7060
|
-
var ns = "$tmp-".concat(app.id);
|
|
7061
|
-
// Support any languages in `app.locales`.
|
|
7062
|
-
Object.entries(app.locales).forEach(_ref => {
|
|
7063
|
-
var [lang, resources] = _ref;
|
|
7064
|
-
i18next__default["default"].addResourceBundle(lang, ns, resources);
|
|
7065
|
-
});
|
|
7066
|
-
// Use `app.name` as the fallback `app.localeName`.
|
|
7067
|
-
app.localeName = i18next__default["default"].getFixedT(null, ns)("name", app.name);
|
|
7068
|
-
// Remove the temporary i18n resource bundles.
|
|
7069
|
-
Object.keys(app.locales).forEach(lang => {
|
|
7070
|
-
i18next__default["default"].removeResourceBundle(lang, ns);
|
|
7071
|
-
});
|
|
7072
|
-
})();
|
|
7073
|
-
} else {
|
|
7074
|
-
app.localeName = app.name;
|
|
7075
|
-
}
|
|
7076
7057
|
}
|
|
7077
7058
|
}
|
|
7078
7059
|
if (bootstrapResponse.settings) {
|
|
@@ -11824,6 +11805,28 @@
|
|
|
11824
11805
|
}
|
|
11825
11806
|
}
|
|
11826
11807
|
|
|
11808
|
+
function setAppLocales(app) {
|
|
11809
|
+
var _locales, _app$config, _app$config$settings;
|
|
11810
|
+
var locales = (_locales = (_app$config = app.config) === null || _app$config === void 0 ? void 0 : (_app$config$settings = _app$config.settings) === null || _app$config$settings === void 0 ? void 0 : _app$config$settings.locales) !== null && _locales !== void 0 ? _locales : app.locales;
|
|
11811
|
+
if (locales) {
|
|
11812
|
+
// Prefix to avoid conflict between brick package's i18n namespace.
|
|
11813
|
+
var ns = "$tmp-".concat(app.id);
|
|
11814
|
+
// Support any languages in `app.locales`.
|
|
11815
|
+
Object.entries(locales).forEach(_ref => {
|
|
11816
|
+
var [lang, resources] = _ref;
|
|
11817
|
+
i18next__default["default"].addResourceBundle(lang, ns, resources);
|
|
11818
|
+
});
|
|
11819
|
+
// Use `app.name` as the fallback `app.localeName`.
|
|
11820
|
+
app.localeName = i18next__default["default"].getFixedT(null, ns)("name", app.name);
|
|
11821
|
+
// Remove the temporary i18n resource bundles.
|
|
11822
|
+
Object.keys(locales).forEach(lang => {
|
|
11823
|
+
i18next__default["default"].removeResourceBundle(lang, ns);
|
|
11824
|
+
});
|
|
11825
|
+
} else {
|
|
11826
|
+
app.localeName = app.name;
|
|
11827
|
+
}
|
|
11828
|
+
}
|
|
11829
|
+
|
|
11827
11830
|
class Router {
|
|
11828
11831
|
constructor(kernel) {
|
|
11829
11832
|
_defineProperty__default["default"](this, "defaultCollapsed", false);
|
|
@@ -12003,6 +12006,7 @@
|
|
|
12003
12006
|
if (storyboard) {
|
|
12004
12007
|
var _storyboard$meta, _storyboard$meta2, _storyboard$meta3;
|
|
12005
12008
|
yield _this3.kernel.fulfilStoryboard(storyboard);
|
|
12009
|
+
setAppLocales(storyboard.app);
|
|
12006
12010
|
_this3.kernel.nextApp = storyboard.app;
|
|
12007
12011
|
setWatermark();
|
|
12008
12012
|
brickUtils.removeDeadConditions(storyboard, {
|