@acorex/core 21.0.2-next.4 → 21.0.2-next.41
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 +105 -91
- 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 +30 -13
- 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 +4 -4
- 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 +3 -78
- package/fesm2022/acorex-core-utils.mjs.map +1 -1
- package/fesm2022/acorex-core-validation.mjs +40 -40
- package/fesm2022/acorex-core-z-index.mjs +3 -3
- 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 +0 -22
|
@@ -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');
|
|
@@ -782,8 +812,12 @@ class AXSolarHijriCalendar extends AXCalendar {
|
|
|
782
812
|
case 'day':
|
|
783
813
|
clone.setHours(0, 0, 0, 0);
|
|
784
814
|
return new AXDateTime(clone, this);
|
|
785
|
-
case 'week':
|
|
786
|
-
|
|
815
|
+
case 'week': {
|
|
816
|
+
const currentDayOfWeek_0based = this.weekdayIndex(clone);
|
|
817
|
+
const firstDayOfWeek_0based = this.weekdays[0];
|
|
818
|
+
const daysToSubtract = (currentDayOfWeek_0based - firstDayOfWeek_0based + 7) % 7;
|
|
819
|
+
return new AXDateTime(clone, this).add('day', -daysToSubtract).startOf('day');
|
|
820
|
+
}
|
|
787
821
|
case 'month': {
|
|
788
822
|
const jy = this.year(date);
|
|
789
823
|
const jm = this.monthOfYear(date);
|
|
@@ -1058,53 +1092,12 @@ class AXSolarHijriCalendar extends AXCalendar {
|
|
|
1058
1092
|
}
|
|
1059
1093
|
}
|
|
1060
1094
|
|
|
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
1095
|
class AXCalendarService {
|
|
1103
1096
|
get calendar() {
|
|
1104
1097
|
return this.getActiveCalendar();
|
|
1105
1098
|
}
|
|
1106
1099
|
getDefaultCalendar() {
|
|
1107
|
-
return this.
|
|
1100
|
+
return this.resolveCalendar(this.localeService.activeProfile().calendar.system);
|
|
1108
1101
|
}
|
|
1109
1102
|
getActiveCalendar() {
|
|
1110
1103
|
return this.activeCalendar.getValue();
|
|
@@ -1112,31 +1105,52 @@ class AXCalendarService {
|
|
|
1112
1105
|
setActiveCalendar(name) {
|
|
1113
1106
|
if (name != this.calendar?.name()) {
|
|
1114
1107
|
const calendar = this.resolveCalendar(name);
|
|
1115
|
-
this.
|
|
1116
|
-
this.eventService.emitEvent({
|
|
1117
|
-
type: AXSystemEvents.AXCalendarChanged,
|
|
1118
|
-
payload: this.getActiveCalendar(),
|
|
1119
|
-
});
|
|
1108
|
+
this.notifyCalendarChanged(calendar);
|
|
1120
1109
|
}
|
|
1121
1110
|
}
|
|
1111
|
+
notifyCalendarChanged(calendar) {
|
|
1112
|
+
this.activeCalendar.next(calendar);
|
|
1113
|
+
this.eventService.emitEvent({
|
|
1114
|
+
type: AXSystemEvents.AXCalendarChanged,
|
|
1115
|
+
payload: calendar,
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
buildWeekConfig(profile) {
|
|
1119
|
+
const weekdays = Array.from({ length: 7 }, (_, i) => (profile.calendar.week.startsOn + i) % 7);
|
|
1120
|
+
return {
|
|
1121
|
+
weekdays,
|
|
1122
|
+
weekend: profile.calendar.week.weekends,
|
|
1123
|
+
};
|
|
1124
|
+
}
|
|
1125
|
+
registerCalendars(profile) {
|
|
1126
|
+
const weekConfig = this.buildWeekConfig(profile);
|
|
1127
|
+
this.calendars.set('gregorian', new AXGregorianCalendar(weekConfig));
|
|
1128
|
+
this.calendars.set('solar-hijri', new AXSolarHijriCalendar(weekConfig));
|
|
1129
|
+
}
|
|
1130
|
+
applyLocaleWeekSettings(locale) {
|
|
1131
|
+
const weekConfig = this.buildWeekConfig(locale);
|
|
1132
|
+
this.calendars.forEach((calendar) => calendar.applyWeekConfig(weekConfig));
|
|
1133
|
+
this.notifyCalendarChanged(this.resolveCalendar(locale.calendar.system));
|
|
1134
|
+
}
|
|
1122
1135
|
get holidays() {
|
|
1123
1136
|
return this._holidays;
|
|
1124
1137
|
}
|
|
1125
1138
|
constructor() {
|
|
1126
|
-
this.config = inject(AX_DATETIME_CONFIG);
|
|
1127
1139
|
this._holidaysLoader = inject(AX_DATETIME_HOLIDAYS_LOADER);
|
|
1128
1140
|
this.eventService = inject(AXEventService);
|
|
1129
1141
|
this.formatService = inject(AXFormatService);
|
|
1130
1142
|
this.localeService = inject(AXLocaleService);
|
|
1131
|
-
this.
|
|
1132
|
-
this.calendarChanges$ = this.activeCalendar.asObservable();
|
|
1143
|
+
this.calendars = new Map();
|
|
1133
1144
|
this.onHolidaysChanged = new Subject();
|
|
1134
1145
|
this._holidays = [];
|
|
1146
|
+
const profile = this.localeService.activeProfile();
|
|
1147
|
+
this.registerCalendars(profile);
|
|
1148
|
+
this.activeCalendar = new BehaviorSubject(this.resolveCalendar(profile.calendar.system));
|
|
1149
|
+
this.calendarChanges$ = this.activeCalendar.asObservable();
|
|
1135
1150
|
this.loadHolidays();
|
|
1136
|
-
//
|
|
1137
1151
|
this.localeService.profileChanged$.subscribe((locale) => {
|
|
1138
1152
|
if (locale?.calendar?.system) {
|
|
1139
|
-
this.
|
|
1153
|
+
this.applyLocaleWeekSettings(locale);
|
|
1140
1154
|
}
|
|
1141
1155
|
});
|
|
1142
1156
|
}
|
|
@@ -1208,11 +1222,11 @@ class AXCalendarService {
|
|
|
1208
1222
|
return new AXDateTime(new Date(), calendar);
|
|
1209
1223
|
}
|
|
1210
1224
|
resolveCalendar(name) {
|
|
1211
|
-
const
|
|
1212
|
-
if (!
|
|
1225
|
+
const calendar = this.calendars.get(name);
|
|
1226
|
+
if (!calendar) {
|
|
1213
1227
|
return this.calendar;
|
|
1214
1228
|
}
|
|
1215
|
-
return
|
|
1229
|
+
return calendar;
|
|
1216
1230
|
}
|
|
1217
1231
|
convert(value, calendarName) {
|
|
1218
1232
|
const isISOString = (str) => {
|
|
@@ -1239,10 +1253,10 @@ class AXCalendarService {
|
|
|
1239
1253
|
calendar: calendar.name(),
|
|
1240
1254
|
});
|
|
1241
1255
|
}
|
|
1242
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1243
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1256
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1257
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCalendarService, providedIn: 'root' }); }
|
|
1244
1258
|
}
|
|
1245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXCalendarService, decorators: [{
|
|
1246
1260
|
type: Injectable,
|
|
1247
1261
|
args: [{ providedIn: 'root' }]
|
|
1248
1262
|
}], ctorParameters: () => [] });
|
|
@@ -1266,10 +1280,10 @@ class AXDateTimePipe {
|
|
|
1266
1280
|
const val = this._calendarService.convert(value, calendar.name());
|
|
1267
1281
|
return this.formatService.format(val, 'datetime', format);
|
|
1268
1282
|
}
|
|
1269
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1270
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
1283
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1284
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimePipe, isStandalone: true, name: "axDate" }); }
|
|
1271
1285
|
}
|
|
1272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimePipe, decorators: [{
|
|
1273
1287
|
type: Pipe,
|
|
1274
1288
|
args: [{ name: 'axDate' }]
|
|
1275
1289
|
}] });
|
|
@@ -1314,10 +1328,10 @@ class AXDateFormatter {
|
|
|
1314
1328
|
.convert(value, effectiveOptions.calendar)
|
|
1315
1329
|
.format(format, { locale: effectiveOptions.locale });
|
|
1316
1330
|
}
|
|
1317
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1318
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1331
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1332
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateFormatter }); }
|
|
1319
1333
|
}
|
|
1320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1334
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateFormatter, decorators: [{
|
|
1321
1335
|
type: Injectable
|
|
1322
1336
|
}] });
|
|
1323
1337
|
|
|
@@ -1371,10 +1385,10 @@ class AXDateTimeFormatter {
|
|
|
1371
1385
|
.convert(value, effectiveOptions.calendar)
|
|
1372
1386
|
.format(format, { locale: effectiveOptions.locale });
|
|
1373
1387
|
}
|
|
1374
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1375
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1388
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1389
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeFormatter }); }
|
|
1376
1390
|
}
|
|
1377
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeFormatter, decorators: [{
|
|
1378
1392
|
type: Injectable
|
|
1379
1393
|
}] });
|
|
1380
1394
|
|
|
@@ -1497,10 +1511,10 @@ class AXTimeDurationFormatter {
|
|
|
1497
1511
|
return result.join(separator);
|
|
1498
1512
|
}
|
|
1499
1513
|
}
|
|
1500
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1501
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1514
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeDurationFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1515
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeDurationFormatter }); }
|
|
1502
1516
|
}
|
|
1503
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeDurationFormatter, decorators: [{
|
|
1504
1518
|
type: Injectable
|
|
1505
1519
|
}] });
|
|
1506
1520
|
|
|
@@ -1544,10 +1558,10 @@ class AXTimeFormatter {
|
|
|
1544
1558
|
.convert(value, effectiveOptions.calendar)
|
|
1545
1559
|
.format(format, { locale: effectiveOptions.locale });
|
|
1546
1560
|
}
|
|
1547
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1548
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1561
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1562
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeFormatter }); }
|
|
1549
1563
|
}
|
|
1550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeFormatter, decorators: [{
|
|
1551
1565
|
type: Injectable
|
|
1552
1566
|
}] });
|
|
1553
1567
|
|
|
@@ -1669,21 +1683,21 @@ class AXTimeLeftFormatter {
|
|
|
1669
1683
|
return 'Invalid format';
|
|
1670
1684
|
}
|
|
1671
1685
|
}
|
|
1672
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1673
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
1686
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeLeftFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1687
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeLeftFormatter }); }
|
|
1674
1688
|
}
|
|
1675
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXTimeLeftFormatter, decorators: [{
|
|
1676
1690
|
type: Injectable
|
|
1677
1691
|
}] });
|
|
1678
1692
|
|
|
1679
1693
|
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.
|
|
1694
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1695
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeModule, imports: [i1.AXFormatModule, AXDateTimePipe], exports: [AXDateTimePipe] }); }
|
|
1696
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeModule, imports: [AXFormatModule.forChild({
|
|
1683
1697
|
formatters: [AXDateTimeFormatter, AXDateFormatter, AXTimeFormatter, AXTimeLeftFormatter, AXTimeDurationFormatter],
|
|
1684
1698
|
})] }); }
|
|
1685
1699
|
}
|
|
1686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDateTimeModule, decorators: [{
|
|
1687
1701
|
type: NgModule,
|
|
1688
1702
|
args: [{
|
|
1689
1703
|
imports: [
|
|
@@ -1700,5 +1714,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
1700
1714
|
* Generated bundle index. Do not edit.
|
|
1701
1715
|
*/
|
|
1702
1716
|
|
|
1703
|
-
export { AXCalendar, AXCalendarMonth, AXCalendarService, AXDateTime,
|
|
1717
|
+
export { AXCalendar, AXCalendarMonth, AXCalendarService, AXDateTime, AXDateTimeFormatter, AXDateTimeModule, AXDateTimePipe, AXDateTimeRange, AXGregorianCalendar, AXHolidaysLoaderDefault, AXSolarHijriCalendar, AXTimeDurationFormatter, AXTimeLeftFormatter, AX_DATETIME_HOLIDAYS_LOADER };
|
|
1704
1718
|
//# sourceMappingURL=acorex-core-date-time.mjs.map
|