angular-intlayer 9.5.0 → 9.5.2
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/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs.map +1 -1
- package/dist/cjs/esbuild/plugin.cjs +3 -3
- package/dist/esm/client/useLocale.mjs +1 -1
- package/dist/esm/client/useLocale.mjs.map +1 -1
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocaleStorage.d.ts +5 -4
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/format/useCompact.d.ts +2 -1
- package/dist/types/format/useCompact.d.ts.map +1 -1
- package/dist/types/format/useCurrency.d.ts +2 -1
- package/dist/types/format/useCurrency.d.ts.map +1 -1
- package/dist/types/format/useDate.d.ts +2 -1
- package/dist/types/format/useDate.d.ts.map +1 -1
- package/dist/types/format/useList.d.ts +2 -1
- package/dist/types/format/useList.d.ts.map +1 -1
- package/dist/types/format/useNumber.d.ts +2 -1
- package/dist/types/format/useNumber.d.ts.map +1 -1
- package/dist/types/format/usePercentage.d.ts +2 -1
- package/dist/types/format/usePercentage.d.ts.map +1 -1
- package/dist/types/format/useRelativeTime.d.ts +2 -1
- package/dist/types/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/format/useUnit.d.ts +2 -1
- package/dist/types/format/useUnit.d.ts.map +1 -1
- package/dist/types/intlayer/dist/types/index.d.ts +14 -0
- package/package.json +10 -10
|
@@ -5,6 +5,7 @@ let _intlayer_config_built = require("@intlayer/config/built");
|
|
|
5
5
|
let _angular_core = require("@angular/core");
|
|
6
6
|
|
|
7
7
|
//#region src/client/useLocale.ts
|
|
8
|
+
const { defaultLocale, locales: availableLocales } = _intlayer_config_built.internationalization ?? {};
|
|
8
9
|
/**
|
|
9
10
|
* Angular hook to manage the current locale and related functions.
|
|
10
11
|
*
|
|
@@ -33,7 +34,6 @@ let _angular_core = require("@angular/core");
|
|
|
33
34
|
* ```
|
|
34
35
|
*/
|
|
35
36
|
const useLocale = ({ isCookieEnabled, onLocaleChange } = {}) => {
|
|
36
|
-
const { defaultLocale, locales: availableLocales } = _intlayer_config_built.internationalization ?? {};
|
|
37
37
|
const intlayer = (0, _angular_core.inject)(require_client_intlayerToken.INTLAYER_TOKEN);
|
|
38
38
|
const locale = (0, _angular_core.computed)(() => intlayer?.locale() ?? defaultLocale);
|
|
39
39
|
const isCookieEnabledContext = (0, _angular_core.computed)(() => intlayer?.isCookieEnabled() ?? true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.cjs","names":["internationalization","inject","INTLAYER_TOKEN","computed"],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["import { computed, inject, type Signal } from '@angular/core';\nimport { internationalization } from '@intlayer/config/built';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { INTLAYER_TOKEN, type IntlayerProvider } from './installIntlayer';\nimport { setLocaleInStorage } from './useLocaleStorage';\n\nexport type UseLocaleProps = {\n isCookieEnabled?: boolean;\n onLocaleChange?: (locale: DeclaredLocales) => void;\n};\n\nexport type UseLocaleResult = {\n locale: Signal<DeclaredLocales>;\n defaultLocale: DeclaredLocales;\n availableLocales: DeclaredLocales[];\n setLocale: (locale: LocalesValues) => void;\n};\n\n/**\n * Angular hook to manage the current locale and related functions.\n *\n * @param props - Optional configuration for locale management.\n * @returns An object containing the current locale (signal), default locale, available locales, and a function to update the locale.\n *\n * @example\n * ```ts\n * import { Component } from '@angular/core';\n * import { useLocale } from 'angular-intlayer';\n *\n * @Component({\n * standalone: true,\n * selector: 'app-locale-switcher',\n * template: `\n * <select [value]=\"locale()\" (change)=\"setLocale($any($event.target).value)\">\n * @for (loc of availableLocales; track loc) {\n * <option [value]=\"loc\">{{ loc }}</option>\n * }\n * </select>\n * `,\n * })\n * export class LocaleSwitcher {\n * const { locale, setLocale, availableLocales } = useLocale();\n * }\n * ```\n */\nexport const useLocale = ({\n isCookieEnabled,\n onLocaleChange,\n}: UseLocaleProps = {}): UseLocaleResult => {\n const
|
|
1
|
+
{"version":3,"file":"useLocale.cjs","names":["internationalization","inject","INTLAYER_TOKEN","computed"],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["import { computed, inject, type Signal } from '@angular/core';\nimport { internationalization } from '@intlayer/config/built';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { INTLAYER_TOKEN, type IntlayerProvider } from './installIntlayer';\nimport { setLocaleInStorage } from './useLocaleStorage';\n\nexport type UseLocaleProps = {\n isCookieEnabled?: boolean;\n onLocaleChange?: (locale: DeclaredLocales) => void;\n};\n\nexport type UseLocaleResult = {\n locale: Signal<DeclaredLocales>;\n defaultLocale: DeclaredLocales;\n availableLocales: DeclaredLocales[];\n setLocale: (locale: LocalesValues) => void;\n};\n\nconst { defaultLocale, locales: availableLocales } = internationalization ?? {};\n\n/**\n * Angular hook to manage the current locale and related functions.\n *\n * @param props - Optional configuration for locale management.\n * @returns An object containing the current locale (signal), default locale, available locales, and a function to update the locale.\n *\n * @example\n * ```ts\n * import { Component } from '@angular/core';\n * import { useLocale } from 'angular-intlayer';\n *\n * @Component({\n * standalone: true,\n * selector: 'app-locale-switcher',\n * template: `\n * <select [value]=\"locale()\" (change)=\"setLocale($any($event.target).value)\">\n * @for (loc of availableLocales; track loc) {\n * <option [value]=\"loc\">{{ loc }}</option>\n * }\n * </select>\n * `,\n * })\n * export class LocaleSwitcher {\n * const { locale, setLocale, availableLocales } = useLocale();\n * }\n * ```\n */\nexport const useLocale = ({\n isCookieEnabled,\n onLocaleChange,\n}: UseLocaleProps = {}): UseLocaleResult => {\n const intlayer = inject<IntlayerProvider>(INTLAYER_TOKEN);\n\n // Create a reactive reference for the locale\n const locale = computed(\n () => (intlayer?.locale() ?? defaultLocale) as DeclaredLocales\n );\n const isCookieEnabledContext = computed(\n () => intlayer?.isCookieEnabled() ?? true\n );\n\n const setLocale = (newLocale: LocalesValues) => {\n if (!availableLocales?.map(String).includes(newLocale)) {\n console.error(`Locale ${newLocale} is not available`);\n return;\n }\n\n if (intlayer) {\n intlayer.setLocale(newLocale);\n }\n setLocaleInStorage(\n newLocale,\n isCookieEnabled ?? isCookieEnabledContext() ?? true\n );\n onLocaleChange?.(newLocale as DeclaredLocales);\n };\n\n return {\n locale, // Current locale\n defaultLocale, // Principal locale defined in config\n availableLocales, // List of the available locales defined in config\n setLocale, // Function to set the locale\n } as UseLocaleResult;\n};\n"],"mappings":";;;;;;;AAqBA,MAAM,EAAE,eAAe,SAAS,qBAAqBA,+CAAwB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6B9E,MAAa,aAAa,EACxB,iBACA,mBACkB,CAAC,MAAuB;CAC1C,MAAM,eAAWC,sBAAyBC,2CAAc;CAGxD,MAAM,aAASC,8BACN,UAAU,OAAO,KAAK,aAC/B;CACA,MAAM,6BAAyBA,8BACvB,UAAU,gBAAgB,KAAK,IACvC;CAEA,MAAM,aAAa,cAA6B;EAC9C,IAAI,CAAC,kBAAkB,IAAI,MAAM,CAAC,CAAC,SAAS,SAAS,GAAG;GACtD,QAAQ,MAAM,UAAU,UAAU,kBAAkB;GACpD;EACF;EAEA,IAAI,UACF,SAAS,UAAU,SAAS;EAE9B,mDACE,WACA,mBAAmB,uBAAuB,KAAK,IACjD;EACA,iBAAiB,SAA4B;CAC/C;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
let node_fs_promises = require("node:fs/promises");
|
|
3
2
|
let node_module = require("node:module");
|
|
4
3
|
let node_path = require("node:path");
|
|
4
|
+
let _intlayer_config_node = require("@intlayer/config/node");
|
|
5
|
+
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
6
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
7
|
let _intlayer_config_dictionaryPreload = require("@intlayer/config/dictionaryPreload");
|
|
6
8
|
let _intlayer_config_envVars = require("@intlayer/config/envVars");
|
|
7
9
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
8
|
-
let _intlayer_config_node = require("@intlayer/config/node");
|
|
9
|
-
let _intlayer_config_utils = require("@intlayer/config/utils");
|
|
10
10
|
let _intlayer_dictionaries_entry = require("@intlayer/dictionaries-entry");
|
|
11
11
|
let _intlayer_engine_build = require("@intlayer/engine/build");
|
|
12
12
|
let _intlayer_engine_cli = require("@intlayer/engine/cli");
|
|
@@ -4,6 +4,7 @@ import { internationalization } from "@intlayer/config/built";
|
|
|
4
4
|
import { computed, inject } from "@angular/core";
|
|
5
5
|
|
|
6
6
|
//#region src/client/useLocale.ts
|
|
7
|
+
const { defaultLocale, locales: availableLocales } = internationalization ?? {};
|
|
7
8
|
/**
|
|
8
9
|
* Angular hook to manage the current locale and related functions.
|
|
9
10
|
*
|
|
@@ -32,7 +33,6 @@ import { computed, inject } from "@angular/core";
|
|
|
32
33
|
* ```
|
|
33
34
|
*/
|
|
34
35
|
const useLocale = ({ isCookieEnabled, onLocaleChange } = {}) => {
|
|
35
|
-
const { defaultLocale, locales: availableLocales } = internationalization ?? {};
|
|
36
36
|
const intlayer = inject(INTLAYER_TOKEN);
|
|
37
37
|
const locale = computed(() => intlayer?.locale() ?? defaultLocale);
|
|
38
38
|
const isCookieEnabledContext = computed(() => intlayer?.isCookieEnabled() ?? true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.mjs","names":[],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["import { computed, inject, type Signal } from '@angular/core';\nimport { internationalization } from '@intlayer/config/built';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { INTLAYER_TOKEN, type IntlayerProvider } from './installIntlayer';\nimport { setLocaleInStorage } from './useLocaleStorage';\n\nexport type UseLocaleProps = {\n isCookieEnabled?: boolean;\n onLocaleChange?: (locale: DeclaredLocales) => void;\n};\n\nexport type UseLocaleResult = {\n locale: Signal<DeclaredLocales>;\n defaultLocale: DeclaredLocales;\n availableLocales: DeclaredLocales[];\n setLocale: (locale: LocalesValues) => void;\n};\n\n/**\n * Angular hook to manage the current locale and related functions.\n *\n * @param props - Optional configuration for locale management.\n * @returns An object containing the current locale (signal), default locale, available locales, and a function to update the locale.\n *\n * @example\n * ```ts\n * import { Component } from '@angular/core';\n * import { useLocale } from 'angular-intlayer';\n *\n * @Component({\n * standalone: true,\n * selector: 'app-locale-switcher',\n * template: `\n * <select [value]=\"locale()\" (change)=\"setLocale($any($event.target).value)\">\n * @for (loc of availableLocales; track loc) {\n * <option [value]=\"loc\">{{ loc }}</option>\n * }\n * </select>\n * `,\n * })\n * export class LocaleSwitcher {\n * const { locale, setLocale, availableLocales } = useLocale();\n * }\n * ```\n */\nexport const useLocale = ({\n isCookieEnabled,\n onLocaleChange,\n}: UseLocaleProps = {}): UseLocaleResult => {\n const
|
|
1
|
+
{"version":3,"file":"useLocale.mjs","names":[],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["import { computed, inject, type Signal } from '@angular/core';\nimport { internationalization } from '@intlayer/config/built';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { INTLAYER_TOKEN, type IntlayerProvider } from './installIntlayer';\nimport { setLocaleInStorage } from './useLocaleStorage';\n\nexport type UseLocaleProps = {\n isCookieEnabled?: boolean;\n onLocaleChange?: (locale: DeclaredLocales) => void;\n};\n\nexport type UseLocaleResult = {\n locale: Signal<DeclaredLocales>;\n defaultLocale: DeclaredLocales;\n availableLocales: DeclaredLocales[];\n setLocale: (locale: LocalesValues) => void;\n};\n\nconst { defaultLocale, locales: availableLocales } = internationalization ?? {};\n\n/**\n * Angular hook to manage the current locale and related functions.\n *\n * @param props - Optional configuration for locale management.\n * @returns An object containing the current locale (signal), default locale, available locales, and a function to update the locale.\n *\n * @example\n * ```ts\n * import { Component } from '@angular/core';\n * import { useLocale } from 'angular-intlayer';\n *\n * @Component({\n * standalone: true,\n * selector: 'app-locale-switcher',\n * template: `\n * <select [value]=\"locale()\" (change)=\"setLocale($any($event.target).value)\">\n * @for (loc of availableLocales; track loc) {\n * <option [value]=\"loc\">{{ loc }}</option>\n * }\n * </select>\n * `,\n * })\n * export class LocaleSwitcher {\n * const { locale, setLocale, availableLocales } = useLocale();\n * }\n * ```\n */\nexport const useLocale = ({\n isCookieEnabled,\n onLocaleChange,\n}: UseLocaleProps = {}): UseLocaleResult => {\n const intlayer = inject<IntlayerProvider>(INTLAYER_TOKEN);\n\n // Create a reactive reference for the locale\n const locale = computed(\n () => (intlayer?.locale() ?? defaultLocale) as DeclaredLocales\n );\n const isCookieEnabledContext = computed(\n () => intlayer?.isCookieEnabled() ?? true\n );\n\n const setLocale = (newLocale: LocalesValues) => {\n if (!availableLocales?.map(String).includes(newLocale)) {\n console.error(`Locale ${newLocale} is not available`);\n return;\n }\n\n if (intlayer) {\n intlayer.setLocale(newLocale);\n }\n setLocaleInStorage(\n newLocale,\n isCookieEnabled ?? isCookieEnabledContext() ?? true\n );\n onLocaleChange?.(newLocale as DeclaredLocales);\n };\n\n return {\n locale, // Current locale\n defaultLocale, // Principal locale defined in config\n availableLocales, // List of the available locales defined in config\n setLocale, // Function to set the locale\n } as UseLocaleResult;\n};\n"],"mappings":";;;;;;AAqBA,MAAM,EAAE,eAAe,SAAS,qBAAqB,wBAAwB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6B9E,MAAa,aAAa,EACxB,iBACA,mBACkB,CAAC,MAAuB;CAC1C,MAAM,WAAW,OAAyB,cAAc;CAGxD,MAAM,SAAS,eACN,UAAU,OAAO,KAAK,aAC/B;CACA,MAAM,yBAAyB,eACvB,UAAU,gBAAgB,KAAK,IACvC;CAEA,MAAM,aAAa,cAA6B;EAC9C,IAAI,CAAC,kBAAkB,IAAI,MAAM,CAAC,CAAC,SAAS,SAAS,GAAG;GACtD,QAAQ,MAAM,UAAU,UAAU,kBAAkB;GACpD;EACF;EAEA,IAAI,UACF,SAAS,UAAU,SAAS;EAE9B,mBACE,WACA,mBAAmB,uBAAuB,KAAK,IACjD;EACA,iBAAiB,SAA4B;CAC/C;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;YASY;EACV;EACA,kBAAkB,QAAQ;;YAGhB;EACV,QAAQ,OAAO;EACf,eAAe;EACf,kBAAkB;EAClB,YAAY,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;YASY;EACV;EACA,kBAAkB,QAAQ;;YAGhB;EACV,QAAQ,OAAO;EACf,eAAe;EACf,kBAAkB;EAClB,YAAY,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgCT,cAAS,iBAAA,mBAGnB,mBAAsB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
1
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
3
|
//#region src/client/useLocaleStorage.d.ts
|
|
3
4
|
/**
|
|
@@ -6,13 +7,13 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
|
6
7
|
/**
|
|
7
8
|
* Get the locale cookie
|
|
8
9
|
*/
|
|
9
|
-
export declare const localeInStorage:
|
|
10
|
+
export declare const localeInStorage: Locale;
|
|
10
11
|
/**
|
|
11
12
|
* @deprecated Use localeInStorage instead
|
|
12
13
|
*
|
|
13
14
|
* Get the locale cookie
|
|
14
15
|
*/
|
|
15
|
-
export declare const localeCookie:
|
|
16
|
+
export declare const localeCookie: Locale;
|
|
16
17
|
/**
|
|
17
18
|
* Set the locale cookie
|
|
18
19
|
*/
|
|
@@ -27,7 +28,7 @@ export declare const setLocaleCookie: typeof setLocaleInStorage;
|
|
|
27
28
|
* Hook that provides the locale storage and a function to set it
|
|
28
29
|
*/
|
|
29
30
|
export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
30
|
-
getLocale: () =>
|
|
31
|
+
getLocale: () => Locale;
|
|
31
32
|
setLocale: (locale: LocalesValues) => void;
|
|
32
33
|
};
|
|
33
34
|
/**
|
|
@@ -38,7 +39,7 @@ export declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
38
39
|
* Hook that provides the locale cookie and a function to set it
|
|
39
40
|
*/
|
|
40
41
|
export declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
41
|
-
localeCookie:
|
|
42
|
+
localeCookie: Locale;
|
|
42
43
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
43
44
|
};
|
|
44
45
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;;;qBAca,iBAAA;;;;;;qBAMA,cAAA;;;;qBAKA,qBAAkB,QACrB,eAAa;;;;;;qBAaV,wBAAe;;;;qBAKf,mBAAgB;mBAAhB;sBAAA;;;;;;;;;qBAaA,kBAAe;EAIxB,cAJS;EAKT,kBAAe,QAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useCompact.d.ts
|
|
2
3
|
export declare const useCompact: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# sourceMappingURL=useCompact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":";;qBAIa,0CAAU,QAAA,wBAAA,UAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useCurrency.d.ts
|
|
2
3
|
export declare const useCurrency: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# sourceMappingURL=useCurrency.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":";;qBAIa,2CAAW,QAAA,wBAAA,UAAA,KAAA;WAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useDate.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Angular client hook that provides a localized date/time formatter.
|
|
4
5
|
*/
|
|
5
6
|
export declare const useDate: () => import("@angular/core").Signal<(date: string | number | Date, options?: import("@intlayer/core/formatters").DateTimePreset | (Intl.DateTimeFormatOptions & {
|
|
6
|
-
locale?:
|
|
7
|
+
locale?: LocalesValues;
|
|
7
8
|
})) => string>;
|
|
8
9
|
//#endregion
|
|
9
10
|
//# sourceMappingURL=useDate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":";;;;;qBAOa,uCAAO,QAAA,wBAAA,MAAA,8CAAA,kBAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useList.d.ts
|
|
2
3
|
export declare const useList: () => import("@angular/core").Signal<(values: (string | number)[], options?: import("@intlayer/core/formatters").ListFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# sourceMappingURL=useList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":";;qBAIa,uCAAO,QAAA,6BAAA,8CAAA;WAAP"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useNumber.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Angular client hook that provides a localized number formatter.
|
|
4
5
|
*/
|
|
5
6
|
export declare const useNumber: () => import("@angular/core").Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
6
|
-
locale?:
|
|
7
|
+
locale?: LocalesValues;
|
|
7
8
|
}) => string>;
|
|
8
9
|
//#endregion
|
|
9
10
|
//# sourceMappingURL=useNumber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":";;;;;qBAOa,yCAAS,QAAA,wBAAA,SAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/usePercentage.d.ts
|
|
2
3
|
export declare const usePercentage: () => import("@angular/core").Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# sourceMappingURL=usePercentage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":";;qBAIa,6CAAa,QAAA,wBAAA,SAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useRelativeTime.d.ts
|
|
2
3
|
export declare const useRelativeTime: () => import("@angular/core").Signal<(from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
5
6
|
}) => string>;
|
|
6
7
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;qBAIa,+CAAe,QAAA,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA;WAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
1
2
|
//#region src/format/useUnit.d.ts
|
|
2
3
|
export declare const useUnit: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
-
locale?:
|
|
4
|
+
locale?: LocalesValues;
|
|
4
5
|
}) => string>;
|
|
5
6
|
//#endregion
|
|
6
7
|
//# sourceMappingURL=useUnit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;qBAIa,uCAAO,QAAA,wBAAA,UAAA,KAAA;WAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DeclaredLocales, LocalesValues as LocalesValues$1 } from "@intlayer/types/module_augmentation";
|
|
2
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
3
|
+
import "@intlayer/core/interpreter";
|
|
4
|
+
import "@intlayer/types/config";
|
|
5
|
+
import { Locale } from "@intlayer/types/allLocales";
|
|
6
|
+
import "@intlayer/types/locales";
|
|
7
|
+
import "@intlayer/config/built";
|
|
8
|
+
import "@intlayer/core/file";
|
|
9
|
+
import "@intlayer/core/formatters";
|
|
10
|
+
import "@intlayer/core/localization";
|
|
11
|
+
import "@intlayer/core/markdown";
|
|
12
|
+
import "@intlayer/core/transpiler";
|
|
13
|
+
import "@intlayer/core/utils";
|
|
14
|
+
export type { Locale, LocalesValues$1 as LocalesValues };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-intlayer",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Angular applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -119,20 +119,20 @@
|
|
|
119
119
|
"@babel/core": "^8.0.1",
|
|
120
120
|
"@babel/plugin-syntax-import-attributes": "7.29.7",
|
|
121
121
|
"@babel/preset-env": "8.0.2",
|
|
122
|
-
"@intlayer/config": "9.5.
|
|
123
|
-
"@intlayer/core": "9.5.
|
|
124
|
-
"@intlayer/dictionaries-entry": "9.5.
|
|
125
|
-
"@intlayer/editor": "9.5.
|
|
126
|
-
"@intlayer/engine": "9.5.
|
|
127
|
-
"@intlayer/types": "9.5.
|
|
128
|
-
"@intlayer/webpack": "9.5.
|
|
122
|
+
"@intlayer/config": "9.5.2",
|
|
123
|
+
"@intlayer/core": "9.5.2",
|
|
124
|
+
"@intlayer/dictionaries-entry": "9.5.2",
|
|
125
|
+
"@intlayer/editor": "9.5.2",
|
|
126
|
+
"@intlayer/engine": "9.5.2",
|
|
127
|
+
"@intlayer/types": "9.5.2",
|
|
128
|
+
"@intlayer/webpack": "9.5.2",
|
|
129
129
|
"babel-loader": "10.1.1",
|
|
130
130
|
"defu": "6.1.7"
|
|
131
131
|
},
|
|
132
132
|
"devDependencies": {
|
|
133
133
|
"@angular/common": "22.1.5",
|
|
134
134
|
"@angular/core": "22.1.5",
|
|
135
|
-
"@types/node": "
|
|
135
|
+
"@types/node": "^22",
|
|
136
136
|
"@types/webpack": "5.28.5",
|
|
137
137
|
"@utils/ts-config": "1.0.4",
|
|
138
138
|
"@utils/ts-config-types": "1.0.4",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
157
|
"optionalDependencies": {
|
|
158
|
-
"@intlayer/analytics": "9.5.
|
|
158
|
+
"@intlayer/analytics": "9.5.2"
|
|
159
159
|
},
|
|
160
160
|
"engines": {
|
|
161
161
|
"node": ">=14.18"
|