@acorex/core 19.12.0-next.1 → 19.12.0-next.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/date-time/index.d.ts +5 -5
- package/date-time/lib/calendar.service.d.ts +8 -3
- package/date-time/lib/dateTime.config.d.ts +1 -1
- package/date-time/lib/datetime.pipe.d.ts +2 -1
- package/date-time/lib/{datetime.class.d.ts → datetime.types.d.ts} +2 -2
- package/date-time/lib/formatters/date.formatter.d.ts +12 -0
- package/date-time/lib/formatters/{datetime-formatter.d.ts → datetime.formatter.d.ts} +3 -1
- package/date-time/lib/formatters/time.formatter.d.ts +12 -0
- package/date-time/lib/{georgian.calendar.d.ts → gregorian.calendar.d.ts} +2 -2
- package/date-time/lib/{jalali.calendar.d.ts → solar-hijri.calendar.d.ts} +8 -8
- package/events/index.d.ts +0 -1
- package/fesm2022/acorex-core-date-time.mjs +305 -132
- package/fesm2022/acorex-core-date-time.mjs.map +1 -1
- package/fesm2022/acorex-core-events.mjs +1 -7
- package/fesm2022/acorex-core-events.mjs.map +1 -1
- package/fesm2022/acorex-core-format.mjs +47 -33
- package/fesm2022/acorex-core-format.mjs.map +1 -1
- package/fesm2022/acorex-core-locale-en-AU.profile-BW-_9tgT.mjs +64 -0
- package/fesm2022/acorex-core-locale-en-AU.profile-BW-_9tgT.mjs.map +1 -0
- package/fesm2022/acorex-core-locale.mjs +341 -0
- package/fesm2022/acorex-core-locale.mjs.map +1 -0
- package/fesm2022/acorex-core-translation.mjs +12 -4
- package/fesm2022/acorex-core-translation.mjs.map +1 -1
- package/format/index.d.ts +2 -2
- package/format/lib/format.directive.d.ts +1 -1
- package/format/lib/format.module.d.ts +3 -3
- package/locale/README.md +3 -0
- package/locale/index.d.ts +8 -0
- package/locale/lib/formatters/currency.formatter.d.ts +10 -0
- package/locale/lib/locale-profile-provider.service.d.ts +24 -0
- package/locale/lib/locale.config.d.ts +5 -0
- package/locale/lib/locale.module.d.ts +7 -0
- package/locale/lib/locale.service.d.ts +20 -0
- package/locale/lib/locale.types.d.ts +61 -0
- package/locale/lib/profiles/en-AU.profile.d.ts +2 -0
- package/locale/lib/profiles/en-US.profile.d.ts +2 -0
- package/locale/lib/profiles/fa-IR.profile.d.ts +2 -0
- package/package.json +5 -1
- package/translation/lib/translation.service.d.ts +1 -0
- package/types/README.md +2 -2
- package/events/lib/event.type.d.ts +0 -5
- package/i18n/en/common.json +0 -191
- package/i18n/fa/common.json +0 -190
- /package/date-time/lib/formatters/{time-duration-formatter.d.ts → time-duration.formatter.d.ts} +0 -0
- /package/date-time/lib/formatters/{timeleft-formatter.d.ts → timeleft.formatter.d.ts} +0 -0
- /package/format/lib/formatters/{number-formatter.d.ts → number.formatter.d.ts} +0 -0
- /package/format/lib/formatters/{string-formatter.d.ts → string.formatter.d.ts} +0 -0
package/date-time/index.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
export * from './lib/calendar.service';
|
2
2
|
export * from './lib/dateTime.config';
|
3
|
-
export * from './lib/datetime.
|
3
|
+
export * from './lib/datetime.types';
|
4
4
|
export * from './lib/datetime.module';
|
5
5
|
export * from './lib/datetime.pipe';
|
6
|
-
export * from './lib/formatters/datetime
|
7
|
-
export * from './lib/formatters/timeleft
|
8
|
-
export * from './lib/
|
6
|
+
export * from './lib/formatters/datetime.formatter';
|
7
|
+
export * from './lib/formatters/timeleft.formatter';
|
8
|
+
export * from './lib/gregorian.calendar';
|
9
9
|
export * from './lib/holidays.loader';
|
10
|
-
export * from './lib/
|
10
|
+
export * from './lib/solar-hijri.calendar';
|
@@ -1,11 +1,14 @@
|
|
1
1
|
import { Subject } from 'rxjs';
|
2
|
-
import { AXCalendar, AXDateTime, AXDateValue } from './datetime.
|
2
|
+
import { AXCalendar, AXDateTime, AXDateValue, AXValidDateTimeValue } from './datetime.types';
|
3
3
|
import { AXHolidayDate, AXHolidaysLoaderOptions } from './holidays.loader';
|
4
|
+
import { AXDateTimeFormatterOptions } from './formatters/datetime.formatter';
|
4
5
|
import * as i0 from "@angular/core";
|
5
6
|
export declare class AXCalendarService {
|
6
7
|
private config;
|
7
8
|
private _holidaysLoader;
|
8
9
|
private eventService;
|
10
|
+
private formatService;
|
11
|
+
private localeService;
|
9
12
|
get calendar(): AXCalendar;
|
10
13
|
private activeCalendar;
|
11
14
|
calendarChanges$: import("rxjs").Observable<AXCalendar>;
|
@@ -17,13 +20,15 @@ export declare class AXCalendarService {
|
|
17
20
|
get holidays(): AXHolidayDate[];
|
18
21
|
constructor();
|
19
22
|
loadHolidays(options?: AXHolidaysLoaderOptions): Promise<void>;
|
20
|
-
|
23
|
+
isValidDate(value: any): boolean;
|
21
24
|
create(value: AXDateValue, calendarName?: string): AXDateTime;
|
22
25
|
create(value: Date, calendarName?: string): AXDateTime;
|
23
26
|
create(value: string, calendarName?: string): AXDateTime;
|
27
|
+
create(value: AXDateTime): AXDateTime;
|
24
28
|
now(calendarName?: string): AXDateTime;
|
25
29
|
resolveCalendar(name: string): AXCalendar;
|
26
|
-
convert(value:
|
30
|
+
convert(value: AXValidDateTimeValue, calendarName?: string): AXDateTime;
|
31
|
+
format(value: AXValidDateTimeValue, format: string, options?: AXDateTimeFormatterOptions): string;
|
27
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXCalendarService, never>;
|
28
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXCalendarService>;
|
29
34
|
}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
2
|
-
import { AXDateTime } from './datetime.
|
2
|
+
import { AXDateTime } from './datetime.types';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
/**
|
5
5
|
* @deprecated The pipe should not be used, use format instead
|
6
6
|
*/
|
7
7
|
export declare class AXDateTimePipe implements PipeTransform {
|
8
8
|
private _calendarService;
|
9
|
+
private formatService;
|
9
10
|
transform(value: Date | AXDateTime | string, format?: string, calendarName?: string): string;
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDateTimePipe, never>;
|
11
12
|
static ɵpipe: i0.ɵɵPipeDeclaration<AXDateTimePipe, "axDate", true>;
|
@@ -37,12 +37,13 @@ export type AXDateTimeParts = {
|
|
37
37
|
hour: AXDateTimePart;
|
38
38
|
minute: AXDateTimePart;
|
39
39
|
second: AXDateTimePart;
|
40
|
+
AMPM: AXDateTimePart;
|
40
41
|
};
|
41
42
|
export interface AXCalendarConfig {
|
42
43
|
weekdays: number[];
|
43
44
|
weekend: number[];
|
44
|
-
formats: AXDateTimeDisplayFormats;
|
45
45
|
}
|
46
|
+
export type AXValidDateTimeValue = AXDateTime | Date | string | AXDateValue;
|
46
47
|
export declare abstract class AXCalendar {
|
47
48
|
private _config;
|
48
49
|
/**
|
@@ -50,7 +51,6 @@ export declare abstract class AXCalendar {
|
|
50
51
|
*/
|
51
52
|
constructor(config: AXCalendarConfig);
|
52
53
|
get weekend(): number[];
|
53
|
-
get formats(): AXDateTimeDisplayFormats;
|
54
54
|
get weekdays(): number[];
|
55
55
|
abstract name(): string;
|
56
56
|
abstract dayOfMonth(date: Date): number;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { AXFormatter } from "@acorex/core/format";
|
2
|
+
import { AXValidDateTimeValue } from "../datetime.types";
|
3
|
+
import { AXDateTimeFormatterOptions } from "./datetime.formatter";
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class AXDateFormatter implements AXFormatter {
|
6
|
+
private calendarService;
|
7
|
+
private localeService;
|
8
|
+
get name(): string;
|
9
|
+
format(value: AXValidDateTimeValue, options?: AXDateTimeFormatterOptions | string): string;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXDateFormatter, never>;
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXDateFormatter>;
|
12
|
+
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { AXFormatOptions, AXFormatter } from '@acorex/core/format';
|
2
|
+
import { AXValidDateTimeValue } from '../datetime.types';
|
2
3
|
import * as i0 from "@angular/core";
|
3
4
|
export interface AXDateTimeFormatterOptions extends AXFormatOptions {
|
4
5
|
format?: string;
|
@@ -11,9 +12,10 @@ declare module '@acorex/core/format' {
|
|
11
12
|
}
|
12
13
|
}
|
13
14
|
export declare class AXDateTimeFormatter implements AXFormatter {
|
15
|
+
private localeService;
|
14
16
|
private calendarService;
|
15
17
|
get name(): string;
|
16
|
-
format(value:
|
18
|
+
format(value: AXValidDateTimeValue, options?: AXDateTimeFormatterOptions | string): string;
|
17
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXDateTimeFormatter, never>;
|
18
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXDateTimeFormatter>;
|
19
21
|
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { AXFormatter } from '@acorex/core/format';
|
2
|
+
import { AXValidDateTimeValue } from '../datetime.types';
|
3
|
+
import { AXDateTimeFormatterOptions } from './datetime.formatter';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class AXTimeFormatter implements AXFormatter {
|
6
|
+
private calendarService;
|
7
|
+
private localeService;
|
8
|
+
get name(): string;
|
9
|
+
format(value: AXValidDateTimeValue, options?: AXDateTimeFormatterOptions | string): string;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTimeFormatter, never>;
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXTimeFormatter>;
|
12
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.
|
2
|
-
export declare class
|
1
|
+
import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.types';
|
2
|
+
export declare class AXGregorianCalendar extends AXCalendar {
|
3
3
|
/**
|
4
4
|
* @ignore
|
5
5
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.
|
2
|
-
export declare class
|
1
|
+
import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.types';
|
2
|
+
export declare class AXSolarHijriCalendar extends AXCalendar {
|
3
3
|
/**
|
4
4
|
* @ignore
|
5
5
|
*/
|
@@ -18,23 +18,23 @@ export declare class JalaliCalendar extends AXCalendar {
|
|
18
18
|
startOf(date: Date, unit: TimeUnit): AXDateTime;
|
19
19
|
endOf(date: Date, unit: TimeUnit): AXDateTime;
|
20
20
|
parse(value: string): AXDateTime;
|
21
|
-
|
21
|
+
toSolarHijri(date: Date): {
|
22
22
|
year: number;
|
23
23
|
month: number;
|
24
24
|
day: number;
|
25
25
|
};
|
26
26
|
toGregorian(jy: any, jm: any, jd: any): Date;
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
isValidSolarHijriDate(jy: any, jm: any, jd: any): boolean;
|
28
|
+
isLeapSolarHijriYear(jy: any): boolean;
|
29
|
+
SolarHijriMonthLength(jy: any, jm: any): 31 | 30 | 29;
|
30
30
|
private jalCalLeap;
|
31
31
|
private jalCal;
|
32
32
|
private j2d;
|
33
33
|
private d2j;
|
34
34
|
private g2d;
|
35
35
|
private d2g;
|
36
|
-
private
|
37
|
-
private
|
36
|
+
private SolarHijriWeek;
|
37
|
+
private SolarHijriToDateObject;
|
38
38
|
private div;
|
39
39
|
private mod;
|
40
40
|
}
|
package/events/index.d.ts
CHANGED