@next-core/brick-kit 2.195.0 → 2.196.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.
@@ -3682,6 +3682,16 @@
3682
3682
  });
3683
3683
  return _dev_only_debugDataValue2.apply(this, arguments);
3684
3684
  }
3685
+ function _dev_only_getLegalRuntimeValue() {
3686
+ var _runtimeContext$overr;
3687
+ var runtimeContext = _internalApiGetCurrentContext();
3688
+ return _objectSpread__default["default"]({
3689
+ app: (_runtimeContext$overr = runtimeContext === null || runtimeContext === void 0 ? void 0 : runtimeContext.overrideApp) !== null && _runtimeContext$overr !== void 0 ? _runtimeContext$overr : runtimeContext === null || runtimeContext === void 0 ? void 0 : runtimeContext.app,
3690
+ location: _.pick(location, ["href", "origin", "hostname", "host"])
3691
+ }, _.pick(runtimeContext, ["query", "sys", "match"]));
3692
+ }
3693
+
3694
+ /* istanbul ignore next */
3685
3695
  function _dev_only_updateFormPreviewSettings(appId, formId, settings) {
3686
3696
  kernel._dev_only_updateFormPreviewSettings(appId, formId, settings);
3687
3697
  }
@@ -7082,6 +7092,28 @@
7082
7092
  };
7083
7093
  }();
7084
7094
 
7095
+ function setAppLocales(app) {
7096
+ var _locales, _app$config, _app$config$settings;
7097
+ 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;
7098
+ if (locales) {
7099
+ // Prefix to avoid conflict between brick package's i18n namespace.
7100
+ var ns = "$tmp-".concat(app.id);
7101
+ // Support any languages in `app.locales`.
7102
+ Object.entries(locales).forEach(_ref => {
7103
+ var [lang, resources] = _ref;
7104
+ i18next__default["default"].addResourceBundle(lang, ns, resources);
7105
+ });
7106
+ // Use `app.name` as the fallback `app.localeName`.
7107
+ app.localeName = i18next__default["default"].getFixedT(null, ns)("name", app.name);
7108
+ // Remove the temporary i18n resource bundles.
7109
+ Object.keys(locales).forEach(lang => {
7110
+ i18next__default["default"].removeResourceBundle(lang, ns);
7111
+ });
7112
+ } else {
7113
+ app.localeName = app.name;
7114
+ }
7115
+ }
7116
+
7085
7117
  /**
7086
7118
  * Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
7087
7119
  *
@@ -7092,6 +7124,7 @@
7092
7124
  var app = storyboard.app;
7093
7125
  if (app) {
7094
7126
  app.config = brickUtils.deepFreeze(_.merge({}, app.defaultConfig, app.userConfig));
7127
+ setAppLocales(storyboard.app);
7095
7128
  }
7096
7129
  }
7097
7130
  if (bootstrapResponse.settings) {
@@ -11846,28 +11879,6 @@
11846
11879
  }
11847
11880
  }
11848
11881
 
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
11882
  class Router {
11872
11883
  constructor(kernel) {
11873
11884
  _defineProperty__default["default"](this, "defaultCollapsed", false);
@@ -14486,6 +14497,7 @@
14486
14497
  getContextValue: _dev_only_getContextValue,
14487
14498
  getAllContextValues: _dev_only_getAllContextValues,
14488
14499
  debugDataValue: _dev_only_debugDataValue,
14500
+ getLegalRuntimeValue: _dev_only_getLegalRuntimeValue,
14489
14501
  render: _dev_only_render,
14490
14502
  setRealTimeDataInspectRoot,
14491
14503
  addRealTimeDataInspectHook
@@ -16774,6 +16786,7 @@
16774
16786
  exports.property = property;
16775
16787
  exports.reTransformForDevtools = reTransformForDevtools;
16776
16788
  exports.renderEasyopsEmpty = renderEasyopsEmpty;
16789
+ exports.setAppLocales = setAppLocales;
16777
16790
  exports.transformElementProperties = transformElementProperties;
16778
16791
  exports.transformIntermediateData = transformIntermediateData;
16779
16792
  exports.transformProperties = transformProperties;