@acorex/core 21.0.2-next.9 → 21.0.3-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/fesm2022/acorex-core-components.mjs +3 -3
- package/fesm2022/acorex-core-config.mjs +3 -3
- package/fesm2022/acorex-core-date-time.mjs +112 -92
- package/fesm2022/acorex-core-date-time.mjs.map +1 -1
- package/fesm2022/acorex-core-events.mjs +3 -3
- package/fesm2022/acorex-core-file.mjs +667 -92
- package/fesm2022/acorex-core-file.mjs.map +1 -1
- package/fesm2022/acorex-core-format.mjs +19 -19
- package/fesm2022/acorex-core-full-screen.mjs +4 -4
- package/fesm2022/acorex-core-full-screen.mjs.map +1 -1
- package/fesm2022/acorex-core-icon.mjs +3 -3
- package/fesm2022/acorex-core-image.mjs +3 -3
- package/fesm2022/acorex-core-locale.mjs +173 -142
- package/fesm2022/acorex-core-locale.mjs.map +1 -1
- package/fesm2022/acorex-core-network.mjs +4 -4
- package/fesm2022/acorex-core-network.mjs.map +1 -1
- package/fesm2022/acorex-core-pipes.mjs +3 -3
- package/fesm2022/acorex-core-platform.mjs +5 -5
- package/fesm2022/acorex-core-platform.mjs.map +1 -1
- package/fesm2022/acorex-core-storage.mjs +9 -9
- package/fesm2022/acorex-core-translation.mjs +68 -24
- package/fesm2022/acorex-core-translation.mjs.map +1 -1
- package/fesm2022/acorex-core-utils.mjs +124 -5
- package/fesm2022/acorex-core-utils.mjs.map +1 -1
- package/fesm2022/acorex-core-validation.mjs +40 -40
- package/fesm2022/acorex-core-z-index.mjs +16 -10
- package/fesm2022/acorex-core-z-index.mjs.map +1 -1
- package/package.json +3 -2
- package/types/acorex-core-date-time.d.ts +24 -20
- package/types/acorex-core-file.d.ts +268 -40
- package/types/acorex-core-locale.d.ts +5 -0
- package/types/acorex-core-translation.d.ts +8 -1
- package/types/acorex-core-utils.d.ts +28 -1
- package/types/acorex-core-z-index.d.ts +3 -2
|
@@ -34,10 +34,10 @@ class AXComponentService {
|
|
|
34
34
|
createFromTemplate(content) {
|
|
35
35
|
return this.getRootViewContainerRef().createEmbeddedView(content);
|
|
36
36
|
}
|
|
37
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
38
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
38
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXComponentService, providedIn: 'root' }); }
|
|
39
39
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXComponentService, decorators: [{
|
|
41
41
|
type: Injectable,
|
|
42
42
|
args: [{
|
|
43
43
|
providedIn: 'root',
|
|
@@ -20,10 +20,10 @@ class AXConfigService {
|
|
|
20
20
|
const v2 = this.injector.get(providerToken);
|
|
21
21
|
return get(v2, parts[parts.length - 1], defaultValue);
|
|
22
22
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
24
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
24
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConfigService, providedIn: 'root' }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXConfigService, decorators: [{
|
|
27
27
|
type: Injectable,
|
|
28
28
|
args: [{ providedIn: 'root' }]
|
|
29
29
|
}] });
|
|
@@ -4,11 +4,10 @@ import { AXFormatService, AXFormatModule } from '@acorex/core/format';
|
|
|
4
4
|
import { AXLocaleService } from '@acorex/core/locale';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { InjectionToken, inject, Injectable, Pipe, NgModule } from '@angular/core';
|
|
7
|
-
import {
|
|
8
|
-
import { AX_GLOBAL_CONFIG } from '@acorex/core/config';
|
|
9
|
-
import { defaults, orderBy, set, isNil, isDate } from 'lodash-es';
|
|
7
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
10
8
|
import { isBrowser } from '@acorex/core/platform';
|
|
11
9
|
import { translateSync, AXTranslationService } from '@acorex/core/translation';
|
|
10
|
+
import { defaults, orderBy, isNil, isDate } from 'lodash-es';
|
|
12
11
|
|
|
13
12
|
class AXCalendar {
|
|
14
13
|
/**
|
|
@@ -26,6 +25,18 @@ class AXCalendar {
|
|
|
26
25
|
get weekdays() {
|
|
27
26
|
return this._config.weekdays;
|
|
28
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Updates week layout settings (column order and weekend days).
|
|
30
|
+
*/
|
|
31
|
+
applyWeekConfig(config) {
|
|
32
|
+
this._config = { ...this._config, ...config };
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Returns the 0-based weekday index used for week layout (0 = Sunday … 6 = Saturday).
|
|
36
|
+
*/
|
|
37
|
+
weekdayIndex(date) {
|
|
38
|
+
return this.dayOfWeek(date) - 1;
|
|
39
|
+
}
|
|
29
40
|
}
|
|
30
41
|
class AXDateTime {
|
|
31
42
|
get date() {
|
|
@@ -44,10 +55,10 @@ class AXDateTime {
|
|
|
44
55
|
// 0 1 ... 5 6 day of week ***
|
|
45
56
|
d: () => (this.calendar.dayOfWeek(this.date) - 1).toString(),
|
|
46
57
|
// Su Mo ... Fr Sa ***
|
|
47
|
-
dd: () => translateSync(`@acorex:dateTime.weekdays.short.${this.
|
|
48
|
-
ddd: () => translateSync(`@acorex:dateTime.weekdays.short.${this.
|
|
58
|
+
dd: () => translateSync(`@acorex:dateTime.weekdays.short.${this.weekdayIndex}`),
|
|
59
|
+
ddd: () => translateSync(`@acorex:dateTime.weekdays.short.${this.weekdayIndex}`),
|
|
49
60
|
// Sunday Monday ... Friday Saturday
|
|
50
|
-
dddd: () => translateSync(`@acorex:dateTime.weekdays.long.${this.
|
|
61
|
+
dddd: () => translateSync(`@acorex:dateTime.weekdays.long.${this.weekdayIndex}`),
|
|
51
62
|
// 1 2 ... 30 31
|
|
52
63
|
D: () => this.calendar.dayOfMonth(this.date).toString(),
|
|
53
64
|
// 01 02 ... 30 31 day of month
|
|
@@ -73,9 +84,9 @@ class AXDateTime {
|
|
|
73
84
|
// 01 02 ... 07
|
|
74
85
|
EE: () => this.pad(this.calendar.dayOfWeek(this.date), 2),
|
|
75
86
|
// Sun Mon ... Sat
|
|
76
|
-
EEE: () => translateSync(`@acorex:dateTime.weekdays.short.${this.
|
|
87
|
+
EEE: () => translateSync(`@acorex:dateTime.weekdays.short.${this.weekdayIndex}`),
|
|
77
88
|
// Sunday Monday ... Saturday
|
|
78
|
-
EEEE: () => translateSync(`@acorex:dateTime.weekdays.long.${this.
|
|
89
|
+
EEEE: () => translateSync(`@acorex:dateTime.weekdays.long.${this.weekdayIndex}`),
|
|
79
90
|
// 1 2 ... 2020 ...
|
|
80
91
|
y: () => this.calendar.year(this.date).toString(),
|
|
81
92
|
// 70 71 ... 29 30
|
|
@@ -131,6 +142,9 @@ class AXDateTime {
|
|
|
131
142
|
get dayOfWeek() {
|
|
132
143
|
return this._calendar.dayOfWeek(this.date);
|
|
133
144
|
}
|
|
145
|
+
get weekdayIndex() {
|
|
146
|
+
return this._calendar.weekdayIndex(this.date);
|
|
147
|
+
}
|
|
134
148
|
get hour() {
|
|
135
149
|
return this._date.getHours();
|
|
136
150
|
}
|
|
@@ -619,6 +633,18 @@ class AXGregorianCalendar extends AXCalendar {
|
|
|
619
633
|
}
|
|
620
634
|
}
|
|
621
635
|
|
|
636
|
+
class AXHolidaysLoaderDefault {
|
|
637
|
+
getHolidays(options) {
|
|
638
|
+
return Promise.resolve([]);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
const AX_DATETIME_HOLIDAYS_LOADER = new InjectionToken('AX_DATETIME_HOLIDAYS_LOADER', {
|
|
642
|
+
providedIn: 'root',
|
|
643
|
+
factory: () => {
|
|
644
|
+
return new AXHolidaysLoaderDefault();
|
|
645
|
+
},
|
|
646
|
+
});
|
|
647
|
+
|
|
622
648
|
class AXSolarHijriCalendar extends AXCalendar {
|
|
623
649
|
/**
|
|
624
650
|
* @ignore
|
|
@@ -649,6 +675,10 @@ class AXSolarHijriCalendar extends AXCalendar {
|
|
|
649
675
|
dayOfWeek(date) {
|
|
650
676
|
return date.getDay() == 6 ? 1 : date.getDay() + 2;
|
|
651
677
|
}
|
|
678
|
+
weekdayIndex(date) {
|
|
679
|
+
const dow = this.dayOfWeek(date);
|
|
680
|
+
return dow === 1 ? 6 : dow - 2;
|
|
681
|
+
}
|
|
652
682
|
weekOfYear(date) {
|
|
653
683
|
//TODO : apply jalali
|
|
654
684
|
const firstDay = new AXDateTime(date, this).startOf('year');
|
|
@@ -748,14 +778,20 @@ class AXSolarHijriCalendar extends AXCalendar {
|
|
|
748
778
|
default:
|
|
749
779
|
case 'day': {
|
|
750
780
|
const gDate = this.toGregorian(jDate.year, jDate.month, value);
|
|
781
|
+
clone.setFullYear(gDate.getFullYear());
|
|
782
|
+
clone.setMonth(gDate.getMonth());
|
|
751
783
|
clone.setDate(gDate.getDate());
|
|
752
784
|
break;
|
|
753
785
|
}
|
|
754
786
|
case 'week':
|
|
755
787
|
break;
|
|
756
788
|
case 'month': {
|
|
757
|
-
const
|
|
789
|
+
const lastDay = this.SolarHijriMonthLength(jDate.year, value);
|
|
790
|
+
const day = Math.min(jDate.day, lastDay);
|
|
791
|
+
const gDate2 = this.toGregorian(jDate.year, value, day);
|
|
792
|
+
clone.setFullYear(gDate2.getFullYear());
|
|
758
793
|
clone.setMonth(gDate2.getMonth());
|
|
794
|
+
clone.setDate(gDate2.getDate());
|
|
759
795
|
break;
|
|
760
796
|
}
|
|
761
797
|
case 'year': {
|
|
@@ -782,8 +818,12 @@ class AXSolarHijriCalendar extends AXCalendar {
|
|
|
782
818
|
case 'day':
|
|
783
819
|
clone.setHours(0, 0, 0, 0);
|
|
784
820
|
return new AXDateTime(clone, this);
|
|
785
|
-
case 'week':
|
|
786
|
-
|
|
821
|
+
case 'week': {
|
|
822
|
+
const currentDayOfWeek_0based = this.weekdayIndex(clone);
|
|
823
|
+
const firstDayOfWeek_0based = this.weekdays[0];
|
|
824
|
+
const daysToSubtract = (currentDayOfWeek_0based - firstDayOfWeek_0based + 7) % 7;
|
|
825
|
+
return new AXDateTime(clone, this).add('day', -daysToSubtract).startOf('day');
|
|
826
|
+
}
|
|
787
827
|
case 'month': {
|
|
788
828
|
const jy = this.year(date);
|
|
789
829
|
const jm = this.monthOfYear(date);
|
|
@@ -1058,53 +1098,12 @@ class AXSolarHijriCalendar extends AXCalendar {
|
|
|
1058
1098
|
}
|
|
1059
1099
|
}
|
|
1060
1100
|
|
|
1061
|
-
const AX_DATETIME_CONFIG = new InjectionToken('AX_DATETIME_CONFIG', {
|
|
1062
|
-
providedIn: 'root',
|
|
1063
|
-
factory: () => {
|
|
1064
|
-
const global = inject(AX_GLOBAL_CONFIG);
|
|
1065
|
-
set(global, 'dateTime', AX_DATETIME_CONFIG);
|
|
1066
|
-
return AXDateTimeDefaultConfig;
|
|
1067
|
-
},
|
|
1068
|
-
});
|
|
1069
|
-
const AXDateTimeDefaultConfig = {
|
|
1070
|
-
calendar: 'gregorian',
|
|
1071
|
-
calendars: {
|
|
1072
|
-
gregorian: new AXGregorianCalendar({
|
|
1073
|
-
weekdays: [0, 1, 2, 3, 4, 5, 6],
|
|
1074
|
-
weekend: [5, 6],
|
|
1075
|
-
}),
|
|
1076
|
-
'solar-hijri': new AXSolarHijriCalendar({
|
|
1077
|
-
weekdays: [6, 0, 1, 2, 3, 4, 5],
|
|
1078
|
-
weekend: [6],
|
|
1079
|
-
}),
|
|
1080
|
-
},
|
|
1081
|
-
};
|
|
1082
|
-
function dateTimeConfig(config = {}) {
|
|
1083
|
-
const result = {
|
|
1084
|
-
...AXDateTimeDefaultConfig,
|
|
1085
|
-
...config,
|
|
1086
|
-
};
|
|
1087
|
-
return result;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
class AXHolidaysLoaderDefault {
|
|
1091
|
-
getHolidays(options) {
|
|
1092
|
-
return Promise.resolve([]);
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
const AX_DATETIME_HOLIDAYS_LOADER = new InjectionToken('AX_DATETIME_HOLIDAYS_LOADER', {
|
|
1096
|
-
providedIn: 'root',
|
|
1097
|
-
factory: () => {
|
|
1098
|
-
return new AXHolidaysLoaderDefault();
|
|
1099
|
-
},
|
|
1100
|
-
});
|
|
1101
|
-
|
|
1102
1101
|
class AXCalendarService {
|
|
1103
1102
|
get calendar() {
|
|
1104
1103
|
return this.getActiveCalendar();
|
|
1105
1104
|
}
|
|
1106
1105
|
getDefaultCalendar() {
|
|
1107
|
-
return this.
|
|
1106
|
+
return this.resolveCalendar(this.localeService.activeProfile().calendar.system);
|
|
1108
1107
|
}
|
|
1109
1108
|
getActiveCalendar() {
|
|
1110
1109
|
return this.activeCalendar.getValue();
|
|
@@ -1112,31 +1111,52 @@ class AXCalendarService {
|
|
|
1112
1111
|
setActiveCalendar(name) {
|
|
1113
1112
|
if (name != this.calendar?.name()) {
|
|
1114
1113
|
const calendar = this.resolveCalendar(name);
|
|
1115
|
-
this.
|
|
1116
|
-
this.eventService.emitEvent({
|
|
1117
|
-
type: AXSystemEvents.AXCalendarChanged,
|
|
1118
|
-
payload: this.getActiveCalendar(),
|
|
1119
|
-
});
|
|
1114
|
+
this.notifyCalendarChanged(calendar);
|
|
1120
1115
|
}
|
|
1121
1116
|
}
|
|
1117
|
+
notifyCalendarChanged(calendar) {
|
|
1118
|
+
this.activeCalendar.next(calendar);
|
|
1119
|
+
this.eventService.emitEvent({
|
|
1120
|
+
type: AXSystemEvents.AXCalendarChanged,
|
|
1121
|
+
payload: calendar,
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
buildWeekConfig(profile) {
|
|
1125
|
+
const weekdays = Array.from({ length: 7 }, (_, i) => (profile.calendar.week.startsOn + i) % 7);
|
|
1126
|
+
return {
|
|
1127
|
+
weekdays,
|
|
1128
|
+
weekend: profile.calendar.week.weekends,
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
registerCalendars(profile) {
|
|
1132
|
+
const weekConfig = this.buildWeekConfig(profile);
|
|
1133
|
+
this.calendars.set('gregorian', new AXGregorianCalendar(weekConfig));
|
|
1134
|
+
this.calendars.set('solar-hijri', new AXSolarHijriCalendar(weekConfig));
|
|
1135
|
+
}
|
|
1136
|
+
applyLocaleWeekSettings(locale) {
|
|
1137
|
+
const weekConfig = this.buildWeekConfig(locale);
|
|
1138
|
+
this.calendars.forEach((calendar) => calendar.applyWeekConfig(weekConfig));
|
|
1139
|
+
this.notifyCalendarChanged(this.resolveCalendar(locale.calendar.system));
|
|
1140
|
+
}
|
|
1122
1141
|
get holidays() {
|
|
1123
1142
|
return this._holidays;
|
|
1124
1143
|
}
|
|
1125
1144
|
constructor() {
|
|
1126
|
-
this.config = inject(AX_DATETIME_CONFIG);
|
|
1127
1145
|
this._holidaysLoader = inject(AX_DATETIME_HOLIDAYS_LOADER);
|
|
1128
1146
|
this.eventService = inject(AXEventService);
|
|
1129
1147
|
this.formatService = inject(AXFormatService);
|
|
1130
1148
|
this.localeService = inject(AXLocaleService);
|
|
1131
|
-
this.
|
|
1132
|
-
this.calendarChanges$ = this.activeCalendar.asObservable();
|
|
1149
|
+
this.calendars = new Map();
|
|
1133
1150
|
this.onHolidaysChanged = new Subject();
|
|
1134
1151
|
this._holidays = [];
|
|
1152
|
+
const profile = this.localeService.activeProfile();
|
|
1153
|
+
this.registerCalendars(profile);
|
|
1154
|
+
this.activeCalendar = new BehaviorSubject(this.resolveCalendar(profile.calendar.system));
|
|
1155
|
+
this.calendarChanges$ = this.activeCalendar.asObservable();
|
|
1135
1156
|
this.loadHolidays();
|
|
1136
|
-
//
|
|
1137
1157
|
this.localeService.profileChanged$.subscribe((locale) => {
|
|
1138
1158
|
if (locale?.calendar?.system) {
|
|
1139
|
-
this.
|
|
1159
|
+
this.applyLocaleWeekSettings(locale);
|
|
1140
1160
|
}
|
|
1141
1161
|
});
|
|
1142
1162
|
}
|
|
@@ -1208,11 +1228,11 @@ class AXCalendarService {
|
|
|
1208
1228
|
return new AXDateTime(new Date(), calendar);
|
|
1209
1229
|
}
|
|
1210
1230
|
resolveCalendar(name) {
|
|
1211
|
-
const
|
|
1212
|
-
if (!
|
|
1231
|
+
const calendar = this.calendars.get(name);
|
|
1232
|
+
if (!calendar) {
|
|
1213
1233
|
return this.calendar;
|
|
1214
1234
|
}
|
|
1215
|
-
return
|
|
1235
|
+
return calendar;
|
|
1216
1236
|
}
|
|
1217
1237
|
convert(value, calendarName) {
|
|
1218
1238
|
const isISOString = (str) => {
|
|
@@ -1239,10 +1259,10 @@ class AXCalendarService {
|
|
|
1239
1259
|
calendar: calendar.name(),
|
|
1240
1260
|
});
|
|
1241
1261
|
}
|
|
1242
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1243
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1262
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1263
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCalendarService, providedIn: 'root' }); }
|
|
1244
1264
|
}
|
|
1245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCalendarService, decorators: [{
|
|
1246
1266
|
type: Injectable,
|
|
1247
1267
|
args: [{ providedIn: 'root' }]
|
|
1248
1268
|
}], ctorParameters: () => [] });
|
|
@@ -1266,10 +1286,10 @@ class AXDateTimePipe {
|
|
|
1266
1286
|
const val = this._calendarService.convert(value, calendar.name());
|
|
1267
1287
|
return this.formatService.format(val, 'datetime', format);
|
|
1268
1288
|
}
|
|
1269
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1270
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
1289
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1290
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimePipe, isStandalone: true, name: "axDate" }); }
|
|
1271
1291
|
}
|
|
1272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimePipe, decorators: [{
|
|
1273
1293
|
type: Pipe,
|
|
1274
1294
|
args: [{ name: 'axDate' }]
|
|
1275
1295
|
}] });
|
|
@@ -1314,10 +1334,10 @@ class AXDateFormatter {
|
|
|
1314
1334
|
.convert(value, effectiveOptions.calendar)
|
|
1315
1335
|
.format(format, { locale: effectiveOptions.locale });
|
|
1316
1336
|
}
|
|
1317
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1318
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1337
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1338
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateFormatter }); }
|
|
1319
1339
|
}
|
|
1320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateFormatter, decorators: [{
|
|
1321
1341
|
type: Injectable
|
|
1322
1342
|
}] });
|
|
1323
1343
|
|
|
@@ -1371,10 +1391,10 @@ class AXDateTimeFormatter {
|
|
|
1371
1391
|
.convert(value, effectiveOptions.calendar)
|
|
1372
1392
|
.format(format, { locale: effectiveOptions.locale });
|
|
1373
1393
|
}
|
|
1374
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1375
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1394
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1395
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeFormatter }); }
|
|
1376
1396
|
}
|
|
1377
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeFormatter, decorators: [{
|
|
1378
1398
|
type: Injectable
|
|
1379
1399
|
}] });
|
|
1380
1400
|
|
|
@@ -1497,10 +1517,10 @@ class AXTimeDurationFormatter {
|
|
|
1497
1517
|
return result.join(separator);
|
|
1498
1518
|
}
|
|
1499
1519
|
}
|
|
1500
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1501
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1520
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeDurationFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1521
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeDurationFormatter }); }
|
|
1502
1522
|
}
|
|
1503
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1523
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeDurationFormatter, decorators: [{
|
|
1504
1524
|
type: Injectable
|
|
1505
1525
|
}] });
|
|
1506
1526
|
|
|
@@ -1544,10 +1564,10 @@ class AXTimeFormatter {
|
|
|
1544
1564
|
.convert(value, effectiveOptions.calendar)
|
|
1545
1565
|
.format(format, { locale: effectiveOptions.locale });
|
|
1546
1566
|
}
|
|
1547
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1548
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1567
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1568
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeFormatter }); }
|
|
1549
1569
|
}
|
|
1550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeFormatter, decorators: [{
|
|
1551
1571
|
type: Injectable
|
|
1552
1572
|
}] });
|
|
1553
1573
|
|
|
@@ -1669,21 +1689,21 @@ class AXTimeLeftFormatter {
|
|
|
1669
1689
|
return 'Invalid format';
|
|
1670
1690
|
}
|
|
1671
1691
|
}
|
|
1672
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1673
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1692
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeLeftFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1693
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeLeftFormatter }); }
|
|
1674
1694
|
}
|
|
1675
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeLeftFormatter, decorators: [{
|
|
1676
1696
|
type: Injectable
|
|
1677
1697
|
}] });
|
|
1678
1698
|
|
|
1679
1699
|
class AXDateTimeModule {
|
|
1680
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1681
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
1682
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
1700
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1701
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeModule, imports: [i1.AXFormatModule, AXDateTimePipe], exports: [AXDateTimePipe] }); }
|
|
1702
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeModule, imports: [AXFormatModule.forChild({
|
|
1683
1703
|
formatters: [AXDateTimeFormatter, AXDateFormatter, AXTimeFormatter, AXTimeLeftFormatter, AXTimeDurationFormatter],
|
|
1684
1704
|
})] }); }
|
|
1685
1705
|
}
|
|
1686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeModule, decorators: [{
|
|
1687
1707
|
type: NgModule,
|
|
1688
1708
|
args: [{
|
|
1689
1709
|
imports: [
|
|
@@ -1700,5 +1720,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
1700
1720
|
* Generated bundle index. Do not edit.
|
|
1701
1721
|
*/
|
|
1702
1722
|
|
|
1703
|
-
export { AXCalendar, AXCalendarMonth, AXCalendarService, AXDateTime,
|
|
1723
|
+
export { AXCalendar, AXCalendarMonth, AXCalendarService, AXDateTime, AXDateTimeFormatter, AXDateTimeModule, AXDateTimePipe, AXDateTimeRange, AXGregorianCalendar, AXHolidaysLoaderDefault, AXSolarHijriCalendar, AXTimeDurationFormatter, AXTimeLeftFormatter, AX_DATETIME_HOLIDAYS_LOADER };
|
|
1704
1724
|
//# sourceMappingURL=acorex-core-date-time.mjs.map
|