@next-core/brick-kit 2.194.2 → 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.bundle.js +30 -28
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +31 -30
- package/dist/index.esm.js.map +1 -1
- package/dist/types/ErrorBoundary.d.ts.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/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.bundle.js
CHANGED
|
@@ -7082,6 +7082,28 @@
|
|
|
7082
7082
|
};
|
|
7083
7083
|
}();
|
|
7084
7084
|
|
|
7085
|
+
function setAppLocales(app) {
|
|
7086
|
+
var _locales, _app$config, _app$config$settings;
|
|
7087
|
+
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;
|
|
7088
|
+
if (locales) {
|
|
7089
|
+
// Prefix to avoid conflict between brick package's i18n namespace.
|
|
7090
|
+
var ns = "$tmp-".concat(app.id);
|
|
7091
|
+
// Support any languages in `app.locales`.
|
|
7092
|
+
Object.entries(locales).forEach(_ref => {
|
|
7093
|
+
var [lang, resources] = _ref;
|
|
7094
|
+
i18next__default["default"].addResourceBundle(lang, ns, resources);
|
|
7095
|
+
});
|
|
7096
|
+
// Use `app.name` as the fallback `app.localeName`.
|
|
7097
|
+
app.localeName = i18next__default["default"].getFixedT(null, ns)("name", app.name);
|
|
7098
|
+
// Remove the temporary i18n resource bundles.
|
|
7099
|
+
Object.keys(locales).forEach(lang => {
|
|
7100
|
+
i18next__default["default"].removeResourceBundle(lang, ns);
|
|
7101
|
+
});
|
|
7102
|
+
} else {
|
|
7103
|
+
app.localeName = app.name;
|
|
7104
|
+
}
|
|
7105
|
+
}
|
|
7106
|
+
|
|
7085
7107
|
/**
|
|
7086
7108
|
* Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
|
|
7087
7109
|
*
|
|
@@ -7092,6 +7114,7 @@
|
|
|
7092
7114
|
var app = storyboard.app;
|
|
7093
7115
|
if (app) {
|
|
7094
7116
|
app.config = brickUtils.deepFreeze(_.merge({}, app.defaultConfig, app.userConfig));
|
|
7117
|
+
setAppLocales(storyboard.app);
|
|
7095
7118
|
}
|
|
7096
7119
|
}
|
|
7097
7120
|
if (bootstrapResponse.settings) {
|
|
@@ -11846,28 +11869,6 @@
|
|
|
11846
11869
|
}
|
|
11847
11870
|
}
|
|
11848
11871
|
|
|
11849
|
-
function setAppLocales(app) {
|
|
11850
|
-
var _locales, _app$config, _app$config$settings;
|
|
11851
|
-
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;
|
|
11852
|
-
if (locales) {
|
|
11853
|
-
// Prefix to avoid conflict between brick package's i18n namespace.
|
|
11854
|
-
var ns = "$tmp-".concat(app.id);
|
|
11855
|
-
// Support any languages in `app.locales`.
|
|
11856
|
-
Object.entries(locales).forEach(_ref => {
|
|
11857
|
-
var [lang, resources] = _ref;
|
|
11858
|
-
i18next__default["default"].addResourceBundle(lang, ns, resources);
|
|
11859
|
-
});
|
|
11860
|
-
// Use `app.name` as the fallback `app.localeName`.
|
|
11861
|
-
app.localeName = i18next__default["default"].getFixedT(null, ns)("name", app.name);
|
|
11862
|
-
// Remove the temporary i18n resource bundles.
|
|
11863
|
-
Object.keys(locales).forEach(lang => {
|
|
11864
|
-
i18next__default["default"].removeResourceBundle(lang, ns);
|
|
11865
|
-
});
|
|
11866
|
-
} else {
|
|
11867
|
-
app.localeName = app.name;
|
|
11868
|
-
}
|
|
11869
|
-
}
|
|
11870
|
-
|
|
11871
11872
|
class Router {
|
|
11872
11873
|
constructor(kernel) {
|
|
11873
11874
|
_defineProperty__default["default"](this, "defaultCollapsed", false);
|
|
@@ -12028,6 +12029,9 @@
|
|
|
12028
12029
|
// Create the page tracker before page load.
|
|
12029
12030
|
// And the API Analyzer maybe disabled.
|
|
12030
12031
|
var tracePageEnd = (_apiAnalyzer$getInsta = easyopsAnalytics.apiAnalyzer.getInstance()) === null || _apiAnalyzer$getInsta === void 0 ? void 0 : _apiAnalyzer$getInsta.tracePage();
|
|
12032
|
+
easyopsAnalytics.SkywalkingAnalysis.setPerformance({
|
|
12033
|
+
pagePath: "".concat(location.pathname).concat(location.search)
|
|
12034
|
+
});
|
|
12031
12035
|
var locationContext = _this3.locationContext = new LocationContext(_this3.kernel, location, renderId);
|
|
12032
12036
|
if (window.DEVELOPER_PREVIEW) {
|
|
12033
12037
|
return;
|
|
@@ -12586,12 +12590,9 @@
|
|
|
12586
12590
|
error
|
|
12587
12591
|
};
|
|
12588
12592
|
}
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
logErrorToMyService(error, info);
|
|
12593
|
-
} */
|
|
12594
|
-
|
|
12593
|
+
componentDidCatch(error) {
|
|
12594
|
+
easyopsAnalytics.SkywalkingAnalysis.reportFrameErrors(error);
|
|
12595
|
+
}
|
|
12595
12596
|
render() {
|
|
12596
12597
|
if (this.state.error) {
|
|
12597
12598
|
// You can render any custom fallback UI
|
|
@@ -16774,6 +16775,7 @@
|
|
|
16774
16775
|
exports.property = property;
|
|
16775
16776
|
exports.reTransformForDevtools = reTransformForDevtools;
|
|
16776
16777
|
exports.renderEasyopsEmpty = renderEasyopsEmpty;
|
|
16778
|
+
exports.setAppLocales = setAppLocales;
|
|
16777
16779
|
exports.transformElementProperties = transformElementProperties;
|
|
16778
16780
|
exports.transformIntermediateData = transformIntermediateData;
|
|
16779
16781
|
exports.transformProperties = transformProperties;
|