@acorex/core 19.15.0-next.9 → 20.0.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/components/index.d.ts +23 -2
- package/config/index.d.ts +18 -2
- package/constants/index.d.ts +19 -2
- package/date-time/index.d.ts +341 -11
- package/events/index.d.ts +21 -1
- package/fesm2022/acorex-core-components.mjs +3 -3
- package/fesm2022/acorex-core-components.mjs.map +1 -1
- package/fesm2022/acorex-core-config.mjs +7 -10
- package/fesm2022/acorex-core-config.mjs.map +1 -1
- package/fesm2022/acorex-core-constants.mjs.map +1 -1
- package/fesm2022/acorex-core-date-time.mjs +27 -27
- package/fesm2022/acorex-core-date-time.mjs.map +1 -1
- package/fesm2022/acorex-core-events.mjs +3 -3
- package/fesm2022/acorex-core-events.mjs.map +1 -1
- package/fesm2022/acorex-core-file.mjs +11 -12
- package/fesm2022/acorex-core-file.mjs.map +1 -1
- package/fesm2022/acorex-core-format.mjs +34 -36
- package/fesm2022/acorex-core-format.mjs.map +1 -1
- package/fesm2022/acorex-core-icon.mjs +51 -0
- package/fesm2022/acorex-core-icon.mjs.map +1 -0
- package/fesm2022/acorex-core-image.mjs +4 -5
- package/fesm2022/acorex-core-image.mjs.map +1 -1
- package/fesm2022/acorex-core-locale-en-AU.profile-DNjKIaZS.mjs.map +1 -1
- package/fesm2022/acorex-core-locale.mjs +10 -10
- package/fesm2022/acorex-core-locale.mjs.map +1 -1
- package/fesm2022/acorex-core-memoize.mjs.map +1 -1
- package/fesm2022/acorex-core-network.mjs +3 -3
- package/fesm2022/acorex-core-network.mjs.map +1 -1
- package/fesm2022/acorex-core-pipes.mjs +8 -8
- package/fesm2022/acorex-core-pipes.mjs.map +1 -1
- package/fesm2022/acorex-core-platform.mjs +24 -8
- package/fesm2022/acorex-core-platform.mjs.map +1 -1
- package/fesm2022/acorex-core-storage.mjs +14 -17
- package/fesm2022/acorex-core-storage.mjs.map +1 -1
- package/fesm2022/acorex-core-translation.mjs +22 -22
- package/fesm2022/acorex-core-translation.mjs.map +1 -1
- package/fesm2022/acorex-core-utils.mjs +3 -3
- package/fesm2022/acorex-core-utils.mjs.map +1 -1
- package/fesm2022/acorex-core-validation.mjs +55 -57
- package/fesm2022/acorex-core-validation.mjs.map +1 -1
- package/fesm2022/acorex-core.mjs.map +1 -1
- package/file/index.d.ts +42 -3
- package/format/index.d.ts +122 -8
- package/icon/README.md +3 -0
- package/icon/index.d.ts +20 -0
- package/image/index.d.ts +16 -1
- package/index.d.ts +3 -1
- package/locale/index.d.ts +135 -8
- package/memoize/index.d.ts +3 -1
- package/network/index.d.ts +69 -4
- package/package.json +22 -18
- package/pipes/index.d.ts +12 -1
- package/platform/index.d.ts +82 -1
- package/storage/index.d.ts +145 -4
- package/translation/index.d.ts +109 -8
- package/utils/index.d.ts +118 -6
- package/validation/index.d.ts +249 -14
- package/components/lib/component.service.d.ts +0 -11
- package/components/lib/component.types.d.ts +0 -9
- package/config/lib/configs.d.ts +0 -6
- package/config/lib/configs.service.d.ts +0 -12
- package/constants/countries/countries.data.d.ts +0 -3
- package/constants/countries/country.d.ts +0 -13
- package/date-time/lib/calendar.service.d.ts +0 -34
- package/date-time/lib/dateTime.config.d.ts +0 -12
- package/date-time/lib/datetime.module.d.ts +0 -8
- package/date-time/lib/datetime.pipe.d.ts +0 -13
- package/date-time/lib/datetime.types.d.ts +0 -138
- package/date-time/lib/formatters/date.formatter.d.ts +0 -12
- package/date-time/lib/formatters/datetime.formatter.d.ts +0 -21
- package/date-time/lib/formatters/time-duration.formatter.d.ts +0 -21
- package/date-time/lib/formatters/time.formatter.d.ts +0 -12
- package/date-time/lib/formatters/timeleft.formatter.d.ts +0 -16
- package/date-time/lib/gregorian.calendar.d.ts +0 -21
- package/date-time/lib/holidays.loader.d.ts +0 -21
- package/date-time/lib/solar-hijri.calendar.d.ts +0 -40
- package/events/lib/event.service.d.ts +0 -17
- package/file/lib/file-size-formatter.d.ts +0 -16
- package/file/lib/file.module.d.ts +0 -7
- package/file/lib/file.service.d.ts +0 -15
- package/format/lib/format.config.d.ts +0 -5
- package/format/lib/format.directive.d.ts +0 -12
- package/format/lib/format.module.d.ts +0 -19
- package/format/lib/format.pipe.d.ts +0 -12
- package/format/lib/format.service.d.ts +0 -44
- package/format/lib/format.types.d.ts +0 -4
- package/format/lib/formatters/number.formatter.d.ts +0 -23
- package/format/lib/formatters/string.formatter.d.ts +0 -14
- package/image/lib/image.service.d.ts +0 -13
- package/locale/lib/formatters/currency.formatter.d.ts +0 -10
- package/locale/lib/locale-profile-provider.service.d.ts +0 -24
- package/locale/lib/locale.config.d.ts +0 -5
- package/locale/lib/locale.module.d.ts +0 -7
- package/locale/lib/locale.service.d.ts +0 -20
- package/locale/lib/locale.types.d.ts +0 -61
- package/locale/lib/profiles/en-AU.profile.d.ts +0 -2
- package/locale/lib/profiles/en-US.profile.d.ts +0 -2
- package/locale/lib/profiles/fa-IR.profile.d.ts +0 -2
- package/memoize/lib/memoize.decorator.d.ts +0 -1
- package/network/lib/download-task.d.ts +0 -11
- package/network/lib/network.service.d.ts +0 -16
- package/network/lib/network.types.d.ts +0 -28
- package/network/lib/upload-task.d.ts +0 -14
- package/pipes/lib/safe/safe.pipe.d.ts +0 -10
- package/platform/lib/platform.service.d.ts +0 -77
- package/storage/cookie-storage.service.d.ts +0 -104
- package/storage/local-storage.service.d.ts +0 -16
- package/storage/session-storage.service.d.ts +0 -10
- package/storage/storage.interface.d.ts +0 -14
- package/translation/lib/translation-loader.service.d.ts +0 -20
- package/translation/lib/translation-scope.resolver.d.ts +0 -2
- package/translation/lib/translation.config.d.ts +0 -27
- package/translation/lib/translation.loader.d.ts +0 -14
- package/translation/lib/translation.module.d.ts +0 -8
- package/translation/lib/translation.parser.d.ts +0 -7
- package/translation/lib/translation.resolver.d.ts +0 -9
- package/translation/lib/translation.service.d.ts +0 -25
- package/translation/lib/translation.types.d.ts +0 -16
- package/translation/lib/translator.directive.d.ts +0 -12
- package/translation/lib/translator.pipe.d.ts +0 -10
- package/utils/lib/color.utils.d.ts +0 -26
- package/utils/lib/drawing.utils.d.ts +0 -18
- package/utils/lib/execution.utils.d.ts +0 -33
- package/utils/lib/html-utils.d.ts +0 -15
- package/utils/lib/lifecycle-helpers.utils.d.ts +0 -12
- package/utils/lib/string.utils.d.ts +0 -4
- package/validation/lib/rules/between-rule.d.ts +0 -18
- package/validation/lib/rules/callback-rule.d.ts +0 -24
- package/validation/lib/rules/equal-rule.d.ts +0 -17
- package/validation/lib/rules/greater-than.d.ts +0 -17
- package/validation/lib/rules/length-rule.d.ts +0 -17
- package/validation/lib/rules/less-than-rule.d.ts +0 -17
- package/validation/lib/rules/maxlength-rule.d.ts +0 -16
- package/validation/lib/rules/minlength-rule.d.ts +0 -16
- package/validation/lib/rules/regex-rule.d.ts +0 -17
- package/validation/lib/rules/required-rule.d.ts +0 -16
- package/validation/lib/validation.config.d.ts +0 -15
- package/validation/lib/validation.module.d.ts +0 -17
- package/validation/lib/validation.service.d.ts +0 -35
- package/validation/lib/validation.types.d.ts +0 -21
@@ -1,9 +0,0 @@
|
|
1
|
-
import { AXTranslateLang, AXTranslateParams, AXTranslateScope } from './translation.types';
|
2
|
-
export declare class TranslationResolverService {
|
3
|
-
private loaderService;
|
4
|
-
private cache;
|
5
|
-
private inflight;
|
6
|
-
private parser;
|
7
|
-
resolve(lang: AXTranslateLang, scope: AXTranslateScope, key: string, params?: AXTranslateParams): Promise<string>;
|
8
|
-
format(text: string, params?: AXTranslateParams): string;
|
9
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { Observable } from 'rxjs';
|
2
|
-
import { AXTranslateLang, AXTranslateOptions } from './translation.types';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export declare function translateSync(key: string, options?: AXTranslateOptions): string;
|
5
|
-
export declare class AXTranslationService {
|
6
|
-
private localeService;
|
7
|
-
private config;
|
8
|
-
private loader;
|
9
|
-
private parser;
|
10
|
-
private resolver;
|
11
|
-
private activeLang;
|
12
|
-
readonly langChanges$: Observable<string>;
|
13
|
-
constructor();
|
14
|
-
setActiveLang(lang: AXTranslateLang): void;
|
15
|
-
getActiveLang(): AXTranslateLang;
|
16
|
-
getDefaultLang(): AXTranslateLang;
|
17
|
-
translate$(text: string, options?: AXTranslateOptions): Observable<string>;
|
18
|
-
translateAsync(text: string, options?: AXTranslateOptions): Promise<string>;
|
19
|
-
translateSync(text: string, options?: AXTranslateOptions & {
|
20
|
-
waitForLoad?: boolean;
|
21
|
-
timeoutMs?: number;
|
22
|
-
}): string;
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslationService, never>;
|
24
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXTranslationService>;
|
25
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
export type AXTranslateHashMap<T = unknown> = Record<string, T>;
|
2
|
-
export type AXTranslateLang = string;
|
3
|
-
export type AXTranslateScope = string;
|
4
|
-
export type AXTranslateParams<T = unknown> = Record<string, T>;
|
5
|
-
export type AXTranslation = Record<string, string>;
|
6
|
-
export interface AXTranslateOptions {
|
7
|
-
lang?: AXTranslateLang;
|
8
|
-
scope?: AXTranslateScope;
|
9
|
-
params?: AXTranslateParams;
|
10
|
-
}
|
11
|
-
export interface AXParsedToken {
|
12
|
-
key: string;
|
13
|
-
scope?: AXTranslateScope;
|
14
|
-
lang?: AXTranslateLang;
|
15
|
-
fullMatch: string;
|
16
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
|
2
|
-
import { AXTranslationService } from './translation.service';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export declare class AXTranslatorDirective implements OnInit {
|
5
|
-
private templateRef;
|
6
|
-
private vc;
|
7
|
-
private translationService;
|
8
|
-
constructor(templateRef: TemplateRef<any>, vc: ViewContainerRef, translationService: AXTranslationService);
|
9
|
-
ngOnInit(): void;
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslatorDirective, never>;
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AXTranslatorDirective, "[translate]", never, {}, {}, never, never, true, never>;
|
12
|
-
}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
2
|
-
import { Observable } from 'rxjs';
|
3
|
-
import { AXTranslateOptions } from './translation.types';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
export declare class AXTranslatorPipe implements PipeTransform {
|
6
|
-
private service;
|
7
|
-
transform(key: string, options?: AXTranslateOptions): Observable<string>;
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslatorPipe, never>;
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<AXTranslatorPipe, "translate", true>;
|
10
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva' | null;
|
2
|
-
import tinycolor, { ColorInput } from 'tinycolor2';
|
3
|
-
import { Instance } from 'tinygradient-es';
|
4
|
-
export type AXColorFormat = ColorInput;
|
5
|
-
export declare class AXColorUtil {
|
6
|
-
static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat;
|
7
|
-
static toString(color: AXColorFormat, mode?: AXColorMode): string;
|
8
|
-
static isValid(color: AXColorFormat): boolean;
|
9
|
-
static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string;
|
10
|
-
static multiply(color1: AXColorFormat, color2: AXColorFormat): string;
|
11
|
-
static contrastToWhite(color: AXColorFormat): number;
|
12
|
-
static lighten(hex: AXColorFormat, percentage?: number): tinycolor.Instance;
|
13
|
-
static darken(hex: AXColorFormat, percentage?: number): tinycolor.Instance;
|
14
|
-
static brighten(hex: AXColorFormat, percentage?: number): tinycolor.Instance;
|
15
|
-
static saturate(hex: AXColorFormat, percentage?: number): tinycolor.Instance;
|
16
|
-
static desaturate(hex: AXColorFormat): number;
|
17
|
-
static equal(color1: AXColorFormat, color2: AXColorFormat): boolean;
|
18
|
-
static gradient(values: unknown[] | {
|
19
|
-
color: unknown;
|
20
|
-
pos: number;
|
21
|
-
}[]): Instance;
|
22
|
-
static getLuminance(hex: AXColorFormat): number;
|
23
|
-
static xyToRgb(vX: any, vY: any): string;
|
24
|
-
static colorStringToHex(color: any): any;
|
25
|
-
static getRandomColor(): string;
|
26
|
-
}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
export interface AXPoint {
|
2
|
-
x: number;
|
3
|
-
y: number;
|
4
|
-
}
|
5
|
-
export interface AXBoundingClientRect {
|
6
|
-
left?: number;
|
7
|
-
top?: number;
|
8
|
-
width?: number;
|
9
|
-
height?: number;
|
10
|
-
bottom?: number;
|
11
|
-
right?: number;
|
12
|
-
}
|
13
|
-
export declare class AXDrawingUtil {
|
14
|
-
static collision(a: HTMLElement, b: HTMLElement): boolean;
|
15
|
-
static isInElementBound(pos: AXPoint, element: HTMLElement): boolean;
|
16
|
-
static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean;
|
17
|
-
static convertRemToPixels(rem: number): number;
|
18
|
-
}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Blocks until a condition returns a value or the timeout is reached.
|
3
|
-
* Useful for simulating sync behavior with cached async results.
|
4
|
-
*/
|
5
|
-
export declare function waitFor<T>(peekFn: () => T | null | undefined, loadFn: () => void, timeoutMs?: number): T | null;
|
6
|
-
/**
|
7
|
-
* Delays for a specific amount of time.
|
8
|
-
*/
|
9
|
-
export declare function delay(ms: number): Promise<void>;
|
10
|
-
/**
|
11
|
-
* Retries an async function until it succeeds or a max attempt count is reached.
|
12
|
-
*/
|
13
|
-
export declare function retryUntil<T>(fn: () => Promise<T>, attempts?: number, delayMs?: number): Promise<T>;
|
14
|
-
/**
|
15
|
-
* Continuously polls a condition until it returns true or a timeout is reached.
|
16
|
-
*/
|
17
|
-
export declare function pollUntil(condition: () => boolean, intervalMs?: number, timeoutMs?: number): Promise<boolean>;
|
18
|
-
/**
|
19
|
-
* Throttles an async function to ensure only one instance runs at a time.
|
20
|
-
*/
|
21
|
-
export declare function throttleAsync<T extends (...args: any[]) => Promise<any>>(fn: T): T;
|
22
|
-
/**
|
23
|
-
* Polls a condition with cancel support via AbortSignal.
|
24
|
-
*/
|
25
|
-
export declare function pollUntilAbortable(condition: () => boolean, intervalMs?: number, timeoutMs?: number, signal?: AbortSignal): Promise<boolean>;
|
26
|
-
/**
|
27
|
-
* Debounces an async function to run only after no calls are made within the wait window.
|
28
|
-
*/
|
29
|
-
export declare function debounceAsync<T extends (...args: any[]) => Promise<any>>(fn: T, waitMs: number): T;
|
30
|
-
/**
|
31
|
-
* Runs a list of fallback functions until one resolves without throwing.
|
32
|
-
*/
|
33
|
-
export declare function fallbackChain<T>(tasks: Array<() => Promise<T>>): Promise<T>;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
export declare class AXHtmlUtil {
|
2
|
-
static focusElement(element: HTMLElement): HTMLElement;
|
3
|
-
static blurElement(element: HTMLElement): HTMLElement;
|
4
|
-
static hasFocus(element: HTMLElement): boolean;
|
5
|
-
static isRtl(element?: HTMLElement): boolean;
|
6
|
-
static hasDark(element: HTMLElement): boolean;
|
7
|
-
/**
|
8
|
-
* Helper function to check if an element is scrollable
|
9
|
-
*/
|
10
|
-
static isScrollable(element: HTMLElement): boolean;
|
11
|
-
/**
|
12
|
-
* Utility function to find scrollable parent elements
|
13
|
-
*/
|
14
|
-
static getScrollableParents(element: HTMLElement): HTMLElement[];
|
15
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { OnDestroy } from '@angular/core';
|
2
|
-
import { Observable, Subject } from 'rxjs';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export declare function AXAutoUnsubscriber(): (constructor: any) => void;
|
5
|
-
export declare class AXUnsubscriber implements OnDestroy {
|
6
|
-
private readonly _destroy$;
|
7
|
-
readonly takeUntilDestroy: <T>(origin: Observable<T> | Subject<T>) => Observable<T> | Subject<T>;
|
8
|
-
unsubscribe(): void;
|
9
|
-
ngOnDestroy(): void;
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXUnsubscriber, never>;
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXUnsubscriber>;
|
12
|
-
}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export interface AXBetweenValidationRuleOptions<T = number | Date> extends AXValidationRuleOptions {
|
4
|
-
lowerValue: T;
|
5
|
-
upperValue: T;
|
6
|
-
inclusive?: boolean;
|
7
|
-
}
|
8
|
-
declare module '../validation.types' {
|
9
|
-
interface AXValidationRuleOptionsMap {
|
10
|
-
between: AXBetweenValidationRuleOptions;
|
11
|
-
}
|
12
|
-
}
|
13
|
-
export declare class AXBetweenValidationRule<T = number | Date> implements AXValidationRule {
|
14
|
-
get name(): string;
|
15
|
-
validate(value: T, options: AXBetweenValidationRuleOptions<T>): Promise<AXValidationRuleResult>;
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXBetweenValidationRule<any>, never>;
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXBetweenValidationRule<any>>;
|
18
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export type AXCallbackValidationRuleResult = Promise<{
|
4
|
-
result: boolean;
|
5
|
-
message?: string;
|
6
|
-
}> | {
|
7
|
-
result: boolean;
|
8
|
-
message?: string;
|
9
|
-
} | boolean;
|
10
|
-
export type AXCallbackValidation<T> = (value: T, options?: AXCallbackValidationRuleOptions<T>) => AXCallbackValidationRuleResult;
|
11
|
-
export interface AXCallbackValidationRuleOptions<T> extends AXValidationRuleOptions {
|
12
|
-
validate: AXCallbackValidation<T>;
|
13
|
-
}
|
14
|
-
declare module '../validation.types' {
|
15
|
-
interface AXValidationRuleOptionsMap {
|
16
|
-
callback: AXCallbackValidationRuleOptions<unknown>;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
export declare class AXCallbackValidationRule<T> implements AXValidationRule {
|
20
|
-
get name(): string;
|
21
|
-
validate(value: T, options: AXCallbackValidationRuleOptions<T>): Promise<AXValidationRuleResult>;
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXCallbackValidationRule<any>, never>;
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXCallbackValidationRule<any>>;
|
24
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export interface AXEqualValidationRuleOptions extends AXValidationRuleOptions {
|
4
|
-
value: any;
|
5
|
-
not?: boolean;
|
6
|
-
}
|
7
|
-
declare module '../validation.types' {
|
8
|
-
interface AXValidationRuleOptionsMap {
|
9
|
-
equal: AXEqualValidationRuleOptions;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
export declare class AXEqualValidationRule implements AXValidationRule {
|
13
|
-
get name(): string;
|
14
|
-
validate(value: any, options: AXEqualValidationRuleOptions): Promise<AXValidationRuleResult>;
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXEqualValidationRule, never>;
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXEqualValidationRule>;
|
17
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export interface AXGreaterThanValidationRuleOptions extends AXValidationRuleOptions {
|
4
|
-
value: number;
|
5
|
-
inclusive?: boolean;
|
6
|
-
}
|
7
|
-
declare module '../validation.types' {
|
8
|
-
interface AXValidationRuleOptionsMap {
|
9
|
-
greaterThan: AXGreaterThanValidationRuleOptions;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
export declare class AXGreaterThanValidationRule implements AXValidationRule {
|
13
|
-
get name(): string;
|
14
|
-
validate(value: number, options: AXGreaterThanValidationRuleOptions): Promise<AXValidationRuleResult>;
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXGreaterThanValidationRule, never>;
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXGreaterThanValidationRule>;
|
17
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export interface AXLengthValidationRuleOptions extends AXValidationRuleOptions {
|
4
|
-
min: number;
|
5
|
-
max: number;
|
6
|
-
}
|
7
|
-
declare module '../validation.types' {
|
8
|
-
interface AXValidationRuleOptionsMap {
|
9
|
-
length: AXLengthValidationRuleOptions;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
export declare class AXLengthValidationRule implements AXValidationRule {
|
13
|
-
get name(): string;
|
14
|
-
validate(value: string, options: AXLengthValidationRuleOptions): Promise<AXValidationRuleResult>;
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXLengthValidationRule, never>;
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXLengthValidationRule>;
|
17
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export interface AXLessThanValidationRuleOptions extends AXValidationRuleOptions {
|
4
|
-
value: number;
|
5
|
-
inclusive?: boolean;
|
6
|
-
}
|
7
|
-
declare module '../validation.types' {
|
8
|
-
interface AXValidationRuleOptionsMap {
|
9
|
-
lessThan: AXLessThanValidationRuleOptions;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
export declare class AXLessThanValidationRule implements AXValidationRule {
|
13
|
-
get name(): string;
|
14
|
-
validate(value: number, options: AXLessThanValidationRuleOptions): Promise<AXValidationRuleResult>;
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXLessThanValidationRule, never>;
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXLessThanValidationRule>;
|
17
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export interface AXMaxLengthValidationRuleOptions extends AXValidationRuleOptions {
|
4
|
-
value: number;
|
5
|
-
}
|
6
|
-
declare module '../validation.types' {
|
7
|
-
interface AXValidationRuleOptionsMap {
|
8
|
-
maxLength: AXMaxLengthValidationRuleOptions;
|
9
|
-
}
|
10
|
-
}
|
11
|
-
export declare class AXMaxLengthValidationRule implements AXValidationRule {
|
12
|
-
get name(): string;
|
13
|
-
validate(value: string, options: AXMaxLengthValidationRuleOptions): Promise<AXValidationRuleResult>;
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXMaxLengthValidationRule, never>;
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXMaxLengthValidationRule>;
|
16
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export interface AXMinLengthValidationRuleOptions extends AXValidationRuleOptions {
|
4
|
-
value: number;
|
5
|
-
}
|
6
|
-
declare module '../validation.types' {
|
7
|
-
interface AXValidationRuleOptionsMap {
|
8
|
-
minLength: AXMinLengthValidationRuleOptions;
|
9
|
-
}
|
10
|
-
}
|
11
|
-
export declare class AXMinLengthValidationRule implements AXValidationRule {
|
12
|
-
get name(): string;
|
13
|
-
validate(value: string, options: AXMinLengthValidationRuleOptions): Promise<AXValidationRuleResult>;
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXMinLengthValidationRule, never>;
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXMinLengthValidationRule>;
|
16
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export interface AXRegexValidationRuleOptions extends AXValidationRuleOptions {
|
4
|
-
pattern: string | RegExp;
|
5
|
-
}
|
6
|
-
declare module '../validation.types' {
|
7
|
-
interface AXValidationRuleOptionsMap {
|
8
|
-
regex: AXRegexValidationRuleOptions;
|
9
|
-
}
|
10
|
-
}
|
11
|
-
export declare class AXRegexValidationRule implements AXValidationRule {
|
12
|
-
private traslationService;
|
13
|
-
get name(): string;
|
14
|
-
validate(value: string, options: AXRegexValidationRuleOptions): Promise<AXValidationRuleResult>;
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXRegexValidationRule, never>;
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXRegexValidationRule>;
|
17
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export interface AXRequiredValidationRuleOptions extends AXValidationRuleOptions {
|
4
|
-
}
|
5
|
-
declare module '../validation.types' {
|
6
|
-
interface AXValidationRuleOptionsMap {
|
7
|
-
required: AXRequiredValidationRuleOptions;
|
8
|
-
}
|
9
|
-
}
|
10
|
-
export declare class AXRequiredValidationRule implements AXValidationRule {
|
11
|
-
private traslationService;
|
12
|
-
get name(): string;
|
13
|
-
validate(value?: unknown, options?: AXRequiredValidationRuleOptions): Promise<AXValidationRuleResult>;
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXRequiredValidationRule, never>;
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXRequiredValidationRule>;
|
16
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
2
|
-
import { AXValidationRuleOptions, AXValidationRuleOptionsMap } from './validation.types';
|
3
|
-
export type AXValidationConfigRules = {
|
4
|
-
[key: string]: {
|
5
|
-
rule: keyof AXValidationRuleOptionsMap;
|
6
|
-
options: AXValidationRuleOptions;
|
7
|
-
};
|
8
|
-
};
|
9
|
-
export interface AXValidationConfig {
|
10
|
-
rules: AXValidationConfigRules;
|
11
|
-
}
|
12
|
-
export declare const AX_VALIDATION_CONFIG: InjectionToken<AXValidationConfig>;
|
13
|
-
export declare const AXValidationDefaultConfig: AXValidationConfig;
|
14
|
-
export type AXPartialValidationConfig = Partial<AXValidationConfig>;
|
15
|
-
export declare function validationConfig(config?: AXPartialValidationConfig): AXValidationConfig;
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
2
|
-
import { AXValidationRule } from './validation.types';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export interface AXValidationModuleConfigs {
|
5
|
-
rules: (new () => AXValidationRule)[];
|
6
|
-
}
|
7
|
-
export declare class AXValidationModule {
|
8
|
-
static forRoot(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule>;
|
9
|
-
static forChild(configs?: AXValidationModuleConfigs): ModuleWithProviders<AXValidationModule>;
|
10
|
-
/**
|
11
|
-
* @ignore
|
12
|
-
*/
|
13
|
-
constructor(instances: any[]);
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXValidationModule, never>;
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXValidationModule, never, never, never>;
|
16
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<AXValidationModule>;
|
17
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import { AXTranslationService } from '@acorex/core/translation';
|
2
|
-
import { Injector } from '@angular/core';
|
3
|
-
import { AXValidationConfigRules } from './validation.config';
|
4
|
-
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleOptionsMap, AXValidationRuleResult, AXValidationSummary } from './validation.types';
|
5
|
-
import * as i0 from "@angular/core";
|
6
|
-
export declare class AXValidationRegistryService {
|
7
|
-
private plugins;
|
8
|
-
private configs;
|
9
|
-
get customRules(): AXValidationConfigRules;
|
10
|
-
private injector;
|
11
|
-
constructor(injector: Injector);
|
12
|
-
register(...plugins: (new () => AXValidationRule)[]): void;
|
13
|
-
get(ruleName: string): AXValidationRule | undefined;
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXValidationRegistryService, never>;
|
15
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXValidationRegistryService>;
|
16
|
-
}
|
17
|
-
export declare class AXValidationService {
|
18
|
-
private pluginRegistry;
|
19
|
-
private translationService;
|
20
|
-
constructor(pluginRegistry: AXValidationRegistryService, translationService: AXTranslationService);
|
21
|
-
validate(ruleName: string, value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult>;
|
22
|
-
ruleFor(value: unknown): AXValidationRuleChain;
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXValidationService, never>;
|
24
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXValidationService>;
|
25
|
-
}
|
26
|
-
declare class AXValidationRuleChain {
|
27
|
-
private validationService;
|
28
|
-
private initialValue;
|
29
|
-
private rules;
|
30
|
-
private validationSummary;
|
31
|
-
constructor(validationService: AXValidationService, initialValue: unknown);
|
32
|
-
addRule<K extends keyof AXValidationRuleOptionsMap>(name: K, options?: AXValidationRuleOptionsMap[K]): AXValidationRuleChain;
|
33
|
-
validate(): Promise<AXValidationSummary>;
|
34
|
-
}
|
35
|
-
export {};
|
@@ -1,21 +0,0 @@
|
|
1
|
-
export interface AXValidationRuleOptions {
|
2
|
-
message?: string;
|
3
|
-
[key: string]: unknown;
|
4
|
-
}
|
5
|
-
export interface AXValidationRuleOptionsMap {
|
6
|
-
}
|
7
|
-
export declare abstract class AXValidationRule {
|
8
|
-
abstract get name(): string;
|
9
|
-
abstract validate(value: unknown, options?: AXValidationRuleOptions): Promise<AXValidationRuleResult>;
|
10
|
-
}
|
11
|
-
export interface AXValidationRuleResult {
|
12
|
-
rule: string;
|
13
|
-
value?: unknown;
|
14
|
-
message?: string | null;
|
15
|
-
result: boolean;
|
16
|
-
[key: string]: unknown;
|
17
|
-
}
|
18
|
-
export interface AXValidationSummary {
|
19
|
-
result: boolean;
|
20
|
-
rules: AXValidationRuleResult[];
|
21
|
-
}
|