angular-intlayer 8.4.0 → 8.4.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/ContentSelector.component-Dfy-4WRH.cjs +9 -0
- package/dist/cjs/ContentSelector.component-Dfy-4WRH.cjs.map +1 -0
- package/dist/cjs/{_virtual/_rolldown/runtime.cjs → chunk-Bmb41Sf3.cjs} +1 -1
- package/dist/cjs/client/installIntlayer.cjs +1 -1
- package/dist/cjs/client/installIntlayer.cjs.map +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionary.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs.map +1 -1
- package/dist/cjs/client/useIntl.cjs +1 -1
- package/dist/cjs/client/useIntl.cjs.map +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/client/useIntlayer.cjs.map +1 -1
- package/dist/cjs/client/useLoadDynamic.cjs +1 -1
- package/dist/cjs/client/useLoadDynamic.cjs.map +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs.map +1 -1
- package/dist/cjs/client/useLocaleStorage.cjs +1 -1
- package/dist/cjs/client/useLocaleStorage.cjs.map +1 -1
- package/dist/{esm/_virtual/_@oxc-project_runtime@0.115.0/helpers/decorate.mjs → cjs/decorate-B_4qGGx3.cjs} +1 -1
- package/dist/cjs/editor/ContentSelector.component.cjs +1 -9
- package/dist/cjs/editor/useEditor.cjs +1 -1
- package/dist/cjs/editor/useEditor.cjs.map +1 -1
- package/dist/cjs/getDictionary.cjs +1 -1
- package/dist/cjs/getDictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayer.cjs +1 -1
- package/dist/cjs/getIntlayer.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs +1 -1
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs.map +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/cjs/webpack/mergeConfig.cjs +1 -1
- package/dist/cjs/webpack/mergeConfig.cjs.map +1 -1
- package/dist/esm/ContentSelector.component-B9Uvy9gY.mjs +9 -0
- package/dist/esm/ContentSelector.component-B9Uvy9gY.mjs.map +1 -0
- package/dist/esm/client/installIntlayer.mjs +1 -1
- package/dist/esm/client/installIntlayer.mjs.map +1 -1
- package/dist/esm/client/useIntl.mjs.map +1 -1
- package/dist/{cjs/_virtual/_@oxc-project_runtime@0.115.0/helpers/decorate.cjs → esm/decorate-EVKP5RjP.mjs} +1 -1
- package/dist/esm/editor/ContentSelector.component.mjs +1 -9
- package/dist/esm/editor/useEditor.mjs +1 -1
- package/dist/esm/editor/useEditor.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/markdown/installIntlayerMarkdown.mjs +1 -1
- package/dist/esm/markdown/installIntlayerMarkdown.mjs.map +1 -1
- package/dist/esm/plugins.mjs +1 -1
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/types/client/index.d.ts +8 -8
- package/dist/types/client/installIntlayer.d.ts +2 -50
- package/dist/types/client/useDictionary.d.ts +2 -10
- package/dist/types/client/useDictionaryAsync.d.ts +2 -14
- package/dist/types/client/useDictionaryDynamic.d.ts +2 -17
- package/dist/types/client/useIntl.d.ts +2 -89
- package/dist/types/client/useIntlayer.d.ts +2 -38
- package/dist/types/client/useLoadDynamic.d.ts +2 -11
- package/dist/types/client/useLocale.d.ts +2 -48
- package/dist/types/getDictionary-DDjZzxAC.d.ts +9 -0
- package/dist/types/getDictionary-DDjZzxAC.d.ts.map +1 -0
- package/dist/types/getDictionary.d.ts +2 -9
- package/dist/types/getIntlayer-CWM6qsJJ.d.ts +8 -0
- package/dist/types/getIntlayer-CWM6qsJJ.d.ts.map +1 -0
- package/dist/types/getIntlayer.d.ts +2 -8
- package/dist/types/index-Cf8zm5QQ.d.ts +1 -0
- package/dist/types/index-D5QAgZ5v.d.ts +22 -0
- package/dist/types/index-D5QAgZ5v.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -21
- package/dist/types/installIntlayer-Ce7kST5N.d.ts +50 -0
- package/dist/types/installIntlayer-Ce7kST5N.d.ts.map +1 -0
- package/dist/types/installIntlayerMarkdown-BIU3FTDH.d.ts +36 -0
- package/dist/types/installIntlayerMarkdown-BIU3FTDH.d.ts.map +1 -0
- package/dist/types/markdown/index.d.ts +1 -1
- package/dist/types/markdown/installIntlayerMarkdown.d.ts +2 -36
- package/dist/types/plugins-C_v3w-vC.d.ts +89 -0
- package/dist/types/plugins-C_v3w-vC.d.ts.map +1 -0
- package/dist/types/plugins.d.ts +2 -89
- package/dist/types/useDictionary-Dq9yu0X_.d.ts +10 -0
- package/dist/types/useDictionary-Dq9yu0X_.d.ts.map +1 -0
- package/dist/types/useDictionaryAsync-BYUsr8w4.d.ts +14 -0
- package/dist/types/useDictionaryAsync-BYUsr8w4.d.ts.map +1 -0
- package/dist/types/useIntl-CHizZCR2.d.ts +33 -0
- package/dist/types/useIntl-CHizZCR2.d.ts.map +1 -0
- package/dist/types/useIntlayer-m3n_upwm.d.ts +38 -0
- package/dist/types/useIntlayer-m3n_upwm.d.ts.map +1 -0
- package/dist/types/useLoadDynamic-C4pltPcC.d.ts +11 -0
- package/dist/types/useLoadDynamic-C4pltPcC.d.ts.map +1 -0
- package/dist/types/useLocale-BzfAmXlx.d.ts +48 -0
- package/dist/types/useLocale-BzfAmXlx.d.ts.map +1 -0
- package/dist/types/webpack/index.d.ts +5 -2
- package/dist/types/webpack/index.d.ts.map +1 -0
- package/dist/types/webpack/mergeConfig.d.ts +2 -5
- package/package.json +8 -8
- package/dist/cjs/_virtual/_@oxc-project_runtime@0.115.0/helpers/decorateMetadata.cjs +0 -1
- package/dist/cjs/editor/ContentSelector.component.cjs.map +0 -1
- package/dist/esm/_virtual/_@oxc-project_runtime@0.115.0/helpers/decorateMetadata.mjs +0 -1
- package/dist/esm/editor/ContentSelector.component.mjs.map +0 -1
- package/dist/types/client/installIntlayer.d.ts.map +0 -1
- package/dist/types/client/useDictionary.d.ts.map +0 -1
- package/dist/types/client/useDictionaryAsync.d.ts.map +0 -1
- package/dist/types/client/useDictionaryDynamic.d.ts.map +0 -1
- package/dist/types/client/useIntl.d.ts.map +0 -1
- package/dist/types/client/useIntlayer.d.ts.map +0 -1
- package/dist/types/client/useLoadDynamic.d.ts.map +0 -1
- package/dist/types/client/useLocale.d.ts.map +0 -1
- package/dist/types/getDictionary.d.ts.map +0 -1
- package/dist/types/getIntlayer.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/markdown/installIntlayerMarkdown.d.ts.map +0 -1
- package/dist/types/plugins.d.ts.map +0 -1
- package/dist/types/webpack/mergeConfig.d.ts.map +0 -1
|
@@ -0,0 +1,50 @@
|
|
|
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/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
|
+
/**
|
|
18
|
+
* Provides Intlayer to your Angular application.
|
|
19
|
+
*
|
|
20
|
+
* This function should be used in your application's provider list (e.g., in `app.config.ts`)
|
|
21
|
+
* to initialize the Intlayer service.
|
|
22
|
+
*
|
|
23
|
+
* @param locale - Initial locale to use.
|
|
24
|
+
* @param isCookieEnabled - Whether to store the locale in cookies.
|
|
25
|
+
* @returns A provider configuration for Intlayer.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // app.config.ts
|
|
30
|
+
* import { ApplicationConfig } from '@angular/core';
|
|
31
|
+
* import { provideIntlayer } from 'angular-intlayer';
|
|
32
|
+
*
|
|
33
|
+
* export const appConfig: ApplicationConfig = {
|
|
34
|
+
* providers: [
|
|
35
|
+
* provideIntlayer({ locale: 'en' }),
|
|
36
|
+
* ],
|
|
37
|
+
* };
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare const provideIntlayer: (locale?: LocalesValues, isCookieEnabled?: boolean) => {
|
|
41
|
+
provide: InjectionToken<IntlayerProvider>;
|
|
42
|
+
useValue: IntlayerProvider;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Helper to install the Intlayer provider.
|
|
46
|
+
*/
|
|
47
|
+
declare const installIntlayer: (locale?: LocalesValues, isCookieEnabled?: boolean) => IntlayerProvider;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { provideIntlayer as a, installIntlayer as i, IntlayerProvider as n, createIntlayerClient as r, INTLAYER_TOKEN as t };
|
|
50
|
+
//# sourceMappingURL=installIntlayer-Ce7kST5N.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installIntlayer-Ce7kST5N.d.ts","names":[],"sources":["../../src/client/installIntlayer.ts"],"mappings":";;;;;cAIa,cAAA,EAAc,cAAA,CAAA,gBAAA;AAAA,cAUd,gBAAA;EACX,eAAA,EAD2B,cAAA,CACZ,cAAA;EAAA,QACP,OAAA;EAAA,SAIC,MAAA,EAAQ,MAAA,CAAO,aAAA;EAExB,SAAA,GAAa,MAAA,EAAQ,aAAA;AAAA;;AAXvB;;cAmBa,oBAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA,eACC,gBAAA;;;;;;;;;;;;;;;;;;AAHH;;;;;;cAuCa,eAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA;;;;AAFF;;;AAAA,cAWa,eAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA,eAAsB,gBAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { InjectionToken, TemplateRef } from "@angular/core";
|
|
2
|
+
import { MarkdownRuntime } from "@intlayer/core/markdown";
|
|
3
|
+
|
|
4
|
+
//#region src/markdown/installIntlayerMarkdown.d.ts
|
|
5
|
+
declare const INTLAYER_MARKDOWN_TOKEN: InjectionToken<IntlayerMarkdownProvider>;
|
|
6
|
+
type RenderMarkdownOptions = {
|
|
7
|
+
components?: any;
|
|
8
|
+
wrapper?: any;
|
|
9
|
+
options?: any;
|
|
10
|
+
};
|
|
11
|
+
type RenderMarkdownFunction = (markdown: string, overrides?: any | RenderMarkdownOptions) => string | TemplateRef<any>;
|
|
12
|
+
type IntlayerMarkdownProvider = {
|
|
13
|
+
renderMarkdown: RenderMarkdownFunction;
|
|
14
|
+
};
|
|
15
|
+
declare const htmlRuntime: MarkdownRuntime;
|
|
16
|
+
/**
|
|
17
|
+
* Create IntlayerMarkdown provider configuration
|
|
18
|
+
*/
|
|
19
|
+
declare const createIntlayerMarkdownProvider: (renderMarkdown?: RenderMarkdownFunction) => {
|
|
20
|
+
provide: InjectionToken<IntlayerMarkdownProvider>;
|
|
21
|
+
useValue: IntlayerMarkdownProvider;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Injectable service for markdown rendering
|
|
25
|
+
*/
|
|
26
|
+
declare class IntlayerMarkdownService {
|
|
27
|
+
private markdownProvider;
|
|
28
|
+
renderMarkdown(markdown: string, overrides?: any): string | TemplateRef<any>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Function to inject markdown provider
|
|
32
|
+
*/
|
|
33
|
+
declare const useMarkdown: () => IntlayerMarkdownProvider;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { htmlRuntime as a, createIntlayerMarkdownProvider as i, IntlayerMarkdownProvider as n, useMarkdown as o, IntlayerMarkdownService as r, INTLAYER_MARKDOWN_TOKEN as t };
|
|
36
|
+
//# sourceMappingURL=installIntlayerMarkdown-BIU3FTDH.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installIntlayerMarkdown-BIU3FTDH.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,KAEF,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,CAAe,QAAA,UAAkB,SAAA,kBAA2B,WAAA;AAAA;;AAnF9D;;cA8Fa,WAAA,QAAkB,wBAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as htmlRuntime, i as createIntlayerMarkdownProvider, n as IntlayerMarkdownProvider, o as useMarkdown, r as IntlayerMarkdownService, t as INTLAYER_MARKDOWN_TOKEN } from "../installIntlayerMarkdown-BIU3FTDH.js";
|
|
2
2
|
export { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, htmlRuntime, useMarkdown };
|
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
//#region src/markdown/installIntlayerMarkdown.d.ts
|
|
5
|
-
declare const INTLAYER_MARKDOWN_TOKEN: InjectionToken<IntlayerMarkdownProvider>;
|
|
6
|
-
type RenderMarkdownOptions = {
|
|
7
|
-
components?: any;
|
|
8
|
-
wrapper?: any;
|
|
9
|
-
options?: any;
|
|
10
|
-
};
|
|
11
|
-
type RenderMarkdownFunction = (markdown: string, overrides?: any | RenderMarkdownOptions) => string | TemplateRef<any>;
|
|
12
|
-
type IntlayerMarkdownProvider = {
|
|
13
|
-
renderMarkdown: RenderMarkdownFunction;
|
|
14
|
-
};
|
|
15
|
-
declare const htmlRuntime: MarkdownRuntime;
|
|
16
|
-
/**
|
|
17
|
-
* Create IntlayerMarkdown provider configuration
|
|
18
|
-
*/
|
|
19
|
-
declare const createIntlayerMarkdownProvider: (renderMarkdown?: RenderMarkdownFunction) => {
|
|
20
|
-
provide: InjectionToken<IntlayerMarkdownProvider>;
|
|
21
|
-
useValue: IntlayerMarkdownProvider;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Injectable service for markdown rendering
|
|
25
|
-
*/
|
|
26
|
-
declare class IntlayerMarkdownService {
|
|
27
|
-
private markdownProvider;
|
|
28
|
-
renderMarkdown(markdown: string, overrides?: any): string | TemplateRef<any>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Function to inject markdown provider
|
|
32
|
-
*/
|
|
33
|
-
declare const useMarkdown: () => IntlayerMarkdownProvider;
|
|
34
|
-
//#endregion
|
|
35
|
-
export { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, htmlRuntime, useMarkdown };
|
|
36
|
-
//# sourceMappingURL=installIntlayerMarkdown.d.ts.map
|
|
1
|
+
import { a as htmlRuntime, i as createIntlayerMarkdownProvider, n as IntlayerMarkdownProvider, o as useMarkdown, r as IntlayerMarkdownService, t as INTLAYER_MARKDOWN_TOKEN } from "../installIntlayerMarkdown-BIU3FTDH.js";
|
|
2
|
+
export { INTLAYER_MARKDOWN_TOKEN, IntlayerMarkdownProvider, IntlayerMarkdownService, createIntlayerMarkdownProvider, htmlRuntime, useMarkdown };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
+
import { DeepTransformContent, IInterpreterPluginState, Plugins } from "@intlayer/core/interpreter";
|
|
3
|
+
import { NodeType } from "@intlayer/types/nodeType";
|
|
4
|
+
|
|
5
|
+
//#region src/plugins.d.ts
|
|
6
|
+
/** ---------------------------------------------
|
|
7
|
+
* INTLAYER NODE PLUGIN
|
|
8
|
+
* --------------------------------------------- */
|
|
9
|
+
type IntlayerNodeCond<T> = T extends number | string ? IntlayerNode<T> : never;
|
|
10
|
+
interface IntlayerNode<T, P = {}> {
|
|
11
|
+
value: T;
|
|
12
|
+
children?: any;
|
|
13
|
+
additionalProps?: P;
|
|
14
|
+
}
|
|
15
|
+
/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */
|
|
16
|
+
declare const intlayerNodePlugins: Plugins;
|
|
17
|
+
/**
|
|
18
|
+
* MARKDOWN PLUGIN
|
|
19
|
+
*/
|
|
20
|
+
type MarkdownStringCond<T> = T extends string ? IntlayerNode<string, {
|
|
21
|
+
metadata: DeepTransformContent$1<string>;
|
|
22
|
+
}> : never;
|
|
23
|
+
/** Markdown string plugin. Replaces string node with a component that render the markdown. */
|
|
24
|
+
declare const markdownStringPlugin: Plugins;
|
|
25
|
+
type MarkdownCond<T, _S, _L extends LocalesValues> = T extends {
|
|
26
|
+
nodeType: NodeType | string;
|
|
27
|
+
[NodeType.Markdown]: infer M;
|
|
28
|
+
tags?: infer U;
|
|
29
|
+
metadata?: infer V;
|
|
30
|
+
} ? IntlayerNode<M, {
|
|
31
|
+
use: (components?: Record<keyof U, any>) => any;
|
|
32
|
+
metadata: DeepTransformContent$1<V>;
|
|
33
|
+
}> : never;
|
|
34
|
+
declare const markdownPlugin: Plugins;
|
|
35
|
+
/** ---------------------------------------------
|
|
36
|
+
* HTML PLUGIN
|
|
37
|
+
* --------------------------------------------- */
|
|
38
|
+
/**
|
|
39
|
+
* HTML conditional type.
|
|
40
|
+
*
|
|
41
|
+
* This ensures type safety:
|
|
42
|
+
* - `html('<div>Hello <CustomComponent /></div>').use({ CustomComponent: ... })` - optional but typed
|
|
43
|
+
*/
|
|
44
|
+
type HTMLPluginCond<T, _S, _L> = T extends {
|
|
45
|
+
nodeType: NodeType | string;
|
|
46
|
+
[NodeType.HTML]: infer I;
|
|
47
|
+
tags?: infer U;
|
|
48
|
+
} ? IntlayerNode<I, {
|
|
49
|
+
use: (components?: Record<keyof U, any>) => any;
|
|
50
|
+
}> : never;
|
|
51
|
+
/** HTML plugin. Replaces node with a function that takes components => IntlayerNode. */
|
|
52
|
+
declare const htmlPlugin: Plugins;
|
|
53
|
+
/** ---------------------------------------------
|
|
54
|
+
* INSERTION PLUGIN
|
|
55
|
+
* --------------------------------------------- */
|
|
56
|
+
/**
|
|
57
|
+
* Insertion conditional type.
|
|
58
|
+
*/
|
|
59
|
+
type InsertionPluginCond<T> = T extends {
|
|
60
|
+
nodeType: NodeType | string;
|
|
61
|
+
[NodeType.Insertion]: infer _I;
|
|
62
|
+
} ? (args: Record<string, string | number>) => string : never;
|
|
63
|
+
declare const insertionPlugin: Plugins;
|
|
64
|
+
interface IInterpreterPluginAngular<T, S, L extends LocalesValues> {
|
|
65
|
+
angularIntlayerNode: IntlayerNodeCond<T>;
|
|
66
|
+
angularMarkdown: MarkdownCond<T, S, L>;
|
|
67
|
+
angularHtml: HTMLPluginCond<T, S, L>;
|
|
68
|
+
angularInsertion: InsertionPluginCond<T>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.
|
|
72
|
+
*
|
|
73
|
+
* Otherwise the the `angular-intlayer` plugins will override the types of `intlayer` functions.
|
|
74
|
+
*/
|
|
75
|
+
type IInterpreterPluginState$1 = Omit<IInterpreterPluginState, 'insertion'> & {
|
|
76
|
+
angularIntlayerNode: true;
|
|
77
|
+
angularMarkdown: true;
|
|
78
|
+
angularHtml: true;
|
|
79
|
+
angularInsertion: true;
|
|
80
|
+
};
|
|
81
|
+
type DeepTransformContent$1<T, L extends LocalesValues = DeclaredLocales> = DeepTransformContent<T, IInterpreterPluginState$1, L>;
|
|
82
|
+
/**
|
|
83
|
+
* Get the plugins array for Angular content transformation.
|
|
84
|
+
* This function is used by both getIntlayer and getDictionary to ensure consistent plugin configuration.
|
|
85
|
+
*/
|
|
86
|
+
declare const getPlugins: (locale?: LocalesValues, fallback?: boolean) => Plugins[];
|
|
87
|
+
//#endregion
|
|
88
|
+
export { InsertionPluginCond as a, MarkdownCond as c, htmlPlugin as d, insertionPlugin as f, markdownStringPlugin as h, IInterpreterPluginState$1 as i, MarkdownStringCond as l, markdownPlugin as m, HTMLPluginCond as n, IntlayerNode as o, intlayerNodePlugins as p, IInterpreterPluginAngular as r, IntlayerNodeCond as s, DeepTransformContent$1 as t, getPlugins as u };
|
|
89
|
+
//# sourceMappingURL=plugins-C_v3w-vC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins-C_v3w-vC.d.ts","names":[],"sources":["../../src/plugins.ts"],"mappings":";;;;;;;AA4DA;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;;;;KA2BtB,kBAAA,MAAwB,CAAA,kBAChC,YAAA;EAAuB,QAAA,EAAU,sBAAA;AAAA;;cAIxB,oBAAA,EAAsB,OAAA;AAAA,KA0GvB,YAAA,mBAA+B,aAAA,IAAiB,CAAA;EAC1D,QAAA,EAAU,QAAA;EAAA,CACT,QAAA,CAAS,QAAA;EACV,IAAA;EACA,QAAA;AAAA,IAEE,YAAA,CACE,CAAA;EAEE,GAAA,GAAM,UAAA,GAAa,MAAA,OAAa,CAAA;EAChC,QAAA,EAAU,sBAAA,CAAqB,CAAA;AAAA;AAAA,cAK1B,cAAA,EAAgB,OAAA;AAzJ7B;;;;;AA2BA;;;;KA+JY,cAAA,cAA4B,CAAA;EACtC,QAAA,EAAU,QAAA;EAAA,CACT,QAAA,CAAS,IAAA;EACV,IAAA;AAAA,IAEE,YAAA,CACE,CAAA;EAEE,GAAA,GAAM,UAAA,GAAa,MAAA,OAAa,CAAA;AAAA;;cAM3B,UAAA,EAAY,OAAA;;;AAxKzB;;;;KAuQY,mBAAA,MAAyB,CAAA;EACnC,QAAA,EAAU,QAAA;EAAA,CACT,QAAA,CAAS,SAAA;AAAA,KAEP,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,yBAAA,GAA0B,IAAA,CACpC,uBAAA;EAGA,mBAAA;EACA,eAAA;EACA,WAAA;EACA,gBAAA;AAAA;AAAA,KAGU,sBAAA,cAEA,aAAA,GAAgB,eAAA,IACxB,oBAAA,CAAyB,CAAA,EAAG,yBAAA,EAAyB,CAAA;;;;;cAM5C,UAAA,GACX,MAAA,GAAS,aAAA,EACT,QAAA,eACC,OAAA"}
|
package/dist/types/plugins.d.ts
CHANGED
|
@@ -1,89 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { NodeType } from "@intlayer/types/nodeType";
|
|
4
|
-
|
|
5
|
-
//#region src/plugins.d.ts
|
|
6
|
-
/** ---------------------------------------------
|
|
7
|
-
* INTLAYER NODE PLUGIN
|
|
8
|
-
* --------------------------------------------- */
|
|
9
|
-
type IntlayerNodeCond<T> = T extends number | string ? IntlayerNode<T> : never;
|
|
10
|
-
interface IntlayerNode<T, P = {}> {
|
|
11
|
-
value: T;
|
|
12
|
-
children?: any;
|
|
13
|
-
additionalProps?: P;
|
|
14
|
-
}
|
|
15
|
-
/** Translation plugin. Replaces node with a locale string if nodeType = Translation. */
|
|
16
|
-
declare const intlayerNodePlugins: Plugins;
|
|
17
|
-
/**
|
|
18
|
-
* MARKDOWN PLUGIN
|
|
19
|
-
*/
|
|
20
|
-
type MarkdownStringCond<T> = T extends string ? IntlayerNode<string, {
|
|
21
|
-
metadata: DeepTransformContent<string>;
|
|
22
|
-
}> : never;
|
|
23
|
-
/** Markdown string plugin. Replaces string node with a component that render the markdown. */
|
|
24
|
-
declare const markdownStringPlugin: Plugins;
|
|
25
|
-
type MarkdownCond<T, _S, _L extends LocalesValues> = T extends {
|
|
26
|
-
nodeType: NodeType | string;
|
|
27
|
-
[NodeType.Markdown]: infer M;
|
|
28
|
-
tags?: infer U;
|
|
29
|
-
metadata?: infer V;
|
|
30
|
-
} ? IntlayerNode<M, {
|
|
31
|
-
use: (components?: Record<keyof U, any>) => any;
|
|
32
|
-
metadata: DeepTransformContent<V>;
|
|
33
|
-
}> : never;
|
|
34
|
-
declare const markdownPlugin: Plugins;
|
|
35
|
-
/** ---------------------------------------------
|
|
36
|
-
* HTML PLUGIN
|
|
37
|
-
* --------------------------------------------- */
|
|
38
|
-
/**
|
|
39
|
-
* HTML conditional type.
|
|
40
|
-
*
|
|
41
|
-
* This ensures type safety:
|
|
42
|
-
* - `html('<div>Hello <CustomComponent /></div>').use({ CustomComponent: ... })` - optional but typed
|
|
43
|
-
*/
|
|
44
|
-
type HTMLPluginCond<T, _S, _L> = T extends {
|
|
45
|
-
nodeType: NodeType | string;
|
|
46
|
-
[NodeType.HTML]: infer I;
|
|
47
|
-
tags?: infer U;
|
|
48
|
-
} ? IntlayerNode<I, {
|
|
49
|
-
use: (components?: Record<keyof U, any>) => any;
|
|
50
|
-
}> : never;
|
|
51
|
-
/** HTML plugin. Replaces node with a function that takes components => IntlayerNode. */
|
|
52
|
-
declare const htmlPlugin: Plugins;
|
|
53
|
-
/** ---------------------------------------------
|
|
54
|
-
* INSERTION PLUGIN
|
|
55
|
-
* --------------------------------------------- */
|
|
56
|
-
/**
|
|
57
|
-
* Insertion conditional type.
|
|
58
|
-
*/
|
|
59
|
-
type InsertionPluginCond<T> = T extends {
|
|
60
|
-
nodeType: NodeType | string;
|
|
61
|
-
[NodeType.Insertion]: infer _I;
|
|
62
|
-
} ? (args: Record<string, string | number>) => string : never;
|
|
63
|
-
declare const insertionPlugin: Plugins;
|
|
64
|
-
interface IInterpreterPluginAngular<T, S, L extends LocalesValues> {
|
|
65
|
-
angularIntlayerNode: IntlayerNodeCond<T>;
|
|
66
|
-
angularMarkdown: MarkdownCond<T, S, L>;
|
|
67
|
-
angularHtml: HTMLPluginCond<T, S, L>;
|
|
68
|
-
angularInsertion: InsertionPluginCond<T>;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Insert this type as param of `DeepTransformContent` to avoid `intlayer` package pollution.
|
|
72
|
-
*
|
|
73
|
-
* Otherwise the the `angular-intlayer` plugins will override the types of `intlayer` functions.
|
|
74
|
-
*/
|
|
75
|
-
type IInterpreterPluginState = Omit<IInterpreterPluginState$1, 'insertion'> & {
|
|
76
|
-
angularIntlayerNode: true;
|
|
77
|
-
angularMarkdown: true;
|
|
78
|
-
angularHtml: true;
|
|
79
|
-
angularInsertion: true;
|
|
80
|
-
};
|
|
81
|
-
type DeepTransformContent<T, L extends LocalesValues = DeclaredLocales> = DeepTransformContent$1<T, IInterpreterPluginState, L>;
|
|
82
|
-
/**
|
|
83
|
-
* Get the plugins array for Angular content transformation.
|
|
84
|
-
* This function is used by both getIntlayer and getDictionary to ensure consistent plugin configuration.
|
|
85
|
-
*/
|
|
86
|
-
declare const getPlugins: (locale?: LocalesValues, fallback?: boolean) => Plugins[];
|
|
87
|
-
//#endregion
|
|
88
|
-
export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, InsertionPluginCond, IntlayerNode, IntlayerNodeCond, MarkdownCond, MarkdownStringCond, getPlugins, htmlPlugin, insertionPlugin, intlayerNodePlugins, markdownPlugin, markdownStringPlugin };
|
|
89
|
-
//# sourceMappingURL=plugins.d.ts.map
|
|
1
|
+
import { a as InsertionPluginCond, c as MarkdownCond, d as htmlPlugin, f as insertionPlugin, h as markdownStringPlugin, i as IInterpreterPluginState, l as MarkdownStringCond, m as markdownPlugin, n as HTMLPluginCond, o as IntlayerNode, p as intlayerNodePlugins, r as IInterpreterPluginAngular, s as IntlayerNodeCond, t as DeepTransformContent, u as getPlugins } from "./plugins-C_v3w-vC.js";
|
|
2
|
+
export { DeepTransformContent, HTMLPluginCond, IInterpreterPluginAngular, IInterpreterPluginState, InsertionPluginCond, IntlayerNode, IntlayerNodeCond, MarkdownCond, MarkdownStringCond, getPlugins, htmlPlugin, insertionPlugin, intlayerNodePlugins, markdownPlugin, markdownStringPlugin };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { t as DeepTransformContent } from "./plugins-C_v3w-vC.js";
|
|
2
|
+
import { Signal } from "@angular/core";
|
|
3
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
5
|
+
|
|
6
|
+
//#region src/client/useDictionary.d.ts
|
|
7
|
+
declare const useDictionary: <T extends Dictionary>(dictionary: T, locale?: LocalesValues) => Signal<DeepTransformContent<T["content"]>>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { useDictionary as t };
|
|
10
|
+
//# sourceMappingURL=useDictionary-Dq9yu0X_.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDictionary-Dq9yu0X_.d.ts","names":[],"sources":["../../src/client/useDictionary.ts"],"mappings":";;;;;;cAOa,aAAA,aAA2B,UAAA,EACtC,UAAA,EAAY,CAAA,EACZ,MAAA,GAAS,aAAA,KACR,MAAA,CAAO,oBAAA,CAAqB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as _angular_core0 from "@angular/core";
|
|
2
|
+
import { LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
3
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
+
|
|
5
|
+
//#region src/client/useDictionaryAsync.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* On the server side, Hook that transform a dictionary and return the content
|
|
8
|
+
*
|
|
9
|
+
* If the locale is not provided, it will use the locale from the client context
|
|
10
|
+
*/
|
|
11
|
+
declare const useDictionaryAsync: <T extends Dictionary>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: LocalesValues) => Promise<_angular_core0.Signal<any>>;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { useDictionaryAsync as t };
|
|
14
|
+
//# sourceMappingURL=useDictionaryAsync-BYUsr8w4.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDictionaryAsync-BYUsr8w4.d.ts","names":[],"sources":["../../src/client/useDictionaryAsync.ts"],"mappings":";;;;;;;;AAcA;;cAAa,kBAAA,aAAsC,UAAA,EACjD,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,MAAA,GAAS,aAAA,KAAa,OAAA,CAAA,cAAA,CAAA,MAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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/client/useIntl.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Angular composable that provides a locale-bound `Intl` object.
|
|
8
|
+
*
|
|
9
|
+
* It acts exactly like the native `Intl` object, but acts as a proxy to:
|
|
10
|
+
* 1. Inject the current locale automatically if none is provided.
|
|
11
|
+
* 2. Use the performance-optimized `CachedIntl` under the hood.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { Component, computed } from '@angular/core';
|
|
16
|
+
* import { useIntl } from 'angular-intlayer';
|
|
17
|
+
*
|
|
18
|
+
* @Component({ ... })
|
|
19
|
+
* export class MyComponent {
|
|
20
|
+
* intl = useIntl();
|
|
21
|
+
* formattedPrice = computed(() =>
|
|
22
|
+
* new this.intl().NumberFormat({
|
|
23
|
+
* style: 'currency',
|
|
24
|
+
* currency: 'USD'
|
|
25
|
+
* }).format(123.45)
|
|
26
|
+
* );
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare const useIntl: (locale?: LocalesValues) => _angular_core0.Signal<WrappedIntl>;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { useIntl as t };
|
|
33
|
+
//# sourceMappingURL=useIntl-CHizZCR2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIntl-CHizZCR2.d.ts","names":[],"sources":["../../src/client/useIntl.ts"],"mappings":";;;;;;;;AA6BA;;;;;;;;;;;;;;;;;;;;;cAAa,OAAA,GAAW,MAAA,GAAS,aAAA,KAAa,cAAA,CAAA,MAAA,CAAA,WAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { t as DeepTransformContent } from "./plugins-C_v3w-vC.js";
|
|
2
|
+
import { Signal } from "@angular/core";
|
|
3
|
+
import { DictionaryKeys, DictionaryRegistryContent, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
|
+
|
|
5
|
+
//#region src/client/useIntlayer.d.ts
|
|
6
|
+
/** guard utility - true only for objects generated by `renderIntlayerNode()` */
|
|
7
|
+
declare const isUpdatableNode: (val: unknown) => val is {
|
|
8
|
+
__update: (n: unknown) => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Angular hook that picks one dictionary by its key and returns its reactive content.
|
|
12
|
+
*
|
|
13
|
+
* It utilizes Angular signals to provide deep reactivity, ensuring your components
|
|
14
|
+
* update automatically when the locale changes.
|
|
15
|
+
*
|
|
16
|
+
* @param key - The unique key of the dictionary to retrieve.
|
|
17
|
+
* @param locale - Optional locale to override the current context locale.
|
|
18
|
+
* @returns The transformed dictionary content.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { Component } from '@angular/core';
|
|
23
|
+
* import { useIntlayer } from 'angular-intlayer';
|
|
24
|
+
*
|
|
25
|
+
* @Component({
|
|
26
|
+
* standalone: true,
|
|
27
|
+
* selector: 'app-my-component',
|
|
28
|
+
* template: `<div>{{ content().myField.value }}</div>`,
|
|
29
|
+
* })
|
|
30
|
+
* export class MyComponent {
|
|
31
|
+
* content = useIntlayer('my-dictionary-key');
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: LocalesValues) => Signal<DeepTransformContent<DictionaryRegistryContent<T>>>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { useIntlayer as n, isUpdatableNode as t };
|
|
38
|
+
//# sourceMappingURL=useIntlayer-m3n_upwm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIntlayer-m3n_upwm.d.ts","names":[],"sources":["../../src/client/useIntlayer.ts"],"mappings":";;;;;;cAOa,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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/client/useLoadDynamic.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A "synchronous" loader for a dynamically‐imported JSON (or anything).
|
|
4
|
+
*
|
|
5
|
+
* - Immediately returns a reactive signal so that Angular can properly track changes.
|
|
6
|
+
* - When the Promise resolves, it replaces the signal's value with the real data.
|
|
7
|
+
*/
|
|
8
|
+
declare const useLoadDynamic: <T extends Record<string, any>>(key: string, promise: Promise<T>) => T;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useLoadDynamic as t };
|
|
11
|
+
//# sourceMappingURL=useLoadDynamic-C4pltPcC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLoadDynamic-C4pltPcC.d.ts","names":[],"sources":["../../src/client/useLoadDynamic.ts"],"mappings":";;AAQA;;;;;cAAa,cAAA,aAA4B,MAAA,eACvC,GAAA,UACA,OAAA,EAAS,OAAA,CAAQ,CAAA,MAChB,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as _angular_core0 from "@angular/core";
|
|
2
|
+
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
|
+
import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
4
|
+
|
|
5
|
+
//#region src/client/useLocale.d.ts
|
|
6
|
+
type useLocaleProps = {
|
|
7
|
+
isCookieEnabled?: boolean;
|
|
8
|
+
onLocaleChange?: (locale: LocalesValues) => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Angular hook to manage the current locale and related functions.
|
|
12
|
+
*
|
|
13
|
+
* @param props - Optional configuration for locale management.
|
|
14
|
+
* @returns An object containing the current locale (signal), default locale, available locales, and a function to update the locale.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* import { Component } from '@angular/core';
|
|
19
|
+
* import { useLocale } from 'angular-intlayer';
|
|
20
|
+
*
|
|
21
|
+
* @Component({
|
|
22
|
+
* standalone: true,
|
|
23
|
+
* selector: 'app-locale-switcher',
|
|
24
|
+
* template: `
|
|
25
|
+
* <select [value]="locale()" (change)="setLocale($any($event.target).value)">
|
|
26
|
+
* @for (loc of availableLocales; track loc) {
|
|
27
|
+
* <option [value]="loc">{{ loc }}</option>
|
|
28
|
+
* }
|
|
29
|
+
* </select>
|
|
30
|
+
* `,
|
|
31
|
+
* })
|
|
32
|
+
* export class LocaleSwitcher {
|
|
33
|
+
* const { locale, setLocale, availableLocales } = useLocale();
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare const useLocale: ({
|
|
38
|
+
isCookieEnabled,
|
|
39
|
+
onLocaleChange
|
|
40
|
+
}?: useLocaleProps) => {
|
|
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: _intlayer_types_allLocales0.Locale;
|
|
43
|
+
availableLocales: _intlayer_types_allLocales0.Locale[];
|
|
44
|
+
setLocale: (newLocale: LocalesValues) => void;
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { useLocale as t };
|
|
48
|
+
//# sourceMappingURL=useLocale-BzfAmXlx.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocale-BzfAmXlx.d.ts","names":[],"sources":["../../src/client/useLocale.ts"],"mappings":";;;;;KAMK,cAAA;EACH,eAAA;EACA,cAAA,IAAkB,MAAA,EAAQ,aAAA;AAAA;AAN6C;;;;;;;;;;AAoCzE;;;;;;;;;;;;;;;;;AApCyE,cAoC5D,SAAA;EAAa,eAAA;EAAA;AAAA,IAGvB,cAAA;UAAmB,cAAA,CAAA,MAAA;;;yBAWU,aAAA;AAAA"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/webpack/mergeConfig.d.ts
|
|
2
|
+
declare const mergeConfig: (baseConfig: WebpackConfig) => WebpackConfig;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { mergeConfig };
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/webpack/mergeConfig.ts"],"mappings":";cAOa,WAAA,GAAe,UAAA,EAAY,aAAA,KAAgB,aAAA"}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#endregion
|
|
4
|
-
export { mergeConfig };
|
|
5
|
-
//# sourceMappingURL=mergeConfig.d.ts.map
|
|
1
|
+
import { mergeConfig } from "./index.js";
|
|
2
|
+
export { mergeConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-intlayer",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Angular applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -86,13 +86,13 @@
|
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@babel/plugin-syntax-import-attributes": "^7.28.6",
|
|
88
88
|
"@babel/preset-env": "^7.29.0",
|
|
89
|
-
"@intlayer/chokidar": "8.4.
|
|
90
|
-
"@intlayer/config": "8.4.
|
|
91
|
-
"@intlayer/core": "8.4.
|
|
92
|
-
"@intlayer/dictionaries-entry": "8.4.
|
|
93
|
-
"@intlayer/editor": "8.4.
|
|
94
|
-
"@intlayer/types": "8.4.
|
|
95
|
-
"@intlayer/webpack": "8.4.
|
|
89
|
+
"@intlayer/chokidar": "8.4.2",
|
|
90
|
+
"@intlayer/config": "8.4.2",
|
|
91
|
+
"@intlayer/core": "8.4.2",
|
|
92
|
+
"@intlayer/dictionaries-entry": "8.4.2",
|
|
93
|
+
"@intlayer/editor": "8.4.2",
|
|
94
|
+
"@intlayer/types": "8.4.2",
|
|
95
|
+
"@intlayer/webpack": "8.4.2",
|
|
96
96
|
"babel-loader": "^10.1.1",
|
|
97
97
|
"defu": "6.1.4"
|
|
98
98
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}exports.__decorateMetadata=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelector.component.cjs","names":["CUSTOM_ELEMENTS_SCHEMA"],"sources":["../../../src/editor/ContentSelector.component.ts"],"sourcesContent":["import { Component, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';\n\n@Component({\n selector: 'app-content-selector-wrapper',\n standalone: true,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n template: `\n <intlayer-content-selector-wrapper\n [attr.key-path]=\"keyPathJson\"\n [attr.dictionary-key]=\"dictionaryKey\"\n >\n <ng-content></ng-content>\n </intlayer-content-selector-wrapper>\n `,\n})\nexport class ContentSelectorWrapperComponent {\n @Input() dictionaryKey!: string;\n @Input() keyPath!: any[];\n\n get keyPathJson() {\n return JSON.stringify(this.keyPath);\n }\n}\n"],"mappings":"qTAeO,EAAA,KAAsC,CAC3C,cACA,QAEA,IAAI,aAAc,CAChB,OAAO,KAAK,UAAU,KAAK,QAAQ,8BAJ7B,CAAA,EAAA,mBAAA,cAAA,OAAA,CAAA,CAAA,EAAA,UAAA,gBAAA,IAAA,GAAA,4BACA,CAAA,EAAA,mBAAA,cAAA,MAAA,CAAA,CAAA,EAAA,UAAA,UAAA,IAAA,GAAA,iCAfC,CACT,SAAU,+BACV,WAAY,GACZ,QAAS,CAACA,EAAAA,uBAAuB,CACjC,SAAU;;;;;;;IAQX,CAAC,CAAA,CAAA,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t){if(typeof Reflect==`object`&&typeof Reflect.metadata==`function`)return Reflect.metadata(e,t)}export{e as __decorateMetadata};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelector.component.mjs","names":[],"sources":["../../../src/editor/ContentSelector.component.ts"],"sourcesContent":["import { Component, CUSTOM_ELEMENTS_SCHEMA, Input } from '@angular/core';\n\n@Component({\n selector: 'app-content-selector-wrapper',\n standalone: true,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n template: `\n <intlayer-content-selector-wrapper\n [attr.key-path]=\"keyPathJson\"\n [attr.dictionary-key]=\"dictionaryKey\"\n >\n <ng-content></ng-content>\n </intlayer-content-selector-wrapper>\n `,\n})\nexport class ContentSelectorWrapperComponent {\n @Input() dictionaryKey!: string;\n @Input() keyPath!: any[];\n\n get keyPathJson() {\n return JSON.stringify(this.keyPath);\n }\n}\n"],"mappings":"yRAeO,IAAA,EAAA,KAAsC,CAC3C,cACA,QAEA,IAAI,aAAc,CAChB,OAAO,KAAK,UAAU,KAAK,QAAQ,MAJpC,GAAO,CAAA,EAAA,cAAA,OAAA,CAAA,CAAA,EAAA,UAAA,gBAAA,IAAA,GAAA,IACP,GAAO,CAAA,EAAA,cAAA,MAAA,CAAA,CAAA,EAAA,UAAA,UAAA,IAAA,GAAA,MAfT,EAAU,CACT,SAAU,+BACV,WAAY,GACZ,QAAS,CAAC,EAAuB,CACjC,SAAU;;;;;;;IAQX,CAAC,CAAA,CAAA,EAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"installIntlayer.d.ts","names":[],"sources":["../../../src/client/installIntlayer.ts"],"mappings":";;;;;cAIa,cAAA,EAAc,cAAA,CAAA,gBAAA;AAAA,cAUd,gBAAA;EACX,eAAA,EAD2B,cAAA,CACZ,cAAA;EAAA,QACP,OAAA;EAAA,SAIC,MAAA,EAAQ,MAAA,CAAO,aAAA;EAExB,SAAA,GAAa,MAAA,EAAQ,aAAA;AAAA;;AAXvB;;cAmBa,oBAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA,eACC,gBAAA;;;;;;;;;;;;;;;;;;AAHH;;;;;;cAuCa,eAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA;;;;AAFF;;;AAAA,cAWa,eAAA,GACX,MAAA,GAAS,aAAA,EACT,eAAA,eAAsB,gBAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"mappings":";;;;;;cAOa,aAAA,aAA2B,UAAA,EACtC,UAAA,EAAY,CAAA,EACZ,MAAA,GAAS,aAAA,KACR,MAAA,CAAO,oBAAA,CAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryAsync.d.ts","names":[],"sources":["../../../src/client/useDictionaryAsync.ts"],"mappings":";;;;;;;;AAcA;;cAAa,kBAAA,aAAsC,UAAA,EACjD,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,MAAA,GAAS,aAAA,KAAa,OAAA,CAAA,cAAA,CAAA,MAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;;cAea,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,2BAAA,CAAA,MAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../src/client/useIntl.ts"],"mappings":";;;;;;;AA6BA;;;;;;;;;;;;;;;;;;;;;cAAa,OAAA,GAAW,MAAA,GAAS,aAAA,oBAAa,MAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/client/useIntlayer.ts"],"mappings":";;;;;;cAOa,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"mappings":";;AAQA;;;;;cAAa,cAAA,aAA4B,MAAA,eACvC,GAAA,UACA,OAAA,EAAS,OAAA,CAAQ,CAAA,MAChB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;;;KAMK,cAAA;EACH,eAAA;EACA,cAAA,IAAkB,MAAA,EAAQ,aAAA;AAAA;AAN6C;;;;;;;;;;AAoCzE;;;;;;;;;;;;;;;;;AApCyE,cAoC5D,SAAA;EAAa,eAAA;EAAA;AAAA,IAGvB,cAAA;UAAmB,cAAA,CAAA,MAAA;;;yBAWU,aAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"mappings":";;;;;cAQa,aAAA,aACD,UAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,UAAA,EAAY,CAAA,EACZ,MAAA,GAAS,CAAA,KAAC,2BAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,2BAAA,CAAA,uBAAA,EAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getIntlayer.d.ts","names":[],"sources":["../../src/getIntlayer.ts"],"mappings":";;;;cASa,WAAA,aACD,cAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,CAAA,KAMJ,oBAAA,CAAqB,yBAAA,CAA0B,CAAA"}
|