@rangertechnologies/ngnxt 2.1.259 → 2.1.261
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.
|
@@ -4347,14 +4347,17 @@ class DataService {
|
|
|
4347
4347
|
return result;
|
|
4348
4348
|
}
|
|
4349
4349
|
// SKS7AUG25 en numaral to hijri en numaral object
|
|
4350
|
-
formatToGregorianString(date) {
|
|
4351
|
-
const dateStr = `${date.year}-${date.month}-${date.day}`;
|
|
4352
|
-
const hijriMoment = moment(dateStr, 'iYYYY-iM-iD');
|
|
4353
|
-
if (date.time) {
|
|
4350
|
+
formatToGregorianString(date, type) {
|
|
4351
|
+
const dateStr = `${date.year}-${date.month}-${date.day || 1}`; // Use day=1 if not provided
|
|
4352
|
+
const hijriMoment = moment(dateStr, 'iYYYY-iM-iD').locale('en'); // Force English locale
|
|
4353
|
+
if (date.time && type !== 'month') {
|
|
4354
4354
|
const [hours, minutes] = date.time.split(':').map(Number);
|
|
4355
4355
|
hijriMoment.set({ hour: hours, minute: minutes });
|
|
4356
4356
|
}
|
|
4357
|
-
|
|
4357
|
+
if (type === 'month') {
|
|
4358
|
+
return hijriMoment.format('YYYY-MM'); // Gregorian year-month
|
|
4359
|
+
}
|
|
4360
|
+
return hijriMoment.toDate().toISOString(); // Full ISO Gregorian datetime
|
|
4358
4361
|
}
|
|
4359
4362
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DataService, deps: [{ token: i1$1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4360
4363
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: DataService, providedIn: 'root' });
|
|
@@ -6924,7 +6927,7 @@ class NxtInput {
|
|
|
6924
6927
|
this.languageCode = lang;
|
|
6925
6928
|
});
|
|
6926
6929
|
if (this.languageCode === 'ar') {
|
|
6927
|
-
this.displayedHijriDate = this.type === '
|
|
6930
|
+
this.displayedHijriDate = (this.type === 'datetime' || this.type === 'date' || this.type === 'month') ? this.dataService.formatToHijriString(this.value, this.type) : this.value;
|
|
6928
6931
|
}
|
|
6929
6932
|
}
|
|
6930
6933
|
ngOnDestroy() {
|
|
@@ -7071,7 +7074,7 @@ class NxtInput {
|
|
|
7071
7074
|
else if (this.type === 'month' || this.type === 'time') {
|
|
7072
7075
|
if (this.languageCode === 'ar') {
|
|
7073
7076
|
this.displayedHijriDate = event;
|
|
7074
|
-
this.value = this.type === 'month' ? this.dataService.formatToGregorianString(event) : event;
|
|
7077
|
+
this.value = this.type === 'month' ? this.dataService.formatToGregorianString(event, this.type) : event;
|
|
7075
7078
|
}
|
|
7076
7079
|
else {
|
|
7077
7080
|
const inputElement = event.target;
|
|
@@ -7099,7 +7102,7 @@ class NxtInput {
|
|
|
7099
7102
|
this.onChange(this.value);
|
|
7100
7103
|
this.onTouched();
|
|
7101
7104
|
// SKS11JUN25 Only emit the value if not in view edit mode
|
|
7102
|
-
if (!this.viewEdit
|
|
7105
|
+
if (!this.viewEdit || this.type === 'list') {
|
|
7103
7106
|
let change = {};
|
|
7104
7107
|
change['isObject'] = this.apiMeta?.isObject;
|
|
7105
7108
|
change['fromQuestionId'] = this.question?.id;
|
|
@@ -60842,7 +60845,7 @@ const VERSION = {
|
|
|
60842
60845
|
"semver": null,
|
|
60843
60846
|
"suffix": "09440148-dirty",
|
|
60844
60847
|
"semverString": null,
|
|
60845
|
-
"version": "2.1.
|
|
60848
|
+
"version": "2.1.261"
|
|
60846
60849
|
};
|
|
60847
60850
|
/* tslint:enable */
|
|
60848
60851
|
|