gt-react 10.20.3 → 10.20.5
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/CHANGELOG.md +19 -0
- package/dist/browser.cjs +8 -5
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +8 -5
- package/dist/browser.d.cts.map +1 -1
- package/dist/browser.d.mts +8 -5
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.mjs +8 -5
- package/dist/browser.mjs.map +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +1 -1
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.mts +1 -1
- package/dist/client.d.mts.map +1 -1
- package/dist/client.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal.cjs +8 -6
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +12 -9
- package/dist/internal.d.cts.map +1 -1
- package/dist/internal.d.mts +12 -9
- package/dist/internal.d.mts.map +1 -1
- package/dist/internal.mjs +8 -6
- package/dist/internal.mjs.map +1 -1
- package/dist/macros.cjs +8 -5
- package/dist/macros.cjs.map +1 -1
- package/dist/macros.mjs +8 -5
- package/dist/macros.mjs.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# gt-react
|
|
2
2
|
|
|
3
|
+
## 10.20.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`6945a98`](https://github.com/generaltranslation/gt/commit/6945a9871ea260dd999dcb2246c48b21134721f6)]:
|
|
8
|
+
- @generaltranslation/react-core@1.8.25
|
|
9
|
+
- generaltranslation@8.2.19
|
|
10
|
+
- gt-i18n@0.9.9
|
|
11
|
+
- @generaltranslation/supported-locales@2.1.5
|
|
12
|
+
|
|
13
|
+
## 10.20.4
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`a2a3dd0`](https://github.com/generaltranslation/gt/commit/a2a3dd0bcdce9abe360c406a12fc6bb3bc3ca181)]:
|
|
18
|
+
- @generaltranslation/supported-locales@2.1.4
|
|
19
|
+
- gt-i18n@0.9.8
|
|
20
|
+
- @generaltranslation/react-core@1.8.24
|
|
21
|
+
|
|
3
22
|
## 10.20.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/browser.cjs
CHANGED
|
@@ -4271,7 +4271,7 @@ function enforceBrowser(errorMessage = GENERIC_BROWSER_ENVIRONMENT_ERROR) {
|
|
|
4271
4271
|
if (typeof window === "undefined") throw new Error(errorMessage);
|
|
4272
4272
|
}
|
|
4273
4273
|
//#endregion
|
|
4274
|
-
//#region ../i18n/dist/isEncodedTranslationOptions-
|
|
4274
|
+
//#region ../i18n/dist/isEncodedTranslationOptions-69ZmAUR2.mjs
|
|
4275
4275
|
var logger_default = {
|
|
4276
4276
|
warn(message) {
|
|
4277
4277
|
console.warn(message);
|
|
@@ -4293,7 +4293,7 @@ var logger_default = {
|
|
|
4293
4293
|
* TODO: next major version, options should be Record<string, string>
|
|
4294
4294
|
*/
|
|
4295
4295
|
function extractVariables(options) {
|
|
4296
|
-
return Object.fromEntries(Object.entries(options).filter(([key]) => key !== "$id" && key !== "$context" && key !== "$maxChars" && key !== "$hash" && key !== "$_hash" && key !== "$_source" && key !== "$_fallback" && key !== "$format" && key !== "$_locales" && key !== "$locale"));
|
|
4296
|
+
return Object.fromEntries(Object.entries(options).filter(([key]) => key !== "$id" && key !== "$context" && key !== "$maxChars" && key !== "$hash" && key !== "$_hash" && key !== "$_source" && key !== "$_fallback" && key !== "$format" && key !== "$_locales" && key !== "$locale" && key !== "$requiresReview"));
|
|
4297
4297
|
}
|
|
4298
4298
|
const createInterpolationFailureMessage = (message) => `String interpolation failed for message: "${message}".`;
|
|
4299
4299
|
/**
|
|
@@ -4342,7 +4342,7 @@ function interpolateIcuMessage(encodedMsg, options) {
|
|
|
4342
4342
|
}
|
|
4343
4343
|
}
|
|
4344
4344
|
//#endregion
|
|
4345
|
-
//#region ../core/dist/id-
|
|
4345
|
+
//#region ../core/dist/id-BS-dC63I.mjs
|
|
4346
4346
|
/**
|
|
4347
4347
|
* Calculates a unique hash for a given string using SHA-256.
|
|
4348
4348
|
*
|
|
@@ -4365,7 +4365,7 @@ function hashString(string) {
|
|
|
4365
4365
|
* @param {function} [hashFunction] - Custom hash function.
|
|
4366
4366
|
* @returns {string} - The unique hash of the children.
|
|
4367
4367
|
*/
|
|
4368
|
-
function hashSource({ source, context, id, maxChars, dataFormat }, hashFunction = hashString) {
|
|
4368
|
+
function hashSource({ source, context, id, maxChars, requiresReview, dataFormat }, hashFunction = hashString) {
|
|
4369
4369
|
let sanitizedSource;
|
|
4370
4370
|
if (dataFormat === "JSX") sanitizedSource = sanitizeJsxChildren(source);
|
|
4371
4371
|
else sanitizedSource = source;
|
|
@@ -4374,6 +4374,7 @@ function hashSource({ source, context, id, maxChars, dataFormat }, hashFunction
|
|
|
4374
4374
|
...id && { id },
|
|
4375
4375
|
...context && { context },
|
|
4376
4376
|
...maxChars != null && { maxChars: Math.abs(maxChars) },
|
|
4377
|
+
...requiresReview === true && { requiresReview: true },
|
|
4377
4378
|
...dataFormat && { dataFormat }
|
|
4378
4379
|
}));
|
|
4379
4380
|
}
|
|
@@ -4405,7 +4406,7 @@ function sanitizeJsxChildren(childrenAsObjects) {
|
|
|
4405
4406
|
return Array.isArray(childrenAsObjects) ? childrenAsObjects.map(sanitizeChild) : sanitizeChild(childrenAsObjects);
|
|
4406
4407
|
}
|
|
4407
4408
|
//#endregion
|
|
4408
|
-
//#region ../i18n/dist/versionId-
|
|
4409
|
+
//#region ../i18n/dist/versionId-C6FQLPr1.mjs
|
|
4409
4410
|
/**
|
|
4410
4411
|
* Throw errors if there are any errors and log warnings if there are any warnings
|
|
4411
4412
|
* @param {ValidationResult[]} results - The results to print
|
|
@@ -4946,6 +4947,7 @@ function hashMessage(message, options) {
|
|
|
4946
4947
|
...metadataOptions.$context && { context: metadataOptions.$context },
|
|
4947
4948
|
...metadataOptions.$id && { id: metadataOptions.$id },
|
|
4948
4949
|
...metadataOptions.$maxChars != null && { maxChars: Math.abs(metadataOptions.$maxChars) },
|
|
4950
|
+
...metadataOptions.$requiresReview === true && { requiresReview: true },
|
|
4949
4951
|
dataFormat: options.$format
|
|
4950
4952
|
});
|
|
4951
4953
|
}
|
|
@@ -5082,6 +5084,7 @@ var TranslationsCache = class {
|
|
|
5082
5084
|
...metadataOptions.$context && { context: metadataOptions.$context },
|
|
5083
5085
|
...metadataOptions.$id && { id: metadataOptions.$id },
|
|
5084
5086
|
...metadataOptions.$maxChars != null && { maxChars: Math.abs(metadataOptions.$maxChars) },
|
|
5087
|
+
...metadataOptions.$requiresReview === true && { requiresReview: true },
|
|
5085
5088
|
dataFormat: options.$format
|
|
5086
5089
|
},
|
|
5087
5090
|
resolve: (value) => resolve(value),
|