@acorex/core 22.1.0-next.31 → 22.1.0-next.33
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/constants/README.md +7 -1
- package/fesm2022/acorex-core-components.mjs +3 -3
- package/fesm2022/acorex-core-config.mjs +3 -3
- package/fesm2022/acorex-core-constants.mjs +27809 -1
- package/fesm2022/acorex-core-constants.mjs.map +1 -1
- package/fesm2022/acorex-core-date-time.mjs +55 -41
- package/fesm2022/acorex-core-date-time.mjs.map +1 -1
- package/fesm2022/acorex-core-events.mjs +3 -3
- package/fesm2022/acorex-core-file.mjs +53 -46
- package/fesm2022/acorex-core-file.mjs.map +1 -1
- package/fesm2022/acorex-core-format.mjs +19 -19
- package/fesm2022/acorex-core-full-screen.mjs +232 -59
- 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 +13 -10
- package/fesm2022/acorex-core-locale.mjs.map +1 -1
- package/fesm2022/acorex-core-network.mjs +3 -3
- package/fesm2022/acorex-core-pipes.mjs +3 -3
- package/fesm2022/acorex-core-platform.mjs +4 -3
- package/fesm2022/acorex-core-platform.mjs.map +1 -1
- package/fesm2022/acorex-core-storage.mjs +9 -9
- package/fesm2022/acorex-core-theme-builder.mjs +1329 -0
- package/fesm2022/acorex-core-theme-builder.mjs.map +1 -0
- package/fesm2022/acorex-core-translation.mjs +36 -24
- package/fesm2022/acorex-core-translation.mjs.map +1 -1
- package/fesm2022/acorex-core-utils.mjs +256 -80
- 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/i18n/en-AU/acorex.json +1101 -0
- package/i18n/en-AU/common.json +290 -0
- package/i18n/en-US/acorex.json +1101 -0
- package/i18n/en-US/common.json +285 -0
- package/i18n/fa-IR/acorex.json +1101 -0
- package/i18n/fa-IR/common.json +284 -0
- package/package.json +8 -2
- package/theme-builder/README.md +53 -0
- package/types/acorex-core-components.d.ts +1 -1
- package/types/acorex-core-config.d.ts +1 -1
- package/types/acorex-core-constants.d.ts +58 -2
- package/types/acorex-core-date-time.d.ts +9 -4
- package/types/acorex-core-events.d.ts +1 -1
- package/types/acorex-core-file.d.ts +12 -11
- package/types/acorex-core-format.d.ts +3 -3
- package/types/acorex-core-full-screen.d.ts +67 -18
- package/types/acorex-core-icon.d.ts +1 -1
- package/types/acorex-core-image.d.ts +1 -1
- package/types/acorex-core-locale.d.ts +4 -2
- package/types/acorex-core-network.d.ts +1 -1
- package/types/acorex-core-platform.d.ts +1 -1
- package/types/acorex-core-storage.d.ts +3 -3
- package/types/acorex-core-theme-builder.d.ts +42 -0
- package/types/acorex-core-translation.d.ts +12 -6
- package/types/acorex-core-utils.d.ts +54 -16
- package/types/acorex-core-validation.d.ts +12 -12
- package/types/acorex-core-z-index.d.ts +1 -1
|
@@ -76,9 +76,9 @@ class AXDateTime {
|
|
|
76
76
|
// 01 02 ... 11 12
|
|
77
77
|
MM: () => this.pad(this.calendar.monthOfYear(this.date), 2),
|
|
78
78
|
// Jan Feb ... Nov Dec
|
|
79
|
-
MMM: () => translateSync(
|
|
79
|
+
MMM: () => translateSync(`dateTime.months.${this.calendar.name()}.short.${this.calendar.monthOfYear(this.date) - 1}`),
|
|
80
80
|
// January February ... November December
|
|
81
|
-
MMMM: () => translateSync(
|
|
81
|
+
MMMM: () => translateSync(`dateTime.months.${this.calendar.name()}.long.${this.calendar.monthOfYear(this.date) - 1}`),
|
|
82
82
|
// 1 2 ... 7
|
|
83
83
|
E: () => this.calendar.dayOfWeek(this.date).toString(),
|
|
84
84
|
// 01 02 ... 07
|
|
@@ -554,12 +554,24 @@ class AXGregorianCalendar extends AXCalendar {
|
|
|
554
554
|
break;
|
|
555
555
|
case 'week':
|
|
556
556
|
break;
|
|
557
|
-
case 'month':
|
|
558
|
-
|
|
557
|
+
case 'month': {
|
|
558
|
+
const newMonth = Math.max(0, value - 1);
|
|
559
|
+
const lastDayOfMonth = new Date(clone.getFullYear(), newMonth + 1, 0).getDate();
|
|
560
|
+
const day = Math.min(clone.getDate(), lastDayOfMonth);
|
|
561
|
+
// Set to the 1st first so native Date does not overflow (e.g. Jan 31 → Feb).
|
|
562
|
+
clone.setDate(1);
|
|
563
|
+
clone.setMonth(newMonth);
|
|
564
|
+
clone.setDate(day);
|
|
559
565
|
break;
|
|
560
|
-
|
|
566
|
+
}
|
|
567
|
+
case 'year': {
|
|
568
|
+
const isFeb29 = clone.getMonth() === 1 && clone.getDate() === 29;
|
|
561
569
|
clone.setFullYear(value);
|
|
570
|
+
if (isFeb29 && clone.getMonth() !== 1) {
|
|
571
|
+
clone.setMonth(1, 28);
|
|
572
|
+
}
|
|
562
573
|
break;
|
|
574
|
+
}
|
|
563
575
|
}
|
|
564
576
|
return new AXDateTime(clone, this);
|
|
565
577
|
}
|
|
@@ -778,10 +790,7 @@ class AXSolarHijriCalendar extends AXCalendar {
|
|
|
778
790
|
default:
|
|
779
791
|
case 'day': {
|
|
780
792
|
const gDate = this.toGregorian(jDate.year, jDate.month, value);
|
|
781
|
-
|
|
782
|
-
clone.setMonth(gDate.getMonth());
|
|
783
|
-
clone.setDate(gDate.getDate());
|
|
784
|
-
break;
|
|
793
|
+
return this.withCivilDate(clone, gDate);
|
|
785
794
|
}
|
|
786
795
|
case 'week':
|
|
787
796
|
break;
|
|
@@ -789,19 +798,24 @@ class AXSolarHijriCalendar extends AXCalendar {
|
|
|
789
798
|
const lastDay = this.SolarHijriMonthLength(jDate.year, value);
|
|
790
799
|
const day = Math.min(jDate.day, lastDay);
|
|
791
800
|
const gDate2 = this.toGregorian(jDate.year, value, day);
|
|
792
|
-
|
|
793
|
-
clone.setMonth(gDate2.getMonth());
|
|
794
|
-
clone.setDate(gDate2.getDate());
|
|
795
|
-
break;
|
|
801
|
+
return this.withCivilDate(clone, gDate2);
|
|
796
802
|
}
|
|
797
803
|
case 'year': {
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
|
|
804
|
+
const lastDay = this.SolarHijriMonthLength(value, jDate.month);
|
|
805
|
+
const day = Math.min(jDate.day, lastDay);
|
|
806
|
+
const gDate3 = this.toGregorian(value, jDate.month, day);
|
|
807
|
+
return this.withCivilDate(clone, gDate3);
|
|
801
808
|
}
|
|
802
809
|
}
|
|
803
810
|
return new AXDateTime(clone, this);
|
|
804
811
|
}
|
|
812
|
+
/**
|
|
813
|
+
* Builds a Date from converted civil Y/M/D while keeping the original time.
|
|
814
|
+
* Assigning year/month/day on an existing Date sequentially overflows (e.g. Aug 31 → Feb).
|
|
815
|
+
*/
|
|
816
|
+
withCivilDate(source, civil) {
|
|
817
|
+
return new AXDateTime(new Date(civil.getFullYear(), civil.getMonth(), civil.getDate(), source.getHours(), source.getMinutes(), source.getSeconds(), source.getMilliseconds()), this);
|
|
818
|
+
}
|
|
805
819
|
startOf(date, unit) {
|
|
806
820
|
const clone = new Date(date.valueOf());
|
|
807
821
|
switch (unit) {
|
|
@@ -1259,10 +1273,10 @@ class AXCalendarService {
|
|
|
1259
1273
|
calendar: calendar.name(),
|
|
1260
1274
|
});
|
|
1261
1275
|
}
|
|
1262
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1263
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.
|
|
1276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1277
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCalendarService, providedIn: 'root' }); }
|
|
1264
1278
|
}
|
|
1265
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1279
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXCalendarService, decorators: [{
|
|
1266
1280
|
type: Injectable,
|
|
1267
1281
|
args: [{ providedIn: 'root' }]
|
|
1268
1282
|
}], ctorParameters: () => [] });
|
|
@@ -1286,10 +1300,10 @@ class AXDateTimePipe {
|
|
|
1286
1300
|
const val = this._calendarService.convert(value, calendar.name());
|
|
1287
1301
|
return this.formatService.format(val, 'datetime', format);
|
|
1288
1302
|
}
|
|
1289
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1290
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
1303
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1304
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimePipe, isStandalone: true, name: "axDate" }); }
|
|
1291
1305
|
}
|
|
1292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimePipe, decorators: [{
|
|
1293
1307
|
type: Pipe,
|
|
1294
1308
|
args: [{ name: 'axDate' }]
|
|
1295
1309
|
}] });
|
|
@@ -1334,10 +1348,10 @@ class AXDateFormatter {
|
|
|
1334
1348
|
.convert(value, effectiveOptions.calendar)
|
|
1335
1349
|
.format(format, { locale: effectiveOptions.locale });
|
|
1336
1350
|
}
|
|
1337
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1338
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.
|
|
1351
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1352
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateFormatter }); }
|
|
1339
1353
|
}
|
|
1340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateFormatter, decorators: [{
|
|
1341
1355
|
type: Injectable
|
|
1342
1356
|
}] });
|
|
1343
1357
|
|
|
@@ -1391,10 +1405,10 @@ class AXDateTimeFormatter {
|
|
|
1391
1405
|
.convert(value, effectiveOptions.calendar)
|
|
1392
1406
|
.format(format, { locale: effectiveOptions.locale });
|
|
1393
1407
|
}
|
|
1394
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1395
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.
|
|
1408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimeFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1409
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimeFormatter }); }
|
|
1396
1410
|
}
|
|
1397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimeFormatter, decorators: [{
|
|
1398
1412
|
type: Injectable
|
|
1399
1413
|
}] });
|
|
1400
1414
|
|
|
@@ -1517,10 +1531,10 @@ class AXTimeDurationFormatter {
|
|
|
1517
1531
|
return result.join(separator);
|
|
1518
1532
|
}
|
|
1519
1533
|
}
|
|
1520
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1521
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.
|
|
1534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTimeDurationFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1535
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTimeDurationFormatter }); }
|
|
1522
1536
|
}
|
|
1523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTimeDurationFormatter, decorators: [{
|
|
1524
1538
|
type: Injectable
|
|
1525
1539
|
}] });
|
|
1526
1540
|
|
|
@@ -1564,10 +1578,10 @@ class AXTimeFormatter {
|
|
|
1564
1578
|
.convert(value, effectiveOptions.calendar)
|
|
1565
1579
|
.format(format, { locale: effectiveOptions.locale });
|
|
1566
1580
|
}
|
|
1567
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1568
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.
|
|
1581
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTimeFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1582
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTimeFormatter }); }
|
|
1569
1583
|
}
|
|
1570
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTimeFormatter, decorators: [{
|
|
1571
1585
|
type: Injectable
|
|
1572
1586
|
}] });
|
|
1573
1587
|
|
|
@@ -1689,21 +1703,21 @@ class AXTimeLeftFormatter {
|
|
|
1689
1703
|
return 'Invalid format';
|
|
1690
1704
|
}
|
|
1691
1705
|
}
|
|
1692
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1693
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.
|
|
1706
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTimeLeftFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1707
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTimeLeftFormatter }); }
|
|
1694
1708
|
}
|
|
1695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXTimeLeftFormatter, decorators: [{
|
|
1696
1710
|
type: Injectable
|
|
1697
1711
|
}] });
|
|
1698
1712
|
|
|
1699
1713
|
class AXDateTimeModule {
|
|
1700
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1701
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.
|
|
1702
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.
|
|
1714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1715
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimeModule, imports: [i1.AXFormatModule, AXDateTimePipe], exports: [AXDateTimePipe] }); }
|
|
1716
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimeModule, imports: [AXFormatModule.forChild({
|
|
1703
1717
|
formatters: [AXDateTimeFormatter, AXDateFormatter, AXTimeFormatter, AXTimeLeftFormatter, AXTimeDurationFormatter],
|
|
1704
1718
|
})] }); }
|
|
1705
1719
|
}
|
|
1706
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDateTimeModule, decorators: [{
|
|
1707
1721
|
type: NgModule,
|
|
1708
1722
|
args: [{
|
|
1709
1723
|
imports: [
|