@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.
package/dist/index.esm.js CHANGED
@@ -3684,6 +3684,16 @@ function _dev_only_debugDataValue2() {
3684
3684
  });
3685
3685
  return _dev_only_debugDataValue2.apply(this, arguments);
3686
3686
  }
3687
+ function _dev_only_getLegalRuntimeValue() {
3688
+ var _runtimeContext$overr;
3689
+ var runtimeContext = _internalApiGetCurrentContext();
3690
+ return _objectSpread({
3691
+ 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,
3692
+ location: pick(location, ["href", "origin", "hostname", "host"])
3693
+ }, pick(runtimeContext, ["query", "sys", "match"]));
3694
+ }
3695
+
3696
+ /* istanbul ignore next */
3687
3697
  function _dev_only_updateFormPreviewSettings(appId, formId, settings) {
3688
3698
  kernel._dev_only_updateFormPreviewSettings(appId, formId, settings);
3689
3699
  }
@@ -7084,6 +7094,28 @@ var UserAdminApi_searchAllUsersInfo = /*#__PURE__*/function () {
7084
7094
  };
7085
7095
  }();
7086
7096
 
7097
+ function setAppLocales(app) {
7098
+ var _locales, _app$config, _app$config$settings;
7099
+ 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;
7100
+ if (locales) {
7101
+ // Prefix to avoid conflict between brick package's i18n namespace.
7102
+ var ns = "$tmp-".concat(app.id);
7103
+ // Support any languages in `app.locales`.
7104
+ Object.entries(locales).forEach(_ref => {
7105
+ var [lang, resources] = _ref;
7106
+ i18next.addResourceBundle(lang, ns, resources);
7107
+ });
7108
+ // Use `app.name` as the fallback `app.localeName`.
7109
+ app.localeName = i18next.getFixedT(null, ns)("name", app.name);
7110
+ // Remove the temporary i18n resource bundles.
7111
+ Object.keys(locales).forEach(lang => {
7112
+ i18next.removeResourceBundle(lang, ns);
7113
+ });
7114
+ } else {
7115
+ app.localeName = app.name;
7116
+ }
7117
+ }
7118
+
7087
7119
  /**
7088
7120
  * Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
7089
7121
  *
@@ -7094,6 +7126,7 @@ function processBootstrapResponse(bootstrapResponse) {
7094
7126
  var app = storyboard.app;
7095
7127
  if (app) {
7096
7128
  app.config = deepFreeze(merge({}, app.defaultConfig, app.userConfig));
7129
+ setAppLocales(storyboard.app);
7097
7130
  }
7098
7131
  }
7099
7132
  if (bootstrapResponse.settings) {
@@ -11848,28 +11881,6 @@ function setWatermark() {
11848
11881
  }
11849
11882
  }
11850
11883
 
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
11884
  class Router {
11874
11885
  constructor(kernel) {
11875
11886
  _defineProperty$1(this, "defaultCollapsed", false);
@@ -14488,6 +14499,7 @@ var developHelper = {
14488
14499
  getContextValue: _dev_only_getContextValue,
14489
14500
  getAllContextValues: _dev_only_getAllContextValues,
14490
14501
  debugDataValue: _dev_only_debugDataValue,
14502
+ getLegalRuntimeValue: _dev_only_getLegalRuntimeValue,
14491
14503
  render: _dev_only_render,
14492
14504
  setRealTimeDataInspectRoot,
14493
14505
  addRealTimeDataInspectHook
@@ -15128,5 +15140,5 @@ function constructEventListener(handler) {
15128
15140
  });
15129
15141
  }
15130
15142
 
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 };
15143
+ 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
15144
  //# sourceMappingURL=index.esm.js.map