gt-react 10.19.15 β†’ 10.19.16

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 (170) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/browser.cjs +10789 -0
  3. package/dist/browser.cjs.map +1 -0
  4. package/dist/browser.d.cts +732 -0
  5. package/dist/browser.d.cts.map +1 -0
  6. package/dist/browser.d.mts +734 -0
  7. package/dist/browser.d.mts.map +1 -0
  8. package/dist/browser.mjs +10751 -0
  9. package/dist/browser.mjs.map +1 -0
  10. package/dist/client.cjs +3356 -0
  11. package/dist/client.cjs.map +1 -0
  12. package/dist/client.d.cts +249 -0
  13. package/dist/client.d.cts.map +1 -0
  14. package/dist/client.d.mts +250 -0
  15. package/dist/client.d.mts.map +1 -0
  16. package/dist/client.mjs +3296 -0
  17. package/dist/client.mjs.map +1 -0
  18. package/dist/index.cjs +3509 -0
  19. package/dist/index.cjs.map +1 -0
  20. package/dist/index.d.cts +377 -0
  21. package/dist/index.d.cts.map +1 -0
  22. package/dist/index.d.mts +376 -0
  23. package/dist/index.d.mts.map +1 -0
  24. package/dist/index.mjs +3453 -0
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/internal.cjs +3954 -0
  27. package/dist/internal.cjs.map +1 -0
  28. package/dist/internal.d.cts +1118 -0
  29. package/dist/internal.d.cts.map +1 -0
  30. package/dist/internal.d.mts +1118 -0
  31. package/dist/internal.d.mts.map +1 -0
  32. package/dist/internal.mjs +3893 -0
  33. package/dist/internal.mjs.map +1 -0
  34. package/dist/macros.cjs +6139 -0
  35. package/dist/macros.cjs.map +1 -0
  36. package/dist/macros.d.cts +25 -0
  37. package/dist/macros.d.cts.map +1 -0
  38. package/dist/macros.d.mts +25 -0
  39. package/dist/macros.d.mts.map +1 -0
  40. package/dist/macros.mjs +6140 -0
  41. package/dist/macros.mjs.map +1 -0
  42. package/package.json +60 -40
  43. package/dist/browser-types.d.ts +0 -5
  44. package/dist/browser-types.d.ts.map +0 -1
  45. package/dist/browser.cjs.min.cjs +0 -2
  46. package/dist/browser.cjs.min.cjs.map +0 -1
  47. package/dist/browser.d.ts +0 -4
  48. package/dist/browser.d.ts.map +0 -1
  49. package/dist/browser.esm.min.mjs +0 -2
  50. package/dist/browser.esm.min.mjs.map +0 -1
  51. package/dist/client.cjs.min.cjs +0 -2
  52. package/dist/client.cjs.min.cjs.map +0 -1
  53. package/dist/client.d.ts +0 -6
  54. package/dist/client.d.ts.map +0 -1
  55. package/dist/client.esm.min.mjs +0 -2
  56. package/dist/client.esm.min.mjs.map +0 -1
  57. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts +0 -32
  58. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts.map +0 -1
  59. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts +0 -42
  60. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts.map +0 -1
  61. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts +0 -90
  62. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts.map +0 -1
  63. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts +0 -9
  64. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts.map +0 -1
  65. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts +0 -3
  66. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts.map +0 -1
  67. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts +0 -19
  68. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts.map +0 -1
  69. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts +0 -15
  70. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts.map +0 -1
  71. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts +0 -14
  72. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts.map +0 -1
  73. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts +0 -29
  74. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts.map +0 -1
  75. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts +0 -30
  76. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts.map +0 -1
  77. package/dist/i18n-context/functions/branching/index.d.ts +0 -3
  78. package/dist/i18n-context/functions/branching/index.d.ts.map +0 -1
  79. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts +0 -31
  80. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts.map +0 -1
  81. package/dist/i18n-context/functions/derivation/index.d.ts +0 -2
  82. package/dist/i18n-context/functions/derivation/index.d.ts.map +0 -1
  83. package/dist/i18n-context/functions/html-tag-operations.d.ts +0 -19
  84. package/dist/i18n-context/functions/html-tag-operations.d.ts.map +0 -1
  85. package/dist/i18n-context/functions/index.d.ts +0 -8
  86. package/dist/i18n-context/functions/index.d.ts.map +0 -1
  87. package/dist/i18n-context/functions/locale-operations.d.ts +0 -11
  88. package/dist/i18n-context/functions/locale-operations.d.ts.map +0 -1
  89. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts +0 -11
  90. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts.map +0 -1
  91. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts +0 -11
  92. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts.map +0 -1
  93. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts +0 -33
  94. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts.map +0 -1
  95. package/dist/i18n-context/functions/translation/index.d.ts +0 -5
  96. package/dist/i18n-context/functions/translation/index.d.ts.map +0 -1
  97. package/dist/i18n-context/functions/translation/t.d.ts +0 -25
  98. package/dist/i18n-context/functions/translation/t.d.ts.map +0 -1
  99. package/dist/i18n-context/functions/translation/types.d.ts +0 -21
  100. package/dist/i18n-context/functions/translation/types.d.ts.map +0 -1
  101. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts +0 -28
  102. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts.map +0 -1
  103. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts +0 -26
  104. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts.map +0 -1
  105. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts +0 -26
  106. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts.map +0 -1
  107. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts +0 -35
  108. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts.map +0 -1
  109. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts +0 -23
  110. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts.map +0 -1
  111. package/dist/i18n-context/functions/variables/index.d.ts +0 -6
  112. package/dist/i18n-context/functions/variables/index.d.ts.map +0 -1
  113. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts +0 -9
  114. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts.map +0 -1
  115. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts +0 -15
  116. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts.map +0 -1
  117. package/dist/i18n-context/setup/bootstrap.d.ts +0 -22
  118. package/dist/i18n-context/setup/bootstrap.d.ts.map +0 -1
  119. package/dist/i18n-context/setup/index.d.ts +0 -3
  120. package/dist/i18n-context/setup/index.d.ts.map +0 -1
  121. package/dist/i18n-context/setup/initializeGT.d.ts +0 -7
  122. package/dist/i18n-context/setup/initializeGT.d.ts.map +0 -1
  123. package/dist/i18n-context/setup/types.d.ts +0 -19
  124. package/dist/i18n-context/setup/types.d.ts.map +0 -1
  125. package/dist/i18n-context/ui/LocaleSelector.d.ts +0 -18
  126. package/dist/i18n-context/ui/LocaleSelector.d.ts.map +0 -1
  127. package/dist/i18n-context/utils/enforceBrowser.d.ts +0 -7
  128. package/dist/i18n-context/utils/enforceBrowser.d.ts.map +0 -1
  129. package/dist/index.cjs.min.cjs +0 -2
  130. package/dist/index.cjs.min.cjs.map +0 -1
  131. package/dist/index.d.ts +0 -8
  132. package/dist/index.d.ts.map +0 -1
  133. package/dist/index.esm.min.mjs +0 -2
  134. package/dist/index.esm.min.mjs.map +0 -1
  135. package/dist/internal.cjs.min.cjs +0 -2
  136. package/dist/internal.cjs.min.cjs.map +0 -1
  137. package/dist/internal.d.ts +0 -7
  138. package/dist/internal.d.ts.map +0 -1
  139. package/dist/internal.esm.min.mjs +0 -2
  140. package/dist/internal.esm.min.mjs.map +0 -1
  141. package/dist/macros.cjs.min.cjs +0 -2
  142. package/dist/macros.cjs.min.cjs.map +0 -1
  143. package/dist/macros.d.ts +0 -22
  144. package/dist/macros.d.ts.map +0 -1
  145. package/dist/macros.esm.min.mjs +0 -2
  146. package/dist/macros.esm.min.mjs.map +0 -1
  147. package/dist/react-context/provider/ClientProvider.d.ts +0 -4
  148. package/dist/react-context/provider/ClientProvider.d.ts.map +0 -1
  149. package/dist/react-context/provider/GTProvider.d.ts +0 -29
  150. package/dist/react-context/provider/GTProvider.d.ts.map +0 -1
  151. package/dist/react-context/provider/helpers/isSSREnabled.d.ts +0 -2
  152. package/dist/react-context/provider/helpers/isSSREnabled.d.ts.map +0 -1
  153. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts +0 -5
  154. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts.map +0 -1
  155. package/dist/react-context/provider/hooks/useEnableI18n.d.ts +0 -10
  156. package/dist/react-context/provider/hooks/useEnableI18n.d.ts.map +0 -1
  157. package/dist/react-context/provider/hooks/useRegionState.d.ts +0 -9
  158. package/dist/react-context/provider/hooks/useRegionState.d.ts.map +0 -1
  159. package/dist/react-context/types/config.d.ts +0 -67
  160. package/dist/react-context/types/config.d.ts.map +0 -1
  161. package/dist/react-context/ui/LocaleSelector.d.ts +0 -18
  162. package/dist/react-context/ui/LocaleSelector.d.ts.map +0 -1
  163. package/dist/react-context/ui/RegionSelector.d.ts +0 -38
  164. package/dist/react-context/ui/RegionSelector.d.ts.map +0 -1
  165. package/dist/react-context/utils/readAuthFromEnv.d.ts +0 -9
  166. package/dist/react-context/utils/readAuthFromEnv.d.ts.map +0 -1
  167. package/dist/shared/InternalLocaleSelector.d.ts +0 -26
  168. package/dist/shared/InternalLocaleSelector.d.ts.map +0 -1
  169. package/dist/shared/messages.d.ts +0 -11
  170. package/dist/shared/messages.d.ts.map +0 -1
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { ClientProviderProps } from '../types/config';
3
- export default function ClientProvider({ children, dictionary: _dictionary, dictionaryTranslations: _dictionaryTranslations, translations: _translations, locale: _locale, region: _region, _versionId, defaultLocale, translationRequired, dialectTranslationRequired, locales, renderSettings, projectId, devApiKey, runtimeUrl, developmentApiEnabled, resetLocaleCookieName, localeCookieName, regionCookieName, customMapping, environment, reloadServer, }: ClientProviderProps): React.JSX.Element;
4
- //# sourceMappingURL=ClientProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientProvider.d.ts","sourceRoot":"","sources":["../../../src/react-context/provider/ClientProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,QAAQ,EACR,UAAU,EAAE,WAAW,EACvB,sBAAsB,EAAE,uBAAuB,EAC/C,YAAY,EAAE,aAAa,EAC3B,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,OAAO,EACf,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAC1B,OAAY,EACZ,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EACrB,gBAA0C,EAC1C,gBAA0C,EAC1C,aAAa,EACb,WAAW,EACX,YAAY,GACb,EAAE,mBAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2NzC"}
@@ -1,29 +0,0 @@
1
- import { GTProviderProps } from '../types/config';
2
- import React from 'react';
3
- /**
4
- * Provides General Translation context to its children, which can then access `useGT`, `useLocale`, and `useDefaultLocale`.
5
- *
6
- * @param {React.ReactNode} children - The children components that will use the translation context.
7
- * @param {string} [projectId] - The project ID required for General Translation cloud services.
8
- * @param {Dictionary} [dictionary=defaultDictionary] - The translation dictionary for the project.
9
- * @param {string[]} [locales] - The list of approved locales for the project.
10
- * @param {string} [defaultLocale=libraryDefaultLocale] - The default locale to use if no other locale is found.
11
- * @param {string} [locale] - The current locale, if already set.
12
- * @param {string} [cacheUrl='https://cdn.gtx.dev'] - The URL of the cache service for fetching translations.
13
- * @param {string} [runtimeUrl='https://runtime.gtx.dev'] - The URL of the runtime service for fetching translations.
14
- * @param {RenderSettings} [renderSettings=defaultRenderSettings] - The settings for rendering translations.
15
- * @param {string} [_versionId] - The version ID for fetching translations.
16
- * @param {string} [devApiKey] - The API key for development environments.
17
- * @param {object} [metadata] - Additional metadata to pass to the context.
18
- * @param {boolean} [ssr=isSSREnabled()] - Whether to enable server-side rendering.
19
- * @param {string} [localeCookieName=defaultLocaleCookieName] - The name of the cookie to store the locale.
20
- * @param {boolean} [enableI18n=true] - Whether to enable i18n.
21
- * @param {boolean|undefined} [enableI18nLoaded=undefined] - Flag to indicate if the enableI18n flag is finished loading asynchronously. Undefined means flag is loaded synchronously.
22
- * @param {Translations | null} [translations=null] - The translations to use for the context.
23
- * @param {React.ReactNode} [fallback = undefined] - Custom fallback to display while loading
24
- *
25
- * @returns {JSX.Element} The provider component for General Translation context.
26
- */
27
- export declare function GTProvider(props: GTProviderProps): React.JSX.Element;
28
- export default GTProvider;
29
- //# sourceMappingURL=GTProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GTProvider.d.ts","sourceRoot":"","sources":["../../../src/react-context/provider/GTProvider.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAcpE;AAED,eAAe,UAAU,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function isSSREnabled(): boolean;
2
- //# sourceMappingURL=isSSREnabled.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isSSREnabled.d.ts","sourceRoot":"","sources":["../../../../src/react-context/provider/helpers/isSSREnabled.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,YAa3B"}
@@ -1,5 +0,0 @@
1
- import { UseDetermineLocaleParams, UseDetermineLocaleReturn } from '@generaltranslation/react-core/types';
2
- export declare function useDetermineLocale({ locale: initialLocale, defaultLocale, locales: initialLocales, localeCookieName, ssr, // when false, breaks server side rendering by accessing document and navigator on first render
3
- customMapping, enableI18n, // when enabled, don't change locale cookie (feature flag might be loaded async, updating cookie means state is lost on refresh)
4
- reloadOnLocaleUpdate, }: UseDetermineLocaleParams): UseDetermineLocaleReturn;
5
- //# sourceMappingURL=useDetermineLocale.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDetermineLocale.d.ts","sourceRoot":"","sources":["../../../../../src/react-context/provider/hooks/locales/useDetermineLocale.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAG9C,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EAAE,aAAkB,EAC1B,aAAoC,EACpC,OAAO,EAAE,cAAmB,EAC5B,gBAA0C,EAC1C,GAAU,EAAE,+FAA+F;AAC3G,aAAa,EACb,UAAU,EAAE,gIAAgI;AAC5I,oBAA4B,GAC7B,EAAE,wBAAwB,GAAG,wBAAwB,CAiErD"}
@@ -1,10 +0,0 @@
1
- import { UseEnableI18nParams, UseEnableI18nReturn } from '@generaltranslation/react-core/types';
2
- /**
3
- * Sync: no cookie
4
- * Async: listen to cookie, until promise resolves
5
- *
6
- * Unfortunately, when dealing with SSR and an async enableI18n flag, there is no way to avoid a flicker of the default locale
7
- * @returns enableI18n flag
8
- */
9
- export declare function useEnableI18n({ enableI18n: _enableI18n, enableI18nCookieName, enableI18nLoaded, ssr, }: UseEnableI18nParams): UseEnableI18nReturn;
10
- //# sourceMappingURL=useEnableI18n.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useEnableI18n.d.ts","sourceRoot":"","sources":["../../../../src/react-context/provider/hooks/useEnableI18n.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,sCAAsC,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EAAE,WAAW,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,GAAG,GACJ,EAAE,mBAAmB,GAAG,mBAAmB,CAiE3C"}
@@ -1,9 +0,0 @@
1
- export declare function useRegionState({ _region, ssr, regionCookieName, }: {
2
- _region: string | undefined;
3
- ssr: boolean;
4
- regionCookieName: string;
5
- }): {
6
- region: string | undefined;
7
- setRegion: (region: string | undefined) => void;
8
- };
9
- //# sourceMappingURL=useRegionState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useRegionState.d.ts","sourceRoot":"","sources":["../../../../src/react-context/provider/hooks/useRegionState.ts"],"names":[],"mappings":"AAgCA,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,GAAG,EACH,gBAAgB,GACjB,EAAE;IACD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,EAAE,OAAO,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;CAC1B;;wBAS4B,MAAM,GAAG,SAAS;EAa9C"}
@@ -1,67 +0,0 @@
1
- import { RenderMethod, Dictionary, Translations, CustomLoader, GTConfig, UseDetermineLocaleParams, UseDetermineLocaleReturn } from '@generaltranslation/react-core/types';
2
- import { CustomMapping } from 'generaltranslation/types';
3
- export type ClientProviderProps = {
4
- children: any;
5
- dictionary: Dictionary;
6
- dictionaryTranslations: Dictionary;
7
- translations: Translations;
8
- locale: string;
9
- locales: string[];
10
- region?: string;
11
- _versionId?: string;
12
- dictionaryEnabled?: boolean;
13
- defaultLocale: string;
14
- translationRequired: boolean;
15
- dialectTranslationRequired: boolean;
16
- renderSettings: {
17
- method: RenderMethod;
18
- timeout?: number;
19
- };
20
- developmentApiEnabled: boolean;
21
- projectId?: string;
22
- devApiKey?: string;
23
- runtimeUrl?: string | null;
24
- gtServicesEnabled?: boolean;
25
- localeCookieName?: string;
26
- resetLocaleCookieName: string;
27
- regionCookieName?: string;
28
- customMapping?: CustomMapping;
29
- environment: 'development' | 'production' | 'test';
30
- reloadServer: () => void;
31
- };
32
- export type GTProviderProps = {
33
- children?: React.ReactNode;
34
- projectId?: string;
35
- devApiKey?: string;
36
- dictionary?: any;
37
- locales?: string[];
38
- defaultLocale?: string;
39
- locale?: string;
40
- region?: string;
41
- cacheUrl?: string | null;
42
- runtimeUrl?: string | null;
43
- renderSettings?: {
44
- method: RenderMethod;
45
- timeout?: number;
46
- };
47
- _versionId?: string;
48
- ssr?: boolean;
49
- localeCookieName?: string;
50
- translations?: Translations | null;
51
- loadDictionary?: CustomLoader;
52
- loadTranslations?: CustomLoader;
53
- config?: GTConfig;
54
- fallback?: React.ReactNode;
55
- customMapping?: CustomMapping;
56
- modelProvider?: string;
57
- enableI18n?: boolean;
58
- enableI18nLoaded?: boolean;
59
- /**
60
- * @internal - internal use only
61
- * TODO: this should have a separate export for internal use
62
- */
63
- useDetermineLocale?: (params: UseDetermineLocaleParams) => UseDetermineLocaleReturn;
64
- reloadOnLocaleUpdate?: boolean;
65
- [key: string]: any;
66
- };
67
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"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- * A dropdown component that allows users to select a locale.
5
- * @param {string[]} [locales] - An optional list of locales to use for the dropdown. If not provided, the list of locales from the `<GTProvider>` context is used.
6
- * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.
7
- * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.
8
- * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.
9
- */
10
- export default function LocaleSelector({ locales: _locales, ...props }: {
11
- locales?: string[];
12
- customNames?: {
13
- [key: string]: string;
14
- };
15
- customMapping?: CustomMapping;
16
- [key: string]: any;
17
- }): React.JSX.Element | null;
18
- //# sourceMappingURL=LocaleSelector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocaleSelector.d.ts","sourceRoot":"","sources":["../../../src/react-context/ui/LocaleSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGzD;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,OAAO,EAAE,QAAQ,EACjB,GAAG,KAAK,EACT,EAAE;IACD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACxC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAc3B"}
@@ -1,38 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- /**
3
- * A dropdown component that allows users to select a region.
4
- *
5
- * @param {string[]} [regions] - An optional array of ISO 3166 region codes to display. If not provided, regions are inferred from supported locales in the `<GTProvider>` context.
6
- * @param {React.ReactNode} [placeholder] - Optional placeholder node to display as the first option when no region is selected.
7
- * @param {object} [customMapping] - An optional object to map region codes to custom display names, emojis, or associated locales. The value can be a string (display name) or an object with `name`, `emoji`, and/or `locale` properties.
8
- * @param {boolean} [prioritizeCurrentLocaleRegion] - If true, the region corresponding to the current locale is prioritized in the list.
9
- * @param {boolean} [sortRegionsAlphabetically] - If true, regions are sorted alphabetically by display name.
10
- * @param {boolean} [asLocaleSelector=false] - If true, selecting a region will also update the locale to the region's associated locale.
11
- * @param {object} [props] - Additional props to pass to the underlying `<select>` element.
12
- * @returns {React.JSX.Element | null} The rendered region dropdown component or null if no regions are available.
13
- *
14
- * @example
15
- * ```tsx
16
- * <RegionSelector
17
- * regions={['US', 'CA']}
18
- * customMapping={{ US: { name: "United States", emoji: "πŸ‡ΊπŸ‡Έ" } }}
19
- * placeholder="Select a region"
20
- * />
21
- * ```
22
- */
23
- export default function RegionSelector<Regions extends string[]>({ regions: _regions, placeholder, customMapping, prioritizeCurrentLocaleRegion, sortRegionsAlphabetically, asLocaleSelector, ...props }: {
24
- regions?: Regions;
25
- placeholder?: ReactNode;
26
- customMapping?: {
27
- [region: string]: string | {
28
- name?: string;
29
- locale?: string;
30
- emoji?: string;
31
- };
32
- };
33
- prioritizeCurrentLocaleRegion?: boolean;
34
- sortRegionsAlphabetically?: boolean;
35
- asLocaleSelector?: boolean;
36
- [key: string]: any;
37
- }): React.JSX.Element | null;
38
- //# sourceMappingURL=RegionSelector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RegionSelector.d.ts","sourceRoot":"","sources":["../../../src/react-context/ui/RegionSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,OAAO,SAAS,MAAM,EAAE,EAAE,EAC/D,OAAO,EAAE,QAAQ,EACjB,WAAW,EACX,aAAa,EACb,6BAA6B,EAC7B,yBAAyB,EACzB,gBAAwB,EACxB,GAAG,KAAK,EACT,EAAE;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE;QACd,CAAC,MAAM,EAAE,MAAM,GACX,MAAM,GACN;YAAE,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACxD,CAAC;IACF,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAyC3B"}
@@ -1,9 +0,0 @@
1
- import { AuthFromEnvParams, AuthFromEnvReturn } from '@generaltranslation/react-core/types';
2
- /**
3
- * Extract the project ID and development API key from the environment variables
4
- * @param projectId - The project ID
5
- * @param devApiKey - The development API key
6
- * @returns The project ID and development API key
7
- */
8
- export declare function readAuthFromEnv({ projectId, devApiKey, }: AuthFromEnvParams): AuthFromEnvReturn;
9
- //# sourceMappingURL=readAuthFromEnv.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"readAuthFromEnv.d.ts","sourceRoot":"","sources":["../../../src/react-context/utils/readAuthFromEnv.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,sCAAsC,CAAC;AAE9C;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,SAAS,GACV,EAAE,iBAAiB,GAAG,iBAAiB,CA6CvC"}
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import { CustomMapping, LocaleProperties } from 'generaltranslation/types';
3
- /**
4
- * A dropdown component that allows users to select a locale.
5
- * @param {string} locale - The currently selected locale.
6
- * @param {string[]} locales - The list of all available locales.
7
- * @param {function} setLocale - Function to update the current locale.
8
- * @param {function} getLocaleProperties - Function to retrieve properties for a given locale.
9
- * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.
10
- * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.
11
- * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.
12
- *
13
- * @internal
14
- */
15
- export declare function InternalLocaleSelector({ locale, locales, customNames, customMapping, setLocale, getLocaleProperties, ...props }: {
16
- locale: string;
17
- locales: string[];
18
- customNames?: {
19
- [key: string]: string;
20
- };
21
- customMapping?: CustomMapping;
22
- setLocale: (locale: string) => void;
23
- getLocaleProperties: (locale: string) => LocaleProperties;
24
- [key: string]: any;
25
- }): React.JSX.Element | null;
26
- //# sourceMappingURL=InternalLocaleSelector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InternalLocaleSelector.d.ts","sourceRoot":"","sources":["../../src/shared/InternalLocaleSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AA+B3E;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,MAAM,EACN,OAAO,EACP,WAAW,EACX,aAAyD,EACzD,SAAS,EACT,mBAAmB,EACnB,GAAG,KAAK,EACT,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACxC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,mBAAmB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,gBAAgB,CAAC;IAC1D,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAiC3B"}
@@ -1,11 +0,0 @@
1
- export declare const PACKAGE_NAME = "gt-react";
2
- export declare const BROWSER_ENVIRONMENT_ERROR = "gt-react/browser Error: The gt-react/browser module requires a browser environment";
3
- export declare const GENERIC_BROWSER_ENVIRONMENT_ERROR = "gt-react Error: You are trying to import a browser-only module into a non-browser environment.";
4
- export declare const BROWSER_I18N_MANAGER_NOT_INITIALIZED_ERROR = "gt-react Error: BrowserI18nManager not initialized. Invoke initializeGT() to initialize.";
5
- export declare const createTranslationFailedDueToBrowserEnvironmentWarning: (message: string | TemplateStringsArray | undefined) => string;
6
- export declare const createNoLocaleCouldBeDeterminedFromCustomGetLocaleWarning: ({ customLocale, defaultLocale, }: {
7
- customLocale: string;
8
- defaultLocale: string;
9
- }) => string;
10
- export declare const createInvalidLocaleWarning: (locale: string) => string;
11
- //# sourceMappingURL=messages.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/shared/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,aAAa,CAAC;AAIvC,eAAO,MAAM,yBAAyB,uFAAqG,CAAC;AAC5I,eAAO,MAAM,iCAAiC,mGAA0G,CAAC;AACzJ,eAAO,MAAM,0CAA0C,6FAAoG,CAAC;AAG5J,eAAO,MAAM,qDAAqD,GAChE,SAAS,MAAM,GAAG,oBAAoB,GAAG,SAAS,WAEwK,CAAC;AAE7N,eAAO,MAAM,yDAAyD,GAAI,kCAGvE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB,WAC8J,CAAC;AAEhK,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,WACA,CAAC"}