angular-intlayer 8.4.10 → 8.5.1
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/@intlayer/editor/src/isEnabled.cjs +10 -0
- package/dist/cjs/@intlayer/editor/src/isEnabled.cjs.map +1 -0
- package/dist/cjs/UI/IntlayerNode.component.cjs +53 -0
- package/dist/cjs/UI/IntlayerNode.component.cjs.map +1 -0
- package/dist/cjs/UI/index.cjs +9 -0
- package/dist/cjs/client/index.cjs +4 -10
- package/dist/cjs/client/installIntlayer.cjs +19 -48
- package/dist/cjs/client/installIntlayer.cjs.map +1 -1
- package/dist/cjs/client/intlayerToken.cjs +36 -0
- package/dist/cjs/client/intlayerToken.cjs.map +1 -0
- package/dist/cjs/client/useDictionary.cjs +2 -2
- package/dist/cjs/client/useDictionary.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +2 -2
- package/dist/cjs/client/useDictionaryAsync.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +2 -2
- package/dist/cjs/client/useDictionaryDynamic.cjs.map +1 -1
- package/dist/cjs/client/useIntlayer.cjs +2 -2
- package/dist/cjs/client/useIntlayer.cjs.map +1 -1
- package/dist/cjs/client/useLocale.cjs +2 -2
- package/dist/cjs/client/useLocale.cjs.map +1 -1
- package/dist/cjs/editor/EditorProvider.component.cjs +27 -0
- package/dist/cjs/editor/EditorProvider.component.cjs.map +1 -0
- package/dist/cjs/editor/index.cjs +19 -0
- package/dist/cjs/editor/useEditor.cjs +47 -12
- package/dist/cjs/editor/useEditor.cjs.map +1 -1
- package/dist/cjs/format/index.cjs +20 -0
- package/dist/cjs/format/useCompact.cjs +18 -0
- package/dist/cjs/format/useCompact.cjs.map +1 -0
- package/dist/cjs/format/useCurrency.cjs +18 -0
- package/dist/cjs/format/useCurrency.cjs.map +1 -0
- package/dist/cjs/format/useDate.cjs +28 -0
- package/dist/cjs/format/useDate.cjs.map +1 -0
- package/dist/cjs/format/useIntl.cjs +20 -0
- package/dist/cjs/format/useIntl.cjs.map +1 -0
- package/dist/cjs/format/useList.cjs +18 -0
- package/dist/cjs/format/useList.cjs.map +1 -0
- package/dist/cjs/format/useNumber.cjs +21 -0
- package/dist/cjs/format/useNumber.cjs.map +1 -0
- package/dist/cjs/format/usePercentage.cjs +18 -0
- package/dist/cjs/format/usePercentage.cjs.map +1 -0
- package/dist/cjs/format/useRelativeTime.cjs +18 -0
- package/dist/cjs/format/useRelativeTime.cjs.map +1 -0
- package/dist/cjs/format/useUnit.cjs +18 -0
- package/dist/cjs/format/useUnit.cjs.map +1 -0
- package/dist/cjs/html/index.cjs +12 -0
- package/dist/cjs/html/installIntlayerHTML.cjs +47 -0
- package/dist/cjs/html/installIntlayerHTML.cjs.map +1 -0
- package/dist/cjs/index.cjs +8 -18
- package/dist/cjs/markdown/index.cjs +0 -1
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs +1 -1
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs.map +1 -1
- package/dist/cjs/plugins.cjs +14 -22
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/cjs/renderIntlayerNode.cjs +2 -1
- package/dist/cjs/renderIntlayerNode.cjs.map +1 -1
- package/dist/esm/@intlayer/editor/src/isEnabled.mjs +8 -0
- package/dist/esm/@intlayer/editor/src/isEnabled.mjs.map +1 -0
- package/dist/esm/UI/IntlayerNode.component.mjs +46 -0
- package/dist/esm/UI/IntlayerNode.component.mjs.map +1 -0
- package/dist/esm/UI/index.mjs +3 -0
- package/dist/esm/client/index.mjs +3 -3
- package/dist/esm/client/installIntlayer.mjs +15 -37
- package/dist/esm/client/installIntlayer.mjs.map +1 -1
- package/dist/esm/client/intlayerToken.mjs +31 -0
- package/dist/esm/client/intlayerToken.mjs.map +1 -0
- package/dist/esm/client/useDictionary.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs.map +1 -1
- package/dist/esm/client/useDictionaryAsync.mjs +1 -1
- package/dist/esm/client/useDictionaryAsync.mjs.map +1 -1
- package/dist/esm/client/useDictionaryDynamic.mjs +1 -1
- package/dist/esm/client/useDictionaryDynamic.mjs.map +1 -1
- package/dist/esm/client/useIntlayer.mjs +1 -1
- package/dist/esm/client/useIntlayer.mjs.map +1 -1
- package/dist/esm/client/useLocale.mjs +1 -1
- package/dist/esm/editor/EditorProvider.component.mjs +20 -0
- package/dist/esm/editor/EditorProvider.component.mjs.map +1 -0
- package/dist/esm/editor/index.mjs +5 -0
- package/dist/esm/editor/useEditor.mjs +48 -14
- package/dist/esm/editor/useEditor.mjs.map +1 -1
- package/dist/esm/format/index.mjs +11 -0
- package/dist/esm/format/useCompact.mjs +16 -0
- package/dist/esm/format/useCompact.mjs.map +1 -0
- package/dist/esm/format/useCurrency.mjs +16 -0
- package/dist/esm/format/useCurrency.mjs.map +1 -0
- package/dist/esm/format/useDate.mjs +26 -0
- package/dist/esm/format/useDate.mjs.map +1 -0
- package/dist/esm/format/useIntl.mjs +18 -0
- package/dist/esm/format/useIntl.mjs.map +1 -0
- package/dist/esm/format/useList.mjs +16 -0
- package/dist/esm/format/useList.mjs.map +1 -0
- package/dist/esm/format/useNumber.mjs +19 -0
- package/dist/esm/format/useNumber.mjs.map +1 -0
- package/dist/esm/format/usePercentage.mjs +16 -0
- package/dist/esm/format/usePercentage.mjs.map +1 -0
- package/dist/esm/format/useRelativeTime.mjs +16 -0
- package/dist/esm/format/useRelativeTime.mjs.map +1 -0
- package/dist/esm/format/useUnit.mjs +16 -0
- package/dist/esm/format/useUnit.mjs.map +1 -0
- package/dist/esm/html/index.mjs +3 -0
- package/dist/esm/html/installIntlayerHTML.mjs +37 -0
- package/dist/esm/html/installIntlayerHTML.mjs.map +1 -0
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/markdown/index.mjs +2 -2
- package/dist/esm/markdown/installIntlayerMarkdown.mjs +1 -1
- package/dist/esm/markdown/installIntlayerMarkdown.mjs.map +1 -1
- package/dist/esm/plugins.mjs +14 -22
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/esm/renderIntlayerNode.mjs +2 -1
- package/dist/esm/renderIntlayerNode.mjs.map +1 -1
- package/dist/types/UI/IntlayerNode.component.d.ts +27 -0
- package/dist/types/UI/IntlayerNode.component.d.ts.map +1 -0
- package/dist/types/UI/index.d.ts +2 -0
- package/dist/types/client/index.d.ts +3 -3
- package/dist/types/client/installIntlayer.d.ts +10 -21
- package/dist/types/client/installIntlayer.d.ts.map +1 -1
- package/dist/types/client/intlayerToken.d.ts +19 -0
- package/dist/types/client/intlayerToken.d.ts.map +1 -0
- package/dist/types/client/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts +2 -2
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useIntlayer.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +3 -3
- package/dist/types/client/useLocaleStorage.d.ts +5 -5
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/editor/EditorProvider.component.d.ts +33 -0
- package/dist/types/editor/EditorProvider.component.d.ts.map +1 -0
- package/dist/types/editor/index.d.ts +4 -0
- package/dist/types/editor/useEditor.d.ts +35 -2
- package/dist/types/editor/useEditor.d.ts.map +1 -1
- package/dist/types/format/index.d.ts +10 -0
- package/dist/types/format/useCompact.d.ts +10 -0
- package/dist/types/format/useCompact.d.ts.map +1 -0
- package/dist/types/format/useCurrency.d.ts +10 -0
- package/dist/types/format/useCurrency.d.ts.map +1 -0
- package/dist/types/format/useDate.d.ts +14 -0
- package/dist/types/format/useDate.d.ts.map +1 -0
- package/dist/types/format/useIntl.d.ts +12 -0
- package/dist/types/format/useIntl.d.ts.map +1 -0
- package/dist/types/format/useList.d.ts +14 -0
- package/dist/types/format/useList.d.ts.map +1 -0
- package/dist/types/format/useNumber.d.ts +13 -0
- package/dist/types/format/useNumber.d.ts.map +1 -0
- package/dist/types/format/usePercentage.d.ts +10 -0
- package/dist/types/format/usePercentage.d.ts.map +1 -0
- package/dist/types/format/useRelativeTime.d.ts +11 -0
- package/dist/types/format/useRelativeTime.d.ts.map +1 -0
- package/dist/types/format/useUnit.d.ts +10 -0
- package/dist/types/format/useUnit.d.ts.map +1 -0
- package/dist/types/html/index.d.ts +2 -0
- package/dist/types/html/installIntlayerHTML.d.ts +34 -0
- package/dist/types/html/installIntlayerHTML.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -4
- package/dist/types/intlayer/dist/types/index.d.ts +4 -0
- package/dist/types/markdown/index.d.ts +2 -2
- package/dist/types/markdown/installIntlayerMarkdown.d.ts +3 -3
- package/dist/types/markdown/installIntlayerMarkdown.d.ts.map +1 -1
- package/dist/types/plugins.d.ts.map +1 -1
- package/package.json +32 -8
- package/dist/cjs/client/useIntl.cjs +0 -41
- package/dist/cjs/client/useIntl.cjs.map +0 -1
- package/dist/esm/client/useIntl.mjs +0 -39
- package/dist/esm/client/useIntl.mjs.map +0 -1
- package/dist/types/client/useIntl.d.ts +0 -33
- package/dist/types/client/useIntl.d.ts.map +0 -1
|
@@ -1,28 +1,19 @@
|
|
|
1
|
+
import { INTLAYER_TOKEN, IntlayerProvider, createIntlayerClient } from "./intlayerToken.js";
|
|
1
2
|
import * as _angular_core0 from "@angular/core";
|
|
2
|
-
import { InjectionToken, Signal } from "@angular/core";
|
|
3
3
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
4
|
|
|
5
5
|
//#region src/client/installIntlayer.d.ts
|
|
6
|
-
declare const INTLAYER_TOKEN: InjectionToken<IntlayerProvider>;
|
|
7
|
-
declare class IntlayerProvider {
|
|
8
|
-
isCookieEnabled: _angular_core0.WritableSignal<boolean>;
|
|
9
|
-
private _locale;
|
|
10
|
-
readonly locale: Signal<LocalesValues>;
|
|
11
|
-
setLocale: (locale: LocalesValues) => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Create and return a single IntlayerProvider instance
|
|
15
|
-
*/
|
|
16
|
-
declare const createIntlayerClient: (locale?: LocalesValues, isCookieEnabled?: boolean) => IntlayerProvider;
|
|
17
6
|
/**
|
|
18
7
|
* Provides Intlayer to your Angular application.
|
|
19
8
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
9
|
+
* Registers the Intlayer locale token **and** automatically starts the Intlayer
|
|
10
|
+
* editor client (when the editor is enabled) via `provideAppInitializer`.
|
|
11
|
+
*
|
|
12
|
+
* This is the recommended way to set up Intlayer in `app.config.ts`.
|
|
22
13
|
*
|
|
23
14
|
* @param locale - Initial locale to use.
|
|
24
15
|
* @param isCookieEnabled - Whether to store the locale in cookies.
|
|
25
|
-
* @returns
|
|
16
|
+
* @returns An array of Angular providers for Intlayer.
|
|
26
17
|
*
|
|
27
18
|
* @example
|
|
28
19
|
* ```ts
|
|
@@ -31,16 +22,14 @@ declare const createIntlayerClient: (locale?: LocalesValues, isCookieEnabled?: b
|
|
|
31
22
|
* import { provideIntlayer } from 'angular-intlayer';
|
|
32
23
|
*
|
|
33
24
|
* export const appConfig: ApplicationConfig = {
|
|
34
|
-
* providers: [
|
|
35
|
-
* provideIntlayer({ locale: 'en' }),
|
|
36
|
-
* ],
|
|
25
|
+
* providers: [provideIntlayer()],
|
|
37
26
|
* };
|
|
38
27
|
* ```
|
|
39
28
|
*/
|
|
40
|
-
declare const provideIntlayer: (locale?: LocalesValues, isCookieEnabled?: boolean) => {
|
|
41
|
-
provide: InjectionToken<IntlayerProvider>;
|
|
29
|
+
declare const provideIntlayer: (locale?: LocalesValues, isCookieEnabled?: boolean) => (_angular_core0.EnvironmentProviders | {
|
|
30
|
+
provide: _angular_core0.InjectionToken<IntlayerProvider>;
|
|
42
31
|
useValue: IntlayerProvider;
|
|
43
|
-
};
|
|
32
|
+
})[];
|
|
44
33
|
/**
|
|
45
34
|
* Helper to install the Intlayer provider.
|
|
46
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installIntlayer.d.ts","names":[],"sources":["../../../src/client/installIntlayer.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"installIntlayer.d.ts","names":[],"sources":["../../../src/client/installIntlayer.ts"],"mappings":";;;;;;;AAiCA;;;;;;;;;;;;;;;;;;;;;cAAa,eAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA,gBADsB,cAAA,CACA,oBAAA;;;;;;;cAaX,eAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA,eAAsB,gBAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as _angular_core0 from "@angular/core";
|
|
2
|
+
import { InjectionToken, Signal } from "@angular/core";
|
|
3
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
|
+
|
|
5
|
+
//#region src/client/intlayerToken.d.ts
|
|
6
|
+
declare class IntlayerProvider {
|
|
7
|
+
isCookieEnabled: _angular_core0.WritableSignal<boolean>;
|
|
8
|
+
private _locale;
|
|
9
|
+
readonly locale: Signal<LocalesValues>;
|
|
10
|
+
setLocale: (locale: LocalesValues) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const INTLAYER_TOKEN: InjectionToken<IntlayerProvider>;
|
|
13
|
+
/**
|
|
14
|
+
* Create and return a single IntlayerProvider instance
|
|
15
|
+
*/
|
|
16
|
+
declare const createIntlayerClient: (locale?: LocalesValues, isCookieEnabled?: boolean) => IntlayerProvider;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { INTLAYER_TOKEN, IntlayerProvider, createIntlayerClient };
|
|
19
|
+
//# sourceMappingURL=intlayerToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intlayerToken.d.ts","names":[],"sources":["../../../src/client/intlayerToken.ts"],"mappings":";;;;;cAIa,gBAAA;EACX,eAAA,EAD2B,cAAA,CACZ,cAAA;EAAA,QACP,OAAA;EAAA,SAIC,MAAA,EAAQ,MAAA,CAAO,aAAA;EAExB,SAAA,GAAa,MAAA,EAAQ,aAAA;AAAA;AAAA,cAKV,cAAA,EAAc,cAAA,CAAA,gBAAA;;;;cAUd,oBAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA,eACC,gBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"mappings":";;;;;;;;AAiBA;;cAAa,kBAAA,aAAsC,UAAA,EACjD,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,MAAA,GAAS,aAAA,KAAa,OAAA,CAAA,cAAA,CAAA,MAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
2
3
|
import * as _angular_core0 from "@angular/core";
|
|
3
4
|
import { DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
4
5
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
5
6
|
import * as _intlayer_core_interpreter0 from "@intlayer/core/interpreter";
|
|
6
|
-
import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
7
7
|
|
|
8
8
|
//#region src/client/useDictionaryDynamic.d.ts
|
|
9
9
|
/**
|
|
@@ -11,7 +11,7 @@ import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
|
11
11
|
*
|
|
12
12
|
* If the locale is not provided, it will use the locale from the client context
|
|
13
13
|
*/
|
|
14
|
-
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _angular_core0.Signal<_intlayer_core_interpreter0.DeepTransformContent<T["content"], IInterpreterPluginState$1,
|
|
14
|
+
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _angular_core0.Signal<_intlayer_core_interpreter0.DeepTransformContent<T["content"], IInterpreterPluginState$1, Locale>>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { useDictionaryDynamic };
|
|
17
17
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;;cAmBa,oBAAA,aACD,UAAA,YACA,cAAA,EAEV,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,KAAa,cAAA,CAAA,MAAA,CAAA,2BAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,yBAAA,EAAA,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"mappings":";;;;;;cAWa,eAAA,GACX,GAAA,cACC,GAAA;EAAS,QAAA,GAAW,CAAA;AAAA;;;;;;;;;AA8BvB;;;;;;;;;;;;;;;;;cAAa,WAAA,aAAyB,cAAA,YAA0B,aAAA,EAC9D,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,KACR,MAAA,CAAO,oBAAA,CAAqB,yBAAA,CAA0B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
1
2
|
import * as _angular_core0 from "@angular/core";
|
|
2
3
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
|
-
import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useLocale.d.ts
|
|
6
6
|
type useLocaleProps = {
|
|
@@ -39,8 +39,8 @@ declare const useLocale: ({
|
|
|
39
39
|
onLocaleChange
|
|
40
40
|
}?: useLocaleProps) => {
|
|
41
41
|
locale: _angular_core0.Signal<"af" | "af-ZA" | "sq" | "sq-AL" | "am" | "am-ET" | "ar" | "ar-DZ" | "ar-BH" | "ar-TD" | "ar-KM" | "ar-DJ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MR" | "ar-MA" | "ar-OM" | "ar-PS" | "ar-QA" | "ar-SA" | "ar-SO" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-AE" | "ar-YE" | "hy" | "hy-AM" | "az" | "az-AZ" | "eu" | "eu-ES" | "be" | "be-BY" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "bs" | "bs-BA" | "bg" | "bg-BG" | "my" | "my-MM" | "ca" | "ca-ES" | "zh" | "zh-HK" | "zh-MO" | "zh-Hans" | "zh-CN" | "zh-SG" | "zh-TW" | "zh-Hant" | "hr" | "hr-BA" | "hr-HR" | "cs" | "cs-CZ" | "da" | "da-DK" | "dv" | "dv-MV" | "nl" | "nl-BE" | "nl-NL" | "en" | "en-AU" | "en-BZ" | "en-BW" | "en-CA" | "en-CB" | "en-GH" | "en-HK" | "en-IN" | "en-IE" | "en-JM" | "en-KE" | "en-MY" | "en-NZ" | "en-NG" | "en-PK" | "en-PH" | "en-SG" | "en-ZA" | "en-TZ" | "en-TT" | "en-UG" | "en-GB" | "en-US" | "en-ZW" | "eo" | "et" | "et-EE" | "fo" | "fo-FO" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fr" | "fr-BE" | "fr-CA" | "fr-FR" | "fr-LU" | "fr-MC" | "fr-CH" | "mk" | "mk-MK" | "gl" | "gl-ES" | "ka" | "ka-GE" | "de" | "de-AT" | "de-DE" | "de-LI" | "de-LU" | "de-CH" | "el" | "el-GR" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hu" | "hu-HU" | "is" | "is-IS" | "id" | "id-ID" | "ga" | "ga-IE" | "it" | "it-IT" | "it-CH" | "ja" | "ja-JP" | "kn" | "kn-IN" | "kk" | "kk-KZ" | "km" | "km-KH" | "kok" | "kok-IN" | "ko" | "ko-KR" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lo" | "lo-LA" | "lv" | "lv-LV" | "lt" | "lt-LT" | "dsb" | "dsb-DE" | "mg-MG" | "ms" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi" | "mi-NZ" | "mr" | "mr-IN" | "mn" | "mn-MN" | "ne" | "ne-NP" | "ns" | "ns-ZA" | "no" | "nb" | "nb-NO" | "nn" | "nn-NO" | "ps" | "ps-AR" | "pl" | "pl-PL" | "pt" | "pt-BR" | "pt-CV" | "pt-GW" | "pt-MO" | "pt-MZ" | "pt-PT" | "pt-ST" | "pt-TL" | "pa" | "pa-IN" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-MD" | "ro-RO" | "rm" | "rm-CH" | "ru" | "ru-MD" | "ru-RU" | "se" | "se-FI" | "se-NO" | "se-SE" | "sa" | "sa-IN" | "gd" | "gd-GB" | "sr-Cyrl" | "sr-BA" | "sr-RS" | "sr" | "sr-SP" | "si" | "si-LK" | "sk" | "sk-SK" | "sl" | "sl-SI" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-SV" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PY" | "es-PE" | "es-PR" | "es-ES" | "es-US" | "es-UY" | "es-VE" | "sw" | "sw-KE" | "sv" | "sv-FI" | "sv-SE" | "syr" | "syr-SY" | "tl" | "tl-PH" | "ta" | "ta-IN" | "tt" | "tt-RU" | "te" | "te-IN" | "th" | "th-TH" | "ts" | "tn" | "tn-ZA" | "tr" | "tr-TR" | "uk" | "uk-UA" | "hsb" | "hsb-DE" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "ve" | "ve-ZA" | "vi" | "vi-VN" | "cy" | "cy-GB" | "xh" | "xh-ZA" | "yi" | "yi-001" | "yo" | "yo-NG" | "zu" | "zu-ZA" | (string & {})>;
|
|
42
|
-
defaultLocale:
|
|
43
|
-
availableLocales:
|
|
42
|
+
defaultLocale: Locale;
|
|
43
|
+
availableLocales: Locale[];
|
|
44
44
|
setLocale: (newLocale: LocalesValues) => void;
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
1
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
-
import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useLocaleStorage.d.ts
|
|
5
5
|
/**
|
|
@@ -8,13 +8,13 @@ import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
|
8
8
|
/**
|
|
9
9
|
* Get the locale cookie
|
|
10
10
|
*/
|
|
11
|
-
declare const localeInStorage:
|
|
11
|
+
declare const localeInStorage: Locale;
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated Use localeInStorage instead
|
|
14
14
|
*
|
|
15
15
|
* Get the locale cookie
|
|
16
16
|
*/
|
|
17
|
-
declare const localeCookie:
|
|
17
|
+
declare const localeCookie: Locale;
|
|
18
18
|
/**
|
|
19
19
|
* Set the locale cookie
|
|
20
20
|
*/
|
|
@@ -29,7 +29,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean)
|
|
|
29
29
|
* Hook that provides the locale storage and a function to set it
|
|
30
30
|
*/
|
|
31
31
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
32
|
-
getLocale: () =>
|
|
32
|
+
getLocale: () => Locale;
|
|
33
33
|
setLocale: (locale: LocalesValues) => void;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
@@ -40,7 +40,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
40
40
|
* Hook that provides the locale cookie and a function to set it
|
|
41
41
|
*/
|
|
42
42
|
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
43
|
-
localeCookie:
|
|
43
|
+
localeCookie: Locale;
|
|
44
44
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;AAcA;;;AAAA,cAAa,eAAA,EAA4D,
|
|
1
|
+
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;AAcA;;;AAAA,cAAa,eAAA,EAA4D,MAAA;;AAMzE;;;;cAAa,YAAA,EAA8B,MAAA;AAK3C;;;AAAA,cAAa,kBAAA,GACX,MAAA,EAAQ,aAAA,EACR,eAAA;;;;;;cAYW,eAAA,GAAe,MAAA,EAblB,aAAA,EAAa,eAAA;;;;cAkBV,gBAAA,GAAoB,eAAA;mBAI7B,MAAA;sBAAA,aAAA;AAAA;;AAJJ;;;;;;cAaa,eAAA,GAAmB,eAAA;gBAO/B,MAAA;4BAAA,aAAA;AAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/editor/EditorProvider.component.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Drop-in Angular equivalent of React's `EditorProvider`.
|
|
4
|
+
*
|
|
5
|
+
* Wrap your root component (or any subtree) with this component to automatically
|
|
6
|
+
* start the Intlayer editor client. The editor will be started on mount and
|
|
7
|
+
* stopped when this component is destroyed.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```html
|
|
11
|
+
* <!-- app.component.html -->
|
|
12
|
+
* <intlayer-editor-provider>
|
|
13
|
+
* <router-outlet />
|
|
14
|
+
* </intlayer-editor-provider>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* ```ts
|
|
18
|
+
* // app.component.ts
|
|
19
|
+
* import { EditorProviderComponent } from 'angular-intlayer';
|
|
20
|
+
*
|
|
21
|
+
* @Component({
|
|
22
|
+
* imports: [EditorProviderComponent],
|
|
23
|
+
* …
|
|
24
|
+
* })
|
|
25
|
+
* export class AppComponent {}
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare class EditorProviderComponent {
|
|
29
|
+
constructor();
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { EditorProviderComponent };
|
|
33
|
+
//# sourceMappingURL=EditorProvider.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorProvider.component.d.ts","names":[],"sources":["../../../src/editor/EditorProvider.component.ts"],"mappings":";;AA6BA;;;;;;;;;;;;;;;;;;;;;;;;;cAKa,uBAAA;EAAuB,WAAA,CAAA;AAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ContentSelectorWrapperComponent } from "./ContentSelector.component.js";
|
|
2
|
+
import { EditorProviderComponent } from "./EditorProvider.component.js";
|
|
3
|
+
import { provideIntlayerEditor, useEditor } from "./useEditor.js";
|
|
4
|
+
export { ContentSelectorWrapperComponent, EditorProviderComponent, provideIntlayerEditor, useEditor };
|
|
@@ -1,5 +1,38 @@
|
|
|
1
|
+
import { IntlayerProvider } from "../client/intlayerToken.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
|
|
1
4
|
//#region src/editor/useEditor.d.ts
|
|
2
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Initialises the Intlayer editor client singleton when the editor is enabled.
|
|
7
|
+
* Syncs the current locale from the provided Intlayer client into the editor
|
|
8
|
+
* manager so the editor always knows which locale the app is displaying.
|
|
9
|
+
*
|
|
10
|
+
* Must be called inside an Angular injection context (e.g. a component
|
|
11
|
+
* constructor, `provideAppInitializer`, or `runInInjectionContext`).
|
|
12
|
+
*
|
|
13
|
+
* @param client - The IntlayerProvider instance to sync locale from.
|
|
14
|
+
* When omitted the function injects `INTLAYER_TOKEN` from the DI tree,
|
|
15
|
+
* so it still works when called directly from a component.
|
|
16
|
+
*/
|
|
17
|
+
declare const useEditor: (client?: IntlayerProvider | null) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Angular provider that wires `useEditor` into the application initialisation
|
|
20
|
+
* phase via `provideAppInitializer`.
|
|
21
|
+
*
|
|
22
|
+
* `provideIntlayer()` already calls this internally, so you only need this
|
|
23
|
+
* function when you want to manage providers individually.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* // app.config.ts
|
|
28
|
+
* import { provideIntlayer, provideIntlayerEditor } from 'angular-intlayer';
|
|
29
|
+
*
|
|
30
|
+
* export const appConfig: ApplicationConfig = {
|
|
31
|
+
* providers: [provideIntlayer(), provideIntlayerEditor()],
|
|
32
|
+
* };
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare const provideIntlayerEditor: (client?: IntlayerProvider | null) => _angular_core0.EnvironmentProviders;
|
|
3
36
|
//#endregion
|
|
4
|
-
export { useEditor };
|
|
37
|
+
export { provideIntlayerEditor, useEditor };
|
|
5
38
|
//# sourceMappingURL=useEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditor.d.ts","names":[],"sources":["../../../src/editor/useEditor.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useEditor.d.ts","names":[],"sources":["../../../src/editor/useEditor.ts"],"mappings":";;;;;;;AA4BA;;;;;AA6DA;;;;cA7Da,SAAA,GAAa,MAAA,GAAS,gBAAA;;;;;;;;;;;;;;;;;;cA6DtB,qBAAA,GAAyB,MAAA,GAAS,gBAAA,YAAgB,cAAA,CAAO,oBAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useCompact } from "./useCompact.js";
|
|
2
|
+
import { useCurrency } from "./useCurrency.js";
|
|
3
|
+
import { useDate } from "./useDate.js";
|
|
4
|
+
import { useIntl } from "./useIntl.js";
|
|
5
|
+
import { useList } from "./useList.js";
|
|
6
|
+
import { useNumber } from "./useNumber.js";
|
|
7
|
+
import { usePercentage } from "./usePercentage.js";
|
|
8
|
+
import { useRelativeTime } from "./useRelativeTime.js";
|
|
9
|
+
import { useUnit } from "./useUnit.js";
|
|
10
|
+
export { useCompact, useCurrency, useDate, useIntl, useList, useNumber, usePercentage, useRelativeTime, useUnit };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
|
|
4
|
+
//#region src/format/useCompact.d.ts
|
|
5
|
+
declare const useCompact: () => _angular_core0.Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
6
|
+
locale?: LocalesValues;
|
|
7
|
+
}) => string>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { useCompact };
|
|
10
|
+
//# sourceMappingURL=useCompact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../src/format/useCompact.ts"],"mappings":";;;;cAIa,UAAA,uBAAU,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
|
|
4
|
+
//#region src/format/useCurrency.d.ts
|
|
5
|
+
declare const useCurrency: () => _angular_core0.Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
6
|
+
locale?: LocalesValues;
|
|
7
|
+
}) => string>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { useCurrency };
|
|
10
|
+
//# sourceMappingURL=useCurrency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../src/format/useCurrency.ts"],"mappings":";;;;cAIa,WAAA,uBAAW,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
import * as _intlayer_core_formatters0 from "@intlayer/core/formatters";
|
|
4
|
+
|
|
5
|
+
//#region src/format/useDate.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Angular client hook that provides a localized date/time formatter.
|
|
8
|
+
*/
|
|
9
|
+
declare const useDate: () => _angular_core0.Signal<(date: string | number | Date, options?: (Intl.DateTimeFormatOptions & {
|
|
10
|
+
locale?: LocalesValues;
|
|
11
|
+
}) | _intlayer_core_formatters0.DateTimePreset) => string>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { useDate };
|
|
14
|
+
//# sourceMappingURL=useDate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDate.d.ts","names":[],"sources":["../../../src/format/useDate.ts"],"mappings":";;;;;;;;cAOa,OAAA,uBAAO,MAAA,EAAA,IAAA,oBAAA,IAAA,EAAA,OAAA,IAAA,IAAA,CAAA,qBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _angular_core0 from "@angular/core";
|
|
2
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
|
+
import { WrappedIntl } from "@intlayer/core/formatters";
|
|
4
|
+
|
|
5
|
+
//#region src/format/useIntl.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Angular composable that provides a locale-bound `Intl` object as a Signal.
|
|
8
|
+
*/
|
|
9
|
+
declare const useIntl: (locale?: LocalesValues) => _angular_core0.Signal<WrappedIntl>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { useIntl };
|
|
12
|
+
//# sourceMappingURL=useIntl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../src/format/useIntl.ts"],"mappings":";;;;;;;;cAQa,OAAA,GAAW,MAAA,GAAS,aAAA,KAAa,cAAA,CAAA,MAAA,CAAA,WAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
|
|
4
|
+
//#region src/format/useList.d.ts
|
|
5
|
+
declare const useList: () => _angular_core0.Signal<(values: (string | number)[], options?: {
|
|
6
|
+
localeMatcher?: "lookup" | "best fit";
|
|
7
|
+
type?: "conjunction" | "disjunction" | "unit";
|
|
8
|
+
style?: "long" | "short" | "narrow";
|
|
9
|
+
} & {
|
|
10
|
+
locale?: LocalesValues;
|
|
11
|
+
}) => string>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { useList };
|
|
14
|
+
//# sourceMappingURL=useList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../src/format/useList.ts"],"mappings":";;;;cAIa,OAAA,QAWZ,cAAA,CAXmB,MAAA,EAAA,MAAA,uBAAA,OAAA;;;;;WAWnB,aAAA;AAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
|
|
4
|
+
//#region src/format/useNumber.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Angular client hook that provides a localized number formatter.
|
|
7
|
+
*/
|
|
8
|
+
declare const useNumber: () => _angular_core0.Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
9
|
+
locale?: LocalesValues;
|
|
10
|
+
}) => string>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { useNumber };
|
|
13
|
+
//# sourceMappingURL=useNumber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../src/format/useNumber.ts"],"mappings":";;;;;;;cAOa,SAAA,uBAAS,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
|
|
4
|
+
//#region src/format/usePercentage.d.ts
|
|
5
|
+
declare const usePercentage: () => _angular_core0.Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
6
|
+
locale?: LocalesValues;
|
|
7
|
+
}) => string>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { usePercentage };
|
|
10
|
+
//# sourceMappingURL=usePercentage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../src/format/usePercentage.ts"],"mappings":";;;;cAIa,aAAA,uBAAa,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
|
|
4
|
+
//#region src/format/useRelativeTime.d.ts
|
|
5
|
+
declare const useRelativeTime: () => _angular_core0.Signal<(from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
6
|
+
locale?: LocalesValues;
|
|
7
|
+
unit?: Intl.RelativeTimeFormatUnit;
|
|
8
|
+
}) => string>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useRelativeTime };
|
|
11
|
+
//# sourceMappingURL=useRelativeTime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRelativeTime.d.ts","names":[],"sources":["../../../src/format/useRelativeTime.ts"],"mappings":";;;;cAIa,eAAA,uBAAe,MAAA,EAAA,IAAA,oBAAA,IAAA,EAAA,EAAA,qBAAA,IAAA,EAAA,OAAA,GAAA,IAAA,CAAA,yBAAA;WAAA,aAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LocalesValues } from "../intlayer/dist/types/index.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
|
|
4
|
+
//#region src/format/useUnit.d.ts
|
|
5
|
+
declare const useUnit: () => _angular_core0.Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
6
|
+
locale?: LocalesValues;
|
|
7
|
+
}) => string>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { useUnit };
|
|
10
|
+
//# sourceMappingURL=useUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../src/format/useUnit.ts"],"mappings":";;;;cAIa,OAAA,uBAAO,MAAA,EAAA,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,aAAA;AAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { INTLAYER_HTML_TOKEN, IntlayerHTMLProvider, IntlayerHTMLService, createIntlayerHTMLProvider, useHTML } from "./installIntlayerHTML.js";
|
|
2
|
+
export { INTLAYER_HTML_TOKEN, type IntlayerHTMLProvider as IntlayerHTMLProviderType, IntlayerHTMLService, createIntlayerHTMLProvider, useHTML };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InjectionToken, TemplateRef } from "@angular/core";
|
|
2
|
+
|
|
3
|
+
//#region src/html/installIntlayerHTML.d.ts
|
|
4
|
+
declare const INTLAYER_HTML_TOKEN: InjectionToken<IntlayerHTMLProvider>;
|
|
5
|
+
type RenderHTMLOptions = {
|
|
6
|
+
components?: any;
|
|
7
|
+
wrapper?: string;
|
|
8
|
+
options?: any;
|
|
9
|
+
};
|
|
10
|
+
type RenderHTMLFunction = (html: string, overrides?: any | RenderHTMLOptions) => string | TemplateRef<any> | Promise<string | TemplateRef<any>>;
|
|
11
|
+
type IntlayerHTMLProvider = {
|
|
12
|
+
renderHTML: RenderHTMLFunction;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Create IntlayerHTML provider configuration
|
|
16
|
+
*/
|
|
17
|
+
declare const createIntlayerHTMLProvider: (renderHTML?: RenderHTMLFunction) => {
|
|
18
|
+
provide: InjectionToken<IntlayerHTMLProvider>;
|
|
19
|
+
useValue: IntlayerHTMLProvider;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Injectable service for HTML rendering
|
|
23
|
+
*/
|
|
24
|
+
declare class IntlayerHTMLService {
|
|
25
|
+
private htmlProvider;
|
|
26
|
+
renderHTML(html: string, overrides?: any): string | TemplateRef<any> | Promise<string | TemplateRef<any>>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Function to inject HTML provider
|
|
30
|
+
*/
|
|
31
|
+
declare const useHTML: () => IntlayerHTMLProvider;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { INTLAYER_HTML_TOKEN, IntlayerHTMLProvider, IntlayerHTMLService, createIntlayerHTMLProvider, useHTML };
|
|
34
|
+
//# sourceMappingURL=installIntlayerHTML.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installIntlayerHTML.d.ts","names":[],"sources":["../../../src/html/installIntlayerHTML.ts"],"mappings":";;;cAOa,mBAAA,EAAmB,cAAA,CAAA,oBAAA;AAAA,KAI3B,iBAAA;EACH,UAAA;EACA,OAAA;EACA,OAAA;AAAA;AAAA,KAGG,kBAAA,IACH,IAAA,UACA,SAAA,SAAkB,iBAAA,cACN,WAAA,QAAmB,OAAA,UAAiB,WAAA;AAAA,KAEtC,oBAAA;EACV,UAAA,EAAY,kBAAA;AAAA;;;;cAYD,0BAAA,GACX,UAAA,GAAY,kBAAA;;YAKP,oBAAA;AAAA;;;;cASM,mBAAA;EAAA,QACH,YAAA;EAIR,UAAA,CACE,IAAA,UACA,SAAA,kBACU,WAAA,QAAmB,OAAA,UAAiB,WAAA;AAAA;;;;cAWrC,OAAA,QAAc,oBAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IntlayerNodeComponent } from "./UI/IntlayerNode.component.js";
|
|
2
|
+
import { INTLAYER_TOKEN, IntlayerProvider, createIntlayerClient } from "./client/intlayerToken.js";
|
|
3
|
+
import { installIntlayer, provideIntlayer } from "./client/installIntlayer.js";
|
|
2
4
|
import { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, InsertionPluginCond, IntlayerNode, IntlayerNodeCond, MarkdownCond, MarkdownStringCond, getPlugins, htmlPlugin, insertionPlugin, intlayerNodePlugins, markdownPlugin, markdownStringPlugin } from "./plugins.js";
|
|
3
5
|
import { useDictionary } from "./client/useDictionary.js";
|
|
4
6
|
import { useDictionaryAsync } from "./client/useDictionaryAsync.js";
|
|
5
7
|
import { getDictionary } from "./getDictionary.js";
|
|
6
8
|
import { getIntlayer } from "./getIntlayer.js";
|
|
7
|
-
import { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, htmlRuntime, useMarkdown } from "./markdown/installIntlayerMarkdown.js";
|
|
8
9
|
import { useDictionaryDynamic } from "./client/useDictionaryDynamic.js";
|
|
9
|
-
import { useIntl } from "./client/useIntl.js";
|
|
10
10
|
import { isUpdatableNode, useIntlayer } from "./client/useIntlayer.js";
|
|
11
11
|
import { useLoadDynamic } from "./client/useLoadDynamic.js";
|
|
12
12
|
import { useLocale } from "./client/useLocale.js";
|
|
@@ -17,5 +17,5 @@ declare module '@intlayer/core/interpreter' {
|
|
|
17
17
|
interface IInterpreterPlugin<T, S, L extends LocalesValues> extends IInterpreterPluginAngular<T, S, L> {}
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
|
-
export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState,
|
|
20
|
+
export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, INTLAYER_TOKEN, InsertionPluginCond, IntlayerNode, IntlayerNodeComponent, IntlayerNodeCond, IntlayerProvider, MarkdownCond, MarkdownStringCond, createIntlayerClient, getDictionary, getIntlayer, getPlugins, htmlPlugin, insertionPlugin, installIntlayer, intlayerNodePlugins, isUpdatableNode, markdownPlugin, markdownStringPlugin, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale };
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider,
|
|
2
|
-
export { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider,
|
|
1
|
+
import { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, useMarkdown } from "./installIntlayerMarkdown.js";
|
|
2
|
+
export { INTLAYER_MARKDOWN_TOKEN, type IntlayerMarkdownProvider as IntlayerMarkdownProviderType, IntlayerMarkdownService, createIntlayerMarkdownProvider, useMarkdown };
|
|
@@ -5,10 +5,10 @@ import { MarkdownRuntime } from "@intlayer/core/markdown";
|
|
|
5
5
|
declare const INTLAYER_MARKDOWN_TOKEN: InjectionToken<IntlayerMarkdownProvider>;
|
|
6
6
|
type RenderMarkdownOptions = {
|
|
7
7
|
components?: any;
|
|
8
|
-
wrapper?:
|
|
8
|
+
wrapper?: string;
|
|
9
9
|
options?: any;
|
|
10
10
|
};
|
|
11
|
-
type RenderMarkdownFunction = (markdown: string, overrides?: any | RenderMarkdownOptions) => string | TemplateRef<any
|
|
11
|
+
type RenderMarkdownFunction = (markdown: string, overrides?: any | RenderMarkdownOptions) => string | TemplateRef<any> | Promise<string | TemplateRef<any>>;
|
|
12
12
|
type IntlayerMarkdownProvider = {
|
|
13
13
|
renderMarkdown: RenderMarkdownFunction;
|
|
14
14
|
};
|
|
@@ -25,7 +25,7 @@ declare const createIntlayerMarkdownProvider: (renderMarkdown?: RenderMarkdownFu
|
|
|
25
25
|
*/
|
|
26
26
|
declare class IntlayerMarkdownService {
|
|
27
27
|
private markdownProvider;
|
|
28
|
-
renderMarkdown(markdown: string, overrides?: any): string | TemplateRef<any
|
|
28
|
+
renderMarkdown(markdown: string, overrides?: any): string | TemplateRef<any> | Promise<string | TemplateRef<any>>;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Function to inject markdown provider
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installIntlayerMarkdown.d.ts","names":[],"sources":["../../../src/markdown/installIntlayerMarkdown.ts"],"mappings":";;;;cASa,uBAAA,EAAuB,cAAA,CAAA,wBAAA;AAAA,KAG/B,qBAAA;EACH,UAAA;EACA,OAAA;EACA,OAAA;AAAA;AAAA,KAGG,sBAAA,IACH,QAAA,UACA,SAAA,SAAkB,qBAAA,cACN,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"installIntlayerMarkdown.d.ts","names":[],"sources":["../../../src/markdown/installIntlayerMarkdown.ts"],"mappings":";;;;cASa,uBAAA,EAAuB,cAAA,CAAA,wBAAA;AAAA,KAG/B,qBAAA;EACH,UAAA;EACA,OAAA;EACA,OAAA;AAAA;AAAA,KAGG,sBAAA,IACH,QAAA,UACA,SAAA,SAAkB,qBAAA,cACN,WAAA,QAAmB,OAAA,UAAiB,WAAA;AAAA,KAEtC,wBAAA;EACV,cAAA,EAAgB,sBAAA;AAAA;AAAA,cAIL,WAAA,EAAa,eAAA;;;;cA0Db,8BAAA,GACX,cAAA,GAAgB,sBAAA;;YAKX,wBAAA;AAAA;;;;cASM,uBAAA;EAAA,QACH,gBAAA;EAIR,cAAA,CACE,QAAA,UACA,SAAA,kBACU,WAAA,QAAmB,OAAA,UAAiB,WAAA;AAAA;;;;cAWrC,WAAA,QAAkB,wBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.ts"],"mappings":";;;;;;;;AAkEA;KAAY,gBAAA,MAAsB,CAAA,2BAC9B,YAAA,CAAa,CAAA;AAAA,UAGA,YAAA;EACf,KAAA,EAAO,CAAA;EACP,QAAA;EACA,eAAA,GAAkB,CAAA;AAAA;;cAIP,mBAAA,EAAqB,OAAA;;;;KAyBtB,kBAAA,MAAwB,CAAA,kBAChC,YAAA;EAAuB,QAAA,EAAU,oBAAA;AAAA;;cAIxB,oBAAA,EAAsB,OAAA;AAAA,KA8GvB,YAAA,mBAA+B,aAAA,IAAiB,CAAA;EAC1D,QAAA,EAAU,QAAA;EAAA,CACT,SAAA,CAAU,QAAA;EACX,IAAA;EACA,QAAA;AAAA,IAEE,YAAA,CACE,CAAA;EAEE,GAAA,GAAM,UAAA,GAAa,MAAA,OAAa,CAAA;EAChC,QAAA,EAAU,oBAAA,CAAqB,CAAA;AAAA;AAAA,cAK1B,cAAA,EAAgB,OAAA;AA3J7B;;;;;AAyBA;;;;KAmKY,cAAA,cAA4B,CAAA;EACtC,QAAA,EAAU,QAAA;EAAA,CACT,SAAA,CAAU,IAAA;EACX,IAAA;AAAA,IAEE,YAAA,CACE,CAAA;EAEE,GAAA,GAAM,UAAA,GAAa,MAAA,OAAa,CAAA;AAAA;;cAM3B,UAAA,EAAY,OAAA;;;AA5KzB;;;;KA2QY,mBAAA,MAAyB,CAAA;EACnC,QAAA,EAAU,QAAA;EAAA,CACT,SAAA,CAAU,SAAA;AAAA,KAER,IAAA,EAAM,MAAA;AAAA,cAGE,eAAA,EAAiB,OAAA;AAAA,UA6Bb,yBAAA,iBAA0C,aAAA;EACzD,mBAAA,EAAqB,gBAAA,CAAiB,CAAA;EACtC,eAAA,EAAiB,YAAA,CAAa,CAAA,EAAG,CAAA,EAAG,CAAA;EACpC,WAAA,EAAa,cAAA,CAAe,CAAA,EAAG,CAAA,EAAG,CAAA;EAClC,gBAAA,EAAkB,mBAAA,CAAoB,CAAA;AAAA;;;;;;KAQ5B,uBAAA,GAA0B,IAAA,CACpC,yBAAA;EAGA,mBAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;AAAA;AAAA,KAGU,oBAAA,cAEA,aAAA,GAAgB,eAAA,IACxB,sBAAA,CAAyB,CAAA,EAAG,uBAAA,EAAyB,CAAA;;;;;cAM5C,UAAA,GACX,MAAA,GAAS,aAAA,EACT,QAAA,eACC,OAAA"}
|