@osovitny/anatoly 3.17.2 → 3.17.3
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/esm2022/lib/core/consts/settings.mjs +6 -1
- package/esm2022/lib/core/converts/convert.mjs +1 -34
- package/esm2022/lib/core/converts/dateConvert.mjs +58 -0
- package/esm2022/lib/core/index.mjs +3 -1
- package/esm2022/lib/core/is.mjs +79 -0
- package/esm2022/lib/core/localization/localization.service.mjs +63 -88
- package/esm2022/lib/core/localization/localize.pipe.mjs +13 -14
- package/esm2022/lib/core/services/starter.service.mjs +3 -3
- package/esm2022/lib/core/utils.mjs +1 -7
- package/fesm2022/osovitny-anatoly.mjs +257 -180
- package/fesm2022/osovitny-anatoly.mjs.map +1 -1
- package/lib/core/consts/settings.d.ts +4 -0
- package/lib/core/converts/convert.d.ts +0 -5
- package/lib/core/converts/dateConvert.d.ts +7 -0
- package/lib/core/index.d.ts +2 -0
- package/lib/core/is.d.ts +17 -0
- package/lib/core/localization/localization.service.d.ts +7 -8
- package/lib/core/utils.d.ts +0 -2
- package/package.json +2 -2
|
@@ -13,9 +13,4 @@ export declare class Convert {
|
|
|
13
13
|
static company2String(comp: any): string;
|
|
14
14
|
static address2String(adr: any): string;
|
|
15
15
|
static stringToBoolean(value: any): boolean;
|
|
16
|
-
static localToUtcDate(value: Date): Date | null;
|
|
17
|
-
static localToUtcDateTime(value: Date): Date | null;
|
|
18
|
-
static utcToLocalDate(value: Date): Date | null;
|
|
19
|
-
static utcToLocalDateTime(value: Date): Date | null;
|
|
20
|
-
static dateToString(date: any): string;
|
|
21
16
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare class DateConvert {
|
|
2
|
+
static toDate(argument: Date | number | string): Date;
|
|
3
|
+
static localToUtcDate(value: Date): Date | null;
|
|
4
|
+
static localToUtcDateTime(value: Date): Date | null;
|
|
5
|
+
static utcToLocalDate(value: Date): Date | null;
|
|
6
|
+
static utcToLocalDateTime(value: Date): Date | null;
|
|
7
|
+
}
|
package/lib/core/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './consts/settings';
|
|
2
2
|
export * from './converts/convert';
|
|
3
|
+
export * from './converts/dateConvert';
|
|
3
4
|
export * from './converts/xmlFormatter';
|
|
4
5
|
export * from './go/base-go.service';
|
|
5
6
|
export * from './guards/once-import.guard';
|
|
@@ -25,5 +26,6 @@ export * from './services/web-storage.service';
|
|
|
25
26
|
export * from './browser';
|
|
26
27
|
export * from './dom';
|
|
27
28
|
export * from './guid';
|
|
29
|
+
export * from './is';
|
|
28
30
|
export * from './subs';
|
|
29
31
|
export * from './utils';
|
package/lib/core/is.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class is {
|
|
2
|
+
/**
|
|
3
|
+
* @name isDate
|
|
4
|
+
* @summary Is the given value a date?
|
|
5
|
+
*/
|
|
6
|
+
static date(value: any): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @name isDateValid
|
|
9
|
+
* @summary Is the given date valid?
|
|
10
|
+
*/
|
|
11
|
+
static dateValid(date: any): boolean;
|
|
12
|
+
static dateInvalid(date: any): boolean;
|
|
13
|
+
static string(value: any): boolean;
|
|
14
|
+
static number(value: any): boolean;
|
|
15
|
+
static boolean(value: any): boolean;
|
|
16
|
+
static objectNullOrEmpty(obj: any): boolean;
|
|
17
|
+
}
|
|
@@ -18,14 +18,13 @@ export declare class LocalizationService implements OnDestroy {
|
|
|
18
18
|
getBrowserLanguage(): string;
|
|
19
19
|
getDatefnsLocale(): any;
|
|
20
20
|
getLocalizedValue(key: string, params?: any[]): string;
|
|
21
|
-
getLocalizedDate(
|
|
22
|
-
getLocalizedDateTime(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
safeUtcToZonedTime(date: any): string;
|
|
21
|
+
getLocalizedDate(value: any): string;
|
|
22
|
+
getLocalizedDateTime(value: any): string;
|
|
23
|
+
getUTCToLocalizedDate(value: any): string;
|
|
24
|
+
getUTCToLocalizedDateTime(value: any): string;
|
|
25
|
+
private safeUtcToZonedTime;
|
|
26
|
+
getLocalizedDistanceInWords(endedDateStr: string, startedDateStr: string): string;
|
|
27
|
+
getLocalizedDistanceToNowInWords(value: string): string;
|
|
29
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationService, never>;
|
|
30
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<LocalizationService>;
|
|
31
30
|
}
|
package/lib/core/utils.d.ts
CHANGED
|
@@ -7,6 +7,4 @@ export declare class Utils {
|
|
|
7
7
|
static downloadBlobFile(value: Blob, fileName: string): void;
|
|
8
8
|
static slugify(text: string, prefix?: string, postfix?: string): string;
|
|
9
9
|
static generateRandom(start: number, end: number): number;
|
|
10
|
-
static isObjectNullOrEmpty(obj: any): boolean;
|
|
11
|
-
static isString(value: any): boolean;
|
|
12
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osovitny/anatoly",
|
|
3
|
-
"version": "3.17.
|
|
3
|
+
"version": "3.17.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "17.1.2",
|
|
6
6
|
"@angular/core": "17.1.2",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@ngx-translate/core": "15.0.0",
|
|
49
49
|
"@ngx-translate/http-loader": "8.0.0",
|
|
50
50
|
"core-js": "3.35.1",
|
|
51
|
-
"date-fns": "
|
|
51
|
+
"date-fns": "3.3.1",
|
|
52
52
|
"date-fns-tz": "2.0.0",
|
|
53
53
|
"js-beautify": "1.14.11",
|
|
54
54
|
"ngx-captcha": "13.0.0",
|