gt-react 5.3.0 → 5.3.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"getDictionaryEntry.d.ts","sourceRoot":"","sources":["../../../src/provider/helpers/getDictionaryEntry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACtC,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,MAAM,GACX,UAAU,GAAG,eAAe,CAa9B"}
1
+ {"version":3,"file":"getDictionaryEntry.d.ts","sourceRoot":"","sources":["../../../src/provider/helpers/getDictionaryEntry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACtC,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,MAAM,GACX,UAAU,GAAG,eAAe,CAe9B"}
@@ -7,7 +7,8 @@ exports.default = getDictionaryEntry;
7
7
  var react_1 = __importDefault(require("react"));
8
8
  function getDictionaryEntry(dictionary, id) {
9
9
  if (!id || typeof id !== 'string') {
10
- throw new Error("Invalid dictionary id: \"".concat(id, "\""));
10
+ console.error("Invalid dictionary id: \"".concat(id, "\""));
11
+ return undefined;
11
12
  }
12
13
  ;
13
14
  var current = dictionary;
@@ -15,7 +16,8 @@ function getDictionaryEntry(dictionary, id) {
15
16
  for (var _i = 0, dictionaryPath_1 = dictionaryPath; _i < dictionaryPath_1.length; _i++) {
16
17
  var key = dictionaryPath_1[_i];
17
18
  if (typeof current !== 'object' || Array.isArray(current) || react_1.default.isValidElement(current)) {
18
- throw new Error("Invalid dictionary id: \"".concat(id, "\""));
19
+ console.error("Invalid dictionary id: \"".concat(id, "\""));
20
+ return undefined;
19
21
  }
20
22
  current = current[key];
21
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getDictionaryEntry.js","sourceRoot":"","sources":["../../../src/provider/helpers/getDictionaryEntry.ts"],"names":[],"mappings":";;;;;AAGA,qCAgBC;AAnBD,gDAA0B;AAG1B,SAAwB,kBAAkB,CACtC,UAAsB,EACtB,EAAU;IAEV,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,mCAA2B,EAAE,OAAG,CAAC,CAAA;IACrD,CAAC;IAAA,CAAC;IACF,IAAI,OAAO,GAAiC,UAAU,CAAC;IACvD,IAAI,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnC,KAAkB,UAAc,EAAd,iCAAc,EAAd,4BAAc,EAAd,IAAc,EAAE,CAAC;QAA9B,IAAM,GAAG,uBAAA;QACV,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,eAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YACzF,MAAM,IAAI,KAAK,CAAC,mCAA2B,EAAE,OAAG,CAAC,CAAA;QACrD,CAAC;QACD,OAAO,GAAI,OAAsB,CAAC,GAAG,CAAC,CAAA;IAC1C,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"getDictionaryEntry.js","sourceRoot":"","sources":["../../../src/provider/helpers/getDictionaryEntry.ts"],"names":[],"mappings":";;;;;AAGA,qCAkBC;AArBD,gDAA0B;AAG1B,SAAwB,kBAAkB,CACtC,UAAsB,EACtB,EAAU;IAEV,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,mCAA2B,EAAE,OAAG,CAAC,CAAA;QAC/C,OAAO,SAAS,CAAC;IACrB,CAAC;IAAA,CAAC;IACF,IAAI,OAAO,GAAiC,UAAU,CAAC;IACvD,IAAI,cAAc,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnC,KAAkB,UAAc,EAAd,iCAAc,EAAd,4BAAc,EAAd,IAAc,EAAE,CAAC;QAA9B,IAAM,GAAG,uBAAA;QACV,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,eAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;YACzF,OAAO,CAAC,KAAK,CAAC,mCAA2B,EAAE,OAAG,CAAC,CAAA;YAC/C,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,GAAI,OAAsB,CAAC,GAAG,CAAC,CAAA;IAC1C,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gt-react",
3
- "version": "5.3.0",
3
+ "version": "5.3.2",
4
4
  "description": "A React library for automatic internationalization.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,18 +25,9 @@
25
25
  },
26
26
  "homepage": "https://github.com/general-translation/gt-react#readme",
27
27
  "devDependencies": {
28
- "@rollup/plugin-commonjs": "^28.0.1",
29
- "@rollup/plugin-node-resolve": "^15.3.0",
30
- "@rollup/plugin-terser": "^0.4.4",
31
- "@rollup/plugin-typescript": "^12.1.1",
32
28
  "@types/node": "^20.14.9",
33
29
  "@types/react": "^18.3.3",
34
30
  "@types/react-dom": "^18.3.0",
35
- "@types/xxhashjs": "^0.2.4",
36
- "rollup": "^4.24.0",
37
- "rollup-plugin-dts": "^6.1.1",
38
- "rollup-plugin-peer-deps-external": "^2.2.4",
39
- "tslib": "^2.8.0",
40
31
  "typescript": "^5.5.2"
41
32
  },
42
33
  "exports": {