ng-ipa-library 1.4.3 → 1.4.6

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.
@@ -8,7 +8,9 @@ export declare class ErrorInterceptor implements HttpInterceptor {
8
8
  private toastrService;
9
9
  constructor(errorService: ErrorService, toastrService: ToastrService);
10
10
  intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
11
- isException(req: HttpRequest<any>): boolean;
11
+ private isException;
12
+ private showErrorMsg;
13
+ private show500ErrorMsg;
12
14
  private addCopyButton;
13
15
  private copyToClipboard;
14
16
  static ɵfac: i0.ɵɵFactoryDeclaration<ErrorInterceptor, never>;
@@ -1,12 +1,13 @@
1
- import { OnInit } from '@angular/core';
1
+ import { AfterContentChecked, ChangeDetectorRef, OnInit } from '@angular/core';
2
2
  import { FormControl, NgControl } from '@angular/forms';
3
- import { NgbCalendar, NgbDateStruct, NgbInputDatepicker, NgbInputDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';
3
+ import { NgbCalendar, NgbDate, NgbDateStruct, NgbInputDatepicker, NgbInputDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';
4
4
  import { IPAFormService } from '../ipa-form.service';
5
5
  import * as i0 from "@angular/core";
6
- export declare class DatepickerComponent implements OnInit {
6
+ export declare class DatepickerComponent implements OnInit, AfterContentChecked {
7
7
  private ipaFormService;
8
8
  private calendar;
9
9
  controlDir: NgControl;
10
+ private cd;
10
11
  datepicker: NgbInputDatepicker;
11
12
  id: string;
12
13
  label: string;
@@ -17,10 +18,12 @@ export declare class DatepickerComponent implements OnInit {
17
18
  classes: string;
18
19
  containerClasses: string;
19
20
  isArabicForm: boolean;
20
- today: import("@ng-bootstrap/ng-bootstrap").NgbDate;
21
+ isHijriDatepicker: boolean;
22
+ today: NgbDate;
21
23
  formControl: FormControl;
22
24
  errorMsg: string | null;
23
- constructor(ipaFormService: IPAFormService, calendar: NgbCalendar, controlDir: NgControl, config: NgbInputDatepickerConfig);
25
+ constructor(ipaFormService: IPAFormService, calendar: NgbCalendar, controlDir: NgControl, config: NgbInputDatepickerConfig, cd: ChangeDetectorRef);
26
+ ngAfterContentChecked(): void;
24
27
  ngOnInit(): void;
25
28
  onChange(event: any): void;
26
29
  onTouched(): void;
@@ -29,6 +32,6 @@ export declare class DatepickerComponent implements OnInit {
29
32
  registerOnTouched(fn: any): void;
30
33
  openDatepicker(event: any): void;
31
34
  get errorMessage(): string | null;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent, [null, null, { self: true; }, null]>;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent, [null, null, { self: true; }, null, null]>;
33
36
  static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "ipa-datepicker", never, { "id": "id"; "label": "label"; "patternErrorMsg": "patternErrorMsg"; "required": "required"; "maxDate": "maxDate"; "minDate": "minDate"; "classes": "classes"; "containerClasses": "containerClasses"; "isArabicForm": "isArabicForm"; }, {}, never, never>;
34
37
  }
@@ -1,6 +1,7 @@
1
1
  import { DatepickerComponent } from '../datepicker.component';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class GregorianDatepickerComponent extends DatepickerComponent {
4
+ isHijriDatepicker: boolean;
4
5
  static ɵfac: i0.ɵɵFactoryDeclaration<GregorianDatepickerComponent, never>;
5
6
  static ɵcmp: i0.ɵɵComponentDeclaration<GregorianDatepickerComponent, "ipa-gregorian-datepicker", never, {}, {}, never, never>;
6
7
  }
@@ -1,6 +1,7 @@
1
1
  import { DatepickerComponent } from '../datepicker.component';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class HijriDatepickerComponent extends DatepickerComponent {
4
+ isHijriDatepicker: boolean;
4
5
  static ɵfac: i0.ɵɵFactoryDeclaration<HijriDatepickerComponent, never>;
5
6
  static ɵcmp: i0.ɵɵComponentDeclaration<HijriDatepickerComponent, "ipa-hijri-datepicker", never, {}, {}, never, never>;
6
7
  }
@@ -25,6 +25,7 @@ export declare class IPAFormService {
25
25
  * check national ID or iqama ID is valid.
26
26
  */
27
27
  static checkID(control: AbstractControl): ValidationErrors | null;
28
+ static validHijriDate(control: AbstractControl): ValidationErrors | null;
28
29
  getErrorMessage(control: FormControl, patternErrorMsg: string | undefined, isArabic: boolean): string | null;
29
30
  /**
30
31
  * convert gregorian date to hijri date (Based on Umm al-Qura calculations).
@@ -41,6 +42,7 @@ export declare class IPAFormService {
41
42
  private getValidatorErrorMessage;
42
43
  private addPatternMsg;
43
44
  private getNgbDatepickerErrorMsg;
45
+ private static checkHijriDateValid;
44
46
  private static convertToEn;
45
47
  private static nationalIdValidate;
46
48
  private static iqamaIdValidate;
@@ -1,4 +1,5 @@
1
1
  export interface ApiResponse {
2
2
  statusCode: number;
3
3
  message: string;
4
+ errors?: string[];
4
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-ipa-library",
3
- "version": "1.4.3",
3
+ "version": "1.4.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "~13.2.2",
6
6
  "@angular/core": "~13.2.2"