@uipath/apollo-react 4.32.0 → 4.32.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.
@@ -26,9 +26,20 @@ __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  useSafeLingui: ()=>useSafeLingui
28
28
  });
29
+ const core_namespaceObject = require("@lingui/core");
29
30
  const react_namespaceObject = require("@lingui/react");
30
31
  const external_react_namespaceObject = require("react");
31
- const fallbackTranslate = (arg)=>'string' == typeof arg ? arg : arg.message ?? arg.id;
32
+ const fallbackI18n = (0, core_namespaceObject.setupI18n)({
33
+ locale: 'en',
34
+ messages: {
35
+ en: {}
36
+ }
37
+ });
38
+ const fallbackTranslate = (arg)=>{
39
+ if ('string' == typeof arg) return arg;
40
+ if (!arg.message) return arg.id;
41
+ return fallbackI18n._(arg);
42
+ };
32
43
  function useSafeLingui() {
33
44
  const ctx = (0, external_react_namespaceObject.useContext)(react_namespaceObject.LinguiContext);
34
45
  return (0, external_react_namespaceObject.useMemo)(()=>({
@@ -1 +1 @@
1
- {"version":3,"file":"useSafeLingui.d.ts","sourceRoot":"","sources":["../../src/i18n/useSafeLingui.ts"],"names":[],"mappings":"AAGA,KAAK,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC;AACrF,KAAK,SAAS,GAAG;IACf,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC;IACjC,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB,CAAC;AAcF,wBAAgB,aAAa,IAAI;IAAE,CAAC,EAAE,SAAS,CAAA;CAAE,CAGhD"}
1
+ {"version":3,"file":"useSafeLingui.d.ts","sourceRoot":"","sources":["../../src/i18n/useSafeLingui.ts"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC;AACrF,KAAK,SAAS,GAAG;IACf,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAAC;IACjC,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB,CAAC;AAyBF,wBAAgB,aAAa,IAAI;IAAE,CAAC,EAAE,SAAS,CAAA;CAAE,CAGhD"}
@@ -1,6 +1,17 @@
1
+ import { setupI18n } from "@lingui/core";
1
2
  import { LinguiContext } from "@lingui/react";
2
3
  import { useContext, useMemo } from "react";
3
- const fallbackTranslate = (arg)=>'string' == typeof arg ? arg : arg.message ?? arg.id;
4
+ const fallbackI18n = setupI18n({
5
+ locale: 'en',
6
+ messages: {
7
+ en: {}
8
+ }
9
+ });
10
+ const fallbackTranslate = (arg)=>{
11
+ if ('string' == typeof arg) return arg;
12
+ if (!arg.message) return arg.id;
13
+ return fallbackI18n._(arg);
14
+ };
4
15
  function useSafeLingui() {
5
16
  const ctx = useContext(LinguiContext);
6
17
  return useMemo(()=>({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "4.32.0",
3
+ "version": "4.32.1",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",