angular-intlayer 9.0.0-canary.2 → 9.0.0-canary.20
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/UI/IntlayerNode.component.cjs +4 -5
- package/dist/cjs/UI/IntlayerNode.component.cjs.map +1 -1
- package/dist/cjs/_virtual/{_@oxc-project_runtime@0.127.0/helpers → _@oxc-project_runtime@0.140.0/helpers/esm}/decorate.cjs +2 -2
- package/dist/{esm/_virtual/_@oxc-project_runtime@0.127.0/helpers/decorateMetadata.mjs → cjs/_virtual/_@oxc-project_runtime@0.140.0/helpers/esm/decorateMetadata.cjs} +3 -2
- package/dist/cjs/analytics/exposureSink.cjs +27 -0
- package/dist/cjs/analytics/exposureSink.cjs.map +1 -0
- package/dist/cjs/analytics/index.cjs +9 -0
- package/dist/cjs/analytics/useAnalytics.cjs +84 -0
- package/dist/cjs/analytics/useAnalytics.cjs.map +1 -0
- package/dist/cjs/analytics/useConversion.cjs +36 -0
- package/dist/cjs/analytics/useConversion.cjs.map +1 -0
- package/dist/cjs/analytics/useExperiment.cjs +69 -0
- package/dist/cjs/analytics/useExperiment.cjs.map +1 -0
- package/dist/cjs/client/index.cjs +3 -1
- package/dist/cjs/client/installIntlayer.cjs +9 -4
- package/dist/cjs/client/installIntlayer.cjs.map +1 -1
- package/dist/cjs/client/intlayerToken.cjs +0 -1
- package/dist/cjs/client/intlayerToken.cjs.map +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -2
- package/dist/cjs/client/useDictionary.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +0 -1
- package/dist/cjs/client/useDictionaryAsync.cjs.map +1 -1
- package/dist/cjs/client/useDictionaryDynamic.cjs +2 -3
- package/dist/cjs/client/useDictionaryDynamic.cjs.map +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -2
- package/dist/cjs/client/useIntlayer.cjs.map +1 -1
- package/dist/cjs/client/useLoadDynamic.cjs +0 -1
- package/dist/cjs/client/useLoadDynamic.cjs.map +1 -1
- package/dist/cjs/client/useLocale.cjs +0 -1
- package/dist/cjs/client/useLocale.cjs.map +1 -1
- package/dist/cjs/client/useLocaleStorage.cjs +0 -1
- package/dist/cjs/client/useLocaleStorage.cjs.map +1 -1
- package/dist/cjs/client/usePathname.cjs +52 -0
- package/dist/cjs/client/usePathname.cjs.map +1 -0
- package/dist/cjs/editor/ContentSelector.component.cjs +5 -6
- package/dist/cjs/editor/ContentSelector.component.cjs.map +1 -1
- package/dist/cjs/editor/EditorProvider.component.cjs +4 -5
- package/dist/cjs/editor/EditorProvider.component.cjs.map +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -2
- package/dist/cjs/editor/useEditor.cjs.map +1 -1
- package/dist/cjs/esbuild/plugin.cjs +19 -12
- package/dist/cjs/esbuild/plugin.cjs.map +1 -1
- package/dist/cjs/format/useCompact.cjs +0 -1
- package/dist/cjs/format/useCompact.cjs.map +1 -1
- package/dist/cjs/format/useCurrency.cjs +0 -1
- package/dist/cjs/format/useCurrency.cjs.map +1 -1
- package/dist/cjs/format/useDate.cjs +0 -1
- package/dist/cjs/format/useDate.cjs.map +1 -1
- package/dist/cjs/format/useIntl.cjs +0 -1
- package/dist/cjs/format/useIntl.cjs.map +1 -1
- package/dist/cjs/format/useList.cjs +0 -1
- package/dist/cjs/format/useList.cjs.map +1 -1
- package/dist/cjs/format/useNumber.cjs +0 -1
- package/dist/cjs/format/useNumber.cjs.map +1 -1
- package/dist/cjs/format/usePercentage.cjs +0 -1
- package/dist/cjs/format/usePercentage.cjs.map +1 -1
- package/dist/cjs/format/useRelativeTime.cjs +0 -1
- package/dist/cjs/format/useRelativeTime.cjs.map +1 -1
- package/dist/cjs/format/useUnit.cjs +0 -1
- package/dist/cjs/format/useUnit.cjs.map +1 -1
- package/dist/cjs/getDictionary.cjs +1 -2
- package/dist/cjs/getDictionary.cjs.map +1 -1
- package/dist/cjs/getIntlayer.cjs +1 -2
- package/dist/cjs/getIntlayer.cjs.map +1 -1
- package/dist/cjs/html/installIntlayerHTML.cjs +2 -3
- package/dist/cjs/html/installIntlayerHTML.cjs.map +1 -1
- package/dist/cjs/index.cjs +10 -1
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs +2 -3
- package/dist/cjs/markdown/installIntlayerMarkdown.cjs.map +1 -1
- package/dist/cjs/plugins.cjs +32 -21
- package/dist/cjs/plugins.cjs.map +1 -1
- package/dist/cjs/renderIntlayerNode.cjs.map +1 -1
- package/dist/cjs/webpack/mergeConfig.cjs +5 -4
- package/dist/cjs/webpack/mergeConfig.cjs.map +1 -1
- package/dist/esm/UI/IntlayerNode.component.mjs +2 -2
- package/dist/esm/UI/IntlayerNode.component.mjs.map +1 -1
- package/dist/esm/_virtual/{_@oxc-project_runtime@0.127.0/helpers → _@oxc-project_runtime@0.140.0/helpers/esm}/decorate.mjs +2 -2
- package/dist/{cjs/_virtual/_@oxc-project_runtime@0.127.0/helpers/decorateMetadata.cjs → esm/_virtual/_@oxc-project_runtime@0.140.0/helpers/esm/decorateMetadata.mjs} +2 -3
- package/dist/esm/_virtual/_rolldown/runtime.mjs +8 -0
- package/dist/esm/analytics/exposureSink.mjs +24 -0
- package/dist/esm/analytics/exposureSink.mjs.map +1 -0
- package/dist/esm/analytics/index.mjs +5 -0
- package/dist/esm/analytics/useAnalytics.mjs +82 -0
- package/dist/esm/analytics/useAnalytics.mjs.map +1 -0
- package/dist/esm/analytics/useConversion.mjs +35 -0
- package/dist/esm/analytics/useConversion.mjs.map +1 -0
- package/dist/esm/analytics/useExperiment.mjs +68 -0
- package/dist/esm/analytics/useExperiment.mjs.map +1 -0
- package/dist/esm/client/index.mjs +2 -1
- package/dist/esm/client/installIntlayer.mjs +9 -4
- package/dist/esm/client/installIntlayer.mjs.map +1 -1
- package/dist/esm/client/intlayerToken.mjs.map +1 -1
- package/dist/esm/client/useDictionary.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs.map +1 -1
- package/dist/esm/client/useDictionaryAsync.mjs.map +1 -1
- package/dist/esm/client/useDictionaryDynamic.mjs +2 -2
- 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/useLoadDynamic.mjs.map +1 -1
- package/dist/esm/client/useLocale.mjs.map +1 -1
- package/dist/esm/client/useLocaleStorage.mjs.map +1 -1
- package/dist/esm/client/usePathname.mjs +51 -0
- package/dist/esm/client/usePathname.mjs.map +1 -0
- package/dist/esm/editor/ContentSelector.component.mjs +2 -2
- package/dist/esm/editor/ContentSelector.component.mjs.map +1 -1
- package/dist/esm/editor/EditorProvider.component.mjs +2 -2
- package/dist/esm/editor/EditorProvider.component.mjs.map +1 -1
- package/dist/esm/editor/useEditor.mjs +1 -1
- package/dist/esm/editor/useEditor.mjs.map +1 -1
- package/dist/esm/esbuild/plugin.mjs +17 -9
- package/dist/esm/esbuild/plugin.mjs.map +1 -1
- package/dist/esm/format/useCompact.mjs.map +1 -1
- package/dist/esm/format/useCurrency.mjs.map +1 -1
- package/dist/esm/format/useDate.mjs.map +1 -1
- package/dist/esm/format/useIntl.mjs.map +1 -1
- package/dist/esm/format/useList.mjs.map +1 -1
- package/dist/esm/format/useNumber.mjs.map +1 -1
- package/dist/esm/format/usePercentage.mjs.map +1 -1
- package/dist/esm/format/useRelativeTime.mjs.map +1 -1
- package/dist/esm/format/useUnit.mjs.map +1 -1
- package/dist/esm/getDictionary.mjs +1 -1
- package/dist/esm/getDictionary.mjs.map +1 -1
- package/dist/esm/getIntlayer.mjs +1 -1
- package/dist/esm/getIntlayer.mjs.map +1 -1
- package/dist/esm/html/installIntlayerHTML.mjs +1 -1
- package/dist/esm/html/installIntlayerHTML.mjs.map +1 -1
- package/dist/esm/index.mjs +5 -1
- package/dist/esm/markdown/installIntlayerMarkdown.mjs +1 -1
- package/dist/esm/markdown/installIntlayerMarkdown.mjs.map +1 -1
- package/dist/esm/plugins.mjs +32 -21
- package/dist/esm/plugins.mjs.map +1 -1
- package/dist/esm/renderIntlayerNode.mjs.map +1 -1
- package/dist/esm/webpack/mergeConfig.mjs +6 -3
- package/dist/esm/webpack/mergeConfig.mjs.map +1 -1
- package/dist/types/UI/IntlayerNode.component.d.ts +0 -1
- package/dist/types/UI/IntlayerNode.component.d.ts.map +1 -1
- package/dist/types/analytics/exposureSink.d.ts +32 -0
- package/dist/types/analytics/exposureSink.d.ts.map +1 -0
- package/dist/types/analytics/index.d.ts +4 -0
- package/dist/types/analytics/useAnalytics.d.ts +36 -0
- package/dist/types/analytics/useAnalytics.d.ts.map +1 -0
- package/dist/types/analytics/useConversion.d.ts +38 -0
- package/dist/types/analytics/useConversion.d.ts.map +1 -0
- package/dist/types/analytics/useExperiment.d.ts +47 -0
- package/dist/types/analytics/useExperiment.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +2 -1
- package/dist/types/client/installIntlayer.d.ts +2 -4
- package/dist/types/client/installIntlayer.d.ts.map +1 -1
- package/dist/types/client/intlayerToken.d.ts +1 -3
- package/dist/types/client/intlayerToken.d.ts.map +1 -1
- package/dist/types/client/useDictionary.d.ts +0 -1
- package/dist/types/client/useDictionary.d.ts.map +1 -1
- package/dist/types/client/useDictionaryAsync.d.ts +1 -3
- package/dist/types/client/useDictionaryAsync.d.ts.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts +2 -4
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useIntlayer.d.ts +0 -1
- package/dist/types/client/useIntlayer.d.ts.map +1 -1
- package/dist/types/client/useLoadDynamic.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +1 -5
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocaleStorage.d.ts +5 -7
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/client/usePathname.d.ts +35 -0
- package/dist/types/client/usePathname.d.ts.map +1 -0
- package/dist/types/editor/ContentSelector.component.d.ts.map +1 -1
- package/dist/types/editor/EditorProvider.component.d.ts.map +1 -1
- package/dist/types/editor/useEditor.d.ts +1 -3
- package/dist/types/editor/useEditor.d.ts.map +1 -1
- package/dist/types/esbuild/plugin.d.ts +2 -2
- package/dist/types/esbuild/plugin.d.ts.map +1 -1
- package/dist/types/format/useCompact.d.ts +2 -5
- package/dist/types/format/useCompact.d.ts.map +1 -1
- package/dist/types/format/useCurrency.d.ts +2 -5
- package/dist/types/format/useCurrency.d.ts.map +1 -1
- package/dist/types/format/useDate.d.ts +3 -7
- package/dist/types/format/useDate.d.ts.map +1 -1
- package/dist/types/format/useIntl.d.ts +1 -3
- package/dist/types/format/useIntl.d.ts.map +1 -1
- package/dist/types/format/useList.d.ts +5 -8
- package/dist/types/format/useList.d.ts.map +1 -1
- package/dist/types/format/useNumber.d.ts +2 -5
- package/dist/types/format/useNumber.d.ts.map +1 -1
- package/dist/types/format/usePercentage.d.ts +2 -5
- package/dist/types/format/usePercentage.d.ts.map +1 -1
- package/dist/types/format/useRelativeTime.d.ts +2 -5
- package/dist/types/format/useRelativeTime.d.ts.map +1 -1
- package/dist/types/format/useUnit.d.ts +2 -5
- package/dist/types/format/useUnit.d.ts.map +1 -1
- package/dist/types/getDictionary.d.ts +1 -2
- package/dist/types/getDictionary.d.ts.map +1 -1
- package/dist/types/getIntlayer.d.ts +1 -2
- package/dist/types/getIntlayer.d.ts.map +1 -1
- package/dist/types/html/installIntlayerHTML.d.ts +0 -1
- package/dist/types/html/installIntlayerHTML.d.ts.map +1 -1
- package/dist/types/index.d.ts +8 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/markdown/installIntlayerMarkdown.d.ts +0 -1
- package/dist/types/markdown/installIntlayerMarkdown.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +0 -1
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/renderIntlayerNode.d.ts +1 -6
- package/dist/types/renderIntlayerNode.d.ts.map +1 -1
- package/dist/types/webpack/mergeConfig.d.ts +1 -1
- package/dist/types/webpack/mergeConfig.d.ts.map +1 -1
- package/package.json +19 -13
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IntlayerProvider } from "../client/intlayerToken.js";
|
|
2
|
+
//#region src/analytics/useAnalytics.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Initializes the Intlayer analytics client singleton when analytics is
|
|
5
|
+
* enabled (mirrors {@link useEditor}). Records an initial page view, keeps the
|
|
6
|
+
* client aware of the current locale, and wires node-level content exposures.
|
|
7
|
+
*
|
|
8
|
+
* Must be called inside an Angular injection context (e.g. a component
|
|
9
|
+
* constructor, `provideAppInitializer`, or `runInInjectionContext`).
|
|
10
|
+
*
|
|
11
|
+
* @param client - The IntlayerProvider instance to sync locale from.
|
|
12
|
+
* When omitted the function injects `INTLAYER_TOKEN` from the DI tree,
|
|
13
|
+
* so it still works when called directly from a component.
|
|
14
|
+
*/
|
|
15
|
+
declare const useAnalytics: (client?: IntlayerProvider | null) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Angular provider that wires `useAnalytics` into the application
|
|
18
|
+
* initialisation phase via `provideAppInitializer`.
|
|
19
|
+
*
|
|
20
|
+
* `provideIntlayer()` already calls this internally, so you only need this
|
|
21
|
+
* function when you want to manage providers individually.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // app.config.ts
|
|
26
|
+
* import { provideIntlayer, provideIntlayerAnalytics } from 'angular-intlayer';
|
|
27
|
+
*
|
|
28
|
+
* export const appConfig: ApplicationConfig = {
|
|
29
|
+
* providers: [provideIntlayer(), provideIntlayerAnalytics()],
|
|
30
|
+
* };
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare const provideIntlayerAnalytics: (client?: IntlayerProvider | null) => import("@angular/core").EnvironmentProviders;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { provideIntlayerAnalytics, useAnalytics };
|
|
36
|
+
//# sourceMappingURL=useAnalytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnalytics.d.ts","names":[],"sources":["../../../src/analytics/useAnalytics.ts"],"mappings":";;;;;;;;;;;;;;cA4Ba,eAAY,SAAa;;;;;;;;;;;;;;;;;;cAkGzB,2BAAwB,SAAa,oDAAuB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/analytics/useConversion.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Parameters describing a conversion to record.
|
|
4
|
+
*/
|
|
5
|
+
type ConversionParams = {
|
|
6
|
+
/** The experiment this conversion is attributed to. */
|
|
7
|
+
experimentKey: string;
|
|
8
|
+
/** The variant the session was assigned. */
|
|
9
|
+
variant: string;
|
|
10
|
+
/** The goal reached (e.g. `"signup"`, `"cta_click"`). */
|
|
11
|
+
goal: string;
|
|
12
|
+
/** Optional numeric value (e.g. revenue). */
|
|
13
|
+
value?: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Returns a `trackConversion` callback for content A/B testing. Safe to call
|
|
17
|
+
* from any component: it resolves to a no-op when analytics is disabled or the
|
|
18
|
+
* client has not been initialized yet.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* export class CtaComponent {
|
|
23
|
+
* trackConversion = useConversion();
|
|
24
|
+
*
|
|
25
|
+
* onClick() {
|
|
26
|
+
* this.trackConversion({
|
|
27
|
+
* experimentKey: 'homepage-hero',
|
|
28
|
+
* variant: 'b',
|
|
29
|
+
* goal: 'cta_click',
|
|
30
|
+
* });
|
|
31
|
+
* }
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare const useConversion: () => (params: ConversionParams) => void;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { ConversionParams, useConversion };
|
|
38
|
+
//# sourceMappingURL=useConversion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConversion.d.ts","names":[],"sources":["../../../src/analytics/useConversion.ts"],"mappings":";;;;KAKY;;EAEV;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;;;;;;;;;;cAuBW,sBAAa,QACR"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Signal } from "@angular/core";
|
|
2
|
+
//#region src/analytics/useExperiment.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The state of an A/B experiment for the current session.
|
|
5
|
+
*/
|
|
6
|
+
type ExperimentState = {
|
|
7
|
+
/**
|
|
8
|
+
* The variant assigned to this session. Until assignment resolves (and on
|
|
9
|
+
* the server, or when analytics is disabled), this is the first variant —
|
|
10
|
+
* treat the first variant as the control.
|
|
11
|
+
*/
|
|
12
|
+
variant: Signal<string>;
|
|
13
|
+
/**
|
|
14
|
+
* `true` once the variant has been deterministically assigned and its
|
|
15
|
+
* exposure recorded. Useful to defer rendering when a flash of the control
|
|
16
|
+
* variant is not acceptable.
|
|
17
|
+
*/
|
|
18
|
+
isAssigned: Signal<boolean>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Assigns this session to a variant of an A/B experiment and records the
|
|
22
|
+
* exposure, scoped to `experimentKey`, so the backend can compute per-variant
|
|
23
|
+
* conversion rates against `useConversion` events.
|
|
24
|
+
*
|
|
25
|
+
* Assignment is deterministic per session (no server round-trip, stable across
|
|
26
|
+
* re-mounts). The exposure is recorded once per call.
|
|
27
|
+
*
|
|
28
|
+
* Must be called inside an Angular injection context (e.g. a component
|
|
29
|
+
* constructor or field initializer).
|
|
30
|
+
*
|
|
31
|
+
* @param experimentKey - Unique key identifying the experiment.
|
|
32
|
+
* @param variants - The candidate variant names; the first one is the control.
|
|
33
|
+
* @param weights - Optional relative weights, one per variant (e.g. `[9, 1]`).
|
|
34
|
+
* @returns The {@link ExperimentState} for this session.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* export class HeroComponent {
|
|
39
|
+
* experiment = useExperiment('homepage-hero', ['a', 'b']);
|
|
40
|
+
* content = useIntlayer('hero');
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare const useExperiment: (experimentKey: string, variants: string[], weights?: number[]) => ExperimentState;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { ExperimentState, useExperiment };
|
|
47
|
+
//# sourceMappingURL=useExperiment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExperiment.d.ts","names":[],"sources":["../../../src/analytics/useExperiment.ts"],"mappings":";;;;;KAMY;;;;;;EAMV,SAAS;;;;;;EAMT,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;cA2BD,gBAAa,uBACH,oBACH,uBAEjB"}
|
|
@@ -6,4 +6,5 @@ import { useDictionaryDynamic } from "./useDictionaryDynamic.js";
|
|
|
6
6
|
import { isUpdatableNode, useIntlayer } from "./useIntlayer.js";
|
|
7
7
|
import { useLoadDynamic } from "./useLoadDynamic.js";
|
|
8
8
|
import { UseLocaleProps, UseLocaleResult, useLocale } from "./useLocale.js";
|
|
9
|
-
|
|
9
|
+
import { usePathname } from "./usePathname.js";
|
|
10
|
+
export { INTLAYER_TOKEN, IntlayerProvider, UseLocaleProps, UseLocaleResult, createIntlayerClient, installIntlayer, isUpdatableNode, provideIntlayer, useDictionary, useDictionaryAsync, useDictionaryDynamic, useIntlayer, useLoadDynamic, useLocale, usePathname };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { INTLAYER_TOKEN, IntlayerProvider, createIntlayerClient } from "./intlayerToken.js";
|
|
2
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
3
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
|
-
|
|
5
3
|
//#region src/client/installIntlayer.d.ts
|
|
6
4
|
/**
|
|
7
5
|
* Provides Intlayer to your Angular application.
|
|
@@ -26,8 +24,8 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
|
26
24
|
* };
|
|
27
25
|
* ```
|
|
28
26
|
*/
|
|
29
|
-
declare const provideIntlayer: (locale?: LocalesValues, isCookieEnabled?: boolean) => (
|
|
30
|
-
provide:
|
|
27
|
+
declare const provideIntlayer: (locale?: LocalesValues, isCookieEnabled?: boolean) => (import("@angular/core").EnvironmentProviders | {
|
|
28
|
+
provide: import("@angular/core").InjectionToken<IntlayerProvider>;
|
|
31
29
|
useValue: IntlayerProvider;
|
|
32
30
|
})[];
|
|
33
31
|
/**
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;cAkCa,kBAAe,SACjB,eAAa,uDAAA;;;;;;;cAeX,kBAAe,SACjB,eAAa,8BAAA"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
1
|
import { InjectionToken, Signal } from "@angular/core";
|
|
3
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
|
-
|
|
5
3
|
//#region src/client/intlayerToken.d.ts
|
|
6
4
|
declare class IntlayerProvider {
|
|
7
|
-
isCookieEnabled:
|
|
5
|
+
isCookieEnabled: import("@angular/core").WritableSignal<boolean>;
|
|
8
6
|
private _locale;
|
|
9
7
|
readonly locale: Signal<LocalesValues>;
|
|
10
8
|
constructor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intlayerToken.d.ts","names":[],"sources":["../../../src/client/intlayerToken.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"intlayerToken.d.ts","names":[],"sources":["../../../src/client/intlayerToken.ts"],"mappings":";;;cAKa;EACX,yCAAe;UACP;WAIC,QAAQ,OAAO;EAExB;EAIA,YAAS,QAAY;;cAKV,gBAAc,eAAA;;;;cAUd,uBAAoB,SACtB,eAAa,8BAErB"}
|
|
@@ -2,7 +2,6 @@ import { DeepTransformContent } from "../plugins.js";
|
|
|
2
2
|
import { Signal } from "@angular/core";
|
|
3
3
|
import { DeclaredLocales, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
4
|
import { Dictionary, DictionarySelectorForGroup, QualifiedDictionaryGroup, ResolveQualifiedDictionaryContent } from "@intlayer/types/dictionary";
|
|
5
|
-
|
|
6
5
|
//#region src/client/useDictionary.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* Angular hook that transforms a dictionary (or qualified dictionary group)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../src/client/useDictionary.ts"],"mappings":";;;;;;;;;cAqBa,sBACL,UAAU,aAAa,gCACvB,UACF,gBACA,2BAA2B,KAAK,iBAAe,YAEvC,GAAC,mBACM,MAClB,OACD,qBACE,kCAAkC,GAAG,IACrC,sBAAsB"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
1
|
import { LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
3
2
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
-
|
|
5
3
|
//#region src/client/useDictionaryAsync.d.ts
|
|
6
4
|
/**
|
|
7
5
|
* On the server side, Hook that transform a dictionary and return the content
|
|
8
6
|
*
|
|
9
7
|
* If the locale is not provided, it will use the locale from the client context
|
|
10
8
|
*/
|
|
11
|
-
declare const useDictionaryAsync: <const T extends Dictionary>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: LocalesValues) => Promise<
|
|
9
|
+
declare const useDictionaryAsync: <const T extends Dictionary>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: LocalesValues) => Promise<import("@angular/core").Signal<unknown>>;
|
|
12
10
|
//#endregion
|
|
13
11
|
export { useDictionaryAsync };
|
|
14
12
|
//# sourceMappingURL=useDictionaryAsync.d.ts.map
|
|
@@ -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":";;;;;;;;cAiBa,2BAAkC,UAAU,YAAU,mBAC9C,0BAA0B,QAAQ,KAAG,SAC/C,kBAAa,gCAAA"}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
1
|
import { DictionaryKeys, DictionarySelectorForKey, LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
3
2
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
3
|
import { QualifiedDynamicLoaderMap } from "@intlayer/core/dictionaryManipulator";
|
|
5
|
-
|
|
6
4
|
//#region src/client/useDictionaryDynamic.d.ts
|
|
7
5
|
/**
|
|
8
6
|
* Lazily loads a dictionary (plain or qualified) and returns its reactive
|
|
9
7
|
* content.
|
|
10
8
|
*
|
|
11
|
-
* For a qualified loader map (collection / variant
|
|
9
|
+
* For a qualified loader map (collection / variant, possibly
|
|
12
10
|
* combined), only the chunk(s) the selector targets are loaded. For a plain
|
|
13
11
|
* loader map, the locale chunk is loaded.
|
|
14
12
|
*
|
|
15
13
|
* If the locale is not provided (directly or through the selector), it will use
|
|
16
14
|
* the locale from the client context.
|
|
17
15
|
*/
|
|
18
|
-
declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<K> = LocalesValues>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: A) =>
|
|
16
|
+
declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys, const A extends LocalesValues | DictionarySelectorForKey<K> = LocalesValues>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>> | QualifiedDynamicLoaderMap, key: K, localeOrSelector?: A) => import("@angular/core").Signal<any>;
|
|
19
17
|
//#endregion
|
|
20
18
|
export { useDictionaryDynamic };
|
|
21
19
|
//# 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":";;;;;;;;;;;;;;;cAiCa,6BACL,UAAU,kBACV,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,eAAa,mBAGvE,0BAA0B,QAAQ,MAClC,2BAAyB,KACxB,GAAC,mBACa,8BAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DeepTransformContent } from "../plugins.js";
|
|
2
2
|
import { Signal } from "@angular/core";
|
|
3
3
|
import { DeclaredLocales, DictionaryKeys, DictionaryRegistryResult, DictionarySelectorForKey, ExtractSelectorLocale, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
4
|
-
|
|
5
4
|
//#region src/client/useIntlayer.d.ts
|
|
6
5
|
/** guard utility - true only for objects generated by `renderIntlayerNode()` */
|
|
7
6
|
declare const isUpdatableNode: (val: unknown) => val is {
|
|
@@ -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":";;;;;cAea,kBAAe,iBAEzB;EAAS,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8BV,oBACL,UAAU,sBACV,UAAU,gBAAgB,yBAAyB,KAAK,iBAAe,KAExE,GAAC,mBACa,MAClB,OACD,qBAAqB,yBAAyB,GAAG,IAAI,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLoadDynamic.d.ts","names":[],"sources":["../../../src/client/useLoadDynamic.ts"],"mappings":";;;;;;;cAQa,iBAAkB,UAAU,qBAAmB,aAC/C,SACF,QAAQ,OAChB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Signal } from "@angular/core";
|
|
2
2
|
import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
|
-
|
|
4
3
|
//#region src/client/useLocale.d.ts
|
|
5
4
|
type UseLocaleProps = {
|
|
6
5
|
isCookieEnabled?: boolean;
|
|
@@ -39,10 +38,7 @@ type UseLocaleResult = {
|
|
|
39
38
|
* }
|
|
40
39
|
* ```
|
|
41
40
|
*/
|
|
42
|
-
declare const useLocale: ({
|
|
43
|
-
isCookieEnabled,
|
|
44
|
-
onLocaleChange
|
|
45
|
-
}?: UseLocaleProps) => UseLocaleResult;
|
|
41
|
+
declare const useLocale: ({ isCookieEnabled, onLocaleChange }?: UseLocaleProps) => UseLocaleResult;
|
|
46
42
|
//#endregion
|
|
47
43
|
export { UseLocaleProps, UseLocaleResult, useLocale };
|
|
48
44
|
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;KASY;EACV;EACA,kBAAkB,QAAQ;;KAGhB;EACV,QAAQ,OAAO;EACf,eAAe;EACf,kBAAkB;EAClB,YAAY,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8BT,cAAS,iBAAA,mBAGnB,mBAAsB"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
3
|
-
|
|
4
2
|
//#region src/client/useLocaleStorage.d.ts
|
|
5
3
|
/**
|
|
6
4
|
* Get the locale cookie
|
|
@@ -8,13 +6,13 @@ import * as _$_intlayer_types0 from "@intlayer/types";
|
|
|
8
6
|
/**
|
|
9
7
|
* Get the locale cookie
|
|
10
8
|
*/
|
|
11
|
-
declare const localeInStorage:
|
|
9
|
+
declare const localeInStorage: import("@intlayer/types").Locale;
|
|
12
10
|
/**
|
|
13
11
|
* @deprecated Use localeInStorage instead
|
|
14
12
|
*
|
|
15
13
|
* Get the locale cookie
|
|
16
14
|
*/
|
|
17
|
-
declare const localeCookie:
|
|
15
|
+
declare const localeCookie: import("@intlayer/types").Locale;
|
|
18
16
|
/**
|
|
19
17
|
* Set the locale cookie
|
|
20
18
|
*/
|
|
@@ -24,12 +22,12 @@ declare const setLocaleInStorage: (locale: LocalesValues, isCookieEnabled: boole
|
|
|
24
22
|
*
|
|
25
23
|
* Set the locale cookie
|
|
26
24
|
*/
|
|
27
|
-
declare const setLocaleCookie:
|
|
25
|
+
declare const setLocaleCookie: typeof setLocaleInStorage;
|
|
28
26
|
/**
|
|
29
27
|
* Hook that provides the locale storage and a function to set it
|
|
30
28
|
*/
|
|
31
29
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
32
|
-
getLocale: () =>
|
|
30
|
+
getLocale: () => import("@intlayer/types").Locale;
|
|
33
31
|
setLocale: (locale: LocalesValues) => void;
|
|
34
32
|
};
|
|
35
33
|
/**
|
|
@@ -40,7 +38,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
40
38
|
* Hook that provides the locale cookie and a function to set it
|
|
41
39
|
*/
|
|
42
40
|
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
43
|
-
localeCookie:
|
|
41
|
+
localeCookie: import("@intlayer/types").Locale;
|
|
44
42
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
45
43
|
};
|
|
46
44
|
//#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":";;;;;;;;cAca,2CAAe;;;;;;cAMf,wCAAY;;;;cAKZ,qBAAkB,QACrB,eAAa;;;;;;cAaV,wBAAe;;;;cAKf,mBAAgB;;sBAAhB;;;;;;;;;cAaA,kBAAe;EAIxB,wCAAY;EACZ,kBAAe,QAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Signal } from "@angular/core";
|
|
2
|
+
//#region src/client/usePathname.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Angular hook that returns a signal containing the current pathname with
|
|
5
|
+
* the locale segment removed.
|
|
6
|
+
*
|
|
7
|
+
* Reacts to browser back/forward navigation via the `popstate` event.
|
|
8
|
+
* Uses `DestroyRef` to clean up the event listener when the component is destroyed.
|
|
9
|
+
* Falls back to an empty string during server-side rendering.
|
|
10
|
+
*
|
|
11
|
+
* @returns A signal containing the current pathname without the locale prefix.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { Component } from '@angular/core';
|
|
16
|
+
* import { usePathname } from 'angular-intlayer';
|
|
17
|
+
*
|
|
18
|
+
* @Component({
|
|
19
|
+
* standalone: true,
|
|
20
|
+
* selector: 'app-nav-item',
|
|
21
|
+
* template: `
|
|
22
|
+
* <a [class.active]="pathname() === '/dashboard'" href="/dashboard">
|
|
23
|
+
* Dashboard
|
|
24
|
+
* </a>
|
|
25
|
+
* `,
|
|
26
|
+
* })
|
|
27
|
+
* export class NavItem {
|
|
28
|
+
* readonly pathname = usePathname();
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare const usePathname: () => Signal<string>;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { usePathname };
|
|
35
|
+
//# sourceMappingURL=usePathname.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePathname.d.ts","names":[],"sources":["../../../src/client/usePathname.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsCa,mBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelector.component.d.ts","names":[],"sources":["../../../src/editor/ContentSelector.component.ts"],"mappings":";cAea
|
|
1
|
+
{"version":3,"file":"ContentSelector.component.d.ts","names":[],"sources":["../../../src/editor/ContentSelector.component.ts"],"mappings":";cAea;EACF;EACA;MAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorProvider.component.d.ts","names":[],"sources":["../../../src/editor/EditorProvider.component.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EditorProvider.component.d.ts","names":[],"sources":["../../../src/editor/EditorProvider.component.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;cAkCa;EACX"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { IntlayerProvider } from "../client/intlayerToken.js";
|
|
2
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
3
|
-
|
|
4
2
|
//#region src/editor/useEditor.d.ts
|
|
5
3
|
/**
|
|
6
4
|
* Initialises the Intlayer editor client singleton when the editor is enabled.
|
|
@@ -32,7 +30,7 @@ declare const useEditor: (client?: IntlayerProvider | null) => void;
|
|
|
32
30
|
* };
|
|
33
31
|
* ```
|
|
34
32
|
*/
|
|
35
|
-
declare const provideIntlayerEditor: (client?: IntlayerProvider | null) =>
|
|
33
|
+
declare const provideIntlayerEditor: (client?: IntlayerProvider | null) => import("@angular/core").EnvironmentProviders;
|
|
36
34
|
//#endregion
|
|
37
35
|
export { provideIntlayerEditor, useEditor };
|
|
38
36
|
//# 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":";;;;;;;;;;;;;;cA4Ba,YAAS,SAAa;;;;;;;;;;;;;;;;;;cA6DtB,wBAAqB,SAAa,oDAAuB"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { GetConfigurationOptions } from "@intlayer/config/node";
|
|
2
|
-
|
|
3
2
|
//#region src/esbuild/plugin.d.ts
|
|
4
3
|
interface EsbuildPluginBuild {
|
|
5
4
|
initialOptions: {
|
|
6
5
|
alias?: Record<string, string>;
|
|
7
6
|
define?: Record<string, string>;
|
|
8
7
|
minify?: boolean;
|
|
9
|
-
watch?: unknown;
|
|
8
|
+
watch?: unknown;
|
|
9
|
+
/** Absolute working directory of the esbuild context (set by Angular's builder). */
|
|
10
10
|
absWorkingDir?: string;
|
|
11
11
|
};
|
|
12
12
|
onStart(callback: () => void | Promise<void>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../../../src/esbuild/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","names":[],"sources":["../../../src/esbuild/plugin.ts"],"mappings":";;UAwBiB;EACf;IACE,QAAQ;IACR,SAAS;IACT;IACA;;IAEA;;EAEF,QAAQ,uBAAuB;;EAE/B,UACE;IAAW,QAAQ;IAAQ;KAC3B,WAAW;IACT;IACA;IACA;IACA;;IACM;IAAc;;;UAIT;EACf;EACA,MAAM,OAAO,4BAA4B;;KAG/B;EACV,gBAAgB;;;;;;;;EAQhB;;;;;;;;;;;;;;;;;;;;;;;;cAyBW,wBAAqB,UACtB,iCACT"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
3
|
-
|
|
4
1
|
//#region src/format/useCompact.d.ts
|
|
5
|
-
declare const useCompact: () =>
|
|
6
|
-
locale?:
|
|
2
|
+
declare const useCompact: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
7
4
|
}) => string>;
|
|
8
5
|
//#endregion
|
|
9
6
|
export { useCompact };
|
|
@@ -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":";cAIa,0CAAU,QAAA,wBAAA,UAAA,KAAA"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
3
|
-
|
|
4
1
|
//#region src/format/useCurrency.d.ts
|
|
5
|
-
declare const useCurrency: () =>
|
|
6
|
-
locale?:
|
|
2
|
+
declare const useCurrency: () => import("@angular/core").Signal<(value: string | number, options?: Intl.NumberFormatOptions & {
|
|
3
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
7
4
|
}) => string>;
|
|
8
5
|
//#endregion
|
|
9
6
|
export { useCurrency };
|
|
@@ -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":";cAIa,2CAAW,QAAA,wBAAA,UAAA,KAAA"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
3
|
-
import * as _$_intlayer_core_formatters0 from "@intlayer/core/formatters";
|
|
4
|
-
|
|
5
1
|
//#region src/format/useDate.d.ts
|
|
6
2
|
/**
|
|
7
3
|
* Angular client hook that provides a localized date/time formatter.
|
|
8
4
|
*/
|
|
9
|
-
declare const useDate: () =>
|
|
10
|
-
locale?:
|
|
11
|
-
})
|
|
5
|
+
declare const useDate: () => import("@angular/core").Signal<(date: string | number | Date, options?: import("@intlayer/core/formatters").DateTimePreset | (Intl.DateTimeFormatOptions & {
|
|
6
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
7
|
+
})) => string>;
|
|
12
8
|
//#endregion
|
|
13
9
|
export { useDate };
|
|
14
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":";;;;cAOa,uCAAO,QAAA,wBAAA,MAAA,8CAAA,kBAAA,KAAA"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
1
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
2
|
import { WrappedIntl } from "@intlayer/core/formatters";
|
|
4
|
-
|
|
5
3
|
//#region src/format/useIntl.d.ts
|
|
6
4
|
/**
|
|
7
5
|
* Angular composable that provides a locale-bound `Intl` object as a Signal.
|
|
8
6
|
*/
|
|
9
|
-
declare const useIntl: (locale?: LocalesValues) =>
|
|
7
|
+
declare const useIntl: (locale?: LocalesValues) => import("@angular/core").Signal<WrappedIntl>;
|
|
10
8
|
//#endregion
|
|
11
9
|
export { useIntl };
|
|
12
10
|
//# sourceMappingURL=useIntl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../src/format/useIntl.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIntl.d.ts","names":[],"sources":["../../../src/format/useIntl.ts"],"mappings":";;;;;;cAQa,UAAO,SAAa,0CAAa,OAAA"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
3
|
-
|
|
4
1
|
//#region src/format/useList.d.ts
|
|
5
|
-
declare const useList: () =>
|
|
6
|
-
localeMatcher?:
|
|
7
|
-
type?:
|
|
8
|
-
style?:
|
|
2
|
+
declare const useList: () => import("@angular/core").Signal<(values: (string | number)[], options?: {
|
|
3
|
+
localeMatcher?: 'lookup' | 'best fit';
|
|
4
|
+
type?: 'conjunction' | 'disjunction' | 'unit';
|
|
5
|
+
style?: 'long' | 'short' | 'narrow';
|
|
9
6
|
} & {
|
|
10
|
-
locale?:
|
|
7
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
11
8
|
}) => string>;
|
|
12
9
|
//#endregion
|
|
13
10
|
export { useList };
|
|
@@ -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":";cAIa,uCAAO,QAAA,6BAAA"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
3
|
-
|
|
4
1
|
//#region src/format/useNumber.d.ts
|
|
5
2
|
/**
|
|
6
3
|
* Angular client hook that provides a localized number formatter.
|
|
7
4
|
*/
|
|
8
|
-
declare const useNumber: () =>
|
|
9
|
-
locale?:
|
|
5
|
+
declare const useNumber: () => import("@angular/core").Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
6
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
10
7
|
}) => string>;
|
|
11
8
|
//#endregion
|
|
12
9
|
export { useNumber };
|
|
@@ -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":";;;;cAOa,yCAAS,QAAA,wBAAA,SAAA,KAAA"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
3
|
-
|
|
4
1
|
//#region src/format/usePercentage.d.ts
|
|
5
|
-
declare const usePercentage: () =>
|
|
6
|
-
locale?:
|
|
2
|
+
declare const usePercentage: () => import("@angular/core").Signal<(value: string | number, args_1?: Intl.NumberFormatOptions & {
|
|
3
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
7
4
|
}) => string>;
|
|
8
5
|
//#endregion
|
|
9
6
|
export { usePercentage };
|
|
@@ -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":";cAIa,6CAAa,QAAA,wBAAA,SAAA,KAAA"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import * as _$_angular_core0 from "@angular/core";
|
|
2
|
-
import * as _$_intlayer_types0 from "@intlayer/types";
|
|
3
|
-
|
|
4
1
|
//#region src/format/useRelativeTime.d.ts
|
|
5
|
-
declare const useRelativeTime: () =>
|
|
6
|
-
locale?:
|
|
2
|
+
declare const useRelativeTime: () => import("@angular/core").Signal<(from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
3
|
+
locale?: import("@intlayer/types").LocalesValues;
|
|
7
4
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
8
5
|
}) => string>;
|
|
9
6
|
//#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":";cAIa,+CAAe,QAAA,wBAAA,MAAA,uBAAA,MAAA,UAAA,KAAA"}
|