@uxf/core-react 11.78.0 → 11.80.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/core-react",
3
- "version": "11.78.0",
3
+ "version": "11.80.0",
4
4
  "description": "UXF Core",
5
5
  "author": "UX Fans s.r.o",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  "typecheck": "tsc --noEmit --skipLibCheck"
13
13
  },
14
14
  "dependencies": {
15
- "@uxf/core": "11.78.0"
15
+ "@uxf/core": "11.80.0"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "react": ">=18.2.0"
@@ -2,3 +2,12 @@ export type SupportedLanguages = "cs" | "sk" | "en" | "de";
2
2
  export type SupportedPluralKeywords = "0" | "zero" | "one" | "few" | "many" | "other";
3
3
  export type TranslationFunction<Key extends string> = (key: Key, options?: Record<string, any>) => string;
4
4
  export type TranslationsContextValue<Keys extends string> = TranslationFunction<Keys>;
5
+ type JoinDot<S1, S2> = S1 extends string ? S2 extends string ? S2 extends SupportedPluralKeywords | SupportedLanguages ? S1 : `${S1}.${S2}` : never : never;
6
+ type JoinNamespace<NS, S> = NS extends string ? (S extends string ? `${NS}:${S}` : never) : never;
7
+ type PathsDot<T> = {
8
+ [K in keyof T]: T[K] extends Record<string, unknown> ? JoinDot<K, PathsDot<T[K]>> : K;
9
+ }[keyof T];
10
+ export type TranslationsPaths<T> = {
11
+ [K in keyof T]: T[K] extends Record<string, unknown> ? JoinNamespace<K, PathsDot<T[K]>> : K;
12
+ }[keyof T];
13
+ export {};