gt-react 2.0.196 → 2.0.198

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.
Files changed (90) hide show
  1. package/dist/client/GTProvider.js +1 -1
  2. package/dist/client/GTProvider.js.map +1 -1
  3. package/dist/client/useUserLanguage.d.ts +2 -0
  4. package/dist/client/useUserLanguage.d.ts.map +1 -0
  5. package/dist/client/{useCurrentLanguage.js → useUserLanguage.js} +3 -3
  6. package/dist/client/useUserLanguage.js.map +1 -0
  7. package/dist/client.d.ts +2 -2
  8. package/dist/client.d.ts.map +1 -1
  9. package/dist/client.js +3 -3
  10. package/dist/client.js.map +1 -1
  11. package/dist/config/I18NConfig.d.ts +6 -6
  12. package/dist/config/I18NConfig.d.ts.map +1 -1
  13. package/dist/config/I18NConfig.js +8 -8
  14. package/dist/config/I18NConfig.js.map +1 -1
  15. package/dist/intl/intl.d.ts +2 -2
  16. package/dist/intl/intl.d.ts.map +1 -1
  17. package/dist/intl/intl.js +9 -9
  18. package/dist/intl/intl.js.map +1 -1
  19. package/dist/next/NextGTProvider.js +2 -2
  20. package/dist/next/NextGTProvider.js.map +1 -1
  21. package/dist/next/{getCurrentLanguage.d.ts → getUserLanguage.d.ts} +2 -2
  22. package/dist/next/getUserLanguage.d.ts.map +1 -0
  23. package/dist/next/{getCurrentLanguage.js → getUserLanguage.js} +5 -5
  24. package/dist/next/getUserLanguage.js.map +1 -0
  25. package/dist/next/nextDict.js +2 -2
  26. package/dist/next/nextDict.js.map +1 -1
  27. package/dist/next/{intl.d.ts → nextIntl.d.ts} +2 -2
  28. package/dist/next/nextIntl.d.ts.map +1 -0
  29. package/dist/next/{nextT.js → nextIntl.js} +7 -18
  30. package/dist/next/nextIntl.js.map +1 -0
  31. package/dist/next/requestFunctions.js +1 -1
  32. package/dist/next/requestFunctions.js.map +1 -1
  33. package/dist/next.d.ts +3 -3
  34. package/dist/next.d.ts.map +1 -1
  35. package/dist/next.js +5 -5
  36. package/dist/next.js.map +1 -1
  37. package/dist/primitives/numeric/Numeric.d.ts.map +1 -1
  38. package/dist/primitives/numeric/Numeric.js +2 -1
  39. package/dist/primitives/numeric/Numeric.js.map +1 -1
  40. package/dist/primitives/numeric/client/ClientNumeric.js +4 -4
  41. package/dist/primitives/numeric/client/ClientNumeric.js.map +1 -1
  42. package/dist/primitives/value/getValueBranch.d.ts.map +1 -1
  43. package/dist/primitives/value/getValueBranch.js +3 -2
  44. package/dist/primitives/value/getValueBranch.js.map +1 -1
  45. package/dist/primitives/variable/currency/ClientCurrencyVariable.js +3 -3
  46. package/dist/primitives/variable/currency/ClientCurrencyVariable.js.map +1 -1
  47. package/dist/primitives/variable/currency/CurrencyVariable.js +2 -2
  48. package/dist/primitives/variable/currency/CurrencyVariable.js.map +1 -1
  49. package/dist/primitives/variable/date/ClientDateVariable.js +3 -3
  50. package/dist/primitives/variable/date/ClientDateVariable.js.map +1 -1
  51. package/dist/primitives/variable/date/DateVariable.js +3 -3
  52. package/dist/primitives/variable/date/DateVariable.js.map +1 -1
  53. package/dist/primitives/variable/number/ClientNumberVariable.js +4 -4
  54. package/dist/primitives/variable/number/ClientNumberVariable.js.map +1 -1
  55. package/dist/primitives/variable/number/NumberVariable.js +3 -3
  56. package/dist/primitives/variable/number/NumberVariable.js.map +1 -1
  57. package/dist/server/ServerI18N.js +1 -1
  58. package/dist/server/ServerI18N.js.map +1 -1
  59. package/package.json +1 -1
  60. package/dist/client/useCurrentLanguage.d.ts +0 -2
  61. package/dist/client/useCurrentLanguage.d.ts.map +0 -1
  62. package/dist/client/useCurrentLanguage.js.map +0 -1
  63. package/dist/config/local/getDictionaryEntry.d.ts +0 -2
  64. package/dist/config/local/getDictionaryEntry.d.ts.map +0 -1
  65. package/dist/config/local/getDictionaryEntry.js +0 -14
  66. package/dist/config/local/getDictionaryEntry.js.map +0 -1
  67. package/dist/next/dict.d.ts +0 -6
  68. package/dist/next/dict.d.ts.map +0 -1
  69. package/dist/next/dict.js +0 -41
  70. package/dist/next/dict.js.map +0 -1
  71. package/dist/next/getCurrentLanguage.d.ts.map +0 -1
  72. package/dist/next/getCurrentLanguage.js.map +0 -1
  73. package/dist/next/intl.d.ts.map +0 -1
  74. package/dist/next/intl.js +0 -47
  75. package/dist/next/intl.js.map +0 -1
  76. package/dist/next/nextT.d.ts +0 -6
  77. package/dist/next/nextT.d.ts.map +0 -1
  78. package/dist/next/nextT.js.map +0 -1
  79. package/dist/next/t.d.ts +0 -5
  80. package/dist/next/t.d.ts.map +0 -1
  81. package/dist/next/t.js +0 -46
  82. package/dist/next/t.js.map +0 -1
  83. package/dist/server/t.d.ts +0 -7
  84. package/dist/server/t.d.ts.map +0 -1
  85. package/dist/server/t.js +0 -60
  86. package/dist/server/t.js.map +0 -1
  87. package/dist/t/t.d.ts +0 -6
  88. package/dist/t/t.d.ts.map +0 -1
  89. package/dist/t/t.js +0 -54
  90. package/dist/t/t.js.map +0 -1
package/dist/t/t.js DELETED
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __rest = (this && this.__rest) || function (s, e) {
12
- var t = {};
13
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
- t[p] = s[p];
15
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
- t[p[i]] = s[p[i]];
19
- }
20
- return t;
21
- };
22
- var __importDefault = (this && this.__importDefault) || function (mod) {
23
- return (mod && mod.__esModule) ? mod : { "default": mod };
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.default = t;
27
- const jsx_runtime_1 = require("react/jsx-runtime");
28
- const ServerI18N_1 = __importDefault(require("../server/ServerI18N"));
29
- const I18NConfig_1 = __importDefault(require("../config/I18NConfig"));
30
- const intl_1 = __importDefault(require("../intl/intl"));
31
- function getDictionaryEntry(id, dictionary) {
32
- let current = dictionary;
33
- const pathNames = id.split('-');
34
- for (const item of pathNames) {
35
- if (!current)
36
- return null;
37
- current = (current === null || current === void 0 ? void 0 : current[item]) || null;
38
- }
39
- return current;
40
- }
41
- function t(id, _a) {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- var { userLanguage } = _a, options = __rest(_a, ["userLanguage"]);
44
- const dictionary = I18NConfig_1.default.getDictionary();
45
- const entry = getDictionaryEntry(id, dictionary);
46
- if (typeof entry === 'string') {
47
- return yield (0, intl_1.default)(entry, userLanguage, Object.assign({ id }, options));
48
- }
49
- return (
50
- /* @ts-expect-error Server Component */
51
- (0, jsx_runtime_1.jsx)(ServerI18N_1.default, Object.assign({ id: id, userLanguage: userLanguage }, options, { children: entry })));
52
- });
53
- }
54
- //# sourceMappingURL=t.js.map
package/dist/t/t.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"t.js","sourceRoot":"","sources":["../../src/t/t.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAeA,oBAiBC;;AA/BD,sEAA8C;AAC9C,sEAA8C;AAC9C,wDAAgC;AAEhC,SAAS,kBAAkB,CAAC,EAAU,EAAE,UAA+B;IACnE,IAAI,OAAO,GAAG,UAAU,CAAC;IACzB,MAAM,SAAS,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC1B,OAAO,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,IAAI,CAAC,KAAI,IAAI,CAAC;IACtC,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC;AAED,SAA8B,CAAC,CAAC,EAAU,EAAE,EAA0E;;YAA1E,EAAE,YAAY,OAA4D,EAAvD,OAAO,cAA1B,gBAA4B,CAAF;QAElE,MAAM,UAAU,GAAG,oBAAU,CAAC,aAAa,EAAE,CAAC;QAE9C,MAAM,KAAK,GAAG,kBAAkB,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QAEjD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5B,OAAO,MAAM,IAAA,cAAI,EAAC,KAAK,EAAE,YAAY,kBAAI,EAAE,IAAK,OAAO,EAAG,CAAA;QAC9D,CAAC;QAED,OAAO;QACH,uCAAuC;QACvC,uBAAC,oBAAU,kBAAC,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,YAAY,IAAM,OAAO,cACtD,KAAK,IACG,CAChB,CAAC;IAEN,CAAC;CAAA"}