@next-core/brick-kit 2.195.0 → 2.195.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.esm.js
CHANGED
|
@@ -7084,6 +7084,28 @@ var UserAdminApi_searchAllUsersInfo = /*#__PURE__*/function () {
|
|
|
7084
7084
|
};
|
|
7085
7085
|
}();
|
|
7086
7086
|
|
|
7087
|
+
function setAppLocales(app) {
|
|
7088
|
+
var _locales, _app$config, _app$config$settings;
|
|
7089
|
+
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;
|
|
7090
|
+
if (locales) {
|
|
7091
|
+
// Prefix to avoid conflict between brick package's i18n namespace.
|
|
7092
|
+
var ns = "$tmp-".concat(app.id);
|
|
7093
|
+
// Support any languages in `app.locales`.
|
|
7094
|
+
Object.entries(locales).forEach(_ref => {
|
|
7095
|
+
var [lang, resources] = _ref;
|
|
7096
|
+
i18next.addResourceBundle(lang, ns, resources);
|
|
7097
|
+
});
|
|
7098
|
+
// Use `app.name` as the fallback `app.localeName`.
|
|
7099
|
+
app.localeName = i18next.getFixedT(null, ns)("name", app.name);
|
|
7100
|
+
// Remove the temporary i18n resource bundles.
|
|
7101
|
+
Object.keys(locales).forEach(lang => {
|
|
7102
|
+
i18next.removeResourceBundle(lang, ns);
|
|
7103
|
+
});
|
|
7104
|
+
} else {
|
|
7105
|
+
app.localeName = app.name;
|
|
7106
|
+
}
|
|
7107
|
+
}
|
|
7108
|
+
|
|
7087
7109
|
/**
|
|
7088
7110
|
* Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
|
|
7089
7111
|
*
|
|
@@ -7094,6 +7116,7 @@ function processBootstrapResponse(bootstrapResponse) {
|
|
|
7094
7116
|
var app = storyboard.app;
|
|
7095
7117
|
if (app) {
|
|
7096
7118
|
app.config = deepFreeze(merge({}, app.defaultConfig, app.userConfig));
|
|
7119
|
+
setAppLocales(storyboard.app);
|
|
7097
7120
|
}
|
|
7098
7121
|
}
|
|
7099
7122
|
if (bootstrapResponse.settings) {
|
|
@@ -11848,28 +11871,6 @@ function setWatermark() {
|
|
|
11848
11871
|
}
|
|
11849
11872
|
}
|
|
11850
11873
|
|
|
11851
|
-
function setAppLocales(app) {
|
|
11852
|
-
var _locales, _app$config, _app$config$settings;
|
|
11853
|
-
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;
|
|
11854
|
-
if (locales) {
|
|
11855
|
-
// Prefix to avoid conflict between brick package's i18n namespace.
|
|
11856
|
-
var ns = "$tmp-".concat(app.id);
|
|
11857
|
-
// Support any languages in `app.locales`.
|
|
11858
|
-
Object.entries(locales).forEach(_ref => {
|
|
11859
|
-
var [lang, resources] = _ref;
|
|
11860
|
-
i18next.addResourceBundle(lang, ns, resources);
|
|
11861
|
-
});
|
|
11862
|
-
// Use `app.name` as the fallback `app.localeName`.
|
|
11863
|
-
app.localeName = i18next.getFixedT(null, ns)("name", app.name);
|
|
11864
|
-
// Remove the temporary i18n resource bundles.
|
|
11865
|
-
Object.keys(locales).forEach(lang => {
|
|
11866
|
-
i18next.removeResourceBundle(lang, ns);
|
|
11867
|
-
});
|
|
11868
|
-
} else {
|
|
11869
|
-
app.localeName = app.name;
|
|
11870
|
-
}
|
|
11871
|
-
}
|
|
11872
|
-
|
|
11873
11874
|
class Router {
|
|
11874
11875
|
constructor(kernel) {
|
|
11875
11876
|
_defineProperty$1(this, "defaultCollapsed", false);
|
|
@@ -15128,5 +15129,5 @@ function constructEventListener(handler) {
|
|
|
15128
15129
|
});
|
|
15129
15130
|
}
|
|
15130
15131
|
|
|
15131
|
-
export { BrickAsComponent, BrickAsComponentFactory, BrickWrapper, DisplayByFeatureFlags, EasyopsEmpty, ErrorBoundary, FeatureFlagsProvider, ForwardRefSingleBrickAsComponent, ForwardRefSingleBrickAsComponentFactory, ModalElement, SingleBrickAsComponent, SingleBrickAsComponentFactory, StoryboardFunctionRegistryFactory, UpdatingElement, WebsocketMessageRequest, WebsocketMessageResponse, abortController, applyTheme, authenticate, batchSetAppsLocalTheme, checkIf, checkIfByTransform, clearDebugContract, collectDebugContract, constructEventListener, createHistory, createRuntime, createWebSocket, developHelper, doTransform, event, getAuth, getCssPropertyValue, getCurrentTheme, getHistory, getMockInfo, getRealValue, getRuntime, getRuntimeMisc, getWebSocket, handleHttpError, httpErrorToString, i18nText, initI18n, isLoggedIn, logout, looseCheckIf$1 as looseCheckIf, looseCheckIfByTransform, looseCheckIfOfComputed, method, preprocessTransformProperties, property, reTransformForDevtools, renderEasyopsEmpty, transformElementProperties, transformIntermediateData, transformProperties, useApplyPageTitle, useCurrentApp, useCurrentMode, useCurrentTheme, useFeatureFlags, useLocation, useProvider, useRecentApps };
|
|
15132
|
+
export { BrickAsComponent, BrickAsComponentFactory, BrickWrapper, DisplayByFeatureFlags, EasyopsEmpty, ErrorBoundary, FeatureFlagsProvider, ForwardRefSingleBrickAsComponent, ForwardRefSingleBrickAsComponentFactory, ModalElement, SingleBrickAsComponent, SingleBrickAsComponentFactory, StoryboardFunctionRegistryFactory, UpdatingElement, WebsocketMessageRequest, WebsocketMessageResponse, abortController, applyTheme, authenticate, batchSetAppsLocalTheme, checkIf, checkIfByTransform, clearDebugContract, collectDebugContract, constructEventListener, createHistory, createRuntime, createWebSocket, developHelper, doTransform, event, getAuth, getCssPropertyValue, getCurrentTheme, getHistory, getMockInfo, getRealValue, getRuntime, getRuntimeMisc, getWebSocket, handleHttpError, httpErrorToString, i18nText, initI18n, isLoggedIn, logout, looseCheckIf$1 as looseCheckIf, looseCheckIfByTransform, looseCheckIfOfComputed, method, preprocessTransformProperties, property, reTransformForDevtools, renderEasyopsEmpty, setAppLocales, transformElementProperties, transformIntermediateData, transformProperties, useApplyPageTitle, useCurrentApp, useCurrentMode, useCurrentTheme, useFeatureFlags, useLocation, useProvider, useRecentApps };
|
|
15132
15133
|
//# sourceMappingURL=index.esm.js.map
|