@acorex/core 5.0.4 → 5.0.8
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/README.md +24 -24
- package/acorex-core.d.ts +5 -5
- package/bundles/acorex-core.umd.js +1238 -818
- package/bundles/acorex-core.umd.js.map +1 -1
- package/config/tailwind.config.js +258 -0
- package/esm2015/acorex-core.js +4 -4
- package/esm2015/lib/config/configs.js +30 -29
- package/esm2015/lib/core.module.js +18 -18
- package/esm2015/lib/dateTime/datetime.class.js +260 -236
- package/esm2015/lib/dateTime/datetime.module.js +31 -18
- package/esm2015/lib/dateTime/datetime.pipe.js +25 -25
- package/esm2015/lib/dateTime/georgian.calendar.js +162 -145
- package/esm2015/lib/dateTime/index.js +5 -5
- package/esm2015/lib/dateTime/jalali.calendar.js +327 -0
- package/esm2015/lib/platform/index.js +1 -1
- package/esm2015/lib/platform/platform.service.js +119 -119
- package/esm2015/lib/translation/index.js +4 -4
- package/esm2015/lib/translation/translation.module.js +18 -18
- package/esm2015/lib/translation/translator.js +26 -26
- package/esm2015/lib/translation/translator.pipe.js +15 -15
- package/esm2015/lib/utils/drawing-util.js +27 -0
- package/esm2015/lib/utils/index.js +4 -3
- package/esm2015/lib/utils/object-util.js +83 -83
- package/esm2015/lib/utils/safe.pipe.js +30 -30
- package/esm2015/public-api.js +11 -11
- package/fesm2015/acorex-core.js +1120 -715
- package/fesm2015/acorex-core.js.map +1 -1
- package/lib/config/configs.d.ts +9 -9
- package/lib/core.module.d.ts +7 -7
- package/lib/dateTime/datetime.class.d.ts +86 -96
- package/lib/dateTime/datetime.module.d.ts +8 -7
- package/lib/dateTime/datetime.pipe.d.ts +8 -8
- package/lib/dateTime/georgian.calendar.d.ts +19 -17
- package/lib/dateTime/index.d.ts +4 -4
- package/lib/dateTime/jalali.calendar.d.ts +34 -0
- package/lib/platform/index.d.ts +1 -1
- package/lib/platform/platform.service.d.ts +22 -22
- package/lib/translation/index.d.ts +3 -3
- package/lib/translation/translation.module.d.ts +7 -7
- package/lib/translation/translator.d.ts +9 -9
- package/lib/translation/translator.pipe.d.ts +7 -7
- package/lib/utils/drawing-util.d.ts +17 -0
- package/lib/utils/index.d.ts +3 -2
- package/lib/utils/object-util.d.ts +7 -7
- package/lib/utils/safe.pipe.d.ts +10 -10
- package/package.json +17 -17
- package/public-api.d.ts +10 -10
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { AXCalendar, AXDateTime, TimeUnit } from "./datetime.class";
|
|
2
|
-
export declare class GeorgianCalendar implements AXCalendar {
|
|
3
|
-
monthNames: string[];
|
|
4
|
-
monthShortNames: string[];
|
|
5
|
-
dayNames: string[];
|
|
6
|
-
dayShortNames: string[];
|
|
7
|
-
name(): string;
|
|
8
|
-
|
|
9
|
-
dayOfYear(date: Date): number;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { AXCalendar, AXDateTime, TimeUnit } from "./datetime.class";
|
|
2
|
+
export declare class GeorgianCalendar implements AXCalendar {
|
|
3
|
+
monthNames: string[];
|
|
4
|
+
monthShortNames: string[];
|
|
5
|
+
dayNames: string[];
|
|
6
|
+
dayShortNames: string[];
|
|
7
|
+
name(): string;
|
|
8
|
+
dayOfMonth(date: Date): number;
|
|
9
|
+
dayOfYear(date: Date): number;
|
|
10
|
+
dayOfWeek(date: Date): number;
|
|
11
|
+
weekOfYear(date: Date): number;
|
|
12
|
+
year(date: Date): number;
|
|
13
|
+
monthOfYear(date: Date): number;
|
|
14
|
+
add(date: Date, unit: TimeUnit, amount: number): AXDateTime;
|
|
15
|
+
set(date: Date, unit: TimeUnit, value: number): AXDateTime;
|
|
16
|
+
startOf(date: Date, unit: TimeUnit): AXDateTime;
|
|
17
|
+
endOf(date: Date, unit: TimeUnit): AXDateTime;
|
|
18
|
+
isLeap(date: Date): boolean;
|
|
19
|
+
}
|
package/lib/dateTime/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './datetime.class';
|
|
2
|
-
export * from './datetime.module';
|
|
3
|
-
export * from './datetime.pipe';
|
|
4
|
-
export * from './georgian.calendar';
|
|
1
|
+
export * from './datetime.class';
|
|
2
|
+
export * from './datetime.module';
|
|
3
|
+
export * from './datetime.pipe';
|
|
4
|
+
export * from './georgian.calendar';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AXCalendar, AXDateTime, TimeUnit } from "./datetime.class";
|
|
2
|
+
export declare class JalaliCalendar implements AXCalendar {
|
|
3
|
+
monthNames: string[];
|
|
4
|
+
monthShortNames: string[];
|
|
5
|
+
dayNames: string[];
|
|
6
|
+
dayShortNames: string[];
|
|
7
|
+
name(): string;
|
|
8
|
+
dayOfMonth(date: Date): number;
|
|
9
|
+
dayOfYear(date: Date): number;
|
|
10
|
+
dayOfWeek(date: Date): number;
|
|
11
|
+
weekOfYear(date: Date): number;
|
|
12
|
+
year(date: Date): number;
|
|
13
|
+
monthOfYear(date: Date): number;
|
|
14
|
+
add(date: Date, unit: TimeUnit, amount: number): AXDateTime;
|
|
15
|
+
set(date: Date, unit: TimeUnit, value: number): AXDateTime;
|
|
16
|
+
startOf(date: Date, unit: TimeUnit): AXDateTime;
|
|
17
|
+
endOf(date: Date, unit: TimeUnit): AXDateTime;
|
|
18
|
+
toJalali(date: Date): {
|
|
19
|
+
year: number;
|
|
20
|
+
month: number;
|
|
21
|
+
day: number;
|
|
22
|
+
};
|
|
23
|
+
toGregorian(jy: any, jm: any, jd: any): Date;
|
|
24
|
+
isValid(jy: any, jm: any, jd: any): boolean;
|
|
25
|
+
isLeapYear(jy: any): boolean;
|
|
26
|
+
monthLength(jy: any, jm: any): 31 | 30 | 29;
|
|
27
|
+
private jalCal;
|
|
28
|
+
private j2d;
|
|
29
|
+
private d2j;
|
|
30
|
+
private g2d;
|
|
31
|
+
private d2g;
|
|
32
|
+
private div;
|
|
33
|
+
private mod;
|
|
34
|
+
}
|
package/lib/platform/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './platform.service';
|
|
1
|
+
export * from './platform.service';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Subject } from "rxjs";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare type AXPlatforms = 'Android' | 'Desktop' | 'iOS' | 'Mobile';
|
|
4
|
-
export declare type AXBrowsers = 'Chrome' | 'Safari' | 'Edge' | 'Firefox' | 'Opera' | 'MSIE';
|
|
5
|
-
export declare type AXTechnologies = 'PWA' | 'Hybrid' | 'Electron';
|
|
6
|
-
export declare const testUserAgent: (win: Window, expr: RegExp) => boolean;
|
|
7
|
-
export declare class AXPlatformEvent {
|
|
8
|
-
nativeEvent: UIEvent | Event;
|
|
9
|
-
source: AXPlatform;
|
|
10
|
-
}
|
|
11
|
-
export declare class AXPlatform {
|
|
12
|
-
resize: Subject<AXPlatformEvent>;
|
|
13
|
-
click: Subject<AXPlatformEvent>;
|
|
14
|
-
scroll: Subject<AXPlatformEvent>;
|
|
15
|
-
isRtl(): boolean;
|
|
16
|
-
isLandscape(): boolean;
|
|
17
|
-
isPortrate(): boolean;
|
|
18
|
-
is(name: AXPlatforms | AXBrowsers | AXTechnologies): boolean;
|
|
19
|
-
constructor();
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPlatform, never>;
|
|
21
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPlatform>;
|
|
22
|
-
}
|
|
1
|
+
import { Subject } from "rxjs";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare type AXPlatforms = 'Android' | 'Desktop' | 'iOS' | 'Mobile';
|
|
4
|
+
export declare type AXBrowsers = 'Chrome' | 'Safari' | 'Edge' | 'Firefox' | 'Opera' | 'MSIE';
|
|
5
|
+
export declare type AXTechnologies = 'PWA' | 'Hybrid' | 'Electron';
|
|
6
|
+
export declare const testUserAgent: (win: Window, expr: RegExp) => boolean;
|
|
7
|
+
export declare class AXPlatformEvent {
|
|
8
|
+
nativeEvent: UIEvent | Event;
|
|
9
|
+
source: AXPlatform;
|
|
10
|
+
}
|
|
11
|
+
export declare class AXPlatform {
|
|
12
|
+
resize: Subject<AXPlatformEvent>;
|
|
13
|
+
click: Subject<AXPlatformEvent>;
|
|
14
|
+
scroll: Subject<AXPlatformEvent>;
|
|
15
|
+
isRtl(): boolean;
|
|
16
|
+
isLandscape(): boolean;
|
|
17
|
+
isPortrate(): boolean;
|
|
18
|
+
is(name: AXPlatforms | AXBrowsers | AXTechnologies): boolean;
|
|
19
|
+
constructor();
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPlatform, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPlatform>;
|
|
22
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './translator';
|
|
2
|
-
export * from './translator.pipe';
|
|
3
|
-
export * from './translation.module';
|
|
1
|
+
export * from './translator';
|
|
2
|
+
export * from './translator.pipe';
|
|
3
|
+
export * from './translation.module';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./translator.pipe";
|
|
3
|
-
export declare class AXTranslationModule {
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslationModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXTranslationModule, [typeof i1.AXTranslatorPipe], never, [typeof i1.AXTranslatorPipe]>;
|
|
6
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<AXTranslationModule>;
|
|
7
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./translator.pipe";
|
|
3
|
+
export declare class AXTranslationModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslationModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXTranslationModule, [typeof i1.AXTranslatorPipe], never, [typeof i1.AXTranslatorPipe]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXTranslationModule>;
|
|
7
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
export declare class AXTranslator {
|
|
3
|
-
private static lang;
|
|
4
|
-
private static dataChangeSubject;
|
|
5
|
-
static get onChange(): Observable<any>;
|
|
6
|
-
static load(lang: string, value: any): void;
|
|
7
|
-
static use(lang: string): void;
|
|
8
|
-
static get(key: string, lang?: string): string;
|
|
9
|
-
}
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export declare class AXTranslator {
|
|
3
|
+
private static lang;
|
|
4
|
+
private static dataChangeSubject;
|
|
5
|
+
static get onChange(): Observable<any>;
|
|
6
|
+
static load(lang: string, value: any): void;
|
|
7
|
+
static use(lang: string): void;
|
|
8
|
+
static get(key: string, lang?: string): string;
|
|
9
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AXTranslatorPipe implements PipeTransform {
|
|
4
|
-
transform(value: string, lang?: string): string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslatorPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<AXTranslatorPipe, "trans">;
|
|
7
|
-
}
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AXTranslatorPipe implements PipeTransform {
|
|
4
|
+
transform(value: string, lang?: string): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslatorPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AXTranslatorPipe, "trans">;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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): boolean;
|
|
17
|
+
}
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './object-util';
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './object-util';
|
|
2
|
+
export * from './drawing-util';
|
|
3
|
+
export * from './safe.pipe';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare class AXObjectUtil {
|
|
2
|
-
static deepJSONClone(obj: any): any;
|
|
3
|
-
static deepCopy(obj: any): any;
|
|
4
|
-
static fetchProp(obj: any, prop: string): any;
|
|
5
|
-
static getPropByPath(obj: any, path: any, defaultVal?: any): any;
|
|
6
|
-
static setPropByPath(obj: any, path: any, value: any): any;
|
|
7
|
-
}
|
|
1
|
+
export declare class AXObjectUtil {
|
|
2
|
+
static deepJSONClone(obj: any): any;
|
|
3
|
+
static deepCopy(obj: any): any;
|
|
4
|
+
static fetchProp(obj: any, prop: string): any;
|
|
5
|
+
static getPropByPath(obj: any, path: any, defaultVal?: any): any;
|
|
6
|
+
static setPropByPath(obj: any, path: any, value: any): any;
|
|
7
|
+
}
|
package/lib/utils/safe.pipe.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AXSafePipe implements PipeTransform {
|
|
5
|
-
protected sanitizer: DomSanitizer;
|
|
6
|
-
constructor(sanitizer: DomSanitizer);
|
|
7
|
-
transform(value: any, type: string): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXSafePipe, never>;
|
|
9
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<AXSafePipe, "safe">;
|
|
10
|
-
}
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AXSafePipe implements PipeTransform {
|
|
5
|
+
protected sanitizer: DomSanitizer;
|
|
6
|
+
constructor(sanitizer: DomSanitizer);
|
|
7
|
+
transform(value: any, type: string): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXSafePipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AXSafePipe, "safe">;
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
"name": "@acorex/core",
|
|
3
|
+
"version": "5.0.8",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^12.2.6",
|
|
6
|
+
"@angular/core": "^12.2.6"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"lodash-es": "^4.17.20",
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"main": "bundles/acorex-core.umd.js",
|
|
13
|
+
"module": "fesm2015/acorex-core.js",
|
|
14
|
+
"es2015": "fesm2015/acorex-core.js",
|
|
15
|
+
"esm2015": "esm2015/acorex-core.js",
|
|
16
|
+
"fesm2015": "fesm2015/acorex-core.js",
|
|
17
|
+
"typings": "acorex-core.d.ts",
|
|
18
|
+
"sideEffects": false
|
|
19
19
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public API refrences of core libraries
|
|
3
|
-
* @module @acorex/core
|
|
4
|
-
*/
|
|
5
|
-
export * from './lib/core.module';
|
|
6
|
-
export * from './lib/dateTime';
|
|
7
|
-
export * from './lib/utils';
|
|
8
|
-
export * from './lib/config/configs';
|
|
9
|
-
export * from './lib/translation';
|
|
10
|
-
export * from './lib/platform';
|
|
1
|
+
/**
|
|
2
|
+
* Public API refrences of core libraries
|
|
3
|
+
* @module @acorex/core
|
|
4
|
+
*/
|
|
5
|
+
export * from './lib/core.module';
|
|
6
|
+
export * from './lib/dateTime';
|
|
7
|
+
export * from './lib/utils';
|
|
8
|
+
export * from './lib/config/configs';
|
|
9
|
+
export * from './lib/translation';
|
|
10
|
+
export * from './lib/platform';
|