gt-react 9.2.29-alpha.9 → 9.2.30
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 +12 -0
- package/LICENSE.md +1 -1
- package/dist/client.cjs.min.cjs +3 -3
- package/dist/client.d.ts +23 -15
- package/dist/client.esm.min.mjs +3 -3
- package/dist/dictionaries/loadDictionaryHelper.d.ts.map +1 -1
- package/dist/hooks/useLocaleSelector.d.ts +10 -1
- package/dist/hooks/useLocaleSelector.d.ts.map +1 -1
- package/dist/index.cjs.min.cjs +3 -3
- package/dist/index.esm.min.mjs +3 -3
- package/dist/provider/ClientProvider.d.ts.map +1 -1
- package/dist/provider/hooks/useCreateInternalUseGTFunction.d.ts.map +1 -1
- package/dist/provider/hooks/useCreateInternalUseTranslationsFunction.d.ts.map +1 -1
- package/dist/provider/hooks/useErrorChecks.d.ts.map +1 -1
- package/dist/provider/hooks/useRuntimeTranslation.d.ts.map +1 -1
- package/dist/translation/inline/T.d.ts.map +1 -1
- package/dist/ui/LocaleSelector.d.ts.map +1 -1
- package/dist/variables/Currency.d.ts +6 -6
- package/dist/variables/Currency.d.ts.map +1 -1
- package/dist/variables/DateTime.d.ts +4 -4
- package/dist/variables/DateTime.d.ts.map +1 -1
- package/dist/variables/Num.d.ts +3 -4
- package/dist/variables/Num.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/client.d.ts
CHANGED
@@ -378,14 +378,14 @@ declare namespace T {
|
|
378
378
|
* </Currency>
|
379
379
|
* ```
|
380
380
|
*
|
381
|
-
* @param {
|
382
|
-
* @param {string} [currency
|
383
|
-
* @param {string[]} [locales] - Optional locales to use for currency formatting. If wrapped in a `<GTProvider>`, the user's locale is used.
|
384
|
-
* @param {Intl.NumberFormatOptions} [options
|
381
|
+
* @param {any} [children] - Optional content to render inside the currency component.
|
382
|
+
* @param {string} [currency] - The currency type (e.g., USD, EUR, etc.).
|
383
|
+
* @param {string[]} [locales] - Optional locales to use for currency formatting. If not provided, the library default locale (en-US) is used. If wrapped in a `<GTProvider>`, the user's locale is used.
|
384
|
+
* @param {Intl.NumberFormatOptions} [options] - Optional formatting options to customize how the currency is displayed.
|
385
385
|
* @returns {JSX.Element} The formatted currency component.
|
386
386
|
*/
|
387
|
-
declare function Currency({ children, currency, locales, options, }: {
|
388
|
-
children
|
387
|
+
declare function Currency({ children, currency, name, locales, options, }: {
|
388
|
+
children?: any;
|
389
389
|
currency?: string;
|
390
390
|
name?: string;
|
391
391
|
locales?: string[];
|
@@ -407,13 +407,13 @@ declare namespace Currency {
|
|
407
407
|
* </DateTime>
|
408
408
|
* ```
|
409
409
|
*
|
410
|
-
* @param {
|
411
|
-
* @param {string[]} [locales] - Optional locales to use for date formatting. If wrapped in a `<GTProvider>`, the user's locale is used.
|
410
|
+
* @param {any} [children] - Optional content (typically a date) to render inside the component.
|
411
|
+
* @param {string[]} [locales] - Optional locales to use for date formatting. If not provided, the library default locale (en-US) is used. If wrapped in a `<GTProvider>`, the user's locale is used.
|
412
412
|
* @param {Intl.DateTimeFormatOptions} [options={}] - Optional formatting options for the date, following `Intl.DateTimeFormatOptions` specifications.
|
413
413
|
* @returns {JSX.Element} The formatted date or time component.
|
414
414
|
*/
|
415
|
-
declare function DateTime({ children, locales, options, }: {
|
416
|
-
children
|
415
|
+
declare function DateTime({ children, locales, name, options, }: {
|
416
|
+
children?: any;
|
417
417
|
locales?: string[];
|
418
418
|
name?: string;
|
419
419
|
options?: Intl.DateTimeFormatOptions;
|
@@ -436,13 +436,12 @@ declare namespace DateTime {
|
|
436
436
|
* </Num>
|
437
437
|
* ```
|
438
438
|
*
|
439
|
-
* @param {
|
440
|
-
* @param {string[]} [locales] - Optional locales to use for number formatting. If wrapped in a `<GTProvider>`, the user's locale is used.
|
439
|
+
* @param {any} [children] - Optional content (typically a number) to render inside the component.
|
441
440
|
* @param {Intl.NumberFormatOptions} [options={}] - Optional formatting options for the number, following `Intl.NumberFormatOptions` specifications.
|
442
441
|
* @returns {JSX.Element} The formatted number component.
|
443
442
|
*/
|
444
|
-
declare function Num({ children, locales, options, }: {
|
445
|
-
children
|
443
|
+
declare function Num({ children, name, locales, options, }: {
|
444
|
+
children?: any;
|
446
445
|
locales?: string[];
|
447
446
|
options?: Intl.NumberFormatOptions;
|
448
447
|
name?: string;
|
@@ -543,14 +542,23 @@ declare function useSetLocale(): (locale: string) => void;
|
|
543
542
|
declare function useLocales(): string[];
|
544
543
|
|
545
544
|
/**
|
545
|
+
/**
|
546
546
|
* Gets the list of properties for using a locale selector.
|
547
|
+
* Provides locale management utilities for the application.
|
547
548
|
* @param locales an optional list of locales to use for the drop down. These locales must be a subset of the locales provided by the `<GTProvider>` context. When not provided, the list of locales from the `<GTProvider>` context is used.
|
548
|
-
*
|
549
|
+
* Provides locale management utilities for the application.
|
550
|
+
*
|
551
|
+
* @returns {Object} An object containing locale-related utilities:
|
552
|
+
* @returns {string} return.locale - The currently selected locale.
|
553
|
+
* @returns {string[]} return.locales - The list of all available locales.
|
554
|
+
* @returns {(locale: string) => void} return.setLocale - Function to update the current locale.
|
555
|
+
* @returns {(locale: string) => LocaleProperties} return.getLocaleProperties - Function to retrieve properties for a given locale.
|
549
556
|
*/
|
550
557
|
declare function useLocaleSelector(locales?: string[]): {
|
551
558
|
locale: string;
|
552
559
|
locales: string[];
|
553
560
|
setLocale: (locale: string) => void;
|
561
|
+
getLocaleProperties: (locale: string) => generaltranslation_types.LocaleProperties;
|
554
562
|
};
|
555
563
|
|
556
564
|
/**
|